diff --git a/comments/templates/comments/_add_comment_form.html b/comments/templates/comments/_add_comment_form.html index e22027838b182e90bd61220ca359efeb56edb508..38f5beeee4b1f307d07ff38e8b27fd552fac3313 100644 --- a/comments/templates/comments/_add_comment_form.html +++ b/comments/templates/comments/_add_comment_form.html @@ -1,87 +1,87 @@ {% load bootstrap %} {% block footer_script %} -<script> - $(function(){ - var comment_text_input = $("#id_comment_text"); + <script> + $(function(){ + var comment_text_input = $("#id_comment_text"); - comment_text_input.on('keyup', function(){ - var new_text = $(this).val() - $("#preview-comment_text").text(new_text) - if( typeof MathJax !== 'undefined' ) { - MathJax.Hub.Queue(["Typeset",MathJax.Hub]); - } - }).trigger('keyup'); + comment_text_input.on('keyup', function(){ + var new_text = $(this).val() + $("#preview-comment_text").text(new_text) + if( typeof MathJax !== 'undefined' ) { + MathJax.Hub.Queue(["Typeset",MathJax.Hub]); + } + }).trigger('keyup'); - $('input[name$="anonymous"]').on('change', function() { - $('.anonymous-alert').show() - .children('h3').hide() - if ($(this).prop('checked')) { - $('.anonymous-yes').show(); - } else { - $('.anonymous-no').show(); - } - }).trigger('change'); - }); -</script> + $('input[name$="anonymous"]').on('change', function() { + $('.anonymous-alert').show() + .children('h3').hide() + if ($(this).prop('checked')) { + $('.anonymous-yes').show(); + } else { + $('.anonymous-no').show(); + } + }).trigger('change'); + }); + </script> {% endblock %} <form enctype="multipart/form-data" {% if url %}action="{{url}}" {% endif %}method="post"> - {% csrf_token %} - <div class="row"> - <div class="col-md-9"> - {{form.comment_text|bootstrap:'12,12'}} + {% csrf_token %} + <div class="row"> + <div class="col-md-9"> + {{form.comment_text|bootstrap:'12,12'}} - <p> - In your comment, you can use $\LaTeX$ \$...\$ for in-text equations or \ [ ... \ ] for on-line equations. - </p> - <p class="good_commenter">Be professional. Only serious and meaningful comments will be vetted through.</p> - </div> - <div class="col-md-3 radio-list"> - <label>Specify categorization(s):</label> - {{form.is_cor|bootstrap}} - {{form.is_rem|bootstrap}} - {{form.is_que|bootstrap}} - {{form.is_ans|bootstrap}} - {{form.is_obj|bootstrap}} - {{form.is_rep|bootstrap}} - {{form.is_val|bootstrap}} - {{form.is_lit|bootstrap}} - {{form.is_sug|bootstrap}} - </div> - </div> + <p> + In your comment, you can use $\LaTeX$ \$...\$ for in-text equations or \ [ ... \ ] for on-line equations. + </p> + <p class="good_commenter">Be professional. Only serious and meaningful comments will be vetted through.</p> + </div> + <div class="col-md-3 radio-list"> + <label>Specify categorization(s):</label> + {{form.is_cor|bootstrap}} + {{form.is_rem|bootstrap}} + {{form.is_que|bootstrap}} + {{form.is_ans|bootstrap}} + {{form.is_obj|bootstrap}} + {{form.is_rep|bootstrap}} + {{form.is_val|bootstrap}} + {{form.is_lit|bootstrap}} + {{form.is_sug|bootstrap}} + </div> + </div> - <div class="row"> - <div class="col-md-9"> - {{form.remarks_for_editors|bootstrap:'12,12'}} - </div> - <div class="col-md-3"> - {{form.file_attachment|bootstrap:'12,12'}} - </div> - </div> + <div class="row"> + <div class="col-md-9"> + {{form.remarks_for_editors|bootstrap:'12,12'}} + </div> + <div class="col-md-3"> + {{form.file_attachment|bootstrap:'12,12'}} + </div> + </div> - <div class="row"> - <div class="col-12"> - {% if form.anonymous %} - {{ form.anonymous|bootstrap }} - <div class="anonymous-alert my-3" style="display: none;"> - <h3 class="anonymous-yes">Your Comment will remain anonymous.</h3> - <h3 class="anonymous-no"><span class="text-danger">Your Comment will be <span class="text-underline">signed</span>.</span> Thank you very much!</h3> - </div> - {% endif %} - <input type="submit" name="submit" value="Submit your Comment for vetting" class="btn btn-primary" id="submit-id-submit"> - {% if form.anonymous %} - <p class="mt-2" id="goodCommenter"><i>By clicking on Submit, you agree with the <a target="_blank" href="{% url 'scipost:terms_and_conditions' %}">Terms and Conditions</a>.</i></p> - {% else %} - <p class="mt-2" id="goodCommenter"><i>By clicking on Submit, you agree with the <a target="_blank" href="{% url 'scipost:terms_and_conditions' %}">Terms and Conditions</a>, in particular that <span class="text-danger">your identity will be attached to the Comment</span>.</i></p> - {% endif %} - </div> - </div> + <div class="row"> + <div class="col-12"> + {% if form.anonymous %} + {{ form.anonymous|bootstrap }} + <div class="anonymous-alert my-3" style="display: none;"> + <h3 class="anonymous-yes">Your Comment will remain anonymous.</h3> + <h3 class="anonymous-no"><span class="text-danger">Your Comment will be <span class="text-underline">signed</span>.</span> Thank you very much!</h3> + </div> + {% endif %} + <input type="submit" name="submit" value="Submit your Comment for vetting" class="btn btn-primary" id="submit-id-submit"> + {% if form.anonymous %} + <p class="mt-2" id="goodCommenter"><i>By clicking on Submit, you agree with the <a target="_blank" href="{% url 'scipost:terms_and_conditions' %}">Terms and Conditions</a>.</i></p> + {% else %} + <p class="mt-2" id="goodCommenter"><i>By clicking on Submit, you agree with the <a target="_blank" href="{% url 'scipost:terms_and_conditions' %}">Terms and Conditions</a>, in particular that <span class="text-danger">your identity will be attached to the Comment</span>.</i></p> + {% endif %} + </div> + </div> </form> <div class="row"> - <div class="col-md-9"> - <h3>Preview of your comment:</h3> - <p id="preview-comment_text"></p> - </div> + <div class="col-md-9"> + <h3>Preview of your comment:</h3> + <p id="preview-comment_text"></p> + </div> </div> diff --git a/comments/templates/comments/_comment_card_content.html b/comments/templates/comments/_comment_card_content.html index 6fa4f459bd55ef6e161accab805c8689b5e973b3..d329cd0c33f80db50036dabe2dd2339d17fc8f41 100644 --- a/comments/templates/comments/_comment_card_content.html +++ b/comments/templates/comments/_comment_card_content.html @@ -1,24 +1,24 @@ <div class="card-body card-comment"> - {% block card_block_header %}{% endblock %} - <p class="card-text"> - {% if comment.anonymous %} - Anonymous: - {% else %} - <a href="{{ comment.author.get_absolute_url }}">{{ comment.get_author_str }}</a>: - {% endif %} + {% block card_block_header %}{% endblock %} + <p class="card-text"> + {% if comment.anonymous %} + Anonymous: + {% else %} + <a href="{{ comment.author.get_absolute_url }}">{{ comment.get_author_str }}</a>: + {% endif %} - <a href="{{comment.get_absolute_url}}"> - "{{comment.comment_text|slice:'30'}}{% if comment.comment_text|length > 30 %}...{% endif %}" - </a> - </p><p class="card-text pl-md-3"> - in {{comment.content_type|capfirst}} on <a href="{{comment.content_object.get_absolute_url}}" class="pubtitleli">{{comment.title}}</a> + <a href="{{comment.get_absolute_url}}"> + "{{comment.comment_text|slice:'30'}}{% if comment.comment_text|length > 30 %}...{% endif %}" + </a> + </p><p class="card-text pl-md-3"> + in {{comment.content_type|capfirst}} on <a href="{{comment.content_object.get_absolute_url}}" class="pubtitleli">{{comment.title}}</a> - {% if comment.content_object.author_list %} - {% comment %} - Using 'by xxx' on non-submission comments here would be ambigious. Does the `by xxx` apply to the - other object (eg. Report), or the Submission, the Comment, etc? - {% endcomment %} - <span class="text-muted">by {{comment.content_object.author_list}}</span> - {% endif %} - </p> + {% if comment.content_object.author_list %} + {% comment %} + Using 'by xxx' on non-submission comments here would be ambigious. Does the `by xxx` apply to the + other object (eg. Report), or the Submission, the Comment, etc? + {% endcomment %} + <span class="text-muted">by {{comment.content_object.author_list}}</span> + {% endif %} + </p> </div> diff --git a/comments/templates/comments/_comment_card_extended_content.html b/comments/templates/comments/_comment_card_extended_content.html index 168b2eef9c649099eef5062d4a35d3fa13f56004..6717f0b2c49549e1109124d7d63c61c6b2463479 100644 --- a/comments/templates/comments/_comment_card_extended_content.html +++ b/comments/templates/comments/_comment_card_extended_content.html @@ -1,8 +1,8 @@ {% extends 'comments/_comment_card_content.html' %} {% block card_block_header %} - <div class="mb-2"> - <div class="d-inline-block mr-1">Nr {{comment.id}}</div> - {% include 'comments/_comment_voting_summary.html' with comment=comment class='small' %} - </div> + <div class="mb-2"> + <div class="d-inline-block mr-1">Nr {{comment.id}}</div> + {% include 'comments/_comment_voting_summary.html' with comment=comment class='small' %} + </div> {% endblock %} diff --git a/comments/templates/comments/_comment_card_extended_for_author.html b/comments/templates/comments/_comment_card_extended_for_author.html index 5fa9fa5f645c02426aa4aecdc37530cb93c9b441..02fd05618a6d5d9ec3a308a565d58a79184bd33c 100644 --- a/comments/templates/comments/_comment_card_extended_for_author.html +++ b/comments/templates/comments/_comment_card_extended_for_author.html @@ -1,20 +1,20 @@ <div class="card-body card-comment"> - <div class="mb-4 mt-2"> - <div class="d-inline-block mr-1">Nr {{comment.id}}</div> - {% include 'comments/_comment_voting_summary.html' with comment=comment class='small' %} - </div> + <div class="mb-4 mt-2"> + <div class="d-inline-block mr-1">Nr {{comment.id}}</div> + {% include 'comments/_comment_voting_summary.html' with comment=comment class='small' %} + </div> - <p>"{{comment.comment_text|linebreaksbr}}"</p> - {% if comment.anonymous %} - <p class="card-text">by Anonymous in {{comment.content_type|capfirst}} on <a href="{{comment.content_object.get_absolute_url}}" class="pubtitleli">{{comment.title}}</a> {% if comment.content_object.author_list %} <span class="text-muted">by {{comment.content_object.author_list}}</span>{% endif %}</p> - {% else %} - <p class="card-text">by <a href="{{comment.author.get_absolute_url}}">{{comment.author.user.first_name}} {{comment.author.user.last_name}}</a> in {{comment.content_type|capfirst}} on <a href="{{comment.content_object.get_absolute_url}}" class="pubtitleli">{{comment.title}}</a> {% if comment.content_object.author_list %} <span class="text-muted">by {{comment.content_object.author_list}}</span>{% endif %}</p> - {% endif %} + <p>"{{comment.comment_text|linebreaksbr}}"</p> + {% if comment.anonymous %} + <p class="card-text">by Anonymous in {{comment.content_type|capfirst}} on <a href="{{comment.content_object.get_absolute_url}}" class="pubtitleli">{{comment.title}}</a> {% if comment.content_object.author_list %} <span class="text-muted">by {{comment.content_object.author_list}}</span>{% endif %}</p> + {% else %} + <p class="card-text">by <a href="{{comment.author.get_absolute_url}}">{{comment.author.user.first_name}} {{comment.author.user.last_name}}</a> in {{comment.content_type|capfirst}} on <a href="{{comment.content_object.get_absolute_url}}" class="pubtitleli">{{comment.title}}</a> {% if comment.content_object.author_list %} <span class="text-muted">by {{comment.content_object.author_list}}</span>{% endif %}</p> + {% endif %} - {% comment %} - Using 'by xxx' on non-submission comments here would be ambigious. Does the `by xxx` apply to the - other object (eg. Report), or the Submission, the Comment, etc? - {% endcomment %} - <p class="card-text text-muted">Comment submitted {{comment.date_submitted}}</p> - <p class="card-text">Status: <span class="{% if comment.status == 1 %} text-success{% elif comment.status == 0 %} text-danger{% endif %}">{{comment.get_status_display}}</span></p> + {% comment %} + Using 'by xxx' on non-submission comments here would be ambigious. Does the `by xxx` apply to the + other object (eg. Report), or the Submission, the Comment, etc? + {% endcomment %} + <p class="card-text text-muted">Comment submitted {{comment.date_submitted}}</p> + <p class="card-text">Status: <span class="{% if comment.status == 1 %} text-success{% elif comment.status == 0 %} text-danger{% endif %}">{{comment.get_status_display}}</span></p> </div> diff --git a/comments/templates/comments/_comment_categories.html b/comments/templates/comments/_comment_categories.html index 07e3c1d53072e4723c8baf86098421399d0dd48c..3ce7df1ef374045586fcb69cdc1925cb47a316b1 100644 --- a/comments/templates/comments/_comment_categories.html +++ b/comments/templates/comments/_comment_categories.html @@ -1,35 +1,35 @@ {% load comment_extras %} {% if comment|has_category %} - <div class="category-group"> - <div class="name">Category:</div> - {% if comment.is_rem %} - <div>remark</div> - {% endif %} - {% if comment.is_que %} - <div>question</div> - {% endif %} - {% if comment.is_ans %} - <div>answer to question</div> - {% endif %} - {% if comment.is_obj %} - <div>objection</div> - {% endif %} - {% if comment.is_rep %} - <div>reply to objection</div> - {% endif %} - {% if comment.is_cor %} - <div>correction</div> - {% endif %} - {% if comment.is_val %} - <div>validation or rederivation</div> - {% endif %} - {% if comment.is_lit %} - <div>pointer to related literature</div> - {% endif %} - {% if comment.is_sug %} - <div>suggestion for further work</div> - {% endif %} - </div> - <br> + <div class="category-group"> + <div class="name">Category:</div> + {% if comment.is_rem %} + <div>remark</div> + {% endif %} + {% if comment.is_que %} + <div>question</div> + {% endif %} + {% if comment.is_ans %} + <div>answer to question</div> + {% endif %} + {% if comment.is_obj %} + <div>objection</div> + {% endif %} + {% if comment.is_rep %} + <div>reply to objection</div> + {% endif %} + {% if comment.is_cor %} + <div>correction</div> + {% endif %} + {% if comment.is_val %} + <div>validation or rederivation</div> + {% endif %} + {% if comment.is_lit %} + <div>pointer to related literature</div> + {% endif %} + {% if comment.is_sug %} + <div>suggestion for further work</div> + {% endif %} + </div> + <br> {% endif %} diff --git a/comments/templates/comments/_comment_identifier.html b/comments/templates/comments/_comment_identifier.html index 38156a79830f7667e639ad964cf6892fd2b4a707..2fa8da1b4dd075b276a16b5e9f38b7a1d7625a63 100644 --- a/comments/templates/comments/_comment_identifier.html +++ b/comments/templates/comments/_comment_identifier.html @@ -7,39 +7,39 @@ <div class="commentid" id="comment_id{{ comment.id }}"> - {% if request.user.contributor and request.user.contributor == comment.core_content_object.editor_in_charge or is_edcol_admin %} - {% if request.user|is_possible_author_of_submission:comment.core_content_object %} - <h3>Anonymous on {{comment.date_submitted|date:'Y-m-d'}}</h3> - {% else %} - <a href="{{ comment.author.get_absolute_url }}">{{ comment.author.user.first_name }} {{ comment.author.user.last_name }}</a> - on {{ comment.date_submitted|date:'Y-m-d' }} - <br> - {% if comment.anonymous %}<small class="text-danger py-2">Chose public anonymity</small>{% endif %} - {% endif %} - {% elif comment.anonymous %} - Anonymous on {{comment.date_submitted|date:'Y-m-d'}} - {% else %} - {% if comment.is_author_reply %}Author{% endif %} - <a href="{{comment.author.get_absolute_url}}">{{comment.author.user.first_name}} {{comment.author.user.last_name}}</a> - on {{comment.date_submitted|date:'Y-m-d'}} - {% endif %} - {% if comment.doi_string %} <small>{{ comment|citation }}</small>{% endif %} - - {% if user.is_authenticated %} - {% with type_id=comment|content_type_id %} - {% include 'helpdesk/_ticket_for_object_link.html' with type_id=type_id id=comment.id model="Comment" %} - {% endwith %} - {% endif %} - </h3> - - - {% if comment|is_reply_to_comment %} + {% if request.user.contributor and request.user.contributor == comment.core_content_object.editor_in_charge or is_edcol_admin %} + {% if request.user|is_possible_author_of_submission:comment.core_content_object %} + <h3>Anonymous on {{comment.date_submitted|date:'Y-m-d'}}</h3> + {% else %} + <a href="{{ comment.author.get_absolute_url }}">{{ comment.author.user.first_name }} {{ comment.author.user.last_name }}</a> + on {{ comment.date_submitted|date:'Y-m-d' }} + <br> + {% if comment.anonymous %}<small class="text-danger py-2">Chose public anonymity</small>{% endif %} + {% endif %} + {% elif comment.anonymous %} + Anonymous on {{comment.date_submitted|date:'Y-m-d'}} + {% else %} + {% if comment.is_author_reply %}Author{% endif %} + <a href="{{comment.author.get_absolute_url}}">{{comment.author.user.first_name}} {{comment.author.user.last_name}}</a> + on {{comment.date_submitted|date:'Y-m-d'}} + {% endif %} + {% if comment.doi_string %} <small>{{ comment|citation }}</small>{% endif %} + + {% if user.is_authenticated %} + {% with type_id=comment|content_type_id %} + {% include 'helpdesk/_ticket_for_object_link.html' with type_id=type_id id=comment.id model="Comment" %} + {% endwith %} + {% endif %} + </h3> + + + {% if comment|is_reply_to_comment %} (in reply to <a href="{{comment.content_object.get_absolute_url}}">{% if comment.content_object.anonymous %}Anonymous Comment{% else %}{{comment.content_object.author.user.first_name}} {{comment.content_object.author.user.last_name}}{% endif %}</a> on {{comment.content_object.date_submitted|date:'Y-m-d'}}) - {% elif comment|is_reply_to_report %} + {% elif comment|is_reply_to_report %} (in reply to <a href="{{comment.content_object.get_absolute_url}}">Report {{comment.content_object.report_nr}}{% if not comment.content_object.anonymous %} by {{comment.content_object.author.user.first_name}} {{comment.content_object.author.user.last_name}}{% endif %}</a> on {{comment.content_object.date_submitted|date:'Y-m-d'}}) - {% endif %} + {% endif %} </div> diff --git a/comments/templates/comments/_comment_tex_template.html b/comments/templates/comments/_comment_tex_template.html index 05d5e1479ade5d44ab1b41c9d15647940f1773d3..19605ff306f61ef4318db1e83e4a247ec49ee687 100644 --- a/comments/templates/comments/_comment_tex_template.html +++ b/comments/templates/comments/_comment_tex_template.html @@ -1,11 +1,11 @@ {% spaceless %} -Received {{comment.date_submitted|date:'d-m-Y'}}\ \\ -{% if comment.file_attachment %}- \textit{This {% if comment.is_author_reply %}Author Reply{% else %}Comment{% endif %} has an Attachment, please download it online.}\ \\{% endif %}\ \\{{comment.comment_text}} + Received {{comment.date_submitted|date:'d-m-Y'}}\ \\ + {% if comment.file_attachment %}- \textit{This {% if comment.is_author_reply %}Author Reply{% else %}Comment{% endif %} has an Attachment, please download it online.}\ \\{% endif %}\ \\{{comment.comment_text}} {% endspaceless %} {% for subcomment in comment.nested_comments.vetted %} - \addcontentsline{toc}{subsection}{\protect\numberline{}{% if subcomment.is_author_reply %}Author Reply{% else %}Comment{% endif %} {{forloop.counter}} by {% if subcomment.anonymous %}Anonymous{% else %}{{subcomment.author.user.first_name}} {{subcomment.author.user.last_name}}{% endif %} } + \addcontentsline{toc}{subsection}{\protect\numberline{}{% if subcomment.is_author_reply %}Author Reply{% else %}Comment{% endif %} {{forloop.counter}} by {% if subcomment.anonymous %}Anonymous{% else %}{{subcomment.author.user.first_name}} {{subcomment.author.user.last_name}}{% endif %} } - \subsection*{ {% if subcomment.is_author_reply %}Author Reply{% else %}Comment{% endif %} {{forloop.parentloop.counter}}.{{forloop.counter}} by {% if subcomment.anonymous %}Anonymous{% else %}{{subcomment.author.user.first_name}} {{subcomment.author.user.last_name}}{% endif %} } - {% include 'comments/_comment_tex_template.html' with comment=subcomment %} + \subsection*{ {% if subcomment.is_author_reply %}Author Reply{% else %}Comment{% endif %} {{forloop.parentloop.counter}}.{{forloop.counter}} by {% if subcomment.anonymous %}Anonymous{% else %}{{subcomment.author.user.first_name}} {{subcomment.author.user.last_name}}{% endif %} } + {% include 'comments/_comment_tex_template.html' with comment=subcomment %} {% endfor %} diff --git a/comments/templates/comments/_comment_voting_form.html b/comments/templates/comments/_comment_voting_form.html index 9a6fd984a938a169a03f80b4399fb9f4f320e7fc..ffa757f3c8c471fc39c0ef2e7b9851b50c0e8628 100644 --- a/comments/templates/comments/_comment_voting_form.html +++ b/comments/templates/comments/_comment_voting_form.html @@ -1,21 +1,21 @@ {% if user.is_authenticated and perms.scipost.can_express_opinion_on_comments %} - {% if user.contributor != comment.author %} + {% if user.contributor != comment.author %} <div class="voting-group d-inline-block {{class}}"> - <form action="{% url 'comments:express_opinion' comment_id=comment.id opinion='A' %}" method="post"> - {% csrf_token %} - <input type="submit" class="btn btn-sm agree" value="Agree {{ comment.nr_A }}"/> - </form> - <form action="{% url 'comments:express_opinion' comment_id=comment.id opinion='N' %}" method="post"> - {% csrf_token %} - <input type="submit" class="btn btn-sm neutral" value="Not sure {{ comment.nr_N }}"/> - </form> - <form action="{% url 'comments:express_opinion' comment_id=comment.id opinion='D'%}" method="post"> - {% csrf_token %} - <input type="submit" class="btn btn-sm disagree" value="Disagree {{ comment.nr_D }}"/> - </form> + <form action="{% url 'comments:express_opinion' comment_id=comment.id opinion='A' %}" method="post"> + {% csrf_token %} + <input type="submit" class="btn btn-sm agree" value="Agree {{ comment.nr_A }}"/> + </form> + <form action="{% url 'comments:express_opinion' comment_id=comment.id opinion='N' %}" method="post"> + {% csrf_token %} + <input type="submit" class="btn btn-sm neutral" value="Not sure {{ comment.nr_N }}"/> + </form> + <form action="{% url 'comments:express_opinion' comment_id=comment.id opinion='D'%}" method="post"> + {% csrf_token %} + <input type="submit" class="btn btn-sm disagree" value="Disagree {{ comment.nr_D }}"/> + </form> </div> - {% else %} - {% include 'comments/_comment_voting_summary.html' with comment=comment %} - {% endif %} + {% else %} + {% include 'comments/_comment_voting_summary.html' with comment=comment %} + {% endif %} {% endif %} diff --git a/comments/templates/comments/_single_comment.html b/comments/templates/comments/_single_comment.html index bf3de128b768df2a44184475fb7773e4051370e3..2a64b0cc4f745b78b1b7909c5e390bd1341784e1 100644 --- a/comments/templates/comments/_single_comment.html +++ b/comments/templates/comments/_single_comment.html @@ -7,40 +7,40 @@ {% is_editorial_college request.user as is_editorial_college %} <div class="comment"> - {% include 'comments/_comment_identifier.html' with comment=comment %} - - {% include 'comments/_comment_categories.html' with comment=comment %} - - {% if not hide_votes %} - {% include 'comments/_comment_voting_form.html' with comment=comment perms=perms user=user %} - {% endif %} - - <p class="my-3 pb-2"> - {{ comment.comment_text|linebreaksbr }} + {% include 'comments/_comment_identifier.html' with comment=comment %} + + {% include 'comments/_comment_categories.html' with comment=comment %} + + {% if not hide_votes %} + {% include 'comments/_comment_voting_form.html' with comment=comment perms=perms user=user %} + {% endif %} + + <p class="my-3 pb-2"> + {{ comment.comment_text|linebreaksbr }} + </p> + {% if comment.file_attachment %} + <h3>Attachment:</h3> + <p> + <a target="_blank" href="{{ comment.get_attachment_url }}"> + {% if comment.file_attachment|is_image %} + <img class="attachment attachment-comment" src="{{ comment.get_attachment_url }}"> + {% else %} + {{ comment.file_attachment|filename }} + {% endif %} + </a> </p> - {% if comment.file_attachment %} - <h3>Attachment:</h3> - <p> - <a target="_blank" href="{{ comment.get_attachment_url }}"> - {% if comment.file_attachment|is_image %} - <img class="attachment attachment-comment" src="{{ comment.get_attachment_url }}"> - {% else %} - {{ comment.file_attachment|filename }} - {% endif %} - </a> - </p> - {% endif %} + {% endif %} - {% if is_editorial_college or is_edcol_admin %} - {% if comment.remarks_for_editors %} - <h3>Remarks for editors:</h3> - <p>{{ comment.remarks_for_editors|linebreaksbr }}</p> - {% endif %} + {% if is_editorial_college or is_edcol_admin %} + {% if comment.remarks_for_editors %} + <h3>Remarks for editors:</h3> + <p>{{ comment.remarks_for_editors|linebreaksbr }}</p> {% endif %} + {% endif %} - {% for reply in comment.nested_comments.vetted %} - {% include 'comments/_single_comment.html' with comment=reply perms=perms user=user %} - {% endfor %} + {% for reply in comment.nested_comments.vetted %} + {% include 'comments/_single_comment.html' with comment=reply perms=perms user=user %} + {% endfor %} - {% block comment_footer %}{% endblock %} + {% block comment_footer %}{% endblock %} </div> diff --git a/comments/templates/comments/_single_comment_with_link.html b/comments/templates/comments/_single_comment_with_link.html index 552db102a5a95357cd548a96b5b4cb2d3419bacb..606a70e3c73bfab72a724b65cd28bbc0d251b4dd 100644 --- a/comments/templates/comments/_single_comment_with_link.html +++ b/comments/templates/comments/_single_comment_with_link.html @@ -1,8 +1,8 @@ {% extends 'comments/_single_comment.html' %} {% block comment_footer %} - {% if user.is_authenticated and perms.scipost.can_submit_comments %} - <hr class="small"> - <h3 class="mb-3"><a href="{% url 'comments:reply_to_comment' comment_id=comment.id %}">Reply to this comment</a></h3> - {% endif %} + {% if user.is_authenticated and perms.scipost.can_submit_comments %} + <hr class="small"> + <h3 class="mb-3"><a href="{% url 'comments:reply_to_comment' comment_id=comment.id %}">Reply to this comment</a></h3> + {% endif %} {% endblock %} diff --git a/comments/templates/comments/_vet_comment_form.html b/comments/templates/comments/_vet_comment_form.html index e37e21f0e821b04cfb8c04ee9096a81eedb48025..7cbb6f4c08049e38d8e857ed96b3ebfa52dfc80c 100644 --- a/comments/templates/comments/_vet_comment_form.html +++ b/comments/templates/comments/_vet_comment_form.html @@ -4,48 +4,48 @@ {% load comment_extras %} <div> - <h3>Details of the related {{comment.core_content_object|get_core_content_type|capfirst}}</h3> - <a href="{{comment.get_absolute_url}}" target="_blank">See detail page</a> - <div class="py-2"> - {% get_summary_template comment.core_content_object %} - </div> + <h3>Details of the related {{comment.core_content_object|get_core_content_type|capfirst}}</h3> + <a href="{{comment.get_absolute_url}}" target="_blank">See detail page</a> + <div class="py-2"> + {% get_summary_template comment.core_content_object %} + </div> - <hr class="small"> + <hr class="small"> - <h3 class="my-3">The Comment to be vetted:</h3> + <h3 class="my-3">The Comment to be vetted:</h3> - <div class="row"> - <div class="col-md-6"> - <!-- {% include 'comments/_comment_identifier.html' with comment=comment %} --> - {% include 'comments/_single_comment.html' with comment=comment hide_votes=1 %} + <div class="row"> + <div class="col-md-6"> + <!-- {% include 'comments/_comment_identifier.html' with comment=comment %} --> + {% include 'comments/_single_comment.html' with comment=comment hide_votes=1 %} - <h3>Comment text:</h3> - <p>{{ comment.comment_text|linebreaksbr }}</p> + <h3>Comment text:</h3> + <p>{{ comment.comment_text|linebreaksbr }}</p> - {% if comment.file_attachment %} - <h3>Attachment:</h3> - <p> - <a target="_blank" href="{{ comment.get_attachment_url }}"> - {% if comment.file_attachment|is_image %} - <img class="attachment attachment-comment" src="{{ comment.get_attachment_url }}"> - {% else %} - {{ comment.file_attachment|filename }}<br><small>{{ comment.file_attachment.size|filesizeformat }}</small> - {% endif %} - </a> - </p> + {% if comment.file_attachment %} + <h3>Attachment:</h3> + <p> + <a target="_blank" href="{{ comment.get_attachment_url }}"> + {% if comment.file_attachment|is_image %} + <img class="attachment attachment-comment" src="{{ comment.get_attachment_url }}"> + {% else %} + {{ comment.file_attachment|filename }}<br><small>{{ comment.file_attachment.size|filesizeformat }}</small> {% endif %} + </a> + </p> + {% endif %} - {% if comment.remarks_for_editors %} - <h3>Remarks for Editors only:</h3> - <p>{{ comment.remarks_for_editors|linebreaksbr }}</p> - {% endif %} - </div> - <div class="col-md-6"> - <form action="{% url 'comments:vet_submitted_comment' comment_id=comment.id %}" method="post"> - {% csrf_token %} - {{ form|bootstrap }} - <input class="btn btn-primary" type="submit" value="Submit" /> - </form> - </div> + {% if comment.remarks_for_editors %} + <h3>Remarks for Editors only:</h3> + <p>{{ comment.remarks_for_editors|linebreaksbr }}</p> + {% endif %} + </div> + <div class="col-md-6"> + <form action="{% url 'comments:vet_submitted_comment' comment_id=comment.id %}" method="post"> + {% csrf_token %} + {{ form|bootstrap }} + <input class="btn btn-primary" type="submit" value="Submit" /> + </form> </div> + </div> </div> diff --git a/comments/templates/comments/add_comment.html b/comments/templates/comments/add_comment.html index 780fb54a30d4281d6c02acd41caef0272f14f03a..8342d7c78c5230992de25ee025b634e306e6e8fc 100644 --- a/comments/templates/comments/add_comment.html +++ b/comments/templates/comments/add_comment.html @@ -6,17 +6,17 @@ {% block content %} - <h1 class="highlight">Add Comment</h1> + <h1 class="highlight">Add Comment</h1> - {% if user.is_authenticated and perms.scipost.can_submit_comments %} + {% if user.is_authenticated and perms.scipost.can_submit_comments %} - <hr> + <hr> - <h2 class="highlight" id="contribute_comment">Contribute a Comment:</h2> + <h2 class="highlight" id="contribute_comment">Contribute a Comment:</h2> - {% include 'comments/_add_comment_form.html' with form=form url='' %} + {% include 'comments/_add_comment_form.html' with form=form url='' %} - {% endif %} + {% endif %} {% endblock content %} diff --git a/comments/templates/comments/new_comment.html b/comments/templates/comments/new_comment.html index d1299702eec44c7ad2f03ac30e4ebbde77874875..59c864ebbf6eb2b6ef7fca7c465c89f05548e6fe 100644 --- a/comments/templates/comments/new_comment.html +++ b/comments/templates/comments/new_comment.html @@ -2,21 +2,21 @@ {% if user.is_authenticated and open_for_commenting and perms.scipost.can_submit_comments %} -<hr class="divider"> + <hr class="divider"> -<h2 class="highlight" id="contribute_comment">Contribute a Comment</h2> -{% if user_is_referee and submission %} + <h2 class="highlight" id="contribute_comment">Contribute a Comment</h2> + {% if user_is_referee and submission %} <h4 class="text-danger my-3"> - <i class="fa fa-exclamation-triangle"></i> - You are an invited referee, please <a href="{% url 'submissions:submit_report' submission.preprint.identifier_w_vn_nr %}">submit a Report</a> instead. + <i class="fa fa-exclamation-triangle"></i> + You are an invited referee, please <a href="{% url 'submissions:submit_report' submission.preprint.identifier_w_vn_nr %}">submit a Report</a> instead. </h4> -{% endif %} + {% endif %} -{% url 'comments:new_comment' object_id=object_id type_of_object=type_of_object as url %} -{% include 'comments/_add_comment_form.html' with form=form url=url %} + {% url 'comments:new_comment' object_id=object_id type_of_object=type_of_object as url %} + {% include 'comments/_add_comment_form.html' with form=form url=url %} {% elif not user.is_authenticated %} - <h3 class="text-center my-3"><a href="{% url 'scipost:login' %}?next={{request.path}}">Login to comment</a></h3> + <h3 class="text-center my-3"><a href="{% url 'scipost:login' %}?next={{request.path}}">Login to comment</a></h3> {% endif %} diff --git a/comments/templates/comments/reply_to_comment.html b/comments/templates/comments/reply_to_comment.html index 059e651e7f395f2278017aa3a086a960e6ae5398..75c208d5a8ec40bf8a1f77ff32aec3cdc5bc4ce2 100644 --- a/comments/templates/comments/reply_to_comment.html +++ b/comments/templates/comments/reply_to_comment.html @@ -6,59 +6,59 @@ {% block content %} -{% if user.is_authenticated %} + {% if user.is_authenticated %} <div class="row"> - <div class="col-12"> - <h1 class="highlight">SciPost Reply to Comment Page</h1> - </div> + <div class="col-12"> + <h1 class="highlight">SciPost Reply to Comment Page</h1> + </div> </div> <div class="row"> - <div class="col-12"> - <h2>The {{comment.core_content_object|get_core_content_type|capfirst}} concerned:</h2> - {% get_summary_template comment.core_content_object %} - </div> + <div class="col-12"> + <h2>The {{comment.core_content_object|get_core_content_type|capfirst}} concerned:</h2> + {% get_summary_template comment.core_content_object %} + </div> </div> <div class="row"> - <div class="col-12"> - <h2>The Comment you wish to reply to:</h2> - </div> + <div class="col-12"> + <h2>The Comment you wish to reply to:</h2> + </div> </div> <div class="row"> - <div class="col-12"> - <div class="comment"> - {% include 'comments/_comment_identifier.html' with comment=comment %} + <div class="col-12"> + <div class="comment"> + {% include 'comments/_comment_identifier.html' with comment=comment %} - {% include 'comments/_comment_categories.html' with comment=comment class='mr-2' %} + {% include 'comments/_comment_categories.html' with comment=comment class='mr-2' %} - {% include 'comments/_comment_voting_summary.html' with comment=comment %} + {% include 'comments/_comment_voting_summary.html' with comment=comment %} - <p>{{ comment.comment_text|linebreaksbr }}</p> - </div> + <p>{{ comment.comment_text|linebreaksbr }}</p> </div> + </div> </div> <hr> <div class="row"> - <div class="col-12"> - <div class="card card-gray"> - <div class="card-body"> - <h2>Your Reply to this Comment:</h2> - {% if is_author %} - <h3>(you are identified as an author, your reply will appear as an author reply)</h3> - {% else %} - <h3>(you are not identified as an author of this publication; if you are, you can claim authorship on your Personal Page)</h3> - {% endif %} - </div> - </div> + <div class="col-12"> + <div class="card card-gray"> + <div class="card-body"> + <h2>Your Reply to this Comment:</h2> + {% if is_author %} + <h3>(you are identified as an author, your reply will appear as an author reply)</h3> + {% else %} + <h3>(you are not identified as an author of this publication; if you are, you can claim authorship on your Personal Page)</h3> + {% endif %} + </div> </div> + </div> </div> {% url 'comments:reply_to_comment' comment.id as add_comment_url %} {% include 'comments/_add_comment_form.html' with url=add_comment_url form=form %} -{% endif %} + {% endif %} {% endblock content %} diff --git a/comments/templates/comments/reply_to_report.html b/comments/templates/comments/reply_to_report.html index 29b8cc96ab932559132213235459704fdb50c75d..3eeeb5696f388ceefa0a7623358f7e33d3a75c34 100644 --- a/comments/templates/comments/reply_to_report.html +++ b/comments/templates/comments/reply_to_report.html @@ -4,39 +4,39 @@ {% block content %} -{% if user.is_authenticated %} + {% if user.is_authenticated %} <div class="row"> - <div class="col-12"> - <h1 class="highlight">SciPost Reply to Report Page</h1> - </div> + <div class="col-12"> + <h1 class="highlight">SciPost Reply to Report Page</h1> + </div> </div> <div class="row"> - <div class="col-12"> - {% if not is_author %} - <h2>You are not identified as an author of this Submission; if you are, you can claim authorship on your Personal Page.</h2> - {% else %} - <h2>The Submission concerned:</h2> - - {% include 'partials/submissions/submission_summary.html' with submission=report.submission show_abstract=1 %} - - </div> - </div> - - {% include 'partials/submissions/report_public_without_comments.html' with report=report %} - - <div class="row"> - <div class="col-12"> - <h2 class="highlight">Your Reply to this Report:</h2> - {% if is_author %} - <p><em>Please focus on responding to the Report. Although you are welcome to mention what you intend to change in your manuscript as a result of this Report, a formal list of changes is best kept as accompaniment to your eventual resubmission.</em></p> - <p><em>Attachments are here meant for e.g. informative graphs; please do not attach a new version of your manuscript to this Reply.</em></p> - {% endif %} - {% url 'comments:reply_to_report' report_id=report.id as add_comment_url %} - {% include 'comments/_add_comment_form.html' with url=add_comment_url form=form %} - {% endif %} - </div> + <div class="col-12"> + {% if not is_author %} + <h2>You are not identified as an author of this Submission; if you are, you can claim authorship on your Personal Page.</h2> + {% else %} + <h2>The Submission concerned:</h2> + + {% include 'partials/submissions/submission_summary.html' with submission=report.submission show_abstract=1 %} + + </div> + </div> + + {% include 'partials/submissions/report_public_without_comments.html' with report=report %} + + <div class="row"> + <div class="col-12"> + <h2 class="highlight">Your Reply to this Report:</h2> + {% if is_author %} + <p><em>Please focus on responding to the Report. Although you are welcome to mention what you intend to change in your manuscript as a result of this Report, a formal list of changes is best kept as accompaniment to your eventual resubmission.</em></p> + <p><em>Attachments are here meant for e.g. informative graphs; please do not attach a new version of your manuscript to this Reply.</em></p> + {% endif %} + {% url 'comments:reply_to_report' report_id=report.id as add_comment_url %} + {% include 'comments/_add_comment_form.html' with url=add_comment_url form=form %} + {% endif %} + </div> </div> -{% endif %} + {% endif %} {% endblock content %} diff --git a/comments/templates/comments/vet_submitted_comment.html b/comments/templates/comments/vet_submitted_comment.html index 0e4ef0c5d18b6b3c4f2f44cadd7ff9bcd211f82e..30cf97047d393457ee69d5749009fa339ab6fbcd 100644 --- a/comments/templates/comments/vet_submitted_comment.html +++ b/comments/templates/comments/vet_submitted_comment.html @@ -8,8 +8,8 @@ {% block content %} -<h1 class="highlight">SciPost Comment to vet:</h1> + <h1 class="highlight">SciPost Comment to vet:</h1> -{% include 'comments/_vet_comment_form.html' with comment=comment form=form %} + {% include 'comments/_vet_comment_form.html' with comment=comment form=form %} {% endblock content %} diff --git a/comments/templates/comments/vet_submitted_comments.html b/comments/templates/comments/vet_submitted_comments.html index e53caae093879d9c9f61ab201d86ba90e82eed2f..a5d1323935cf150fa55c7819ffa60bea4de28e59 100644 --- a/comments/templates/comments/vet_submitted_comments.html +++ b/comments/templates/comments/vet_submitted_comments.html @@ -1,8 +1,8 @@ {% extends 'scipost/_personal_page_base.html' %} {% block breadcrumb_items %} - {{block.super}} - <span class="breadcrumb-item">Vet submitted Comments</span> + {{block.super}} + <span class="breadcrumb-item">Vet submitted Comments</span> {% endblock %} {% load bootstrap %} @@ -13,21 +13,21 @@ {% block content %} -{% if not comments_to_vet %} + {% if not comments_to_vet %} <div class="row"> - <div class="col-12"> - <h1>There are no comments for you to vet.</h1> - <h3><a href="{% url 'scipost:personal_page' %}">Return to personal page</a></h3> - </div> + <div class="col-12"> + <h1>There are no comments for you to vet.</h1> + <h3><a href="{% url 'scipost:personal_page' %}">Return to personal page</a></h3> + </div> </div> -{% else %} + {% else %} <h1 class="highlight">SciPost Comments to vet:</h1> {% for comment_to_vet in comments_to_vet %} - {% include 'comments/_vet_comment_form.html' with comment=comment_to_vet form=form %} + {% include 'comments/_vet_comment_form.html' with comment=comment_to_vet form=form %} {% endfor %} -{% endif %} + {% endif %} {% endblock content %} diff --git a/comments/templates/partials/comments/comments_list.html b/comments/templates/partials/comments/comments_list.html index 6f35351e2a6b0e59a50c0c394113cc4040648c71..0a9802baadea1c398d8464731e7c50d7613e8f14 100644 --- a/comments/templates/partials/comments/comments_list.html +++ b/comments/templates/partials/comments/comments_list.html @@ -1,8 +1,8 @@ {% if comments %} - <ul class="{{ css_class|default:'' }}"> - {% for comment in comments %} - <li><a href="{{ comment.get_absolute_url }}"{% if target_blank %} target="_blank"{% endif %}>{% if comment.is_author_reply %}Author Reply{% else %}Comment{% endif %} by {{ comment.get_author_str }} on {{ comment.date_submitted|date:'DATE_FORMAT' }}</a></li> - {% include 'partials/comments/comments_list.html' with comments=comment.nested_comments.vetted css_class='m-0 pl-4' %} - {% endfor %} - </ul> + <ul class="{{ css_class|default:'' }}"> + {% for comment in comments %} + <li><a href="{{ comment.get_absolute_url }}"{% if target_blank %} target="_blank"{% endif %}>{% if comment.is_author_reply %}Author Reply{% else %}Comment{% endif %} by {{ comment.get_author_str }} on {{ comment.date_submitted|date:'DATE_FORMAT' }}</a></li> + {% include 'partials/comments/comments_list.html' with comments=comment.nested_comments.vetted css_class='m-0 pl-4' %} + {% endfor %} + </ul> {% endif %}