aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_web/templates/editgroup_view.html
blob: 2341f06a441a0b7943b2f5a69084894b0daca048 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
{% extends "base.html" %}
{% block body %}

{% macro edit_list(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;">
  <div class="ui divided list">
    {% for edit in edits %}
    <div class="item">
      <div class="content">
        <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>{{ edit.revision }}</code></small>
        {% endif %}
        {% if edit.extra %}
        {% endif %}
      </div>
    </div>
    {% endfor %}
  </div>
</div>
{%- endmacro %}

{# extended by changelog_entry #}
{% block editgroupheader %}
<h1 class="ui header">Edit Group
<div class="sub header"><code>editgroup {{ editgroup.editgroup_id }}</code></div></h1>
{% endblock %}

<b>Editor:</b> <a href="/editor/{{editgroup.editor_id}}">{{ editgroup.editor.username }}</a>
<br><b>Description:</b> {{ editgroup.description }}
<br><br>

<div class="ui styled fluid accordion">
  {{ edit_list(editgroup.edits.works, "work", "Work") }}
  {{ edit_list(editgroup.edits.releases, "release", "Release") }}
  {{ 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") }}
</div>


<br>
<p><b>What is an editgroup?</b>
An editgroup is a set of entity edits, bundled together into a coherent,
reviewable bundle.

{% endblock %}

{% block postscript %}
<script>
$('.ui.accordion')
  .accordion({ exclusive: false });
</script>
{% endblock %}