diff --git a/scipost_django/finances/templates/finances/business_model.html b/scipost_django/finances/templates/finances/business_model.html index aacc957d487d495889d451f4fcd8492fc83b5d6e..200328242ba63ae06a757458ffa28e10b796b332 100644 --- a/scipost_django/finances/templates/finances/business_model.html +++ b/scipost_django/finances/templates/finances/business_model.html @@ -92,7 +92,7 @@ </li> <li> <strong>Determining PubFractions</strong><br> - After publication, authors are asked to specify PubFractions for their paper + After publication, PubFractions are specified (a publication's set of PubFractions answers the question "what was each supporting Organization's share of the support for the research leading to this publication?"; see the <a href="#pubFractions">PubFractions system description</a> below). </li> @@ -196,17 +196,15 @@ each paper has one unit of support recognition to be distributed among the Organizations having supported the research detailed in that paper. This is not meant to be <em>extremely</em> accurate, but should still - somehow honestly reflect the support circumstances. Authors of a paper might - thus specify that Organizations A and B each have a $0.4$ pubfraction, - while C has $0.2$. This splitting can be made among an arbitrary number - of Organizations, as specified by the authors. The only requirement is that - any given paper's pubfractions sum up to $1$. + somehow honestly reflect the support circumstances. </p> <p> - This information is prefilled by our editorial administration - at the moment of publication based on a reasonable estimate, - which the authors are then asked to correct/complement/confirm - (see image). + The weight is given by the following simple algorithm: first, the unit + is split equally among each of the authors. Then, for each author, + their share is split equally among their affiliations. + Any given paper's pubfractions sum up to $1$. + This information is filled by our editorial administration + at the moment of publication. These pubfractions are then automatically compiled and linked to the relevant Organizations. This data is displayed on our Organization detail pages. </p> diff --git a/scipost_django/journals/templates/journals/allocate_orgpubfractions.html b/scipost_django/journals/templates/journals/allocate_orgpubfractions.html index 648afac411952a6091b950e4d20cefa66e1251f7..ca421f2f1d630a1f488edb95686483de84596c4a 100644 --- a/scipost_django/journals/templates/journals/allocate_orgpubfractions.html +++ b/scipost_django/journals/templates/journals/allocate_orgpubfractions.html @@ -26,11 +26,11 @@ <hr class="divider"> <h3 class="highlight">Which Organizations supported the research in this publication?</h3> - <p>Please indicate <strong>which Organizations should be credited with supporting the research published in this publication</strong>.<br/>Data provided here is indicative and does not need to be extremely accurate.<br/>Note however that this data <strong>is used</strong> to set the suggested level of support from external Organizations which SciPost needs to remain sustainable.<br/><br/>The Organizations listed here appear as either host institutions for the authors, or as acknowledged funders.<br/>Is the list of Organizations incomplete? <a href="mailto:edadmin@{{ request.get_host }}?subject=Missing Organizations for {{ publication.doi_label }}&body=[Please provide the missing data here]">Please email EdAdmin with details</a>.</p> + <p>Please indicate <strong>which Organizations should be credited with supporting the research published in this publication</strong>.<br/>Data provided here is indicative and does not need to be extremely accurate.<br/>Note however that this data <strong>is used</strong> to set the suggested level of support from external Organizations which SciPost needs to remain sustainable.<br/><br/>The Organizations listed here appear as either host institutions for the authors, or as acknowledged funders.</p> + + + <p><a class="btn btn-primary" href="{% url 'journals:preallocate_orgpubfractions_from_affiliations' doi_label=publication.doi_label %}">Preallocate fractions based on author affiliations</a></p> - {% if "edadmin" in user_roles %} - <p><span class="text-danger">EdAdmin</span>: <a href="{% url 'journals:preallocate_orgpubfractions_from_affiliations' doi_label=publication.doi_label %}">preallocate fractions based on author affiliations</a> - {% endif %} <form method="post" action="{% url 'journals:allocate_orgpubfractions' doi_label=publication.doi_label %}"> {% csrf_token %} @@ -64,18 +64,10 @@ {% if formset.non_form_errors %} <h4 class="text-danger">Error: {{ formset.non_form_errors }}</h4> {% endif %} - <p>These fractions {% if publication.pubfractions_confirmed_by_authors %}<span class="text-success">have been confirmed</span>{% else %}<span class="text-danger">have not yet been confirmed</span>{% endif %} by the authors.</p> - <input type="submit" class="btn btn-primary" value="Save/confirm fractions"> + <input type="submit" class="btn btn-primary" value="Save fractions"> </form> <br/> - {% if perms.scipost.can_publish_accepted_submission %} - <ul class="ul"> - {% if not publication.pubfractions_confirmed_by_authors %} - <li><a href="{% url 'journals:request_pubfrac_check' doi_label=publication.doi_label %}" class="btn btn-link">Email corresponding author to request check of this pubfraction allocation</a></li> - {% endif %} - <li><a href="{% url 'journals:manage_metadata' %}" class="btn btn-link">Back to Admin</a></li> - </ul> - {% endif %} + <p><a href="{% url 'journals:manage_metadata' %}" class="btn btn-link">Back to Admin</a></p> </div> </div> diff --git a/scipost_django/journals/urls/general.py b/scipost_django/journals/urls/general.py index bee4ccf5b87bdb01c2b71f76194862442579c13e..11b930d1b8a4779cd027a906dc6af4e16b810409 100644 --- a/scipost_django/journals/urls/general.py +++ b/scipost_django/journals/urls/general.py @@ -292,11 +292,6 @@ urlpatterns = [ journals_views.preallocate_orgpubfractions_from_affiliations, name="preallocate_orgpubfractions_from_affiliations", ), - path( - "request_pubfrac_check/<publication_doi_label:doi_label>", - journals_views.request_pubfrac_check, - name="request_pubfrac_check", - ), # Citedby path( "admin/citedby/", diff --git a/scipost_django/journals/views.py b/scipost_django/journals/views.py index c654e1eb7ee78fcaa07b6921e5cc86708f6376f1..3bd9c3d2923961efeeb57024f57c4ec6ff50a9b6 100644 --- a/scipost_django/journals/views.py +++ b/scipost_django/journals/views.py @@ -1368,37 +1368,25 @@ def publication_remove_topic(request, doi_label, slug): @login_required +@permission_required("scipost.can_publish_accepted_submission", return_403=True) def allocate_orgpubfractions(request, doi_label): """ Set the relative support obtained from Organizations for the research contained in a Publication. - This view is accessible to EdAdmin as well as to the corresponding author - of the Publication. + This view is accessible to EdAdmin. """ publication = get_object_or_404(Publication, doi_label=doi_label) - if not request.user.is_authenticated: - raise Http404 - elif not ( - request.user == publication.accepted_submission.submitted_by.user - or request.user.has_perm("scipost.can_publish_accepted_submission") - ): - raise Http404 - # Create OrgPubFraction objects from existing organization links for org in publication.get_organizations(): pubfrac, created = OrgPubFraction.objects.get_or_create( publication=publication, organization=org ) - formset = OrgPubFractionsFormSet( request.POST or None, queryset=publication.pubfractions.all() ) if formset.is_valid(): formset.save() - if request.user == publication.accepted_submission.submitted_by.user: - publication.pubfractions_confirmed_by_authors = True - publication.save() messages.success(request, "Funding fractions successfully allocated.") return redirect(publication.get_absolute_url()) context = { @@ -1438,28 +1426,6 @@ def preallocate_orgpubfractions_from_affiliations(request, doi_label): ) -@login_required -@permission_required("scipost.can_publish_accepted_submission", return_403=True) -def request_pubfrac_check(request, doi_label): - """ - This view is used by EdAdmin to request confirmation of the OrgPubFractions - for a given Publication. - - This occurs post-publication, after all the affiliations and funders have - been confirmed. - """ - publication = get_object_or_404(Publication, doi_label=doi_label) - mail_request = MailEditorSubview( - request, "authors/request_pubfrac_check", publication=publication - ) - if mail_request.is_valid(): - messages.success(request, "The corresponding author has been emailed.") - mail_request.send_mail() - return redirect("journals:manage_metadata") - else: - return mail_request.interrupt() - - @permission_required("scipost.can_publish_accepted_submission", return_403=True) def mark_doaj_deposit_success(request, deposit_id, success): deposit = get_object_or_404(DOAJDeposit, pk=deposit_id) diff --git a/scipost_django/scipost/templates/scipost/personal_page/_hx_publications.html b/scipost_django/scipost/templates/scipost/personal_page/_hx_publications.html index e3af784ddf1d4fa1fc707003d67f2575ed509598..6bc467885e92fb1e5634efa007b09c3325fdf767 100644 --- a/scipost_django/scipost/templates/scipost/personal_page/_hx_publications.html +++ b/scipost_django/scipost/templates/scipost/personal_page/_hx_publications.html @@ -24,11 +24,6 @@ <li> <div class="card bg-light card-publication" id="{{pub.doi_label}}"> {% include 'journals/_publication_card_content.html' with publication=pub current_user=request.user %} - {% if request.user == pub.accepted_submission.submitted_by.user %} - {% if not pub.pubfractions_confirmed_by_authors or not pub.pubfractions_sum_to_1 %} - <h4 class="m-2"><a href="{% url 'journals:allocate_orgpubfractions' doi_label=pub.doi_label %}"><span class="text-danger">Intervention needed:</span> review support fractions</a></h4> - {% endif %} - {% endif %} </div> </li> {% empty %} diff --git a/scipost_django/templates/email/authors/request_pubfrac_check.html b/scipost_django/templates/email/authors/request_pubfrac_check.html deleted file mode 100644 index 3172794f4b73c166664d67879ff538ea18f80ffa..0000000000000000000000000000000000000000 --- a/scipost_django/templates/email/authors/request_pubfrac_check.html +++ /dev/null @@ -1,23 +0,0 @@ -<p> - Dear {{ publication.accepted_submission.submitted_by.profile.get_title_display }} {{ publication.accepted_submission.submitted_by.user.last_name }}, -</p> -<p> - For your recent SciPost publication, -</p> -<p> - <a href="https://{{ domain }}/{{ publication.get_absolute_url }}">{{ publication.title }}</a><br> - by {{ publication.author_list }} -</p> -<p> - we would like you to help us determine who supported the research contained in this publication. This info is of great use for our sustainability efforts. One or two minutes of your attention are all that is required. -</p> -<p> - Could we beg you to navigate (login required) to <a href="https://{{ domain }}{% url 'journals:allocate_orgpubfractions' doi_label=publication.doi_label %}">this page</a> and check/correct the data we have prepared? -</p> -<p> - Many thanks in advance, -</p> -<p>The SciPost Team</p> -{% include 'email/_footer.html' %} - -{% include 'email/_submission_thread_uuid.html' with submission=publication.accepted_submission %} diff --git a/scipost_django/templates/email/authors/request_pubfrac_check.json b/scipost_django/templates/email/authors/request_pubfrac_check.json deleted file mode 100644 index 25feeddd5acad9f49e8466c97bff0a8c923dc0b6..0000000000000000000000000000000000000000 --- a/scipost_django/templates/email/authors/request_pubfrac_check.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "subject": "SciPost: please check your publication's support info", - "recipient_list": [ - "accepted_submission.submitted_by.user.email" - ], - "bcc": [ - "edadmin@" - ], - "from_name": "SciPost Editorial Administration", - "from_email": "edadmin@" -}