Commit 93d94683 authored by Serge S. Koval's avatar Serge S. Koval

Fixed #223 - blocks in file admin template

parent 8f259de4
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
{% import 'admin/actions.html' as actionslib with context %} {% import 'admin/actions.html' as actionslib with context %}
{% block body %} {% block body %}
{% block breadcrums %}
<ul class="breadcrumb"> <ul class="breadcrumb">
<li> <li>
<a href="{{ get_dir_url('.index', path=None) }}">{{ _gettext('Root') }}</a> <a href="{{ get_dir_url('.index', path=None) }}">{{ _gettext('Root') }}</a>
...@@ -18,10 +19,13 @@ ...@@ -18,10 +19,13 @@
</li> </li>
{% endif %} {% endif %}
</ul> </ul>
{% endblock %}
{% block file_list_table %}
<table class="table table-striped table-bordered model-list"> <table class="table table-striped table-bordered model-list">
<thead> <thead>
<tr> <tr>
{% block list_header scoped %}
{% if actions %} {% if actions %}
<th class="span1"> <th class="span1">
<input type="checkbox" name="rowtoggle" class="action-rowtoggle" /> <input type="checkbox" name="rowtoggle" class="action-rowtoggle" />
...@@ -30,10 +34,12 @@ ...@@ -30,10 +34,12 @@
<th class="span1">&nbsp;</th> <th class="span1">&nbsp;</th>
<th>Name</th> <th>Name</th>
<th>Size</th> <th>Size</th>
{% endblock %}
</tr> </tr>
</thead> </thead>
{% for name, path, is_dir, size in items %} {% for name, path, is_dir, size in items %}
<tr> <tr>
{% block list_row scoped %}
{% if actions %} {% if actions %}
<td> <td>
{% if not is_dir %} {% if not is_dir %}
...@@ -42,6 +48,7 @@ ...@@ -42,6 +48,7 @@
</td> </td>
{% endif %} {% endif %}
<td> <td>
{% block list_row_actions scoped %}
{% if admin_view.can_rename and path and name != '..' %} {% if admin_view.can_rename and path and name != '..' %}
<a class="icon" href="{{ url_for('.rename', path=path) }}"> <a class="icon" href="{{ url_for('.rename', path=path) }}">
<i class="icon-pencil"></i> <i class="icon-pencil"></i>
...@@ -66,6 +73,7 @@ ...@@ -66,6 +73,7 @@
</form> </form>
{% endif %} {% endif %}
{%- endif -%} {%- endif -%}
{% endblock %}
</td> </td>
{% if is_dir %} {% if is_dir %}
<td colspan="2"> <td colspan="2">
...@@ -81,9 +89,12 @@ ...@@ -81,9 +89,12 @@
{{ size }} {{ size }}
</td> </td>
{% endif %} {% endif %}
{% endblock %}
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>
{% endblock %}
{% block toolbar %}
<div class="btn-toolbar"> <div class="btn-toolbar">
{% if admin_view.can_upload %} {% if admin_view.can_upload %}
<div class="btn-group"> <div class="btn-group">
...@@ -101,8 +112,10 @@ ...@@ -101,8 +112,10 @@
</div> </div>
{% endif %} {% endif %}
</div> </div>
{% endblock %}
{% block actions %}
{{ actionslib.form(actions, url_for('.action_view')) }} {{ actionslib.form(actions, url_for('.action_view')) }}
{% endblock %}
{% endblock %} {% endblock %}
{% block tail %} {% block tail %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment