mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-27 10:22:17 +00:00
Versioning module now does magic
Automatic creation of views/urls for anything registered with reversion, with a small amount of hackage to preserve legacy stuff. (and the DAMNED asset IDs!) I would never get distracted...
This commit is contained in:
@@ -22,11 +22,13 @@
|
||||
<a href="{% url 'profile_detail' pk=version.revision.user.pk %}" class="modal-href">
|
||||
<img class="media-object img-rounded" src="{{ version.revision.user.profile_picture}}" />
|
||||
</a>
|
||||
{% else %}
|
||||
<img class="media-object img-rounded" src="{% static 'imgs/pyrigs-avatar.png' %}" />
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="media-body">
|
||||
<h5>
|
||||
{{ version.revision.user.name }}
|
||||
{{ version.revision.user.name|default:'System' }}
|
||||
<span class="ml-3"><small>{{version.revision.date_created|naturaltime}}</small></span>
|
||||
</h5>
|
||||
{% endif %}
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
{% load paginator from filters %}
|
||||
{% load to_class_name from filters %}
|
||||
|
||||
{% block title %}{{ title }} Activity Stream{% endblock %}
|
||||
{% block title %}{{ title|title }} Activity Stream{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
{% include 'partials/version_scripts.html' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-sm-12">
|
||||
<h3>{{ title }} Activity Stream</h3>
|
||||
<div class="col-12">
|
||||
<h3>{{ title|title }} Activity Stream</h3>
|
||||
{% include 'partials/activity_table_body.html' %}
|
||||
{% paginator %}
|
||||
</div>
|
||||
|
||||
@@ -14,20 +14,14 @@
|
||||
{% for version in object_list %}
|
||||
<tr>
|
||||
<th scope="row">{{ version.revision.date_created }}</th>
|
||||
<td><a href="{{ version.changes.new.get_absolute_url }}">{{version.changes.new|to_class_name}}
|
||||
{% if version.changes.new.asset_id %}
|
||||
{{ version.changes.new.asset_id }}
|
||||
{% else %}
|
||||
{{ version.changes.new.pk|stringformat:"05d" }}
|
||||
{% endif %}
|
||||
</a></td>
|
||||
<td><a href="{{ version.changes.new.get_absolute_url }}">{{ version.changes.new.display_id|default:version.changes.new.pk }} | {{version.changes.new|to_class_name}}</td>
|
||||
<td>{{ version.pk }}|{{ version.revision.pk }}</td>
|
||||
<td>{{ version.revision.user.name|default:"System" }}</td>
|
||||
<td>
|
||||
{% if version.changes.old == None %}
|
||||
{{version.changes.new|to_class_name}} Created
|
||||
{% else %}
|
||||
{% include 'version_changes.html' %}
|
||||
{% include 'partials/version_changes.html' %}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{% load to_class_name from filters %}
|
||||
{% load paginator from filters %}
|
||||
|
||||
{% block title %}{{object|to_class_name}} {{ id }} - Revision History{% endblock %}
|
||||
{% block title %}{{object|to_class_name}} {{ object.display_id|default:object.pk }} - Revision History{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
{% include 'partials/version_scripts.html' %}
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
{% block content %}
|
||||
<div class="col-sm-12">
|
||||
<h3><a href="{{ object.get_absolute_url }}">{{object|to_class_name}} {{ id }}</a> - Revision History</h3>
|
||||
<h3><a href="{{ object.get_absolute_url }}">{{object|to_class_name}} {{ object.display_id|default:object.pk }}</a> - Revision History</h3>
|
||||
{% include 'partials/version_history_table.html' %}
|
||||
<div>{% paginator %}</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user