diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2018-06-30 20:30:51 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2018-06-30 20:31:00 -0700 |
commit | eb9c5b9a8d0b55e0ddaec864a1810f5f5d963a3e (patch) | |
tree | 6154a519565d2b94fae54f32d9ea20088be4785c /python/fatcat/templates | |
parent | 9f40f6131cb08f14a8a5b4211af9c71ee474f3e6 (diff) | |
download | fatcat-eb9c5b9a8d0b55e0ddaec864a1810f5f5d963a3e.tar.gz fatcat-eb9c5b9a8d0b55e0ddaec864a1810f5f5d963a3e.zip |
more fatcat-web views (changelog, history, etc)
Diffstat (limited to 'python/fatcat/templates')
-rw-r--r-- | python/fatcat/templates/changelog.html | 23 | ||||
-rw-r--r-- | python/fatcat/templates/changelog_view.html | 13 | ||||
-rw-r--r-- | python/fatcat/templates/container_create.html (renamed from python/fatcat/templates/container_add.html) | 0 | ||||
-rw-r--r-- | python/fatcat/templates/editgroup_view.html | 50 | ||||
-rw-r--r-- | python/fatcat/templates/editor_changelog.html | 10 | ||||
-rw-r--r-- | python/fatcat/templates/editor_view.html | 6 | ||||
-rw-r--r-- | python/fatcat/templates/entity_edit.html | 8 | ||||
-rw-r--r-- | python/fatcat/templates/entity_history.html | 30 | ||||
-rw-r--r-- | python/fatcat/templates/home.html | 6 | ||||
-rw-r--r-- | python/fatcat/templates/release_create.html (renamed from python/fatcat/templates/work_add.html) | 0 |
10 files changed, 116 insertions, 30 deletions
diff --git a/python/fatcat/templates/changelog.html b/python/fatcat/templates/changelog.html new file mode 100644 index 00000000..ee50a7d2 --- /dev/null +++ b/python/fatcat/templates/changelog.html @@ -0,0 +1,23 @@ +{% extends "base.html" %} +{% block body %} + +<h1 class="ui header">Recent Changes +<div class="sub header"><code>changelog</code></div></h1> + +<table class="ui table"> + <thead><tr><th>Changelog<br>Index + <th>Timestamp (UTC) + <th>Editgroup + <th>Editor + <th>Description + <tbody> + {% for entry in entries %} + <tr><td><a href="/changelog/{{ entry.index }}">{{ entry.index }}</a> + <td>{{ entry.timestamp }} + <td><a href="/editgroup/{{ entry.editgroup_id }}">{{ entry.editgroup_id }}</a> + <td><a href="/editor/{{ entry.editgroup.editor_id }}">{{ entry.editgroup.editor_id }}</a> + <td>{% if entry.editgroup.description != None %}{{ entry.editgroup.description }}{% endif %} + {% endfor %} +</table> + +{% endblock %} diff --git a/python/fatcat/templates/changelog_view.html b/python/fatcat/templates/changelog_view.html new file mode 100644 index 00000000..22aff9bc --- /dev/null +++ b/python/fatcat/templates/changelog_view.html @@ -0,0 +1,13 @@ +{% extends "editgroup_view.html" %} +{% block editgroupheader %} + +<h1 class="ui header">Changelog Entry +<div class="sub header"> + <code>changelog {{ entry.index }}</code> +</div> +</h1> + +<br><b>Timestamp:</b> {{ entry.timestamp }} +<br><b>Editgroup:</b> <a href="/editgroup/{{editgroup.id}}">{{ editgroup.id }}</a> + +{% endblock %} diff --git a/python/fatcat/templates/container_add.html b/python/fatcat/templates/container_create.html index 15288142..15288142 100644 --- a/python/fatcat/templates/container_add.html +++ b/python/fatcat/templates/container_create.html diff --git a/python/fatcat/templates/editgroup_view.html b/python/fatcat/templates/editgroup_view.html index 06fef424..ac3228b0 100644 --- a/python/fatcat/templates/editgroup_view.html +++ b/python/fatcat/templates/editgroup_view.html @@ -1,49 +1,53 @@ {% extends "base.html" %} {% block body %} -<h1>Edit Group: #{{ editgroup.id}}</h1> +{# extended by changelog_entry #} +{% block editgroupheader %} +<h1 class="ui header">Edit Group +<div class="sub header"><code>editgroup {{ editgroup.id }}</code></div></h1> +{% endblock %} {# TODO: <p>Editor: <a href="/editor/{{ editgroup.editor.username }}">{{ editgroup.editor.username }}</a> #} -<p>Editor: {{ editgroup.editor_id }} -<p>Description: {{ editgroup.description }} +<br><b>Editor:</b> <a href="/editor/{{editgroup.editor_id}}">{{ editgroup.editor_id }}</a> +<br><b>Description:</b> {{ editgroup.description }} -<h3>Work Edits ({{ editgroup.work_edits|count }})</h3> +<h3>Work Edits ({{ editgroup.edits.works|count }})</h3> <ul> -{% for edit in editgroup.work_edits %} - <li><a href="/work/edit/{{ edit.id }}">Edit #{{ edit.id }}</a>: - <a href="/work/{{ edit.ident }}">{{ edit.ident }}</a> to rev {{ edit.rev }} +{% for edit in editgroup.edits.works %} + <li>Work edit #<a href="/work/edit/{{ edit.edit_id }}">{{ edit.edit_id }}</a>: + <a href="/work/{{ edit.ident }}">{{ edit.ident }}</a> to rev {{ edit.revision }} {% endfor %} </ul> -<h3>Release Edits ({{ editgroup.release_edits|count }})</h3> +<h3>Release Edits ({{ editgroup.edits.releases|count }})</h3> <ul> -{% for edit in editgroup.release_edits %} - <li><a href="/release/edit/{{ edit.id }}">Edit #{{ edit.id }}</a> - <a href="/release/{{ edit.ident }}">{{ edit.ident }}</a> to rev {{ edit.rev }} +{% for edit in editgroup.edits.releases %} + <li>Release edit #<a href="/release/edit/{{ edit.edit_id }}">{{ edit.edit_id }}</a>: + <a href="/release/{{ edit.ident }}">{{ edit.ident }}</a> to rev {{ edit.revision }} {% endfor %} </ul> -<h3>Container Edits ({{ editgroup.container_edits|count }})</h3> +<h3>Container Edits ({{ editgroup.edits.containers|count }})</h3> <ul> -{% for edit in editgroup.container_edits %} - <li><a href="/container/edit/{{ edit.id }}">Edit #{{ edit.id }}</a> - <a href="/container/{{ edit.ident }}">{{ edit.ident }}</a> to rev {{ edit.rev }} +{% for edit in editgroup.edits.containers %} + <li>Container edit #<a href="/container/edit/{{ edit.edit_id }}">{{ edit.edit_id }}</a>: + <a href="/container/{{ edit.ident }}">{{ edit.ident }}</a> to rev {{ edit.revision }} {% endfor %} </ul> -<h3>Creator Edits ({{ editgroup.creator_edits|count }})</h3> +<h3>Creator Edits ({{ editgroup.edits.creators|count }})</h3> <ul> -{% for edit in editgroup.creator_edits %} - <li><a href="/creator/edit/{{ edit.id }}">Edit #{{ edit.id }}</a> - <a href="/creator/{{ edit.ident }}">{{ edit.ident }}</a> to rev {{ edit.rev }} +{% for edit in editgroup.edits.creators %} + <li>Creator edit #<a href="/creator/edit/{{ edit.edit_id }}">{{ edit.edit_id }}</a>: + <a href="/creator/{{ edit.ident }}">{{ edit.ident }}</a> to rev {{ edit.revision }} {% endfor %} </ul> -<h3>File Edits ({{ editgroup.file_edits|count }})</h3> +<h3>File Edits ({{ editgroup.edits.files|count }})</h3> <ul> -{% for edit in editgroup.file_edits %} - <li><a href="/file/edit/{{ edit.id }}">Edit #{{ edit.id }}</a> - <a href="/file/{{ edit.ident }}">{{ edit.ident }}</a> to rev {{ edit.rev }} +{% for edit in editgroup.edits.files %} + <li>File edit #<a href="/file/edit/{{ edit.edit_id }}">{{ edit.edit_id }}</a>: + <a href="/file/{{ edit.ident }}">{{ edit.ident }}</a> to rev {{ edit.revision }} {% endfor %} </ul> diff --git a/python/fatcat/templates/editor_changelog.html b/python/fatcat/templates/editor_changelog.html index e1410874..543d6bac 100644 --- a/python/fatcat/templates/editor_changelog.html +++ b/python/fatcat/templates/editor_changelog.html @@ -1,9 +1,13 @@ {% extends "base.html" %} {% block body %} -<h1>Editor Changelog: {{ editor.username }}</h1> - -<p>Editor: <a href="/editor/{{ editor.username }}">{{ editor.username }}</a> +<h1 class="ui header">Editor Changelog: {{ editor.username }} +<div class="sub header"> + <a href="/editor/{{editor.id}}"> + <code>editor {{ editor.id }}</code> + </a> +</div> +</h1> <p>Changes accepted (aka, merged editgroups): <ul> diff --git a/python/fatcat/templates/editor_view.html b/python/fatcat/templates/editor_view.html index e0625c42..f58b85b5 100644 --- a/python/fatcat/templates/editor_view.html +++ b/python/fatcat/templates/editor_view.html @@ -1,7 +1,11 @@ {% extends "base.html" %} {% block body %} -<h1>Editor: {{ editor.username }}</h1> +<h1 class="ui header">{{ editor.username }} +<div class="sub header"> + <code>editor {{ editor.id }}</code> +</div> +</h1> <p>Is Admin? {{ editor.is_admin }} <p><a href="/editor/{{ editor.username }}/changelog">Changelog</a> diff --git a/python/fatcat/templates/entity_edit.html b/python/fatcat/templates/entity_edit.html new file mode 100644 index 00000000..5da98d89 --- /dev/null +++ b/python/fatcat/templates/entity_edit.html @@ -0,0 +1,8 @@ +{% extends "base.html" %} +{% block body %} + +<h1>Not Implemented</h1> + +Entity editing isn't implemented yet, only creation. Sorry! + +{% endblock %} diff --git a/python/fatcat/templates/entity_history.html b/python/fatcat/templates/entity_history.html new file mode 100644 index 00000000..54577b2f --- /dev/null +++ b/python/fatcat/templates/entity_history.html @@ -0,0 +1,30 @@ +{% extends "base.html" %} +{% block body %} + +<h1 class="ui header">{% if page_title != None %}{{ page_title }}{% endif %} +<div class="sub header"> + <a href="/{{entity_type}}/{{entity.ident}}"> + <code>{{ entity_type }} {{ entity.ident }}</code> + </a> +</div> +</h1> + +<h3 class="ui header">Fatcat Metadata Edit History</h3> + +<table class="ui table"> + <thead><tr><th>Changelog<br>Index + <th>Timestamp (UTC) + <th>Editgroup + <th>Editor + <th>Description + <tbody> + {% for entry in history %} + <tr><td><a href="/changelog/{{ entry.changelog_entry.index }}">{{ entry.changelog_entry.index }}</a> + <td>{{ entry.changelog_entry.timestamp }} + <td><a href="/editgroup/{{ entry.editgroup.id }}">{{ entry.editgroup.id }}</a> + <td><a href="/editor/{{ entry.editgroup.editor_id }}">{{ entry.editgroup.editor_id }}</a> + <td>{% if entry.editgroup.description != None %}{{ entry.editgroup.description }}{% endif %} + {% endfor %} +</table> + +{% endblock %} diff --git a/python/fatcat/templates/home.html b/python/fatcat/templates/home.html index 0ec0bd18..9a8a55c8 100644 --- a/python/fatcat/templates/home.html +++ b/python/fatcat/templates/home.html @@ -27,11 +27,11 @@ indexing (aka, linking together of pre-prints and final copies). <td><a href="/container/00000000-0000-0000-1111-000000000002">Fake</a> <br><a href="/container/00000000-0000-0000-1111-000000000003">Real</a> <tr><td><b>Creator</b> - <td><a href="/creator/create">Create</a> + <td><!-- <a href="/creator/create">Create</a> --> <td><a href="/creator/00000000-0000-0000-2222-000000000002">Fake</a> <br><a href="/creator/00000000-0000-0000-2222-000000000003">Real</a> <tr><td><b>File</b> - <td><a href="/file/create">Create</a> + <td> <td><a href="/file/00000000-0000-0000-3333-000000000002">Fake</a> <br><a href="/file/00000000-0000-0000-3333-000000000003">Real</a> <tr><td><b>Release</b> @@ -39,7 +39,7 @@ indexing (aka, linking together of pre-prints and final copies). <td><a href="/release/00000000-0000-0000-4444-000000000002">Fake</a> <br><a href="/release/00000000-0000-0000-4444-000000000003">Real</a> <tr><td><b>Work</b> - <td><a href="/work/create">Create</a> + <td> <td><a href="/work/00000000-0000-0000-5555-000000000002">Fake</a> <br><a href="/work/00000000-0000-0000-5555-000000000003">Real</a> </table> diff --git a/python/fatcat/templates/work_add.html b/python/fatcat/templates/release_create.html index ac8a8169..ac8a8169 100644 --- a/python/fatcat/templates/work_add.html +++ b/python/fatcat/templates/release_create.html |