PageRenderTime 103ms CodeModel.GetById 61ms app.highlight 3ms RepoModel.GetById 37ms app.codeStats 0ms

/themes/default/templates/filemanager_page.html

http://n23.googlecode.com/
HTML | 68 lines | 58 code | 6 blank | 4 comment | 0 complexity | 695d9a176b8526bda9ec5dff6557b6da MD5 | raw file
 1{% extends theme.base %}
 2
 3{% block title %}Upload File Manager - {{ config.blog_title }} {% endblock %}
 4
 5{% block scripts %}
 6<script type="text/javascript">
 7// <![CDATA[
 8function SplitFile()
 9{
10	var file = $("#upfile").val();
11	if(!file){
12		return false;
13	}
14	file = file.replace(/\\/g, "/");
15	var parts = file.split("/");
16	var filename = parts[parts.length - 1];
17
18	var bits = filename.split(".");
19	var ext = bits[bits.length - 1];
20
21	$("#filename").val(filename);
22	$("#fileext").val(ext.toLowerCase());
23	return true;
24}
25// ]]>
26</script>
27
28{% endblock %}
29
30{% block content %}
31<!-- {{{ file list -->
32<form action="/blog/filemanager" method="post">
33<table>
34	<tr>
35		<th>File Name</th>
36		<th>Size</th>
37		<th>Upload Date</th>
38		<th>Del</th>
39	</tr>
40{% for file in files %}
41	<tr>
42		<td><a href="/blog/upload/{{ file.name }}">{{ file.orig_name|escape }}</a></td>
43		<td align="right">{{ file.data|length }}</td>
44		<td>{{ file.date|timezone:8|date:"Y-m-d H:i:s" }}</td>
45		<td><input type="checkbox" name="del" value="{{ file.key.id }}" /></td>
46	</tr>
47{% endfor %}
48	<tr>
49		<td>&nbsp;</td>
50		<td>&nbsp;</td>
51		<td colspan="2" align="right">
52			<input type="submit" value="Delete Selected Files" onclick="return confirm('Do you really want to delete selected files?');" />
53		</td>
54	</tr>
55</table>
56</form>
57<!-- }}} -->
58<br />
59<strong>Upload a file</strong>
60<!-- {{{ file upload -->
61<form action="/blog/upload" method="post" enctype="multipart/form-data">
62	<input type="file" id="upfile" name="upfile" />
63	<input type="hidden" id="filename" name="filename" />
64	<input type="hidden" id="fileext" name="fileext" />
65	<input type="submit" value="Upload" onclick="return SplitFile();" />
66</form>
67<!-- }}} -->
68{% endblock %}