aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_web/templates/entity_macros.html
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-03-01 15:48:10 -0800
committerBryan Newbold <bnewbold@robocracy.org>2019-03-01 15:48:10 -0800
commitec0d7f3b50390c2b9140ea954787d365b8d225ae (patch)
treef95261e7ace1898abf9256d520b086f54e257bdc /python/fatcat_web/templates/entity_macros.html
parentddd5912a825ef42670cf164cf64989072bb57e5f (diff)
downloadfatcat-ec0d7f3b50390c2b9140ea954787d365b8d225ae.tar.gz
fatcat-ec0d7f3b50390c2b9140ea954787d365b8d225ae.zip
make 'Fatcat Bits' a macro
Diffstat (limited to 'python/fatcat_web/templates/entity_macros.html')
-rw-r--r--python/fatcat_web/templates/entity_macros.html14
1 files changed, 14 insertions, 0 deletions
diff --git a/python/fatcat_web/templates/entity_macros.html b/python/fatcat_web/templates/entity_macros.html
new file mode 100644
index 00000000..f714a63a
--- /dev/null
+++ b/python/fatcat_web/templates/entity_macros.html
@@ -0,0 +1,14 @@
+
+{% macro fatcat_bits(entity, entity_type, expand="") -%}
+<div class="ui segment attached">
+ <b>Fatcat Bits</b>
+ <p>State is "{{ entity.state }}". Revision:
+ <br><small><code>{{ entity.revision }}</code></small>
+ <br><a href="https://api.{{ config.FATCAT_DOMAIN }}/v0/release/{{ entity.ident }}{% if expand %}?expand={{ expand}}{% endif %}">As JSON object via API</a>
+</div>
+
+<div class="two ui buttons bottom attached">
+ <a href="/{{ entity_type }}/{{ entity.ident }}/edit" class="ui blue button">Edit Metadata</a>
+ <a href="/{{ entity_type }}/{{ entity.ident }}/history" class="ui button">View History</a>
+</div>
+{%- endmacro %}