1 {% extends "admin/base_site.html" %}
4 {% load i18n adminmedia fb_tags %}
9 <script type="text/javascript" src="../../jsi18n/"></script>
10 <script type="text/javascript" src="{% admin_media_prefix %}js/core.js"></script>
11 <script type="text/javascript" src="{{ settings_var.URL_FILEBROWSER_MEDIA }}js/jquery-1.3.2.min.js"></script>
12 <script type="text/javascript" src="{{ settings_var.URL_FILEBROWSER_MEDIA }}uploadify/jquery.uploadify.v2.1.0.js"></script>
13 <script type="text/javascript" src="{{ settings_var.URL_FILEBROWSER_MEDIA }}uploadify/swfobject.js"></script>
14 <script type="text/javascript" src="{% admin_media_prefix %}js/admin/CollapsedFieldsets.js"></script>
15 <script type="text/javascript">
16 $(document).ready(function() {
17 $('#id_file').uploadify({
18 'uploader' : '{{ settings_var.URL_FILEBROWSER_MEDIA }}uploadify/uploadify.swf',
19 'script' : '{% url fb_do_upload %}',
20 'scriptData' : {'session_key': '{{session_key}}'},
21 'checkScript' : '{% url fb_check %}',
22 'cancelImg' : '{{ settings_var.URL_FILEBROWSER_MEDIA }}uploadify/cancel.png',
24 'folder' : '{{ query.dir }}',
26 'fileDesc' : '{% for extension in settings_var.EXTENSIONS.items %}{% ifnotequal extension.0 'Folder' %}{% for item in extension.1 %}*{{ item|safe }};{% endfor %}{% endifnotequal %}{% endfor %}',
27 'fileExt' : '{% for extension in settings_var.EXTENSIONS.items %}{% ifnotequal extension.0 'Folder' %}{% for item in extension.1 %}*{{ item|safe }};{% endfor %}{% endifnotequal %}{% endfor %}',
28 'sizeLimit' : {{ settings_var.MAX_UPLOAD_SIZE }},
29 'scriptAccess' : 'sameDomain',
30 'queueSizeLimit' : 50,
35 browseButton: '{% trans "BROWSE" %}',
36 error: '{% trans "An Error occured" %}',
37 completed: '{% trans "Completed" %}',
38 replaceFile: '{% trans "Do you want to replace the file" %}',
39 unitKb: '{% trans "KB" %}',
40 unitMb: '{% trans "MB" %}'
43 $('input:submit').click(function(){
44 $('#id_file').uploadifyUpload();
51 <!-- COLTYPE/BODYCLASS -->
52 {% block coltype %}colM{% endblock %}
53 {% block bodyclass %}change-form{% endblock %}
56 {% block extrastyle %}
58 <link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}css/forms.css" />
59 <link rel="stylesheet" type="text/css" href="{{ settings_var.URL_FILEBROWSER_MEDIA }}css/filebrowser.css" />
60 <link rel="stylesheet" type="text/css" href="{{ settings_var.URL_FILEBROWSER_MEDIA }}uploadify/uploadify.css" />
62 <style type="text/css">
63 #header { display: none; }
69 {% block breadcrumbs %}{% include "filebrowser/include/breadcrumbs.html" %}{% endblock %}
73 <div id="content-main">
76 <fieldset class="module aligned">
77 <div class="form-row">
78 <input type="File" id="id_file" />
82 <fieldset class="module aligned collapse">
83 <h2>{% trans "Help" %}</h2>
84 <div class="form-row" >
85 {% for extension in settings_var.EXTENSIONS.items %}
86 {% ifnotequal extension.0 'Folder' %}
87 <label class="required">{% if forloop.first %}{% trans "Allowed" %}:{% else %} {% endif %}</label>
88 <p>{{ extension.0|safe }} ({{ extension.1|join:", "|safe }})</p>
92 <div class="form-row" >
93 <label class="required">{% trans "Max. Filesize" %}:</label>
94 <p>{{ settings_var.MAX_UPLOAD_SIZE|filesizeformat }}</p>
96 {% if settings_var.CONVERT_FILENAME %}
97 <div class="form-row" >
98 <label class="required"> </label>
100 {% trans "The Name will be converted to lowercase. Spaces will be replaced with underscores." %}
106 <div class="submit-row">
107 <p class="deletelink-box">
108 <a class="deletelink" href="javascript:$('#id_file').uploadifyClearQueue()">{% trans "Clear Queue" %}</a>
110 <input class="default" type="submit" name="_save" value='{% trans "Upload" %}' />