checkboxes for selecting multiple files
[qcg-portal.git] / filex / templates / filex / source.js.html
1 {% load staticfiles %}
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({
12             host: 'qcg.man.poznan.pl',
13             hostOptions: [
14                 {host: 'qcg.man.poznan.pl', path: '/home/plgrid/{{ request.user.username }}/reef'},
15                 {host: 'ui.grid.icm.edu.pl', path: '/icm/hydra/home/grid/{{ request.user.username }}'},
16                 {host: 'ui.plgrid.wcss.wroc.pl', path: '/home/grid/users/{{ request.user.username }}'},
17                 {host: 'ui.grid.task.gda.pl', path: '/home/plgrid/{{ request.user.username }}'},
18                 {host: 'zeus.cyfronet.pl', path: '/people/{{ request.user.username }}'}
19             ]
20         });
21     });
22 </script>
23
24 <script type="text/template" id="path-bit-template">
25     <a href="#"><%= name %></a>
26 </script>
27
28 <script type="text/template" id="dir-template">
29     <td class="text-center">
30         <label for="dir-<%= cid %>" class="sr-only">Zaznacz katalog <%= name %></label>
31         <input id="dir-<%= cid %>" type="checkbox" autocomplete="off" <%= checked ? 'checked="checked"' : '' %>>
32     </td>
33     <td class="text-center"><span class="glyphicon glyphicon-folder-open" aria-hidden="true"></span></td>
34     <td><a class="link" href="#"><%= name %></a></td>
35     <td class="text-right"><%= size %></td>
36     <td><%= date %></td>
37 </script>
38
39 <script type="text/template" id="file-template">
40     <td class="text-center">
41         <label for="file-<%= cid %>" class="sr-only">Zaznacz plik <%= name %></label>
42         <input id="file-<%= cid %>" type="checkbox" autocomplete="off" <%= checked ? 'checked="checked"' : '' %>>
43     </td>
44     <td class="text-center"><span class="glyphicon glyphicon-file" aria-hidden="true"></span></td>
45     <td>
46         <a href="{% url 'filex:download' %}?<%= url_params %>"
47            class="btn btn-default btn-xs pull-right" title="Pobierz plik">
48             <span class="glyphicon glyphicon-download-alt" aria-hidden="true"></span>
49         </a>
50         <a class="link" href="#"><%= name %></a>
51     </td>
52     <td class="text-right"><%= size %></td>
53     <td><%= date %></td>
54 </script>