summaryrefslogtreecommitdiffstats
path: root/python/fatcat_web/templates/editgroup_view.html
diff options
context:
space:
mode:
Diffstat (limited to 'python/fatcat_web/templates/editgroup_view.html')
-rw-r--r--python/fatcat_web/templates/editgroup_view.html71
1 files changed, 39 insertions, 32 deletions
diff --git a/python/fatcat_web/templates/editgroup_view.html b/python/fatcat_web/templates/editgroup_view.html
index e1af719d..0142a46b 100644
--- a/python/fatcat_web/templates/editgroup_view.html
+++ b/python/fatcat_web/templates/editgroup_view.html
@@ -1,9 +1,35 @@
{% extends "base.html" %}
{% import "entity_macros.html" as entity_macros %}
-{% block title %}Editgroup{% endblock %}
-
-{% block body %}
+{% macro entity_edit_header(auth_to, editgroup, edit, entity_type, entity_name) -%}
+ <div style="float: right; font-weight: bold;">
+ <a href="/editgroup/{{ editgroup.editgroup_id }}/{{ entity_type }}/{{ edit.ident }}">[view]</a>
+ <a href="/editgroup/{{ editgroup.editgroup_id }}/diff#{{ entity_type }}_{{ edit.ident }}">[diff]</a>
+ {% if auth_to.edit and not editgroup.changelog_index and not editgroup.submitted %}
+ <br><a href="/editgroup/{{ editgroup.editgroup_id }}/{{ entity_type }}/{{ edit.ident }}/edit" style="color: green;">[re-edit]</a>
+ <br>
+ <form id="submit_edit_delete" method="POST" action="/editgroup/{{ editgroup.editgroup_id }}/{{ entity_type }}/edit/{{ edit.edit_id }}/delete" style="display:inline;">
+ <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
+ <input type="submit" value="[delete]" style="background:none; color: red; border: none; font-weight:bold; cursor:pointer; padding: 0;"></input>
+ </form>
+ {% endif %}
+ </div>
+ <div class="header">
+ <a href="/{{ entity_type }}/{{ edit.ident }}">{{ entity_type }}_{{ edit.ident }}</a>
+ {% if edit.redirect_ident %}
+ =&gt; redirect to <a href="/{{ entity_type }}/{{ edit.redirect_ident }}">{{ entity_type }}/{{ edit.redirect_ident }}</a>
+ {% elif not edit.revision %}
+ deleted
+ {% elif not edit.prev_revision %}
+ created
+ {% else %}
+ updated
+ {% endif %}
+ </div>
+ {% if edit.revision %}
+ Revision: <small><code><a href="/{{ entity_type }}/rev/{{ edit.revision }}">{{ edit.revision }}</a></code></small>
+ {% endif %}
+{%- endmacro %}
{% macro edit_list(auth_to, editgroup, edits, entity_type, entity_name) -%}
<div class="{% if edits %}active{% endif %} title">
@@ -11,34 +37,9 @@
</div><div class="{% if edits %}active{% endif %} content" style="padding-bottom: 0.5em;">
<div class="ui divided list">
{% for edit in edits %}
- <div class="item">
+ <div class="item" id="{{ entity_type }}_{{ edit.ident }}">
<div class="content" style="padding-bottom: 0.5em;">
- <div style="float: right; font-weight: bold;">
- <a href="/editgroup/{{ editgroup.editgroup_id }}/{{ entity_type }}/{{ edit.ident }}">[view]</a>
- {% if auth_to.edit and not editgroup.changelog_index and not editgroup.submitted %}
- <br><a href="/editgroup/{{ editgroup.editgroup_id }}/{{ entity_type }}/{{ edit.ident }}/edit" style="color: green;">[re-edit]</a>
- <br>
- <form id="submit_edit_delete" method="POST" action="/editgroup/{{ editgroup.editgroup_id }}/{{ entity_type }}/edit/{{ edit.edit_id }}/delete" style="display:inline;">
- <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
- <input type="submit" value="[delete]" style="background:none; color: red; border: none; font-weight:bold; cursor:pointer; padding: 0;"></input>
- </form>
- {% endif %}
- </div>
- <div class="header">
- <a href="/{{ entity_type }}/{{ edit.ident }}">{{ entity_type }}_{{ edit.ident }}</a>
- {% if edit.redirect_ident %}
- =&gt; redirect to <a href="/{{ entity_type }}/{{ edit.redirect_ident }}">{{ entity_type }}/{{ edit.redirect_ident }}</a>
- {% elif not edit.revision %}
- deleted
- {% elif not edit.prev_revision %}
- created
- {% else %}
- updated
- {% endif %}
- </div>
- {% if edit.revision %}
- Revision: <small><code><a href="/{{ entity_type }}/rev/{{ edit.revision }}">{{ edit.revision }}</a></code></small>
- {% endif %}
+ {{ entity_edit_header(auth_to, editgroup, edit, entity_type, entity_name) }}
{% if edit.extra %}
{{ entity_macros.extra_metadata(edit.extra) }}
{% endif %}
@@ -49,14 +50,16 @@
</div>
{%- endmacro %}
+{% block title %}Editgroup{% endblock %}
+
+{% block body %}
{# extended by changelog_entry #}
{% block editgroupheader %}
-<h1 class="ui header">Editgroup
+<h1 class="ui header">{% block pagetitle %}Editgroup{% endblock %}
<span class="sub header"><code>editgroup_{{ editgroup.editgroup_id }}</code></span></h1>
{% if not auth_to.submit %}
-<br clear="all">
<div class="ui info small message">
<div class="header">
What is an editgroup?
@@ -170,6 +173,7 @@
{{ entity_macros.extra_metadata(editgroup.extra) }}
{% endif %}
+{% block editgroupedits %}
<h3 class="ui header">All Entity Changes</h3>
<div class="ui styled fluid accordion">
{{ edit_list(auth_to, editgroup, editgroup.edits.releases, "release", "Release") }}
@@ -183,8 +187,10 @@
<div style="float: right; font-size: smaller;">
<a href="{{ config.FATCAT_PUBLIC_API_HOST }}/editgroup/{{ editgroup.editgroup_id }}">As JSON via API</a>
</div>
+{% endblock %}
<br>
+{% block editgroupannotations %}
<h3 class="ui header">Comments and Annotations</h3>
{% for annotation in editgroup.annotations|reverse %}
<div class="ui segments">
@@ -241,6 +247,7 @@
</form><br>
</div>
{% endif %}
+{% endblock %}
{% endblock %}