add saving favorite locations
[qcg-portal.git] / filex / templates / filex / source.js.html
1 {% load staticfiles filex %}
2
3 <script src="{% static 'qcg/selectize/selectize.min.js' %}"></script>
4 <script src="{% static 'filex/underscore/underscore.js' %}"></script>
5 <script src="{% static 'filex/backbone/backbone.js' %}"></script>
6 <script src="{% static 'filex/filex.js' %}"></script>
7
8 <script>
9     var filex;
10     $(function() {
11         filex = new Filex.FilexView({locations: {% locations %}});
12     });
13 </script>
14
15 <script type="text/template" id="path-bit-template">
16     <a href="#"><%= name %></a>
17 </script>
18
19 <script type="text/template" id="dir-template">
20     <td class="text-center">
21         <label for="dir-<%= cid %>" class="sr-only">Zaznacz katalog <%= name %></label>
22         <input id="dir-<%= cid %>" type="checkbox" autocomplete="off" <%= checked ? 'checked="checked"' : '' %>>
23     </td>
24     <td class="text-center"><span class="glyphicon glyphicon-folder-open" aria-hidden="true"></span></td>
25     <td><a class="link" href="#"><%= name %></a></td>
26     <td class="text-right"><%= size %></td>
27     <td><%= date %></td>
28 </script>
29
30 <script type="text/template" id="file-template">
31     <td class="text-center">
32         <label for="file-<%= cid %>" class="sr-only">Zaznacz plik <%= name %></label>
33         <input id="file-<%= cid %>" type="checkbox" autocomplete="off" <%= checked ? 'checked="checked"' : '' %>>
34     </td>
35     <td class="text-center"><span class="glyphicon glyphicon-file" aria-hidden="true"></span></td>
36     <td>
37         <a class="link" href="{% url 'filex:download' %}?<%= url_params %>"><%= name %></a>
38     </td>
39     <td class="text-right"><%= size %></td>
40     <td><%= date %></td>
41 </script>