{# # This file is part of Invenio. # Copyright (C) 2013, 2014 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # # Invenio is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Invenio; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. #} {%- if not request.is_xhr -%} {%- extends "records/base.html" -%} {%- endif -%} {% bundles "comments.js", "comments.css" %} {%- macro controls() -%}
{%- if option == 'comments' -%} {%- if current_user.is_guest -%} {%- else -%} {%- endif-%} {{ _('Add comment') }} {%- elif option == 'notes' and config.ANNOTATIONS_PREVIEW_ENABLED -%} {%- endif -%}   {%- if config.ANNOTATIONS_NOTES_ENABLED -%}
{%- if option == 'comments' -%} {%- else -%} {%- endif -%} {{ _('Comments') }} {%- if option == 'notes' -%} {%- else -%} {%- endif -%} {{ _('Annotations') }}
{%- endif -%}
{%- endmacro %} {%- block record_content -%} {%- from "_translate.html" import translate -%} {{ translate(["Page", "of", "Show all annotations", "Show page annotations"]) }} {%- block custom -%} {#{ controls() }#} {%- endblock custom -%}

{%- if record.user_comment_subscritions|length -%}
{%- set info_subs=_('%(open_tag)s Unsubscribe %(close_tag)s from this discussion. You will not receive any new comments by email.', open_tag=''|format(url_for('comments.unsubscribe', recid=recid))|safe, close_tag=''|safe) -%} {{ info_subs|safe }}
{%- else -%}
{%- set info_subs=_('%(open_tag)s Subscribe %(close_tag)s to this discussion. You will then receive all new comments by email.', open_tag=''|format(url_for('comments.subscribe', recid=recid))|safe, close_tag=''|safe) -%} {{ info_subs|safe }}
{%- endif -%} {%- endblock record_content -%} {%- if request.is_xhr -%} {%- endif -%}