mirror of https://gitlab.federez.net/re2o/re2o
6 changed files with 110 additions and 166 deletions
@ -1,86 +0,0 @@ |
|||
{# Please keep this template in sync with django/contrib/admin one #} |
|||
{% extends "admin/base_site.html" %} |
|||
{% load i18n admin_urls static admin_modify %} |
|||
|
|||
{% block extrahead %}{{ block.super }} |
|||
<script type="text/javascript" src="{% url 'admin:jsi18n' %}"></script> |
|||
{{ media }} |
|||
{% endblock %} |
|||
|
|||
{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static "admin/css/forms.css" %}" />{% endblock %} |
|||
|
|||
{% block coltype %}colM{% endblock %} |
|||
|
|||
{% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} change-form{% endblock %} |
|||
|
|||
{% if not is_popup %} |
|||
{% block breadcrumbs %} |
|||
<div class="breadcrumbs"> |
|||
<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a> |
|||
› <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a> |
|||
› {% if has_change_permission %}<a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a>{% else %}{{ opts.verbose_name_plural|capfirst }}{% endif %} |
|||
› {% if add %}{% blocktrans with name=opts.verbose_name %}Add {{ name }}{% endblocktrans %}{% else %}{{ original|truncatewords:"18" }}{% endif %} |
|||
</div> |
|||
{% endblock %} |
|||
{% endif %} |
|||
|
|||
{% block content %}<div id="content-main"> |
|||
{% block object-tools %} |
|||
{% if change %}{% if not is_popup %} |
|||
<ul class="object-tools list-inline"> |
|||
{% block object-tools-items %} |
|||
<li class="btn-group"> |
|||
{% url opts|admin_urlname:'history' original.pk|admin_urlquote as history_url %} |
|||
<a href="{% add_preserved_filters history_url %}" class="historylink btn btn-default"><span class="glyphicon glyphicon-list-alt"></span> {% trans "History" %}</a> |
|||
</li> |
|||
{% if has_absolute_url %}<li class="btn-group"><a href="{{ absolute_url }}" class="viewsitelink btn btn-default"><span class="glyphicon glyphicon-new-window"></span> {% trans "View on site" %}</a></li>{% endif %} |
|||
{% endblock %} |
|||
</ul> |
|||
{% endif %}{% endif %} |
|||
{% endblock %} |
|||
<form {% if has_file_field %}enctype="multipart/form-data" {% endif %}action="{{ form_url }}" method="post" id="{{ opts.model_name }}_form" novalidate>{% csrf_token %}{% block form_top %}{% endblock %} |
|||
<div> |
|||
{% if is_popup %}<input type="hidden" name="{{ is_popup_var }}" value="1" />{% endif %} |
|||
{% if to_field %}<input type="hidden" name="{{ to_field_var }}" value="{{ to_field }}" />{% endif %} |
|||
{% if save_on_top %}{% block submit_buttons_top %}{% submit_row %}{% endblock %}{% endif %} |
|||
{% if errors %} |
|||
<p class="errornote"> |
|||
{% if errors|length == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %} |
|||
</p> |
|||
{{ adminform.form.non_field_errors }} |
|||
{% endif %} |
|||
|
|||
{% block field_sets %} |
|||
{% for fieldset in adminform %} |
|||
{% include "admin/includes/fieldset.html" %} |
|||
{% endfor %} |
|||
{% endblock %} |
|||
|
|||
{% block after_field_sets %}{% endblock %} |
|||
|
|||
{% block inline_field_sets %} |
|||
{% for inline_admin_formset in inline_admin_formsets %} |
|||
{% include inline_admin_formset.opts.template %} |
|||
{% endfor %} |
|||
{% endblock %} |
|||
|
|||
{% block after_related_objects %}{% endblock %} |
|||
|
|||
{% block submit_buttons_bottom %}{% submit_row %}{% endblock %} |
|||
|
|||
{% block admin_change_form_document_ready %} |
|||
<script type="text/javascript" |
|||
id="django-admin-form-add-constants" |
|||
src="{% static 'admin/js/change_form.js' %}" |
|||
{% if adminform and add %} |
|||
data-model-name="{{ opts.model_name }}" |
|||
{% endif %}> |
|||
</script> |
|||
{% endblock %} |
|||
|
|||
{# JavaScript for prepopulated fields #} |
|||
{% prepopulated_fields_js %} |
|||
|
|||
</div> |
|||
</form></div> |
|||
{% endblock %} |
|||
@ -1,43 +0,0 @@ |
|||
{# Please keep this template in sync with django/contrib/admin one #} |
|||
{% extends "admin/base_site.html" %} |
|||
{% load i18n admin_urls %} |
|||
|
|||
{% block breadcrumbs %} |
|||
<div class="breadcrumbs"> |
|||
<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a> |
|||
› <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a> |
|||
› <a href="{% url opts|admin_urlname:'changelist' %}">{{ module_name }}</a> |
|||
› <a href="{% url opts|admin_urlname:'change' object.pk|admin_urlquote %}">{{ object|truncatewords:"18" }}</a> |
|||
› {% trans 'History' %} |
|||
</div> |
|||
{% endblock %} |
|||
|
|||
{% block content %} |
|||
<div id="content-main"> |
|||
<div class="module"> |
|||
|
|||
{% if action_list %} |
|||
<table id="change-history" class="table table-striped table-bordered"> |
|||
<thead> |
|||
<tr> |
|||
<th scope="col">{% trans 'Date/time' %}</th> |
|||
<th scope="col">{% trans 'User' %}</th> |
|||
<th scope="col">{% trans 'Action' %}</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
{% for action in action_list %} |
|||
<tr> |
|||
<th scope="row">{{ action.action_time|date:"DATETIME_FORMAT" }}</th> |
|||
<td>{{ action.user.get_username }}{% if action.user.get_full_name %} ({{ action.user.get_full_name }}){% endif %}</td> |
|||
<td>{{ action.get_change_message }}</td> |
|||
</tr> |
|||
{% endfor %} |
|||
</tbody> |
|||
</table> |
|||
{% else %} |
|||
<p>{% trans "This object doesn't have a change history. It probably wasn't added via this admin site." %}</p> |
|||
{% endif %} |
|||
</div> |
|||
</div> |
|||
{% endblock %} |
|||
@ -0,0 +1,37 @@ |
|||
{% extends "admin/change_form.html" %} |
|||
{% comment %} |
|||
Re2o est un logiciel d'administration développé initiallement au rezometz. Il |
|||
se veut agnostique au réseau considéré, de manière à être installable en |
|||
quelques clics. |
|||
|
|||
Copyright © 2019 Alexandre Iooss |
|||
|
|||
This program is free software; you can redistribute it and/or modify |
|||
it under the terms of the GNU General Public License as published by |
|||
the Free Software Foundation; either version 2 of the License, or |
|||
(at your option) any later version. |
|||
|
|||
This program is distributed in the hope that it will be useful, |
|||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
GNU General Public License for more details. |
|||
|
|||
You should have received a copy of the GNU General Public License along |
|||
with this program; if not, write to the Free Software Foundation, Inc., |
|||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
|||
{% endcomment %} |
|||
{% load i18n admin_urls admin_modify %} |
|||
|
|||
{% block object-tools %} |
|||
{% if change %}{% if not is_popup %} |
|||
<ul class="object-tools list-inline"> |
|||
{% block object-tools-items %} |
|||
<li class="btn-group"> |
|||
{% url opts|admin_urlname:'history' original.pk|admin_urlquote as history_url %} |
|||
<a href="{% add_preserved_filters history_url %}" class="historylink btn btn-default"><span class="glyphicon glyphicon-list-alt"></span> {% trans "History" %}</a> |
|||
</li> |
|||
{% if has_absolute_url %}<li class="btn-group"><a href="{{ absolute_url }}" class="viewsitelink btn btn-default"><span class="glyphicon glyphicon-new-window"></span> {% trans "View on site" %}</a></li>{% endif %} |
|||
{% endblock %} |
|||
</ul> |
|||
{% endif %}{% endif %} |
|||
{% endblock %} |
|||
Loading…
Reference in new issue