diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2019-03-01 15:48:10 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2019-03-01 15:48:10 -0800 |
commit | ec0d7f3b50390c2b9140ea954787d365b8d225ae (patch) | |
tree | f95261e7ace1898abf9256d520b086f54e257bdc /python/fatcat_web/templates/file_view.html | |
parent | ddd5912a825ef42670cf164cf64989072bb57e5f (diff) | |
download | fatcat-ec0d7f3b50390c2b9140ea954787d365b8d225ae.tar.gz fatcat-ec0d7f3b50390c2b9140ea954787d365b8d225ae.zip |
make 'Fatcat Bits' a macro
Diffstat (limited to 'python/fatcat_web/templates/file_view.html')
-rw-r--r-- | python/fatcat_web/templates/file_view.html | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/python/fatcat_web/templates/file_view.html b/python/fatcat_web/templates/file_view.html index 77ecae4e..c2497040 100644 --- a/python/fatcat_web/templates/file_view.html +++ b/python/fatcat_web/templates/file_view.html @@ -1,4 +1,7 @@ +{% set entity = file %} +{% import "entity_macros.html" as entity_macros %} {% extends "base.html" %} + {% block fullbody %} <div class="ui stackable mobile reversed grid centered"> @@ -99,28 +102,19 @@ Raw Object: <span class="ui top attached fluid huge grey button"><i class="file cross icon"></i>No Download Available</span> {% endif %} -<div class="ui segment attached"> - {% if file.size != None %} -<p><b>Size</b> {{ file.size|filesizeformat }} (bytes) -</div><div class="ui segment attached"> +<div class="ui segment attached"> + <p><b>Size</b> {{ file.size|filesizeformat }} (bytes) +</div> {% endif %} {% if file.mimetype != None %} -<p><b>File Type</b> <code>{{ file.mimetype }}</code> -</div><div class="ui segment attached"> +<div class="ui segment attached"> + <p><b>File Type</b> <code>{{ file.mimetype }}</code> +</div> {% endif %} -<b>Fatcat Bits</b> -<p>State is "{{ file.state }}". Revision: -<br><small><code>{{ file.revision }}</code></small> -<br><a href="https://api.{{ config.FATCAT_DOMAIN }}/v0/file/{{ file.ident }}">As JSON object via API</a> - -</div> -<div class="two ui buttons bottom attached"> - <a href="/file/{{ file.ident }}/edit" class="ui blue button">Edit Metadata</a> - <a href="/file/{{ file.ident }}/history" class="ui button">View History</a> -</div> +{{ entity_macros.fatcat_bits(entity, "file", "") }} </div> </div> |