Skip to content

Commit

Permalink
records-ui: fix "Annotate" button rendering conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
slint committed Aug 2, 2024
1 parent 783e88d commit a69165a
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ <h3 class="active title panel-heading {{ record.ui.access_status.id }} m-0">
{%- set slug = community.slug %}
{%- set annostor_config = config.ANNOSTOR_COMMUNITIES[slug] if slug in config.ANNOSTOR_COMMUNITIES else None -%}
{%- if annostor_config is not none -%}
{%- set annostar_url = annostor_config.annostor_instance ~ "annotate/" ~ annostor_config.repo_instance ~ "/" ~ annostor_config.task ~ "/" ~ record.id -%}
{%- if permissions.can_edit and file_type=="pdf" and file.metadata.preview -%}
<a role="button" class="ui compact mini button" href="{{ annostar_url }}">
{%- set annostor_url = annostor_config.annostor_instance ~ "annotate/" ~ annostor_config.repo_instance ~ "/" ~ annostor_config.task ~ "/" ~ record.id -%}
{%- if permissions.can_edit and file_type=="pdf" and file.metadata.previewer == "mirador" -%}
<a role="button" class="ui compact mini button" href="{{ annostor_url }}">
<i class="pencil icon" aria-hidden="true"></i>{{_("Annotate")}}<i aria-hidden="true" class="right aligned external icon"></i>
</a>
{%- endif -%}
Expand Down

0 comments on commit a69165a

Please sign in to comment.