Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
$header(formurl,breadcrumbs,shortcuts)$

$if(error)$<div class="error"><p>$error$</p></div>$endif$

<div class="template_resources">

<div>
<form method="post" action="$formurl$/template">

<h2>$t.name;format="html"$</h2>

<p>
This template contains the following resources. When editing text based resources, it
may be necessary to use "shift-reload" in your browser to refresh the page.
</p> 

$if(!first(resources))$
<p>This template has no associated resources.</p>
$endif$

<table>
$resources:{r|
<tr>
	<td>
		$r.name;format="html"$
		$if(!isdefault)$$if(!r.binary)$<a href='$formurl$/resource?template=$t.name;format="url"$&amp;name=$r.name;format="url"$' class="edit">Edit</a>$endif$$endif$
	</td>
</tr>
}$
</table>

</form>
</div>

</div>

<div class="template_resources">
<form method="POST" action="$formurl$/template.file_upload" enctype="multipart/form-data">
	<p>Upload a new or replacement template file from your computer:</p>

	<input type="hidden" name="a" value="$auth$" />
	<input type="hidden" name="name" value="$t.name$" />
	<input type="file" name="file" id="file" />
	<input type="submit" value="Upload" name="upload" id="upload" />
</form>

<p>
<b>Important: </b> All resources associated with a template are cached in memory on the
server. It is recommended only small files are uploaded into a template, or alternatively
be sure to configure you the memory of this service to support containing all of the template
resources in memory.
</p>
</div>

$footer()$
New to GrepCode? Check out our FAQ X