diff --git a/journals/templates/journals/create_citation_list_metadata.html b/journals/templates/journals/create_citation_list_metadata.html index a7d68067d8aeede3f8971ebc9c706923f097c72e..d3d29f9c7f960d79664ba6493e3269d89df4b9c3 100644 --- a/journals/templates/journals/create_citation_list_metadata.html +++ b/journals/templates/journals/create_citation_list_metadata.html @@ -33,7 +33,7 @@ <hr class="hr6"/> - <h3>Once you're happy with this metadata, you can <a href="{{publication.get_absolute_url}}">return to the publication's page</a> or to the <a href="{% url 'journals:manage_metadata' %}">metadata management page</a></h3> + <h3>Once you're happy with this metadata, you can <a href="{{publication.get_absolute_url}}">return to the publication's page</a> or to the <a href="{% url 'journals:manage_metadata' %}">metadata management page</a> or to the <a href="{% url 'journals:manage_metadata' doi_label=publication.doi_label %}">this publication's metadata management page</a></h3> </section> diff --git a/journals/templates/journals/create_funding_info_metadata.html b/journals/templates/journals/create_funding_info_metadata.html index 7e918a563af0236bd0ce89cc15ae7fdd832c8d60..2c8a55797992a00ee7c18e3dfc3a5ad7d374c686 100644 --- a/journals/templates/journals/create_funding_info_metadata.html +++ b/journals/templates/journals/create_funding_info_metadata.html @@ -27,7 +27,7 @@ <hr class="hr6"/> - <h3>Once you're happy with this metadata, you can <a href="{{publication.get_absolute_url}}">return to the publication's page</a> or to the <a href="{% url 'journals:manage_metadata' %}">metadata management page</a></h3> + <h3>Once you're happy with this metadata, you can <a href="{{publication.get_absolute_url}}">return to the publication's page</a> or to the <a href="{% url 'journals:manage_metadata' %}">metadata management page</a> or to the <a href="{% url 'journals:manage_metadata' doi_label=publication.doi_label %}">this publication's metadata management page</a></h3> </section> diff --git a/journals/templates/journals/publication_detail.html b/journals/templates/journals/publication_detail.html index 65a1ce40d09247a4cd9eb8d376e3d47a71586b45..fb2fa570aa16d3d442a9372580c39c22c652b3d9 100644 --- a/journals/templates/journals/publication_detail.html +++ b/journals/templates/journals/publication_detail.html @@ -87,40 +87,11 @@ <div class="row"> <div class="col-12"> <hr> - <h3>Editorial Administration tools: </h3> - <ul> - <li>Mark the first author (currently: {% if publication.first_author %}{{ publication.first_author }} {% elif publication.first_author_unregistered %}{{ publication.first_author_unregistered }} (unregistered){% endif %}) - <div class="row"> - <div class="col-md-5"> - <p>registered authors:</p> - <ul> - {% for author in publication.authors.all %} - <li> - <a href="{% url 'journals:mark_first_author' publication_id=publication.id contributor_id=author.id %}">{{ author }}</a> - </li> - {% endfor %} - </ul> - </div> - <div class="col-md-5"> - <p>unregistered authors:</p> - <ul> - {% for author_unreg in publication.authors_unregistered.all %} - <li> - <a href="{% url 'journals:mark_first_author_unregistered' publication_id=publication.id unregistered_author_id=author_unreg.id %}">{{ author_unreg }}</a> - </li> - {% endfor %} - </ul> - </div> - </div> - </li> - <li><a href="{% url 'journals:add_author' publication.id %}">Add a missing author</a></li> - <li><a href="{% url 'journals:create_citation_list_metadata' publication.doi_label %}">Create/update citation list metadata</a></li> - <li><a href="{% url 'journals:create_funding_info_metadata' publication.doi_label %}">Create/update funding info metadata</a></li> - <li><a href="{% url 'journals:create_metadata_xml' publication.doi_label %}">Create/update the XML metadata</a></li> - <li><a href="{% url 'journals:metadata_xml_deposit' publication.doi_label 'test' %}">Test metadata deposit (via Crossref test server)</a></li> - <li><a href="{% url 'journals:metadata_xml_deposit' publication.doi_label 'deposit' %}">Deposit the metadata to Crossref</a></li> - <li><a href="{% url 'journals:harvest_citedby_links' publication.doi_label %}">Update Crossref cited-by links</a></li> - </ul> + <h3>Editorial Administration tools: </h3> + <ul> + <li><a href="{% url 'journals:manage_metadata' %}">metadata management page</a></li> + <li><a href="{% url 'journals:manage_metadata' doi_label=publication.doi_label %}">this publication's metadata management page</a></li> + </ul> </div> </div> {% endif %} diff --git a/journals/views.py b/journals/views.py index e093fe9f10b60415bb703ee17e1e8c51d2da151d..ab59c37ec41ebfb71989cf0d291723df041a45e3 100644 --- a/journals/views.py +++ b/journals/views.py @@ -299,7 +299,8 @@ def mark_first_author(request, publication_id, contributor_id): publication.first_author = contributor publication.first_author_unregistered = None publication.save() - return redirect(publication.get_absolute_url()) + return redirect(reverse('journals:manage_metadata', + kwargs={'doi_label': publication.doi_label})) @permission_required('scipost.can_publish_accepted_submission', return_403=True) @@ -310,7 +311,8 @@ def mark_first_author_unregistered(request, publication_id, unregistered_author_ publication.first_author = None publication.first_author_unregistered = unregistered_author publication.save() - return redirect(publication.get_absolute_url()) + return redirect(reverse('journals:manage_metadata', + kwargs={'doi_label': publication.doi_label})) @permission_required('scipost.can_publish_accepted_submission', return_403=True) @@ -327,7 +329,8 @@ def add_author(request, publication_id, contributor_id=None, unregistered_author contributor = get_object_or_404(Contributor, id=contributor_id) publication.authors.add(contributor) publication.save() - return redirect(publication.get_absolute_url()) + return redirect(reverse('journals:manage_metadata', + kwargs={'doi_label': publication.doi_label})) if request.method == 'POST': form = UnregisteredAuthorForm(request.POST) @@ -362,7 +365,8 @@ def add_unregistered_author(request, publication_id, unregistered_author_id): unregistered_author = get_object_or_404(UnregisteredAuthor, id=unregistered_author_id) publication.unregistered_authors.add(unregistered_author) publication.save() - return redirect(publication.get_absolute_url()) + return redirect(reverse('journals:manage_metadata', + kwargs={'doi_label': publication.doi_label})) @permission_required('scipost.can_publish_accepted_submission', return_403=True) @@ -374,7 +378,8 @@ def add_new_unreg_author(request, publication_id): if new_unreg_author_form.is_valid(): new_unreg_author = new_unreg_author_form.save() publication.authors_unregistered.add(new_unreg_author) - return redirect(publication.get_absolute_url()) + return redirect(reverse('journals:manage_metadata', + kwargs={'doi_label': publication.doi_label})) raise Http404 @@ -462,7 +467,8 @@ def add_generic_funder(request, doi_label): publication.funders_generic.add(funder_select_form.cleaned_data['funder']) publication.save() messages.success(request, 'Generic funder added to publication %s' % str(publication)) - return redirect(reverse('journals:manage_metadata')) + return redirect(reverse('journals:manage_metadata', + kwargs={'doi_label': doi_label})) @permission_required('scipost.can_publish_accepted_submission', return_403=True)