presenting django messages with bootstrap styling
[qcg-portal.git] / qcg / templates / qcg / gridftp.html
index 7b2cd65..6aaa3fa 100644 (file)
 {% endblock %}
 
 {% block extra_js %}
-    <script src="{% static 'qcg/selectize/selectize.min.js' %}"></script>
-    <script src="{% static 'filex/underscore/underscore.js' %}"></script>
-    <script src="{% static 'filex/backbone/backbone.js' %}"></script>
-    <script src="{% static 'filex/filex.js' %}"></script>
-
-    <script>
-        var app;
-        $(function() {
-            app = new Filex.FilexView({
-                host: 'qcg.man.poznan.pl',
-                hostOptions: [
-                    {host: 'qcg.man.poznan.pl', path: '/home/plgrid/{{ request.user.username }}/reef'},
-                    {host: 'ui.grid.icm.edu.pl', path: '/icm/hydra/home/grid/{{ request.user.username }}'},
-                    {host: 'ui.plgrid.wcss.wroc.pl', path: '/home/grid/users/{{ request.user.username }}'},
-                    {host: 'ui.grid.task.gda.pl', path: '/home/plgrid/{{ request.user.username }}'},
-                    {host: 'zeus.cyfronet.pl', path: '/people/{{ request.user.username }}'}
-                ]
-            });
-        });
-    </script>
-
-    <script type="text/template" id="path-bit-template">
-        <a href="#"><%= name %></a>
-    </script>
-
-    <script type="text/template" id="dir-template">
-        <td class="text-center"><span class="glyphicon glyphicon-folder-open" aria-hidden="true"></span></td>
-        <td><a class="link" href="#"><%= name %></a></td>
-        <td class="text-right"><%= size %></td>
-        <td><%= date %></td>
-    </script>
-
-    <script type="text/template" id="file-template">
-        <td class="text-center"><span class="glyphicon glyphicon-file" aria-hidden="true"></span></td>
-        <td>
-            <a href="{% url 'filex:download' %}?<%= url_params %>" class="btn btn-default btn-xs pull-right link" title="Pobierz plik">
-                <span class="glyphicon glyphicon-cloud-download" aria-hidden="true"></span>
-            </a>
-            <%= name %>
-        </td>
-        <td class="text-right"><%= size %></td>
-        <td><%= date %></td>
-    </script>
+    {% include 'filex/source.js.html' %}
 {% endblock extra_js %}
 
 {% block container %}
     <h1 class="page-header">{% block title %}Zarządzanie plikami GridFTP{% endblock %}</h1>
 
-    <div id="filex">
-        <div class="row">
-            <div class="col-sm-3">
-                <div id="host-controls" style="margin-top: 1px">
-                    <div class="change">
-                        <label for="host-selector" class="sr-only">Wybierz host</label>
-                        <select id="host-selector"></select>
-                    </div>
-                    <button class="btn btn-default view"></button>
-                </div>
-            </div>
-
-            <div class="col-sm-7">
-                <ol class="breadcrumb path"></ol>
-            </div>
-
-            <div class="col-sm-2 text-right">
-                <div class="btn-group" data-toggle="buttons" style="margin-top: 1px">
-                    <label class="btn btn-default">
-                        <input id="show-hidden" type="checkbox" autocomplete="off"> Pokaż ukryte
-                    </label>
-                </div>
-            </div>
-        </div>
-
-        <table class="table table-hover">
-            <thead>
-                <tr>
-                    <th style="width: 40px"></th>
-                    <th>Nazwa</th>
-                    <th style="width: 120px">Rozmiar</th>
-                    <th style="width: 200px">Data</th>
-                </tr>
-            </thead>
-            <tbody></tbody>
-        </table>
-
-        <div id="no-items" class="alert alert-info" hidden>
-            <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
-            Brak elementów
-        </div>
-
-        <div id="error" class="alert alert-danger" hidden>
-            <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
-            <span class="msg"></span>
-        </div>
-
-        <div id="spinner-overlay"></div>
-    </div>
+    {% include 'filex/source.html' %}
 
 {% endblock container %}