Browse Source

Second pass on admin templates, fixed links variables. #156

Ralfp 12 years ago
parent
commit
bf14217e73

+ 1 - 1
templates/admin/admin/acl_form.html

@@ -2,7 +2,7 @@
 {% import "_forms.html" as form_theme with context %}
 {% import "_forms.html" as form_theme with context %}
 
 
 {% block action_body %}
 {% block action_body %}
-<form action="{{ url }}" method="post">
+<form action="{{ link }}" method="post">
   {{ form_theme.form_hidden_widget(form) }}
   {{ form_theme.form_hidden_widget(form) }}
   {% for fieldset in form.fieldsets %}
   {% for fieldset in form.fieldsets %}
   <table class="table table-striped">
   <table class="table table-striped">

+ 1 - 1
templates/admin/admin/form.html

@@ -2,7 +2,7 @@
 {% import "_forms.html" as form_theme with context %}
 {% import "_forms.html" as form_theme with context %}
 
 
 {% block action_body %}
 {% block action_body %}
-<form action="{{ url }}" method="post">
+<form action="{{ link }}" method="post">
   {% if tabbed %}
   {% if tabbed %}
   {{ form_theme.form_hidden_widget(form) }}
   {{ form_theme.form_hidden_widget(form) }}
   <ul class="nav nav-tabs" id="form-tabs">{% for fieldset in form.fieldsets %}
   <ul class="nav nav-tabs" id="form-tabs">{% for fieldset in form.fieldsets %}

+ 8 - 8
templates/admin/admin/list.html

@@ -12,9 +12,9 @@
       <th{{ th_class(column, sorting, sorting_method) }}>
       <th{{ th_class(column, sorting, sorting_method) }}>
       {%- if column[0] in sorting %}<a href="
       {%- if column[0] in sorting %}<a href="
       {%- if column[0] == sorting_method[0]-%}
       {%- if column[0] == sorting_method[0]-%}
-      {% if sorting_method[1] %}{{ url ~ query(sort=column[0],dir=0) }}{% else %}{{ url ~ query(sort=column[0],dir=1) }}{% endif %}
+      {% if sorting_method[1] %}{{ link ~ query(sort=column[0],dir=0) }}{% else %}{{ link ~ query(sort=column[0],dir=1) }}{% endif %}
       {%- else -%}
       {%- else -%}
-      {{ url ~ query(sort=column[0],dir=sorting[column[0]]) }}
+      {{ link ~ query(sort=column[0],dir=sorting[column[0]]) }}
       {%- endif %}">{{ column[1] }}</a>{% else %}{{ column[1] }}{% endif %}</th>{% endfor %}{% endblock %}
       {%- endif %}">{{ column[1] }}</a>{% else %}{{ column[1] }}{% endif %}</th>{% endfor %}{% endblock %}
       {% if not action.hide_actions%}<th>{% trans %}Actions{% endtrans %}</th>{% endif -%}
       {% if not action.hide_actions%}<th>{% trans %}Actions{% endtrans %}</th>{% endif -%}
       {% if list_form %}<th class="check-cell"><label class="checkbox"><input type="checkbox" class="checkbox-master"></label></th>{% endif -%}
       {% if list_form %}<th class="check-cell"><label class="checkbox"><input type="checkbox" class="checkbox-master"></label></th>{% endif -%}
@@ -30,12 +30,12 @@
       	<ul class="list-actions">
       	<ul class="list-actions">
       	  {% for action in item_actions %}
       	  {% for action in item_actions %}
       	  <li>{% if action.post -%}
       	  <li>{% if action.post -%}
-      	  <form action="{{ action.url }}" method="post"{% if action.prompt %} class="confirm" data-jsconfirm="{{ action.prompt }}"{% endif %}>
+      	  <form action="{{ action.link }}" method="post"{% if action.prompt %} class="confirm" data-jsconfirm="{{ action.prompt }}"{% endif %}>
             <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
             <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
       	    <button type="submit" class="tooltip-top" title="{{ action.name }}"><i class="icon-{{ action.icon }}"></i></button>
       	    <button type="submit" class="tooltip-top" title="{{ action.name }}"><i class="icon-{{ action.icon }}"></i></button>
       	  </form>
       	  </form>
       	  {%- else -%}
       	  {%- else -%}
