From f1abe85e8c35a23122f65b47dd55d8135239cf93 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 13 Jun 2019 16:05:58 -0700 Subject: fixes after rebase --- python/fatcat_web/routes.py | 4 +- python/fatcat_web/templates/entity_base.html | 8 +- python/fatcat_web/templates/release_contribs.html | 2 +- .../fatcat_web/templates/release_references.html | 2 +- python/fatcat_web/templates/release_view.html | 179 +++++---------------- 5 files changed, 46 insertions(+), 149 deletions(-) (limited to 'python/fatcat_web') diff --git a/python/fatcat_web/routes.py b/python/fatcat_web/routes.py index 61ba0029..326d5807 100644 --- a/python/fatcat_web/routes.py +++ b/python/fatcat_web/routes.py @@ -203,7 +203,7 @@ def generic_entity_view(entity_type, ident, view_template): metadata.pop('extra') entity._metadata = metadata - return render_template(view_template, entity=entity, editgroup_id=None) + return render_template(view_template, entity_type=entity_type, entity=entity, editgroup_id=None) def generic_editgroup_entity_view(editgroup_id, entity_type, ident, view_template): try: @@ -217,7 +217,7 @@ def generic_editgroup_entity_view(editgroup_id, entity_type, ident, view_templat return render_template('deleted_entity.html', entity=entity, entity_type=entity_type, editgroup=editgroup) - return render_template(view_template, entity=entity, editgroup=editgroup) + return render_template(view_template, entity_type=entity_type, entity=entity, editgroup=editgroup) @app.route('/container/', methods=['GET']) diff --git a/python/fatcat_web/templates/entity_base.html b/python/fatcat_web/templates/entity_base.html index 72a3b6ce..0768f5a9 100644 --- a/python/fatcat_web/templates/entity_base.html +++ b/python/fatcat_web/templates/entity_base.html @@ -22,15 +22,15 @@ {% if entity_type == "release" %}

- {% if authors and authors != [] %} by - {% for contrib in authors[:12] %} + {% if entity._authors and entity._authors != [] %} by + {% for contrib in entity._authors[:12] %} {% if contrib.creator_id %} {{ contrib.raw_name }}{% if not loop.last %}, {% endif %} {% else %} {% if contrib.raw_name != None %}{{ contrib.raw_name }}{% else %}Unknown{% endif %}{% if not loop.last %}, {% endif %} {% endif %} {% endfor %} - {% if authors|count > 12 %} (+{{ authors|length - 12 }} others) + {% if entity._authors|count > 12 %} (+{{ entity._authors|length - 12 }} others) {% endif %}
{% endif %} @@ -39,7 +39,7 @@

-- cgit v1.2.3