mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-25 22:22:26 +00:00
Remove detaild_history.html file
This commit is contained in:
parent
7549cc32aa
commit
698945ec10
4 changed files with 65 additions and 126 deletions
|
@ -1,94 +0,0 @@
|
||||||
{% extends 'logs/sidebar.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 © 2020 Jean-Romain Garnier
|
|
||||||
|
|
||||||
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 bootstrap3 %}
|
|
||||||
{% load i18n %}
|
|
||||||
{% load logs_extra %}
|
|
||||||
|
|
||||||
{% block title %}{% trans "History" %}{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<h2>{% blocktrans %}History of {{ title }}{% endblocktrans %}</h2>
|
|
||||||
|
|
||||||
{% if events %}
|
|
||||||
<table class="table table-striped">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>{% trans "Date" %}</th>
|
|
||||||
<th>{% trans "Performed by" %}</th>
|
|
||||||
<th>{% trans "Edited" %}</th>
|
|
||||||
<th>{% trans "Comment" %}</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
{% for event in events %}
|
|
||||||
<tr>
|
|
||||||
<td>{{ event.date }}</td>
|
|
||||||
<td>
|
|
||||||
{% if event.performed_by %}
|
|
||||||
<a href="{% url 'users:profil' userid=event.performed_by.id %}" title=tr_view_the_profile>
|
|
||||||
{{ event.performed_by }}
|
|
||||||
</a>
|
|
||||||
{% else %}
|
|
||||||
{% trans "Unknown" %}
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{% for edit in event.edits %}
|
|
||||||
{% if edit.1 is None and edit.2 is None %}
|
|
||||||
<strong>{{ edit.0 }}</strong><br/>
|
|
||||||
{% elif edit.1 is None %}
|
|
||||||
<strong>{{ edit.0 }}:</strong>
|
|
||||||
<i class="text-success"> {{ edit.2 }}</i><br/>
|
|
||||||
{% else %}
|
|
||||||
<strong>{{ edit.0 }}:</strong>
|
|
||||||
<i class="text-danger"> {{ edit.1 }} </i>
|
|
||||||
➔ <i class="text-success">{{ edit.2 }}</i><br/>
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
</td>
|
|
||||||
<td>{{ event.comment }}</td>
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
</table>
|
|
||||||
{% include 'pagination.html' with list=events %}
|
|
||||||
{% else %}
|
|
||||||
<h3>{% trans "No event" %}</h3>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if related_history %}
|
|
||||||
|
|
||||||
<h2>{% blocktrans %}Related elements{% endblocktrans %}</h2>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
{% for related in related_history %}
|
|
||||||
<li>
|
|
||||||
<a title="{% trans "History" %}" href="{% url 'logs:history' related.app_name related.model_name related.object_id %}">{{ related.model_name }} - {{ related.name }}</a>
|
|
||||||
</li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
{% endif %}
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
|
|
||||||
{% endblock %}
|
|
|
@ -601,6 +601,6 @@ def history(request, application, object_name, object_id):
|
||||||
|
|
||||||
return render(
|
return render(
|
||||||
request,
|
request,
|
||||||
"logs/detailed_history.html",
|
"re2o/history.html",
|
||||||
{"title": title, "events": events, "related_history": history.related},
|
{"title": title, "events": events, "related_history": history.related},
|
||||||
)
|
)
|
||||||
|
|
|
@ -6,6 +6,7 @@ quelques clics.
|
||||||
Copyright © 2017 Gabriel Détraz
|
Copyright © 2017 Gabriel Détraz
|
||||||
Copyright © 2017 Lara Kermarec
|
Copyright © 2017 Lara Kermarec
|
||||||
Copyright © 2017 Augustin Lemesle
|
Copyright © 2017 Augustin Lemesle
|
||||||
|
Copyright © 2020 Jean-Romain Garnier
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -23,36 +24,67 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
{% endcomment %}
|
{% endcomment %}
|
||||||
|
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
{% load logs_extra %}
|
||||||
|
|
||||||
{% if reversions.paginator %}
|
{% if events %}
|
||||||
<ul class="pagination nav navbar-nav">
|
|
||||||
{% if reversions.has_previous %}
|
|
||||||
<li><a href="?page={{ reversions.previous_page_number }}">{% trans "Next" %}</a></li>
|
|
||||||
{% endif %}
|
|
||||||
{% for page in reversions.paginator.page_range %}
|
|
||||||
<li class="{% if reversions.number == page %}active{% endif %}"><a href="?page={{page }}">{{ page }}</a></li>
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
{% if reversions.has_next %}
|
|
||||||
<li> <a href="?page={{ reversions.next_page_number }}">{% trans "Previous" %}</a></li>
|
|
||||||
{% endif %}
|
|
||||||
</ul>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{% trans "Date" %}</th>
|
<th>{% trans "Date" %}</th>
|
||||||
<th>{% trans "Performed by" %}</th>
|
<th>{% trans "Performed by" %}</th>
|
||||||
|
<th>{% trans "Edited" %}</th>
|
||||||
<th>{% trans "Comment" %}</th>
|
<th>{% trans "Comment" %}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
{% for rev in reversions %}
|
{% for event in events %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ rev.revision.date_created }}</td>
|
<td>{{ event.date }}</td>
|
||||||
<td>{{ rev.revision.user }}</td>
|
<td>
|
||||||
<td>{{ rev.revision.comment }}</td>
|
{% if event.performed_by %}
|
||||||
|
<a href="{% url 'users:profil' userid=event.performed_by.id %}" title=tr_view_the_profile>
|
||||||
|
{{ event.performed_by }}
|
||||||
|
</a>
|
||||||
|
{% else %}
|
||||||
|
{% trans "Unknown" %}
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{% for edit in event.edits %}
|
||||||
|
{% if edit.1 is None and edit.2 is None %}
|
||||||
|
<strong>{{ edit.0 }}</strong><br/>
|
||||||
|
{% elif edit.1 is None %}
|
||||||
|
<strong>{{ edit.0 }}:</strong>
|
||||||
|
<i class="text-success"> {{ edit.2 }}</i><br/>
|
||||||
|
{% else %}
|
||||||
|
<strong>{{ edit.0 }}:</strong>
|
||||||
|
<i class="text-danger"> {{ edit.1 }} </i>
|
||||||
|
➔ <i class="text-success">{{ edit.2 }}</i><br/>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</td>
|
||||||
|
<td>{{ event.comment }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
{% include 'pagination.html' with list=events %}
|
||||||
|
{% else %}
|
||||||
|
<h3>{% trans "No event" %}</h3>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if related_history %}
|
||||||
|
|
||||||
|
<h2>{% blocktrans %}Related elements{% endblocktrans %}</h2>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
{% for related in related_history %}
|
||||||
|
<li>
|
||||||
|
<a title="{% trans "History" %}" href="{% url 'logs:history' related.app_name related.model_name related.object_id %}">{{ related.model_name }} - {{ related.name }}</a>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ quelques clics.
|
||||||
Copyright © 2017 Gabriel Détraz
|
Copyright © 2017 Gabriel Détraz
|
||||||
Copyright © 2017 Lara Kermarec
|
Copyright © 2017 Lara Kermarec
|
||||||
Copyright © 2017 Augustin Lemesle
|
Copyright © 2017 Augustin Lemesle
|
||||||
|
Copyright © 2020 Jean-Romain Garnier
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -29,8 +30,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
{% block title %}{% trans "History" %}{% endblock %}
|
{% block title %}{% trans "History" %}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h2>{% blocktrans %}History of {{ object }}{% endblocktrans %}</h2>
|
<h2>{% blocktrans %}History of {{ title }}{% endblocktrans %}</h2>
|
||||||
{% include 're2o/aff_history.html' with reversions=reversions %}
|
{% include 're2o/aff_history.html' with events=events related_history=related_history %}
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
|
|
Loading…
Reference in a new issue