summaryrefslogtreecommitdiffstats
path: root/python/fatcat_web/templates/editgroup_view.html
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-06-12 19:36:10 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-06-12 19:38:00 -0700
commitef7fafdcb664f9c419069b41d743f69382571f98 (patch)
tree37e0f8ab5e59c5c91a05036a49c40630565aaee0 /python/fatcat_web/templates/editgroup_view.html
parent13f2faaeb3f01478eba32ba22972a2a8ec07df51 (diff)
downloadfatcat-ef7fafdcb664f9c419069b41d743f69382571f98.tar.gz
fatcat-ef7fafdcb664f9c419069b41d743f69382571f98.zip
continue large refactors of entity views
- container views generic - editgroup edit deletion and re-editing - /editgroup/entity/ident views
Diffstat (limited to 'python/fatcat_web/templates/editgroup_view.html')
-rw-r--r--python/fatcat_web/templates/editgroup_view.html24
1 files changed, 16 insertions, 8 deletions
diff --git a/python/fatcat_web/templates/editgroup_view.html b/python/fatcat_web/templates/editgroup_view.html
index 8b454bb2..52b55d43 100644
--- a/python/fatcat_web/templates/editgroup_view.html
+++ b/python/fatcat_web/templates/editgroup_view.html
@@ -3,7 +3,7 @@
{% block body %}
-{% macro edit_list(edits, entity_type, entity_name) -%}
+{% macro edit_list(auth_to, editgroup, edits, entity_type, entity_name) -%}
<div class="{% if edits %}active{% endif %} title">
<h3><i class="dropdown icon"></i>{{ entity_name }} Edits ({{ edits|count }})</h3>
</div><div class="{% if edits %}active{% endif %} content" style="padding-bottom: 0.5em;">
@@ -22,6 +22,14 @@
{% else %}
updated
{% endif %}
+ <a href="/editgroup/{{ editgroup.editgroup_id }}/{{ entity_type }}/{{ edit.ident }}">[view edit]</a>
+ {% if auth_to.edit and not editgroup.changelog_index and not editgroup.submitted %}
+ <a href="/editgroup/{{ editgroup.editgroup_id }}/{{ entity_type }}/{{ edit.ident }}/edit" style="color: green;">[re-edit]</a>
+ <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-edit]" style="background:none; color: red; border: none; padding:9;font-weight:bold;cursor:pointer;"></input>
+ </form>
+ {% endif %}
</div>
{% if edit.revision %}
Revision: <small><code>{{ edit.revision }}</code></small>
@@ -99,13 +107,13 @@ reviewable bundle.
<br><br clear="all">
<div class="ui styled fluid accordion">
- {{ edit_list(editgroup.edits.releases, "release", "Release") }}
- {{ edit_list(editgroup.edits.works, "work", "Work") }}
- {{ edit_list(editgroup.edits.containers, "container", "Container") }}
- {{ edit_list(editgroup.edits.creators, "creator", "Creator") }}
- {{ edit_list(editgroup.edits.files, "file", "File") }}
- {{ edit_list(editgroup.edits.filesets, "fileset", "File Set") }}
- {{ edit_list(editgroup.edits.webcaptures, "webcapture", "Web Capture") }}
+ {{ edit_list(auth_to, editgroup, editgroup.edits.releases, "release", "Release") }}
+ {{ edit_list(auth_to, editgroup, editgroup.edits.works, "work", "Work") }}
+ {{ edit_list(auth_to, editgroup, editgroup.edits.containers, "container", "Container") }}
+ {{ edit_list(auth_to, editgroup, editgroup.edits.creators, "creator", "Creator") }}
+ {{ edit_list(auth_to, editgroup, editgroup.edits.files, "file", "File") }}
+ {{ edit_list(auth_to, editgroup, editgroup.edits.filesets, "fileset", "File Set") }}
+ {{ edit_list(auth_to, editgroup, editgroup.edits.webcaptures, "webcapture", "Web Capture") }}
</div>
<br>