mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-28 15:42:25 +00:00
Overwrite admin templates (3)
This commit is contained in:
parent
9879f940a3
commit
5409f34206
3 changed files with 63 additions and 0 deletions
13
templates/admin/pagination.html
Normal file
13
templates/admin/pagination.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
{# Please keep this template in sync with django/contrib/admin one #}
|
||||
{% load admin_list %}
|
||||
{% load i18n %}
|
||||
<ul class="paginator pagination">
|
||||
{% if pagination_required %}
|
||||
{% for i in page_range %}
|
||||
{% paginator_number cl i %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
<li>{{ cl.result_count }} {% if cl.result_count == 1 %}{{ cl.opts.verbose_name }}{% else %}{{ cl.opts.verbose_name_plural }}{% endif %}</li>
|
||||
{% if show_all_url %}<li><a href="{{ show_all_url }}" class="showall">{% trans 'Show all' %}</a></li>{% endif %}
|
||||
{% if cl.formset and cl.result_count %}<li><input type="submit" name="_save" class="default" value="{% trans 'Save' %}"/></li>{% endif %}
|
||||
</ul>
|
30
templates/admin/related_widget_wrapper.html
Normal file
30
templates/admin/related_widget_wrapper.html
Normal file
|
@ -0,0 +1,30 @@
|
|||
{# Please keep this template in sync with django/contrib/admin one #}
|
||||
{% load i18n static %}
|
||||
<div class="related-widget-wrapper input-group">
|
||||
{{ widget }}
|
||||
{% block links %}
|
||||
{% spaceless %}
|
||||
{% if can_change_related %}
|
||||
<a class="related-widget-wrapper-link change-related input-group-addon" id="change_id_{{ name }}"
|
||||
data-href-template="{{ change_related_template_url }}?{{ url_params }}"
|
||||
title="{% blocktrans %}Change selected {{ model }}{% endblocktrans %}">
|
||||
<span class="glyphicon glyphicon-pencil"></span>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if can_add_related %}
|
||||
<a class="related-widget-wrapper-link add-related input-group-addon" id="add_id_{{ name }}"
|
||||
href="{{ add_related_url }}?{{ url_params }}"
|
||||
title="{% blocktrans %}Add another {{ model }}{% endblocktrans %}">
|
||||
<span class="glyphicon glyphicon-plus"></span>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if can_delete_related %}
|
||||
<a class="related-widget-wrapper-link delete-related input-group-addon" id="delete_id_{{ name }}"
|
||||
data-href-template="{{ delete_related_template_url }}?{{ url_params }}"
|
||||
title="{% blocktrans %}Delete selected {{ model }}{% endblocktrans %}">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endspaceless %}
|
||||
{% endblock %}
|
||||
</div>
|
20
templates/admin/search_form.html
Normal file
20
templates/admin/search_form.html
Normal file
|
@ -0,0 +1,20 @@
|
|||
{# Please keep this template in sync with django/contrib/admin one #}
|
||||
{% load i18n static %}
|
||||
{% if cl.search_fields %}
|
||||
<div id="toolbar"><form id="changelist-search" method="get">
|
||||
<div class="input-group input-group-sm"><!-- DIV needed for valid HTML -->
|
||||
<input type="text" class="form-control popover-dismiss" name="{{ search_var }}" value="{{ cl.query }}" id="searchbar" placeholder='{% trans 'Search' %} "{{ cl.opts.verbose_name_plural|capfirst }}"' autofocus />
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-default" title="{% trans 'Search' %}">
|
||||
<span class="glyphicon glyphicon-search"></span>
|
||||
</button>
|
||||
</span>
|
||||
{% if show_result_count %}
|
||||
<span class="small quiet">{% blocktrans count counter=cl.result_count %}{{ counter }} result{% plural %}{{ counter }} results{% endblocktrans %} (<a href="?{% if cl.is_popup %}_popup=1{% endif %}">{% if cl.show_full_result_count %}{% blocktrans with full_result_count=cl.full_result_count %}{{ full_result_count }} total{% endblocktrans %}{% else %}{% trans "Show all" %}{% endif %}</a>)</span>
|
||||
{% endif %}
|
||||
{% for pair in cl.params.items %}
|
||||
{% if pair.0 != search_var %}<input type="hidden" name="{{ pair.0 }}" value="{{ pair.1 }}"/>{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</form></div>
|
||||
{% endif %}
|
Loading…
Reference in a new issue