diff --git a/commentaries/views.py b/commentaries/views.py index 0660ee1a96dd955e1c026bc92cd7f9ae8c0f8b93..8b01ea1952c5e24f4b0cfacebb1be4494f9a6c0e 100644 --- a/commentaries/views.py +++ b/commentaries/views.py @@ -69,11 +69,6 @@ def vet_commentary_requests(request): form = VetCommentaryForm() context = {'contributor': contributor, 'commentary_to_vet': commentary_to_vet, 'form': form } return render(request, 'commentaries/vet_commentary_requests.html', context) - #return render (request, 'commentaries/no_commentary_req_to_vet.html') - - -#def no_commentary_req_to_vet(request): -# return render (request, 'commentaries/no_commentary_req_to_vet.html') def vet_commentary_request_ack(request, commentary_id): @@ -84,6 +79,7 @@ def vet_commentary_request_ack(request, commentary_id): if form.cleaned_data['action_option'] == '1': # accept the commentary as is commentary.vetted = True + commentary.vetted_by = Contributor.objects.get(user=request.user) commentary.save() email_text = 'Dear ' + title_dict[commentary.requested_by.title] + ' ' + commentary.requested_by.user.last_name + ', \n\nThe Commentary Page you have requested, concerning publication with title ' + commentary.pub_title + ' by ' + commentary.author_list + ', has been activated. You are now welcome to submit your comments.' + '\n\nThank you for your contribution, \nThe SciPost Team.' emailmessage = EmailMessage('SciPost Commentary Page activated', email_text, 'commentaries@scipost.org', [commentary.requested_by.user.email, 'commentaries@scipost.org'], reply_to=['commentaries@scipost.org']) diff --git a/scipost/static/scipost/SciPost.css b/scipost/static/scipost/SciPost.css index f8ea3f9c37c8b47ba53de9a459a03b18893f1b15..1d93aefed500b65280354ad6ff1f49e1361239bf 100644 --- a/scipost/static/scipost/SciPost.css +++ b/scipost/static/scipost/SciPost.css @@ -155,6 +155,19 @@ hr.hr12 { display: flex; flex-wrap: wrap; } +.flex-container #headerflex { + align-contents: center; +} +.flex-logobox { + align-self: center; + margin: 10px; +} +.flex-blurbbox { + margin: 0px; + padding: 0px; + align-self: center; + margin-left: auto; +} .flex-greybox { background-color: #f4f4f4; margin: 10px; diff --git a/scipost/templates/scipost/change_password.html b/scipost/templates/scipost/change_password.html index 9ff0c90810398f61f4f49df350fa5157e5159a47..ee5ec1faace4e1b43988321168e973492ecb2909 100644 --- a/scipost/templates/scipost/change_password.html +++ b/scipost/templates/scipost/change_password.html @@ -4,7 +4,7 @@ {% block bodysup %} -{% if ack %} +{% if acknowledgement %} <section> <h1>Your SciPost password has been successfully changed</h1> </section> @@ -26,6 +26,6 @@ <p>{{ errormessage }}</p> {% endif %} </section> -{% endif %} +{% endif acknowledgement %} {% endblock bodysup %} diff --git a/scipost/templates/scipost/header.html b/scipost/templates/scipost/header.html index aa805ad9011c1956fad4932125b1e32da53cfc3b..4fbda30b4e439525b8d6aae28b4cfad5b9fed971 100644 --- a/scipost/templates/scipost/header.html +++ b/scipost/templates/scipost/header.html @@ -1,22 +1,19 @@ {% load staticfiles %} <header> - <div class="row"> -<!-- Temporary strip --> - {% if user.is_authenticated %} - <div class="col-4"> - <a href="{% url 'scipost:index' %}"><img src="{% static 'scipost/images/logo_scipost_RGB_HTML_groot.png' %}" alt="SciPost logo" width='240px' /></a> - </div> - <div class="col-3"> - </div> - - <div class="col-5"> - <p> - <i>The complete scientific publication portal</i><br /> - <i>Managed by professional scientists</i><br /> - <i>For open, global and perpetual access to science</i> - </p> - </div> - {% endif %} + <!-- Temporary strip --> + {% if user.is_authenticated %} + <div class="flex-container" id="headerflex"> + <div class="flex-logobox"> + <a href="{% url 'scipost:index' %}"><img src="{% static 'scipost/images/logo_scipost_RGB_HTML_groot.png' %}" alt="SciPost logo" width='240px' /></a> + </div> + <div class="flex-blurbbox"> + <p> + <i>The complete scientific publication portal</i><br /> + <i>Managed by professional scientists</i><br /> + <i>For open, global and perpetual access to science</i> + </p> </div> + + {% endif %} </header> diff --git a/scipost/views.py b/scipost/views.py index fdd75006899d1932714c490968385a914f233e4e..49f5d2fee61a22691475fcf23ab6f0fdca3cb4b7 100644 --- a/scipost/views.py +++ b/scipost/views.py @@ -304,7 +304,7 @@ def change_password(request): return render(request, 'scipost/change_password.html', {'form': form, 'errormessage': 'Your new password entries must match'}) request.user.set_password(form.cleaned_data['password_new']) request.user.save() - context = {'acknowledgment': True, 'form': PasswordChangeForm()} + context = {'acknowledgement': True, 'form': PasswordChangeForm()} return render(request, 'scipost/change_password.html', context) else: form = PasswordChangeForm()