-      	  <a href="{{ action.url }}" class="tooltip-top{% if action.prompt %} confirm{% endif %}"{% if action.prompt %} data-jsconfirm="{{ action.prompt }}"{% endif %} title="{{ action.name }}"><i class="icon-{{ action.icon }}"></i></a>
+      	  <a href="{{ action.link }}" class="tooltip-top{% if action.prompt %} confirm{% endif %}"{% if action.prompt %} data-jsconfirm="{{ action.prompt }}"{% endif %} title="{{ action.name }}"><i class="icon-{{ action.icon }}"></i></a>
       	  {%- endif %}</li>
       	  {%- endif %}</li>
       	  {% endfor %}
       	  {% endfor %}
       	</ul>
       	</ul>
@@ -49,7 +49,7 @@
 </table>
 </table>
 <div class="form-actions table-footer">
 <div class="form-actions table-footer">
   {% if table_form %}
   {% if table_form %}
-  <form id="table_form" class="form-inline table-actions-right pull-left" action="{{ url }}" method="POST">
+  <form id="table_form" class="form-inline table-actions-right pull-left" action="{{ link }}" method="POST">
     <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
     <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
     <input type="hidden" name="origin" value="table">
     <input type="hidden" name="origin" value="table">
     <button type="submit" class="btn btn-primary">{{ action.table_form_button }}</button>
     <button type="submit" class="btn btn-primary">{{ action.table_form_button }}</button>
@@ -68,7 +68,7 @@
 Showing {{ shown }} of {{ total }} items
 Showing {{ shown }} of {{ total }} items
 {%- endtrans %}</div>{% endif %}
 {%- endtrans %}</div>{% endif %}
   {% if list_form -%}
   {% if list_form -%}
-  <form id="list_form" class="form-inline pull-right" action="{{ url }}" method="POST">
+  <form id="list_form" class="form-inline pull-right" action="{{ link }}" method="POST">
     <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
     <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
     <input type="hidden" name="origin" value="list">
     <input type="hidden" name="origin" value="list">
     {{ form_theme.input_select(list_form.fields['list_action'],width=3) }}
     {{ form_theme.input_select(list_form.fields['list_action'],width=3) }}
@@ -86,7 +86,7 @@ Showing {{ shown }} of {{ total }} items
   </div>
   </div>
   <div class="span3 side-search">
   <div class="span3 side-search">
   	<h4>{% if search_form.fieldsets[0].legend %}{{ search_form.fieldsets[0].legend }}{% else %}{% trans %}Search Items{% endtrans %}{% endif %}</h4>
   	<h4>{% if search_form.fieldsets[0].legend %}{{ search_form.fieldsets[0].legend }}{% else %}{% trans %}Search Items{% endtrans %}{% endif %}</h4>
-    <form id="search_form" action="{{ url }}" method="post">
+    <form id="search_form" action="{{ link }}" method="post">
       <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
       <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
       <input type="hidden" name="origin" value="search">
       <input type="hidden" name="origin" value="search">
       {% for field in search_form.fieldsets[0].fields %}
       {% for field in search_form.fieldsets[0].fields %}
@@ -101,7 +101,7 @@ Showing {{ shown }} of {{ total }} items
     </div>
     </div>
   </div>
   </div>
 </div>{% if action.is_filtering %}
 </div>{% if action.is_filtering %}
-<form id="search_clear" class="form-inline" action="{{ url }}" method="post">
+<form id="search_clear" class="form-inline" action="{{ link }}" method="post">
   <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
   <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
   <input type="hidden" name="origin" value="clear">
   <input type="hidden" name="origin" value="clear">
 </form>{% endif %}{% endif -%}
 </form>{% endif %}{% endif -%}

+ 1 - 1
templates/admin/prune/apply.html

@@ -1,7 +1,7 @@
 {% extends "admin/admin/layout.html" %}
 {% extends "admin/admin/layout.html" %}
 
 
 {% block action_body %}
 {% block action_body %}
-<form action="{{ url }}" method="post">
+<form action="{{ link }}" method="post">
   <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
   <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
   <p class="lead">
   <p class="lead">
   	{% trans %}Users to be deleted{% endtrans %}: <strong>{{ total_users|intcomma }}</strong>
   	{% trans %}Users to be deleted{% endtrans %}: <strong>{{ total_users|intcomma }}</strong>