aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_web/templates/entity_base.html
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-06-13 17:17:22 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-06-13 17:17:22 -0700
commit16126c5901c435ea6610eff8b7211226c6f125d5 (patch)
tree429a4772a4990e8158f0dbc9714b02c8b0412f07 /python/fatcat_web/templates/entity_base.html
parentf1abe85e8c35a23122f65b47dd55d8135239cf93 (diff)
downloadfatcat-16126c5901c435ea6610eff8b7211226c6f125d5.tar.gz
fatcat-16126c5901c435ea6610eff8b7211226c6f125d5.zip
refactor all entities to new UI style
Diffstat (limited to 'python/fatcat_web/templates/entity_base.html')
-rw-r--r--python/fatcat_web/templates/entity_base.html41
1 files changed, 34 insertions, 7 deletions
diff --git a/python/fatcat_web/templates/entity_base.html b/python/fatcat_web/templates/entity_base.html
index 0768f5a9..ba25e3f9 100644
--- a/python/fatcat_web/templates/entity_base.html
+++ b/python/fatcat_web/templates/entity_base.html
@@ -1,7 +1,7 @@
{% extends "base.html" %}
{% macro entity_tab(name, text, url_suffix, count=None) %}
-<a href ="/{{ entity_type }}/{{ entity.ident }}{{ url_suffix }}" class="{% if entity_view == name %}active{% endif %} item" style="padding: 0em 1.2em;">{{ text }}{% if count != None %} ({{ count }}){% endif %}</a>
+<a href ="{% if editgroup %}/editgroup/{{ editgroup.editgroup_id }}{% endif %}/{{ entity_type }}/{% if entity.ident %}{{ entity.ident }}{% elif entity.revision %}rev/{{ entity.revision }}{% endif %}{{ url_suffix }}" class="{% if entity_view == name %}active{% endif %} item" style="padding: 0em 1.2em;">{{ text }}{% if count != None %} ({{ count }}){% endif %}</a>
{% endmacro %}
{% block fullmain %}
@@ -10,14 +10,35 @@
<div class="ui centered grid">
<div class="fifteen wide large screen sixteen wide column" style="padding-bottom: 0px;">
<h1 class="ui header">
- {% if entity_type == "release" %}
+ {% if entity_type == "container" %}
+ {{ entity.name }}
+ {% elif entity_type == "creator" %}
+ {{ entity.display_name }}
+ {% elif entity_type == "file" %}
+ {% elif entity_type == "fileset" %}
+ {% elif entity_type == "webcapture" %}
+ {% if entity.original_url %}
+ <a href="{{ entity.original_url }}" style="color: black;"><code>{{ entity.original_url }}</code></a>
+ {% endif %}
+ {% elif entity_type == "release" %}
<span itemprop="headline"><span itemprop="name">{{ entity.title }}</span></span>
{% if entity.subtitle %}
<br><span style="font-size: smaller; font-weight: normal;">{{ entity.subtitle }}</span>
{% endif %}
{% endif %}
<span class="sub header">
- <code>{{ entity_type }}_{{ entity.ident }}</code>
+ <code>
+ {% if entity.ident %}
+ {{ entity_type }}_{{ entity.ident }}
+ {% elif entity.revision %}
+ {{ entity_type }}_rev_{{ entity.revision }}
+ {% endif %}
+ {% if editgroup %}
+ <a href="/editgroup/{{ editgroup.editgroup_id }}" style="color: purple;">
+ [as of editgroup_{{ editgroup.editgroup_id }}]
+ </a>
+ {% endif %}
+ </code>
</span>
</h1>
{% if entity_type == "release" %}
@@ -44,10 +65,16 @@
{% endif %}
{{ entity_tab("metadata", "Metadata", "/metadata") }}
</div>
- <div class="ui small tabular compact menu floated right">
- {{ entity_tab("edit", "Edit", "/edit") }}
- {{ entity_tab("history", "History", "/history") }}
- </div>
+ {% if entity.ident %}
+ <div class="ui small tabular compact menu floated right">
+ {% if not editgroup or not (editgroup.changelog_index or editgroup.submitted ) %}
+ {{ entity_tab("edit", "Edit", "/edit") }}
+ {% endif %}
+ {% if not editgroup %}
+ {{ entity_tab("history", "History", "/history") }}
+ {% endif %}
+ </div>
+ {% endif %}
</div>
</div>
</div>