diff --git a/.bootstraprc b/.bootstraprc index 34dcfd0ae1a6e3d04f0e5dcce547594b437e8e5d..c3cf2650279e29d294291b6cb860a8e75d49474a 100644 --- a/.bootstraprc +++ b/.bootstraprc @@ -1,6 +1,8 @@ { "bootstrapVersion": 4, + "bootstrapCustomizations": "./scipost/static/scipost/assets/config/config.scss", "preBootstrapCustomizations": "./scipost/static/scipost/assets/config/preconfig.scss", + "appStyles": "./scipost/static/scipost/assets/css/style.scss", "useFlexbox": true, "styleLoaders": [ "style", @@ -28,9 +30,7 @@ "mixins": true, "nav": true, "navbar": true, - "normalize": true, "reboot": true, - "responsive-embed": true, "transitions": true, "type": true, "tooltip": true, diff --git a/commentaries/templates/commentaries/_commentary_card_content.html b/commentaries/templates/commentaries/_commentary_card_content.html index 33aee23fc70a3f14b779e034528259c8629f7a07..7c5954005dbba4b8a85a7312f0684392da50c232 100644 --- a/commentaries/templates/commentaries/_commentary_card_content.html +++ b/commentaries/templates/commentaries/_commentary_card_content.html @@ -1,4 +1,4 @@ -<div class="card-block"> +<div class="card-body"> <h3 class="card-title"> <a href="{% url 'commentaries:commentary' commentary.arxiv_or_DOI_string %}">{{ commentary.title }}</a> </h3> diff --git a/commentaries/templates/commentaries/commentary_list.html b/commentaries/templates/commentaries/commentary_list.html index 4c1b1269164c93330a273c7137de77a89abc017a..cba5173446b0fc95932e23eac2f39fc73e9d137a 100644 --- a/commentaries/templates/commentaries/commentary_list.html +++ b/commentaries/templates/commentaries/commentary_list.html @@ -13,7 +13,7 @@ <div class="row"> <div class="col-md-4"> <div class="card card-grey"> - <div class="card-block min-height-190"> + <div class="card-body min-height-190"> <h1 class="card-title">SciPost Commentaries</h1> <h3><a href="{% url 'commentaries:howto' %}">SciPost Commentaries how-to</a></h3> <h3><a href="{% url 'commentaries:request_commentary' %}">Request a new Commentary Page</a></h3> @@ -22,7 +22,7 @@ </div> <div class="col-md-4"> <div class="card card-grey"> - <div class="card-block min-height-190"> + <div class="card-body min-height-190"> <h2 class="card-title">Search SciPost Commentaries:</h2> <form action="{% url 'commentaries:commentaries' %}" class="small" method="get"> {{ form|bootstrap:'4,8,sm' }} @@ -33,7 +33,7 @@ </div> <div class="col-md-4"> <div class="card card-grey"> - <div class="card-block min-height-190"> + <div class="card-body min-height-190"> <h2 class="card-title">View SciPost Commentaries</h2> <ul> <li>Physics: last <a href="{% url 'commentaries:browse' discipline='physics' nrweeksback=1 %}">week</a>, <a href="{% url 'commentaries:browse' discipline='physics' nrweeksback=4 %}">month</a> or <a href="{% url 'commentaries:browse' discipline='physics' nrweeksback=52 %}">year</a> </li> diff --git a/commentaries/templates/commentaries/request_arxiv_preprint.html b/commentaries/templates/commentaries/request_arxiv_preprint.html index 2c50e631d5561e8f6094c74fa6edecd4fd23144e..5039bdb9845a13d07aca5503dba6f7a5708a7e19 100644 --- a/commentaries/templates/commentaries/request_arxiv_preprint.html +++ b/commentaries/templates/commentaries/request_arxiv_preprint.html @@ -7,9 +7,9 @@ {% block content %} <div class="row"> - <div class="col-12"> + <div class="col"> <div class="card card-grey"> - <div class="card-block"> + <div class="card-body"> <h1 class="card-title">Request Activation of a Commentary Page</h1> <a href="{% url 'commentaries:request_published_article' %}">Click here to request a Commentary Page on a published article</a> </div> @@ -17,8 +17,8 @@ </div> </div> -<div class="row"> - <div class="col-md-8 offset-md-2"> +<div class="row justify-content-center"> + <div class="col-md-10 col-lg-8"> <form action="{% url 'commentaries:prefill_using_arxiv_identifier' %}" method="post"> {% csrf_token %} {{ query_form|bootstrap }} @@ -27,9 +27,8 @@ </div> </div> -{# <hr>#} -<div class="row"> - <div class="col-md-8 offset-md-2"> +<div class="row justify-content-center"> + <div class="col-md-10 col-lg-8"> <form id="requestForm" action="{% url 'commentaries:request_arxiv_preprint' %}" method="post"> {% csrf_token %} {{ form|bootstrap }} diff --git a/commentaries/templates/commentaries/request_commentary_old.html b/commentaries/templates/commentaries/request_commentary_old.html deleted file mode 100644 index e5c38d7f6b93bf7a5ce8a41d050776222d0a2d35..0000000000000000000000000000000000000000 --- a/commentaries/templates/commentaries/request_commentary_old.html +++ /dev/null @@ -1,56 +0,0 @@ -{% extends 'scipost/base.html' %} - -{% load bootstrap %} - -{% load scipost_extras %} - -{% block pagetitle %}: request Commentary{% endblock pagetitle %} - -{% block content %} - -<div class="row"> - <div class="col-12"> - <div class="panel"> - <h1>Request Activation of a Commentary Page:</h1> - </div> - </div> -</div> -<div class="row"> - <div class="col-md-6 offset-md-3"> - {% if errormessage %} - <h3 style="color: red;">Error: {{ errormessage }}</h3> - {% if existing_commentary %} - <ul>{% include 'commentaries/_commentary_card_content.html' with object=existing_commentary %}</ul> - {% endif %} - <br/> - {% endif %} - - <div id="DOIprefill"> - <h3><em>For published papers, you can prefill the form (except for domain, subject area and abstract) using the DOI:</em></h3> - <p><em>(give the DOI as 10.[4 to 9 digits]/[string], without prefix, as per the placeholder)</em></p> - <form action="{% url 'commentaries:prefill_using_DOI' %}" method="post"> - {% csrf_token %} - {{ doiform|bootstrap }} - <input class="btn btn-secondary" type="submit" value="Query DOI"/> - </form> - </div> - <div id="arXivprefill"> - <h3><em>For preprints, you can prefill the form using the arXiv identifier:</em></h3> - <p><em>(give the identifier without prefix, as per the placeholder)</em></p> - <form action="{% url 'commentaries:prefill_using_identifier' %}" method="post"> - {% csrf_token %} - {{ identifierform|bootstrap }} - <input class="btn btn-secondary" type="submit" value="Query arXiv"/> - </form> - </div> - <br/> - <form id="requestForm" action="{% url 'commentaries:request_commentary' %}" method="post"> - {% csrf_token %} - {{ request_commentary_form|bootstrap }} - <input class="btn btn-primary" type="submit" value="Submit"/> - </form> - - </div> -</div> - -{% endblock content %} diff --git a/commentaries/templates/commentaries/request_published_article.html b/commentaries/templates/commentaries/request_published_article.html index 21511e9e5ee37ce74767ee2e92b1b9015dc6885e..5ae3be2a1aac95aa3b3e30d59be8f242784b348b 100644 --- a/commentaries/templates/commentaries/request_published_article.html +++ b/commentaries/templates/commentaries/request_published_article.html @@ -10,7 +10,7 @@ <div class="row"> <div class="col-12"> <div class="card card-grey"> - <div class="card-block"> + <div class="card-body"> <h1 class="card-title">Request Activation of a Commentary Page</h1> <a href="{% url 'commentaries:request_arxiv_preprint' %}">Click here to request a Commentary Page on an arXiv preprint</a> </div> @@ -18,8 +18,8 @@ </div> </div> -<div class="row"> - <div class='col-md-8 offset-md-2'> +<div class="row justify-content-center"> + <div class='col-md-10 col-lg-8'> <form action="{% url 'commentaries:prefill_using_DOI' %}" method="post"> {% csrf_token %} {{ query_form|bootstrap }} @@ -28,8 +28,8 @@ </div> </div> -<div class="row"> - <div class='col-md-8 offset-md-2'> +<div class="row justify-content-center"> + <div class='col-md-10 col-lg-8'> <form id="requestForm" action="{% url 'commentaries:request_published_article' %}" method="post"> {% csrf_token %} {{ form|bootstrap }} diff --git a/comments/templates/comments/_comment_card_content.html b/comments/templates/comments/_comment_card_content.html index 47487bc7a6182e10fb8be44b1040aa4cddd23dd3..73c341e0928871e17b414109e02a7de25b3a72c8 100644 --- a/comments/templates/comments/_comment_card_content.html +++ b/comments/templates/comments/_comment_card_content.html @@ -1,4 +1,4 @@ -<div class="card-block card-comment"> +<div class="card-body card-comment"> {% block card_block_header %}{% endblock %} <p class="card-text"> <a href="{{comment.author.get_absolute_url}}">{{comment.author.user.first_name}} {{comment.author.user.last_name}}</a>: diff --git a/comments/templates/comments/_comment_card_extended_for_author.html b/comments/templates/comments/_comment_card_extended_for_author.html index aaac79e90846156ed8c28b7b195aad7bd4921aef..51c26e39304d86a3b916dce310b43132f9792d83 100644 --- a/comments/templates/comments/_comment_card_extended_for_author.html +++ b/comments/templates/comments/_comment_card_extended_for_author.html @@ -1,4 +1,4 @@ -<div class="card-block card-comment"> +<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' %} diff --git a/comments/templates/comments/_vet_comment_form.html b/comments/templates/comments/_vet_comment_form.html index 711beb89fe8edd8c63ec00263c7f17a8a4357942..bfd37364681261855c000f64fc4f26f40d2b181c 100644 --- a/comments/templates/comments/_vet_comment_form.html +++ b/comments/templates/comments/_vet_comment_form.html @@ -8,7 +8,7 @@ <h2>From {{comment.core_content_object|get_core_content_type|capfirst}} (<a href="{{comment.get_absolute_url}}" target="_blank">link</a>)</h2> {% get_summary_template comment.core_content_object %} </div> - <div class="card-block"> + <div class="card-body"> <h2 class="card-title">The Comment to be vetted:</h2> diff --git a/comments/templates/comments/reply_to_comment.html b/comments/templates/comments/reply_to_comment.html index 26a545ddbe4c0b0c1b984b9dc77a18166e9999ba..d884188760d15dfb8081101fbf374eeb0dc6edd1 100644 --- a/comments/templates/comments/reply_to_comment.html +++ b/comments/templates/comments/reply_to_comment.html @@ -44,7 +44,7 @@ <div class="row"> <div class="col-12"> <div class="card card-grey"> - <div class="card-block"> + <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> diff --git a/comments/templates/comments/vet_submitted_comments.html b/comments/templates/comments/vet_submitted_comments.html index caf4ef84035553431e5a93d6c5c5a97ad8c3f047..1854a83999f2c64849f4791ee3840077fa8c6e57 100644 --- a/comments/templates/comments/vet_submitted_comments.html +++ b/comments/templates/comments/vet_submitted_comments.html @@ -48,7 +48,7 @@ {% include 'theses/_thesislink_information.html' with thesislink=comment_to_vet.thesislink %} {% endif %} </div> - <div class="card-block"> + <div class="card-body"> <h2 class="card-title">The Comment to be vetted:</h2> diff --git a/config.scss b/config.scss new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/journals/templates/journals/_base.html b/journals/templates/journals/_base.html index 190ee0e1868bafdd7d58d65264b552ba037c03b6..8785ab8e8955c9eebff429701c714a4cf8afaa3f 100644 --- a/journals/templates/journals/_base.html +++ b/journals/templates/journals/_base.html @@ -16,7 +16,7 @@ {% endblock %} {% block secondary_navbar %} -<div class="container my-2"> +<div class="container my-2 pb-0"> <nav class="navbar navbar-secondary px-0 pt-3"> <div> <h2 class="banner d-inline-block mr-2"><a href="{% url 'scipost:landing_page' journal.doi_label %}">{{journal}}</a></h2> diff --git a/journals/templates/journals/_publication_card_content.html b/journals/templates/journals/_publication_card_content.html index 53231d986a807f0b3dee3cf3bafc8c613e7e36bf..b58112307c0deef0bde31921a9d83a164be19275 100644 --- a/journals/templates/journals/_publication_card_content.html +++ b/journals/templates/journals/_publication_card_content.html @@ -1,13 +1,13 @@ -<div class="card-header mx-0 px-2"> - <h3 class="card-title mb-0 "><a href="{{publication.get_absolute_url}}">{{ publication.title }}</a></h3> +<div class="card-header"> + <h3 class="py-0"><a href="{{publication.get_absolute_url}}">{{ publication.title }}</a></h3> </div> -<div class="card-block publication-{{publication.id}}"> +<div class="card-body publication-{{publication.id}}"> <p class="card-text mb-2">{{ publication.author_list }}</p> <p class="card-text text-muted"> {{ publication.citation }} · <span class="font-weight-light">published {{ publication.publication_date|date:'j F Y' }}</span> <span class="mx-1">|</span> - <a href="javascript:;" data-toggle="toggle" data-target=".card-block.publication-{{publication.id}} .abstract">Toggle abstract</a> + <a href="javascript:;" data-toggle="toggle" data-target=".card-body.publication-{{publication.id}} .abstract">Toggle abstract</a> · <a href="{{publication.get_absolute_url}}/pdf" target="_blank">pdf</a> </p> <p class="abstract mb-0 mt-2 py-2" style="display:none;">{{ publication.abstract }}</p> diff --git a/journals/templates/journals/journal_issue_detail.html b/journals/templates/journals/journal_issue_detail.html index 1d7c2fd8cdb120f812917f8887d098962df81891..c15afdb79d285325108d0deea87cec3ed6452ca5 100644 --- a/journals/templates/journals/journal_issue_detail.html +++ b/journals/templates/journals/journal_issue_detail.html @@ -29,12 +29,10 @@ <div class="row"> <div class="col-12"> - <ul class="list-group list-group-flush list-group-noborder"> + <ul class="list-unstyled"> {% for paper in papers %} - <li class="list-group-item"> - <div class="card card-grey card-publication"> - {% include 'journals/_publication_card_content.html' with publication=paper %} - </div> + <li> + {% include 'partials/journals/publication_card.html' with publication=paper %} </li> {% endfor %} </ul> diff --git a/journals/templates/journals/journal_landing_page.html b/journals/templates/journals/journal_landing_page.html index f1c4a81e3cbee7d5e45e6b252a848305b77e2951..1cd761620af9cf7acc1489e50227f2a4c8443e1c 100644 --- a/journals/templates/journals/journal_landing_page.html +++ b/journals/templates/journals/journal_landing_page.html @@ -19,15 +19,13 @@ <div class="row"> <div class="col-12"> - <ul class="list-group list-group-flush list-group-noborder"> + <ul class="list-unstyled"> {% for paper in current_issue.publication_set.all|dictsort:"paper_nr" %} - <li class="list-group-item"> - <div class="card card-grey card-publication"> - {% include 'journals/_publication_card_content.html' with publication=paper %} - </div> + <li> + {% include 'partials/journals/publication_card.html' with publication=paper %} </li> {% empty %} - <li class="list-group-item"> + <li> <h3>No publications found for this issue</h3> </li> {% endfor %} @@ -44,15 +42,13 @@ </div> <div class="row"> <div class="col-12"> - <ul class="list-group list-group-flush list-group-noborder"> + <ul class="list-unstyled"> {% for paper in latest_issue.publication_set.all|dictsort:"paper_nr" %} - <li class="list-group-item"> - <div class="card card-grey card-publication"> - {% include 'journals/_publication_card_content.html' with publication=paper %} - </div> + <li> + {% include 'partials/journals/publication_card.html' with publication=paper %} </li> {% empty %} - <li class="list-group-item"> + <li> <h3>No publications found for this issue</h3> </li> {% endfor %} diff --git a/journals/templates/journals/journal_recent.html b/journals/templates/journals/journal_recent.html index fc34bb5f940a894a8211fd16956bf94f13a34d5e..d12a180904f8c57ace7aa15c2996930e7e708544 100644 --- a/journals/templates/journals/journal_recent.html +++ b/journals/templates/journals/journal_recent.html @@ -18,15 +18,13 @@ <div class="row"> <div class="col-12"> - <ul class="list-group list-group-flush list-group-noborder"> + <ul class="list-unstyled"> {% for paper in recent_papers %} - <li class="list-group-item"> - <div class="card card-grey card-publication"> - {% include 'journals/_publication_card_content.html' with publication=paper %} - </div> + <li> + {% include 'partials/journals/publication_card.html' with publication=paper %} </li> {% empty %} - <li class="list-group-item"><h3>Sorry, no recent publications were found.</h3></li> + <li><h3>Sorry, no recent publications were found.</h3></li> {% endfor %} </ul> </div> diff --git a/journals/templates/journals/publication_detail.html b/journals/templates/journals/publication_detail.html index 908822960bceac29efb26de3962514d67abc1508..beb1cfb4810632e2e2f43781e2887d5a945e1ac4 100644 --- a/journals/templates/journals/publication_detail.html +++ b/journals/templates/journals/publication_detail.html @@ -74,6 +74,12 @@ <p> {% for author in publication.authors.all %} <a href="{{author.get_absolute_url}}">{{ author }}</a> {% if not forloop.last %} · {% endif %} + + {% if forloop.last %} + {% if publication.authors_unregistered.exists %} + · + {% endif %} + {% endif %} {% endfor %} {% for author in publication.authors_unregistered.all %} {{ author }} {% if not forloop.last %} · {% endif %} diff --git a/journals/templates/journals/validate_publication.html b/journals/templates/journals/validate_publication.html index e2fd2cd90b373a7ca0e1a2ec5c48a5e52d452c4d..db78a13e090435434f2826e8dee528feed773071 100644 --- a/journals/templates/journals/validate_publication.html +++ b/journals/templates/journals/validate_publication.html @@ -12,8 +12,8 @@ </div> </div> -<div class="row"> - <div class="col-lg-10 offset-lg-1"> +<div class="row justify-content-center"> + <div class="col-lg-10"> {% if errormessage %} <h2 style="color: red;">{{ errormessage }}</h2> {% endif %} diff --git a/journals/templates/partials/journals/publication_card.html b/journals/templates/partials/journals/publication_card.html new file mode 100644 index 0000000000000000000000000000000000000000..e327036ab9e37ccd2bded9d6fbb3b23b299b53c3 --- /dev/null +++ b/journals/templates/partials/journals/publication_card.html @@ -0,0 +1,3 @@ +<div id="{{publication.doi_label}}" class="card card-grey card-publication"> + {% include 'journals/_publication_card_content.html' with publication=publication %} +</div> diff --git a/news/templates/news/news_card_content.html b/news/templates/news/news_card_content.html index 546022da3e88e5b41de5f8b1afba128cdcf341ea..134db502bedc715be0da60461a79a7e45e946310 100644 --- a/news/templates/news/news_card_content.html +++ b/news/templates/news/news_card_content.html @@ -1,4 +1,4 @@ -<div class="card-block news-item" id="news_{{news.id}}"> +<div class="card-body news-item" id="news_{{news.id}}"> <h2 class="card-title">{{news.headline}}</h2> <div> <div class="text-muted date">{{news.date|date:'j F Y'}}</div> diff --git a/news/templates/news/news_card_content_for_api.html b/news/templates/news/news_card_content_for_api.html index 0e2bd7c77767a6b5b2ab23a4570709ab4323fcd5..d5f80ce81649c01dd762df05107f45cbacdbb3c1 100644 --- a/news/templates/news/news_card_content_for_api.html +++ b/news/templates/news/news_card_content_for_api.html @@ -1,4 +1,4 @@ -<div class="card-block px-0 py-2 news-item"> +<div class="card-body px-0 py-2 news-item"> <h3 class="card-title mb-0 pb-0">{{headline}}</h3> <div> <h5 class="text-muted mb-2">{{date}}</h5> diff --git a/news/templates/news/news_card_content_short.html b/news/templates/news/news_card_content_short.html index bcf34ac858fc6d4f9c702def2e7b81b1fb74a925..09f352dba28e09c03d01c1b99b85dee15a43dfb1 100644 --- a/news/templates/news/news_card_content_short.html +++ b/news/templates/news/news_card_content_short.html @@ -1,4 +1,4 @@ -<div class="card-block px-0 py-2 news-item"> +<div class="card-body px-0 py-2 news-item"> <h3 class="card-title mb-0 pb-0">{{news.headline}}</h3> <div> <h5 class="text-muted mb-2">{{news.date|date:'j F Y'}}</h5> diff --git a/package.json b/package.json index 395d01f373a5e7e14bc23a17b0e682cd5a848851..4d39dc336226454cde6b86294d61bee29cf0183d 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "webpack": "./node_modules/.bin/webpack", "webpack-live": "./node_modules/.bin/webpack --watch" }, + "license": "-", "repository": { "type": "git", "url": "git+https://scipostdev@bitbucket.org/scipostdev/scipost_v1.git" @@ -17,27 +18,35 @@ "author": "SciPost", "homepage": "https://www.scipost.org", "devDependencies": { - "bootstrap": "^4.0.0-alpha.6", - "bootstrap-loader": "^2.0.0", + "ajv": "^5.2.2", + "bootstrap": "^4.0.0-beta", + "bootstrap-loader": "^2.1.0", "clean-webpack-plugin": "^0.1.15", - "css-loader": "^0.26.1", - "exports-loader": "^0.6.3", - "extract-text-webpack-plugin": "2.0.0-beta.5", - "file-loader": "^0.8.4", - "imports-loader": "^0.7.0", + "css-loader": "^0.28.4", + "enhanced-resolve": "^3.4.1", + "exports-loader": "^0.6.4", + "extract-text-webpack-plugin": "^3.0.0", + "file-loader": "^0.11.2", + "imports-loader": "^0.7.1", "jquery": "^2.2.0", "node-loader": "^0.6.0", "node-sass": "^4.4.0", - "postcss-load-config": "1.0.0", - "postcss-loader": "^1.2.2", + "popper.js": "^1.11.1", + "postcss-load-config": "^1.2.0", + "postcss-loader": "^2.0.6", "resolve-url-loader": "^1.6.1", - "sass-loader": "^4.1.1", - "sass-resources-loader": "^1.2.0-beta.1", + "sass-loader": "^6.0.6", + "sass-resources-loader": "^1.3.0", "style-loader": "^0.13.1", + "tapable": "^0.2.8", "tether": "^1.4.0", "url-loader": "^0.5.7", - "webpack": "^2.2.1", + "webpack": "^3.5.4", "webpack-bundle-tracker": "^0.2.0", "webpack-glob-entry": "^2.1.1" + }, + "dependencies": { + "npm": "^5.3.0", + "schema-utils": "^0.3.0" } } diff --git a/partners/templates/partners/_agreement_card.html b/partners/templates/partners/_agreement_card.html index 5e014103f312446d24d9b71e1163163d4c4d4c71..bb2c012a1bb3370da6a3154a358cdfbf858a0ad9 100644 --- a/partners/templates/partners/_agreement_card.html +++ b/partners/templates/partners/_agreement_card.html @@ -1,4 +1,4 @@ -<div class="card-block"> +<div class="card-body"> <div class="row"> <div class="col-md-4"> <address> diff --git a/partners/templates/partners/_partner_card.html b/partners/templates/partners/_partner_card.html index 426d248b4e800a6b5a115057d443b0b5f151b303..718c522dbde599e9eaab4bb39c22aa33c96b9e50 100644 --- a/partners/templates/partners/_partner_card.html +++ b/partners/templates/partners/_partner_card.html @@ -1,6 +1,6 @@ {% load bootstrap %} -<div class="card-block"> +<div class="card-body"> <div class="row"> <div class="col-md-1"> <p>{{ partner.institution.country }}</p> diff --git a/partners/templates/partners/_prospective_partner_card.html b/partners/templates/partners/_prospective_partner_card.html index 5b9ad8805860fc5384f17034504efdc6cc0a44dd..28f587665c6f72da23ad1600889cd8ff2c17065e 100644 --- a/partners/templates/partners/_prospective_partner_card.html +++ b/partners/templates/partners/_prospective_partner_card.html @@ -1,6 +1,6 @@ {% load bootstrap %} -<div class="card-block"> +<div class="card-body"> <div class="row"> <div class="col-md-1"> <p>{{ pp.country }}</p> @@ -44,7 +44,7 @@ </div> <div class="row"> - <div class="col-md-6 offset-md-1"> + <div class="col-md-6 ml-auto"> <h3>Events</h3> <ul> {% for event in pp.prospectivepartnerevent_set.all %} diff --git a/partners/templates/partners/activate_account.html b/partners/templates/partners/activate_account.html index 0e3aef12f1e53ddb919c6a2fc5f06620e70f6f36..1eb07a601fa8562cd259ddbf31f9e1a783f94c5d 100644 --- a/partners/templates/partners/activate_account.html +++ b/partners/templates/partners/activate_account.html @@ -1,28 +1,24 @@ {% extends 'scipost/base.html' %} +{% load bootstrap %} {% block pagetitle %}{{block.super}} Activate Account{% endblock pagetitle %} -{% load bootstrap %} - {% block content %} -<div class="row"> - <div class="col-12"> - <h1 class="highlight">Activate Account</h1> - </div> - <div class="col-md-8 offset-md-2"> +<h1 class="highlight">Activate Account</h1> +<div class="row justify-content-center"> + <div class="col-md-8"> <h2>{{contact.get_title_display}} {{contact.user.first_name}} {{contact.user.last_name}}</h2> <h3>{{contact.user.email}}</h3> </div> </div> -<div class="row"> - <div class="col-md-8 offset-md-2 mb-5"> +<div class="row justify-content-center"> + <div class="col-md-8 mb-5"> <form method="post"> {% csrf_token %} {{ form|bootstrap }} - <input class="btn btn-primary" type="submit" value="Activate"/> </form> </div> diff --git a/partners/templates/partners/membership_request.html b/partners/templates/partners/membership_request.html index 46675520696142b6d376ae5c7679e5c73072de8e..b06175bb734458c13441a5a4aab9ea1ecde45dd2 100644 --- a/partners/templates/partners/membership_request.html +++ b/partners/templates/partners/membership_request.html @@ -2,7 +2,6 @@ {% block pagetitle %}: Supporting Partners Board: Membership request{% endblock pagetitle %} -{% load staticfiles %} {% load bootstrap %} {% block content %} @@ -28,21 +27,14 @@ $(document).ready(function(){ </script> -<div class="row"> - <div class="col-lg-10 offset-lg-1"> +<div class="row justify-content-center"> + <div class="col-lg-10"> <h1 class="highlight">Supporting Partners Board: Membership Request</h1> <p>You can hereby request further details on the process to become one of our Supporting Partners.</p> <p>Filling in this form does not yet constitute a binding agreement.</p> <p>It simply expresses your interest in considering joining our Supporting Partners Board.</p> <p>After filling this form, SciPost Administration will contact you with more details on Partnership.</p> <p><em>Note: you will automatically be considered as the contact person for this Partner.</em></p> - </div> -</div> - - -<div class="row"> - <div class="col-lg-10 offset-lg-1"> - {% if errormessage %} <p class="text-danger">{{ errormessage }}</p> diff --git a/production/templates/production/_production_stream_card.html b/production/templates/production/_production_stream_card.html index fab873137020f491df123ae44c3c644fbef996d3..5e3f387e06cfe43c5626ff9496a9ac60a505cc87 100644 --- a/production/templates/production/_production_stream_card.html +++ b/production/templates/production/_production_stream_card.html @@ -4,7 +4,7 @@ <div class="w-100" id="stream_{{stream.id}}"> {% include 'submissions/_submission_card_content_sparse.html' with submission=stream.submission %} </div> -<div class="card-block"> +<div class="card-body"> <div class="row"> <div class="{% if form %}col-lg-7{% else %}col-12{% endif %}"> <h3>Events</h3> diff --git a/production/templates/production/_production_timesheet_card.html b/production/templates/production/_production_timesheet_card.html index fcb30532b488a1c1aac300d0b2ff74b0df9885d7..7feed2713930a1cd5a94419470b4580d73e9c933 100644 --- a/production/templates/production/_production_timesheet_card.html +++ b/production/templates/production/_production_timesheet_card.html @@ -1,6 +1,6 @@ {% load bootstrap %} -<div class="card-block"> +<div class="card-body"> <table class="table mb-5"> <thead class="thead-default"> <tr> diff --git a/production/templates/production/completed.html b/production/templates/production/completed.html index ec8c987bf49ae30761f30bdce4d21b438e601353..2e6fb2911d22a8c576c8e12d2b91b4619e93bf10 100644 --- a/production/templates/production/completed.html +++ b/production/templates/production/completed.html @@ -22,7 +22,7 @@ {% for stream in streams %} <li class="list-group-item"> <div class="w-100" id="stream_{{stream.id}}">{% include 'submissions/_submission_card_content_sparse.html' with submission=stream.submission %}</div> - <div class="card-block"> + <div class="card-body"> <h3>Events</h3> {% include 'production/_production_events.html' with events=stream.productionevent_set.all %} </div> diff --git a/production/templates/production/productionevent_confirm_delete.html b/production/templates/production/productionevent_confirm_delete.html index d279e44da8b0cf874a552d3ddf6c41847a3dfbc8..75feabb00b889ffabc5af687a2040082ae57002a 100644 --- a/production/templates/production/productionevent_confirm_delete.html +++ b/production/templates/production/productionevent_confirm_delete.html @@ -22,7 +22,7 @@ {% csrf_token %} <h3 class="mb-2">Are you sure you want to delete this production event?</h3> <div class="card card-outline-secondary"> - <div class="card-block"> + <div class="card-body"> <p class="mb-0 font-weight-bold">{{ object.get_event_display }} </p> <p class="text-muted mb-1">noted {{ object.noted_on }} by {{ object.noted_by }}</p> diff --git a/scipost/forms.py b/scipost/forms.py index ba8274e92c76cd6d68f92a9543551d88c3c8fab7..ef56c9cf1c29ff7832d30553c6bb9139206f18a8 100644 --- a/scipost/forms.py +++ b/scipost/forms.py @@ -398,8 +398,11 @@ class UnavailabilityPeriodForm(forms.ModelForm): def clean_end(self): now = timezone.now() - start = self.cleaned_data['start'] - end = self.cleaned_data['end'] + start = self.cleaned_data.get('start') + end = self.cleaned_data.get('end') + if not start or not end: + return end + if start > end: self.add_error('end', 'The start date you have entered is later than the end date.') diff --git a/scipost/management/commands/add_groups_and_permissions.py b/scipost/management/commands/add_groups_and_permissions.py index f002fb9b3c6bbd84a3503e1ed173ddac744036c5..3ed30dba435663d05cb7525f0b169ed45ce07e0e 100644 --- a/scipost/management/commands/add_groups_and_permissions.py +++ b/scipost/management/commands/add_groups_and_permissions.py @@ -272,7 +272,7 @@ class Command(BaseCommand): EditorialAdmin.permissions.set([ can_view_pool, can_assign_submissions, - can_do_plagiarism_checks + can_do_plagiarism_checks, can_oversee_refereeing, can_prepare_recommendations_for_voting, can_fix_College_decision, diff --git a/scipost/managers.py b/scipost/managers.py index 1a4a401fd640f2c8ebea93397a852044e9cecae7..d108e255bda94db1005da0efb8c496ce1063ee08 100644 --- a/scipost/managers.py +++ b/scipost/managers.py @@ -25,6 +25,9 @@ class ContributorManager(models.Manager): def awaiting_validation(self): return self.filter(user__is_active=False, status=CONTRIBUTOR_NEWLY_REGISTERED) + def fellows(self): + return self.filter(user__groups__name='Editorial College') + class RegistrationInvitationManager(models.Manager): def pending_invited_fellows(self): @@ -34,3 +37,9 @@ class RegistrationInvitationManager(models.Manager): def declined_invited_fellows(self): return self.filter(invitation_type=INVITATION_EDITORIAL_FELLOW, responded=False, declined=True) + + +class UnavailabilityPeriodManager(models.Manager): + def today(self): + today = datetime.date.today() + return self.filter(start__lte=today, end__gte=today) diff --git a/scipost/models.py b/scipost/models.py index a1e542d8175fd34f344e005ee41785110ad104c0..99c0619355ba7fdb0902a8a57a435a067d359f12 100644 --- a/scipost/models.py +++ b/scipost/models.py @@ -9,7 +9,6 @@ from django.contrib.postgres.fields import ArrayField from django.db import models from django.template import Template, Context from django.utils import timezone -from django.urls import reverse from django_countries.fields import CountryField @@ -20,7 +19,8 @@ from .constants import SCIPOST_DISCIPLINES, SCIPOST_SUBJECT_AREAS,\ INVITATION_CONTRIBUTOR, INVITATION_FORMAL,\ AUTHORSHIP_CLAIM_PENDING, AUTHORSHIP_CLAIM_STATUS from .fields import ChoiceArrayField -from .managers import FellowManager, ContributorManager, RegistrationInvitationManager +from .managers import FellowManager, ContributorManager, RegistrationInvitationManager,\ + UnavailabilityPeriodManager def get_sentinel_user(): @@ -73,9 +73,14 @@ class Contributor(models.Model): def get_absolute_url(self): return reverse('scipost:contributor_info', args=(self.id,)) + @property def get_formal_display(self): return '%s %s %s' % (self.get_title_display(), self.user.first_name, self.user.last_name) + @property + def is_currently_available(self): + return not self.unavailability_periods.today().exists() + def is_SP_Admin(self): return self.user.groups.filter(name='SciPost Administrators').exists() @@ -85,15 +90,6 @@ class Contributor(models.Model): def is_VE(self): return self.user.groups.filter(name='Vetting Editors').exists() - def is_currently_available(self): - unav_periods = UnavailabilityPeriod.objects.filter(contributor=self) - - today = datetime.date.today() - for unav in unav_periods: - if unav.start < today and unav.end > today: - return False - return True - def get_activation_key(self): if not self._activation_key: self.generate_key() @@ -117,57 +113,15 @@ class Contributor(models.Model): return ', '.join([subject_areas_dict[exp].lower() for exp in self.expertises]) return '' - def assignments_summary_as_td(self): - assignments = self.editorialassignment_set.all() - nr_ongoing = assignments.filter(accepted=True, completed=False).count() - nr_last_12mo = assignments.filter( - date_created__gt=timezone.now() - timezone.timedelta(days=365)).count() - nr_accepted = assignments.filter(accepted=True).count() - nr_accepted_last_12mo = assignments.filter( - accepted=True, date_created__gt=timezone.now() - timezone.timedelta(days=365)).count() - nr_refused = assignments.filter(accepted=False).count() - nr_refused_last_12mo = assignments.filter( - accepted=False, date_created__gt=timezone.now() - timezone.timedelta(days=365)).count() - nr_ignored = assignments.filter(accepted=None).count() - nr_ignored_last_12mo = assignments.filter( - accepted=None, date_created__gt=timezone.now() - timezone.timedelta(days=365)).count() - nr_completed = assignments.filter(completed=True).count() - nr_completed_last_12mo = assignments.filter( - completed=True, date_created__gt=timezone.now() - timezone.timedelta(days=365)).count() - - context = Context({ - 'nr_ongoing': nr_ongoing, - 'nr_total': assignments.count(), - 'nr_last_12mo': nr_last_12mo, - 'nr_accepted': nr_accepted, - 'nr_accepted_last_12mo': nr_accepted_last_12mo, - 'nr_refused': nr_refused, - 'nr_refused_last_12mo': nr_refused_last_12mo, - 'nr_ignored': nr_ignored, - 'nr_ignored_last_12mo': nr_ignored_last_12mo, - 'nr_completed': nr_completed, - 'nr_completed_last_12mo': nr_completed_last_12mo, - }) - output = '<td>' - if self.expertises: - for expertise in self.expertises: - output += subject_areas_dict[expertise] + '<br/>' - output += ('</td>' - '<td>{{ nr_ongoing }}</td>' - '<td>{{ nr_last_12mo }} / {{ nr_total }}</td>' - '<td>{{ nr_accepted_last_12mo }} / {{ nr_accepted }}</td>' - '<td>{{ nr_refused_last_12mo }} / {{ nr_refused }}</td>' - '<td>{{ nr_ignored_last_12mo }} / {{ nr_ignored }}</td>' - '<td>{{ nr_completed_last_12mo }} / {{ nr_completed }}</td>\n') - template = Template(output) - return template.render(context) - class UnavailabilityPeriod(models.Model): - contributor = models.ForeignKey('scipost.Contributor', on_delete=models.CASCADE) + contributor = models.ForeignKey('scipost.Contributor', on_delete=models.CASCADE, + related_name='unavailability_periods') start = models.DateField() end = models.DateField() + objects = UnavailabilityPeriodManager() + class Meta: ordering = ['-start'] @@ -192,18 +146,14 @@ class Remark(models.Model): date = models.DateTimeField(auto_now_add=True) remark = models.TextField() + class Meta: + default_related_name = 'remarks' + def __str__(self): return (self.contributor.user.first_name + ' ' + self.contributor.user.last_name + ' on ' + self.date.strftime("%Y-%m-%d")) - def as_li(self): - output = '<li><em>{{ by }}</em><p>{{ remark }}</p>' - context = Context({'by': str(self), - 'remark': self.remark}) - template = Template(output) - return template.render(context) - ############### # Invitations # diff --git a/scipost/static/scipost/assets/config/preconfig.scss b/scipost/static/scipost/assets/config/preconfig.scss index 22d35899b0be9815cfbb938ecb5a197d8f580dd9..39a77066ff241bbc146e9e7b52b6e204e32ff0cb 100644 --- a/scipost/static/scipost/assets/config/preconfig.scss +++ b/scipost/static/scipost/assets/config/preconfig.scss @@ -1,11 +1,16 @@ +@import "node_modules/bootstrap/scss/functions"; +@import "node_modules/bootstrap/scss/variables"; +@import "node_modules/bootstrap/scss/mixins"; + // General variable structure // // -$border-radius-base: 0; +$base-border-radius: 2px; +$border-radius: 2px; // Grid // -$grid-gutter-width-base: 20px; +$grid-gutter-width: 20px; $container-max-widths: ( sm: 728px, md: 952px, @@ -16,30 +21,38 @@ $container-max-widths: ( // Colors // $scipost-light: #C3D7EE; -$scipost-lightblue: #6884C2; +$scipost-lightblue: #6885c3; $scipost-darkblue: #002b49; -$scipost-orange: #FFA300; +$scipost-orange: #f6a11a; $scipost-white: #f9f9f9; -$green: #6ebb6e; $sidebar-border-color: #dfe0e4; -$blue: $scipost-lightblue !default; -$body-color: $scipost-darkblue !default; +$body-color: $scipost-darkblue; + +// -- Bootstrap color codes +$white: #fff; +$blue: $scipost-lightblue; // Primary +$green: #6ebb6e; +$cyan: $scipost-lightblue; +$yellow: $scipost-orange; +$gray-600: #ccc; +// Others, now as default +// $red: $red; +// $gray-100: $gray-100; +// $gray-600: $gray-600; // Secondary +// $gray-800: $gray-800; + // Alerts // -$alert-success-text: $scipost-darkblue; -$alert-warning-text: $scipost-darkblue; -$alert-danger-text: $scipost-darkblue; -$alert-border-radius: $border-radius-base; +$alert-border-radius: $base-border-radius; // Cards // + +$card-border-radius: $base-border-radius; $card-spacer-x: 0.75rem; -$card-border-radius: 2px; -$card-border-color: #fff; -$card-cap-bg: transparent; -$btn-secondary-border-color: #f1f1f1; +$card-spacer-y: 0.5rem; $card-shadow-color: #ccc; $card-grey-border-bottom-color: #d0d1d5; $card-grey-border-color: #e5e6e9 #dfe0e4 $card-grey-border-bottom-color; @@ -52,12 +65,13 @@ $breadcrumb-divider-color: $scipost-orange; // Forms // -$btn-padding-x: .5rem; -$btn-padding-y: .25rem; -$btn-padding-y-sm: .15rem; +$input-btn-padding-x: .5rem; +$input-btn-padding-y: .25rem; +$input-btn-padding-y-sm: .15rem; $btn-transition: none; -$input-padding-x: .5rem; -$input-padding-y: .25rem; + +$input-height: calc(1.5rem + 2px); +$input-height-lg: calc(1.5rem + 2px); // Lists // @@ -68,20 +82,21 @@ $list-group-border-color: #ddd; // Fonts // -$font-family-sans-serif: 'Merriweather Sans', "Helvetica Neue", Arial, sans-serif !default; -$font-family-serif: $font-family-sans-serif !default; -$font-family-monospace: $font-family-sans-serif !default; -$font-family-base: $font-family-sans-serif !default; +$font-family-sans-serif: 'Merriweather Sans', "Helvetica Neue", Arial, sans-serif; +$headings-font-family: $font-family-sans-serif; +$font-family-serif: $font-family-sans-serif; +$font-family-monospace: $font-family-sans-serif; +$font-family-base: $font-family-sans-serif; -$font-size-base: 0.8rem !default; +$font-size-base: 0.8rem; $font-size-sm: 0.75rem; -$font-size-h1: 2.0em; -$font-size-h2: 1.5em; -$font-size-h3: 1.25em; -$font-size-h4: 0.8rem; -$font-size-h5: 0.8rem; -$font-size-h6: 0.8rem; +$h1-font-size: 2.0em; +$h2-font-size: 1.5em; +$h3-font-size: 1.25em; +$h4-font-size: 0.8rem; +$h5-font-size: 0.8rem; +$h6-font-size: 0.8rem; $close-font-weight: 100; @@ -92,16 +107,34 @@ $table-cell-padding: 0.25rem 0.5rem; // Navbar // -$navbar-light-color: $scipost-darkblue !default; -$navbar-light-hover-color: $scipost-darkblue !default; +$navbar-light-color: $scipost-darkblue; +$navbar-light-hover-color: $scipost-darkblue; +$nav-link-padding-y: 0.4rem; $input-border-radius: 0; -$btn-border-radius: 0; -$btn-border-radius-sm: 2px; +$btn-border-radius: $base-border-radius; +$btn-border-radius-sm: $base-border-radius; $btn-border-radius-lg: 0; // Block quote // $blockquote-font-size: $font-size-base; -$blockquote-border-color: #ececec; +// $blockquote-border-color: #ececec; + + + + +// --- +// +// Reset $theme-colors variable +$theme-colors: ( + primary: $blue, + secondary: $gray-600, + success: $green, + info: $cyan, + warning: $yellow, + danger: $red, + light: $gray-100, + dark: $gray-800 +); diff --git a/scipost/static/scipost/assets/css/_alert.scss b/scipost/static/scipost/assets/css/_alert.scss index 3556a5aaee18e4be626f6682f8ecfb66f18ce2dd..8235e019680133533460da91869a96b3f5191708 100644 --- a/scipost/static/scipost/assets/css/_alert.scss +++ b/scipost/static/scipost/assets/css/_alert.scss @@ -15,10 +15,6 @@ } } -.alert-error { - @include alert-variant($alert-danger-bg, $alert-danger-border, $alert-danger-text); -} - .alert-dismissable, // The misspelled .alert-dismissable was deprecated in 3.2.0. .alert-dismissible { // Adjust close link position diff --git a/scipost/static/scipost/assets/css/_buttons.scss b/scipost/static/scipost/assets/css/_buttons.scss index cdf1a4f7068d6a6b77225cc8001e89f01268ef6f..5fea20e28e1281e19d15417c8f59d2d5bb9413e2 100644 --- a/scipost/static/scipost/assets/css/_buttons.scss +++ b/scipost/static/scipost/assets/css/_buttons.scss @@ -7,12 +7,18 @@ font-family: inherit; } +.btn-secondary { + color: $scipost-darkblue; + background-color: $white; + border-color: $gray-600; +} + .category-group, .voting-group { border-radius: $card-border-radius; background-color: #ddd; color: $scipost-darkblue; - box-shadow: 0 1px 0 0 #ccc; + box-shadow: 0 1px 0 0 $gray-600; .btn { margin: 0; diff --git a/scipost/static/scipost/assets/css/_cards.scss b/scipost/static/scipost/assets/css/_cards.scss index da2d4976425059a1eb3be43a6e753df274454cfe..88d0e81b789dd24376c3085b14a84ff452134474 100644 --- a/scipost/static/scipost/assets/css/_cards.scss +++ b/scipost/static/scipost/assets/css/_cards.scss @@ -5,6 +5,15 @@ background-color: #F4F4F4; border-color: $card-grey-border-color; box-shadow: 0 1px 0 0 $card-shadow-color; + + .card-header { + background: transparent; + border-bottom-color: #fff; + } + + .card-footer { + background: transparent; + } } &.card-publication { @@ -16,7 +25,7 @@ border-bottom: 1px solid #ddd; } - .card-block { + .card-body { border-top: 1px solid #fff; background-color: #f8f8f8; } @@ -27,17 +36,17 @@ border-color: #f1f1f1; } -.card-header { - padding: 0.5rem 0; - margin: 0 0.75rem 0 0.75rem; -} +// .card-header { +// padding: 0.5rem 0; +// margin: 0 0.75rem; +// } -.card-footer { - padding: 0.75rem 0 0 0; - margin: 0 0.75rem 0.75rem 0.75rem; -} +// .card-footer { +// padding: 0.75rem 0 0 0; +// margin: 0 0.75rem 0.75rem 0.75rem; +// } -.list-group-item > .card-block { +.list-group-item > .card-body { padding: 0.5rem; } @@ -52,9 +61,6 @@ .card-news { .news-item .card-title { - // background-color: $scipost-darkblue; - // color: $scipost-light; - // padding: 0.5rem; color: $scipost-darkblue; padding: 0.5rem 0 0.25rem 0; border-bottom: 3px solid $scipost-light; @@ -75,7 +81,7 @@ background-color: #f8f8f8; } - .card-block { + .card-body { padding-top: 0.5rem; padding-bottom: 0.5rem; diff --git a/scipost/static/scipost/assets/css/_form.scss b/scipost/static/scipost/assets/css/_form.scss index 33a9f6b430bed5efa164b3e3a5bc0e156857c435..6f9d6076c011bd7a04a3c354ca57769c75f12bbe 100644 --- a/scipost/static/scipost/assets/css/_form.scss +++ b/scipost/static/scipost/assets/css/_form.scss @@ -11,11 +11,11 @@ } .has-error .help-block { - color: $brand-danger; + color: $red; } .has-error .multiple-checkbox .help-block { - color: $brand-danger; + color: $red; font-weight: 600; } @@ -81,7 +81,7 @@ input[type="file"] { .delete-form-group { > * { opacity: 0.5; - color: $brand-danger; + color: $red; &:last-child { // The delete button should always be visible diff --git a/scipost/static/scipost/assets/css/_homepage.scss b/scipost/static/scipost/assets/css/_homepage.scss index 48b81fe5fc598da01246b20bf091a3a02f48298f..16da6e2fd48b0948f08dec3ed1fe31c34d22b41c 100644 --- a/scipost/static/scipost/assets/css/_homepage.scss +++ b/scipost/static/scipost/assets/css/_homepage.scss @@ -61,7 +61,7 @@ } .card-header, - .card-block, + .card-body, .card-footer { border: 0; margin-left: 0; diff --git a/scipost/static/scipost/assets/css/_labels.scss b/scipost/static/scipost/assets/css/_labels.scss index 1c77e84a987f2c5893ce1847f32d14d5a6f4f971..6105f7d481ac7b7498b1fa701ef59ffb0e17d294 100644 --- a/scipost/static/scipost/assets/css/_labels.scss +++ b/scipost/static/scipost/assets/css/_labels.scss @@ -11,10 +11,10 @@ $label-box-shadow: none; $label-font-size: inherit; $label-primary-color: $white !default; -$label-primary-bg: $brand-primary !default; -$label-primary-border: $btn-primary-bg !default; +$label-primary-bg: $blue !default; +$label-primary-border: $blue !default; -$label-secondary-color: $gray-dark !default; +$label-secondary-color: $gray-800 !default; $label-secondary-bg: $white !default; $label-secondary-border: #ccc !default; @@ -23,20 +23,20 @@ $label-default-bg: #ccc; $label-default-border: #ccc; $label-info-color: $white !default; -$label-info-bg: $brand-info !default; -$label-info-border: $btn-info-bg !default; +$label-info-bg: $cyan !default; +$label-info-border: $cyan !default; $label-success-color: $white !default; -$label-success-bg: $brand-success !default; -$label-success-border: $btn-success-bg !default; +$label-success-bg: $green !default; +$label-success-border: $green !default; $label-warning-color: $white !default; -$label-warning-bg: $brand-warning !default; -$label-warning-border: $btn-warning-bg !default; +$label-warning-bg: $yellow !default; +$label-warning-border: $yellow !default; $label-danger-color: $white; -$label-danger-bg: $brand-danger !default; -$label-danger-border: $btn-danger-bg !default; +$label-danger-bg: $red !default; +$label-danger-border: $red !default; $label-padding-x-sm: .5rem; $label-padding-y-sm: .1rem; @@ -66,7 +66,7 @@ $label-transition: all .2s ease-in-out !default; border: $label-border-width solid transparent; box-shadow: $label-box-shadow; - @include button-size($label-padding-y, $label-padding-x, $label-font-size, $label-border-radius); + @include button-size($label-padding-y, $label-padding-x, $label-font-size, $label-border-radius, $btn-border-radius); @include transition($label-transition); } @@ -149,11 +149,11 @@ a.label-danger, .label-lg { // line-height: ensure even-numbered height of button next to large input - @include button-size($label-padding-y-lg, $label-padding-x-lg, $font-size-lg, $label-border-radius-lg); + @include button-size($label-padding-y-lg, $label-padding-x-lg, $font-size-lg, $label-border-radius-lg, $btn-border-radius-lg); } .label-sm { // line-height: ensure proper height of button next to small input - @include button-size($label-padding-y-sm, $label-padding-x-sm, $font-size-sm, $label-border-radius-sm); + @include button-size($label-padding-y-sm, $label-padding-x-sm, $font-size-sm, $label-border-radius-sm, $btn-border-radius-sm); } diff --git a/scipost/static/scipost/assets/css/_submissions.scss b/scipost/static/scipost/assets/css/_submissions.scss index 5669ab5fe5025f97d11c8d2aa04cba130f7f705f..dc4cdb57c1adc2ed9bcd0c956775392164e5ea86 100644 --- a/scipost/static/scipost/assets/css/_submissions.scss +++ b/scipost/static/scipost/assets/css/_submissions.scss @@ -4,18 +4,36 @@ table.submission_header { .report, .comment { - border-left: 4px solid #f4f4f4; padding-left: 1rem; + position: relative; + + &:before { + content: ''; + width: 4px; + height: 100%; + background: #f4f4f4; + position: absolute; + left: 0; + box-shadow: 0 1px 0 0 $card-shadow-color; + border: 1px solid; + border-color: $card-grey-border-color; + z-index: -1; + border-radius: $border-radius 0 $border-radius $border-radius; + } .reportid, .commentid { - box-shadow: none; display: block; margin-bottom: 1rem; - padding: 0.5rem 1rem; + margin-left: calc(-1rem + 3px); + padding: 0.5rem calc(1rem - 3px); background: #f4f4f4; - margin-left: -1rem; - border-bottom: 1px solid #ccc; + border: 1px solid; + border-color: $card-grey-border-color; + border-radius: 0 $border-radius $border-radius 0; + box-shadow: 0 1px 0 0 $card-shadow-color; + border-left: 0; + z-index: 99; } } @@ -25,11 +43,11 @@ table.submission_header { .required-actions { padding: 0.5rem; - background-color: $brand-danger; + background-color: $red; color: $white; border-radius: $card-border-radius; &.no-actions { - background-color: $brand-success; + background-color: $green; } } diff --git a/scipost/static/scipost/assets/css/style.scss b/scipost/static/scipost/assets/css/style.scss index 5d7150221dccd61915beaad5a837bc80e2a7dccc..a9ca9127664dd156d871fe1213d93ddd118ca978 100644 --- a/scipost/static/scipost/assets/css/style.scss +++ b/scipost/static/scipost/assets/css/style.scss @@ -1,7 +1,5 @@ -@import "node_modules/bootstrap/scss/_variables"; -@import "node_modules/bootstrap/scss/_mixins"; @import "./../config/preconfig.scss"; - +@import "node_modules/bootstrap/scss/variables"; /** * Make variables defined in preconfig.scss accessable in this file, * plus default variables and mixins of Bootstrap@4 diff --git a/scipost/templates/partials/scipost/contributor_assignments_as_td.html b/scipost/templates/partials/scipost/contributor_assignments_as_td.html new file mode 100644 index 0000000000000000000000000000000000000000..4f6d8b211ae8d9d316e7393bce74d0b16eabe1e9 --- /dev/null +++ b/scipost/templates/partials/scipost/contributor_assignments_as_td.html @@ -0,0 +1,14 @@ +{% load scipost_extras %} + +<td> + {% for expertise in contributor.expertises %} + {{expertise|get_specialization_display}}<br> + {% endfor %} +</td> + +<td>{{contributor.editorial_assignments.ongoing.count}}</td> +<td>{{contributor.editorial_assignments.last_year.count}} / {{contributor.editorial_assignments.count}}</td> +<td>{{contributor.editorial_assignments.last_year.accepted.count}} / {{contributor.editorial_assignments.accepted.count}}</td> +<td>{{contributor.editorial_assignments.last_year.refused.count}} / {{contributor.editorial_assignments.refused.count}}</td> +<td>{{contributor.editorial_assignments.last_year.ignored.count}} / {{contributor.editorial_assignments.ignored.count}}</td> +<td>{{contributor.editorial_assignments.last_year.completed.count}} / {{contributor.editorial_assignments.completed.count}}</td> diff --git a/scipost/templates/partials/scipost/remark_as_li.html b/scipost/templates/partials/scipost/remark_as_li.html new file mode 100644 index 0000000000000000000000000000000000000000..6554304e1a0a9f616a753188233660e4226dfbbf --- /dev/null +++ b/scipost/templates/partials/scipost/remark_as_li.html @@ -0,0 +1 @@ +<li><em>{{remark.contributor.first_name}} {{remark.contributor.last_name}} on {{remark.date|date:'Y-m-j'}}</em><p>{{remark.remark}}</p> diff --git a/scipost/templates/scipost/Fellow_activity_overview.html b/scipost/templates/scipost/Fellow_activity_overview.html index 3e2bacaa8d6f19781f406e14d306a351e64d8a80..e0515b48661fb8c87c7b2ca09f9a77260b286238 100644 --- a/scipost/templates/scipost/Fellow_activity_overview.html +++ b/scipost/templates/scipost/Fellow_activity_overview.html @@ -1,10 +1,15 @@ -{% extends 'scipost/base.html' %} +{% extends 'scipost/_personal_page_base.html' %} {% block pagetitle %}: Overview{% endblock pagetitle %} {% load scipost_extras %} {% load submissions_extras %} +{% block breadcrumb_items %} + {{block.super}} + <span class="breadcrumb-item">Overview of Fellow's activities</span> +{% endblock %} + {% block content %} <div class="row"> @@ -29,10 +34,12 @@ </thead> <tbody> {% for fellow in fellows %} - <tr> - <td><a href="{% url 'scipost:Fellow_activity_overview' Fellow_id=fellow.id %}">{{ fellow.user.last_name }}, {{ fellow.user.first_name }}</a></td> - {{ fellow.assignments_summary_as_td }} - </tr> + <tr> + <td> + <a href="{% url 'scipost:Fellow_activity_overview' %}?fellow={{fellow.id}}">{{ fellow.user.last_name }}, {{ fellow.user.first_name }}</a> + </td> + {% include 'partials/scipost/contributor_assignments_as_td.html' with contributor=fellow %} + </tr> {% endfor %} </tbody> </table> @@ -56,12 +63,14 @@ <li class="list-group-item"> {% include 'submissions/_submission_card_contributor_content.html' with submission=assignment.submission %} </li> + {% empty %} + <li class="list-group-item">No completed assignments</li> {% endfor %} </ul> </div> - <div class="col-12"> - <h3>Completed:</h3> + <div class="col-12 mt-4"> + <h3>Completed</h3> </div> <div class="col-12"> @@ -70,6 +79,8 @@ <li class="list-group-item"> {% include 'submissions/_submission_card_contributor_content.html' with submission=assignment.submission %} </li> + {% empty %} + <li class="list-group-item">No completed assignments</li> {% endfor %} </ul> </div> diff --git a/scipost/templates/scipost/about.html b/scipost/templates/scipost/about.html index b4a1fba125f328492168844f124c3b0400ecd0a9..eebe1181be5753a28268a1b63b6488f6f280ab0d 100644 --- a/scipost/templates/scipost/about.html +++ b/scipost/templates/scipost/about.html @@ -72,8 +72,8 @@ <h2 class="highlight">The SciPost Team</h2> </div> </div> -<div class="row"> - <div class="col-md-3 offset-md-1"> +<div class="row justify-content-center"> + <div class="col-md-4 col-lg-3"> <h3><a href="{% url 'scipost:foundation' %}">The SciPost Foundation</a></h3> <ul> <li>Chairman: Prof. <a href="http://jscaux.org" target="_blank">J.-S. Caux</a></li> @@ -81,7 +81,7 @@ <li>Treasurer: Dr J. van Wezel</li> </ul> </div> - <div class="col-md-6"> + <div class="col-md-7 col-lg-6"> <h3>Code Development and Server Maintenance</h3> <ul> <li>Lead programmer: J.-S. Caux</li> @@ -92,27 +92,27 @@ <hr> <div class="row"> - <div class="col-12"> + <div class="col"> <h2 class="highlight" id="advisory_board">Advisory Board</h2> </div> </div> -<div class="row"> - <div class="col-md-3 offset-md-1"> +<div class="row justify-content-center"> + <div class="col-lg-3 col-md-4"> <ul> <li>Prof. <a target="_blank" href="http://www.nikhef.nl/~h02/">J. J. Engelen</a><br/>(U. van Amsterdam)</li> <li>Prof. <a target="_blank" href="https://www.asc.ox.ac.uk/person/18">P. Fendley</a><br/>(Oxford; <a href="https://www.asc.ox.ac.uk/all-souls-college-oxford">All Souls College</a>)</li> <li>Prof. <a target="_blank" href="http://www.ru.nl/highenergyphysics/ehep/persons/sijbrand_de_jong/">S. J. de Jong</a><br/>(Radboud Univ. Nijmegen,<br/>President CERN Council)</li> </ul> </div> - <div class="col-md-3"> + <div class="col-lg-3 col-md-4"> <ul> <li>Prof. <a target="_blank" href="http://www.ens-lyon.fr/PHYSIQUE/presentation/annuaire/maillet-jean-michel">J. M. Maillet</a><br/>(ENS Lyon)</li> <li>Prof. <a target="_blank" href="http://www.ru.nl/ssi/members/theo_rasing/">T. Rasing</a><br/>(Radboud Univ. Nijmegen)</li> <li>Prof. <a target="_blank" href="http://atomchip.org/general-information/people/schmiedmayer/">J. Schmiedmayer</a><br/>(TU Vienna)</li> </ul> </div> - <div class="col-md-3"> + <div class="col-lg-3 col-md-4"> <ul> <li>Prof. <a target="_blank" href="http://www.professoren.tum.de/en/spohn-herbert/">H. Spohn</a><br/>(TU Munich)</li> <li>Prof. <a target="_blank" href="http://www.comp.phys.ethz.ch/people/troyer.html">M. Troyer</a><br/>(ETH Zurich)</li> diff --git a/scipost/templates/scipost/bare_base.html b/scipost/templates/scipost/bare_base.html index 418706259b790f51a857a6136e7c9f07edacf0c5..663e6e2da76ba8114249f5374c40a1a68dc575a9 100644 --- a/scipost/templates/scipost/bare_base.html +++ b/scipost/templates/scipost/bare_base.html @@ -9,7 +9,6 @@ <link href="https://fonts.googleapis.com/css?family=Merriweather+Sans:300,400,700" rel="stylesheet"> <link rel="stylesheet" type="text/css" href="{% static 'scipost/SciPost.css' %}" /> - {% render_bundle 'bootstrap' 'css' %} {% render_bundle 'main' 'css' %} <link rel="shortcut icon" href="{% static 'scipost/images/scipost_favicon.png' %}"/> @@ -46,7 +45,6 @@ <script type="text/javascript" async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML"></script> {% render_bundle 'main' 'js' %} - {% render_bundle 'bootstrap' 'js' %} {% block footer_script %} {% endblock footer_script %} diff --git a/scipost/templates/scipost/call.html b/scipost/templates/scipost/call.html index 2da3051c915782e9a72ae95c5c7374c936af6b32..95a77b39b83f4836ef6984c91852d067536fad60 100644 --- a/scipost/templates/scipost/call.html +++ b/scipost/templates/scipost/call.html @@ -7,12 +7,12 @@ {% block content %} <div class="row"> - <div class="col-12"> + <div class="col"> <h1 class="highlight"><a href="{% url 'scipost:about' %}">A call for openness</a></h1> </div> </div> -<div class="row"> - <div class="col-md-10 offset-md-1"> +<div class="row justify-content-center"> + <div class="col-lg-10"> <p> Scientific publishing is currently making the news headlines. With the recent <a href="http://english.eu2016.nl/documents/reports/2016/04/04/amsterdam-call-for-action-on-open-science">Amsterdam call for action on open science</a> diff --git a/scipost/templates/scipost/change_password.html b/scipost/templates/scipost/change_password.html index ffac2c40459b6a3d8c61fa8ddc8f8d6f517494aa..dd5f72df1f9d3e4d544cba001cfb9f2f1c74a3be 100644 --- a/scipost/templates/scipost/change_password.html +++ b/scipost/templates/scipost/change_password.html @@ -1,13 +1,18 @@ -{% extends 'scipost/base.html' %} +{% extends 'scipost/_personal_page_base.html' %} {% load bootstrap %} {% block pagetitle %}: change password{% endblock pagetitle %} +{% block breadcrumb_items %} + {{block.super}} + <span class="breadcrumb-item">Change password</span> +{% endblock %} + {% block content %} -<div class="row"> - <div class="col-lg-8 offset-lg-2"> +<div class="row justify-content-center"> + <div class="col-lg-8"> <h1 class="highlight">Change your SciPost password</h1> <form action="{% url 'scipost:change_password' %}" method="post"> diff --git a/scipost/templates/scipost/comments_block.html b/scipost/templates/scipost/comments_block.html index 89cb34eb3003e938a4b989ce601b6266f46c4b3c..bc60d0b67be828c920578e4ae16aa2194351bb3c 100644 --- a/scipost/templates/scipost/comments_block.html +++ b/scipost/templates/scipost/comments_block.html @@ -3,7 +3,7 @@ <div class="row"> <div class="col-12"> <div class="card card-grey"> - <div class="card-block"> + <div class="card-body"> <h2 class="card-title mb-0">Comments{% if type_of_object %} on this {{type_of_object}}{% endif %}</h2> <a href="javascript:;" data-toggle="toggle" data-target="#commentslist">Toggle comments view</a> </div> diff --git a/scipost/templates/scipost/contributor_info.html b/scipost/templates/scipost/contributor_info.html index de3c1c059991c66714ce4bd67a331014f77190c1..f97fa477386456fd5faf5ea437fee782e89043f8 100644 --- a/scipost/templates/scipost/contributor_info.html +++ b/scipost/templates/scipost/contributor_info.html @@ -7,7 +7,7 @@ <div class="row"> <div class="col-12"> <div class="card card-grey"> - <div class="card-block"> + <div class="card-body"> <h1 class="card-title mb-0">Contributor info</h1> <h3 class="card-subtitle text-muted">{{contributor.get_formal_display}}</h2> </div> diff --git a/scipost/templates/scipost/email_particular.html b/scipost/templates/scipost/email_particular.html index 35ca4b7b650b540f3f54d44c210faf57119a8f6f..b9a3037ce57b1c0347fdc6392d514cf3ed2891b4 100644 --- a/scipost/templates/scipost/email_particular.html +++ b/scipost/templates/scipost/email_particular.html @@ -13,14 +13,16 @@ {% block content %} <div class="row"> - <div class="col-12"> + <div class="col"> <h1 class="highlight">Email a particular</h1> </div> - <div class="col-md-8 offset-md-2"> +</div> +<div class="row justify-content-center"> + <div class="col-md-8"> <form action="{% url 'scipost:email_particular' %}" method="post"> {% csrf_token %} {{ form|bootstrap:'0,12' }} - <input type="submit" class="btn btn-secondary" value="Send email"/> + <input type="submit" class="btn btn-primary" value="Send email"/> </form> </div> diff --git a/scipost/templates/scipost/foundation.html b/scipost/templates/scipost/foundation.html index 0344ceac5bd2ccc754130e3d082c4248415ef6cf..a331482fe4e8ac5aa2f5984995045cc6d569e4d3 100644 --- a/scipost/templates/scipost/foundation.html +++ b/scipost/templates/scipost/foundation.html @@ -32,9 +32,9 @@ <div class="row"> <div class="col-12"> <div class="card-deck"> - <div class="card"> - <div class="card-block"> - <h2 class="highlight">SciPost Board</h2> + <div class="card border-0"> + <div class="card-body"> + <h2 class="highlight">SciPost Board</h2> <ul> <li>Chairman: Prof. J.-S. Caux</li> <li>Secretary: Dr J. van Mameren</li> @@ -44,10 +44,9 @@ </div> </div> - <div class="card"> - <div class="card-block"> - <h2 class="highlight">Contact details</h2> - + <div class="card border-0"> + <div class="card-body"> + <h2 class="highlight">Contact details</h2> <address class="px-2"> c/o Prof. <a href="mailto:jscaux@scipost.org">J.-S. Caux</a></br> Institute of Physics</br> @@ -61,10 +60,9 @@ </div> </div> - <div class="card"> - <div class="card-block"> - <h2 class="highlight">Registration</h2> - + <div class="card border-0"> + <div class="card-body"> + <h2 class="highlight">Registration</h2> <div class="px-2"> <p> Dutch Chamber of Commerce nr 65280083.</br> @@ -81,22 +79,22 @@ <div class="row"> <div class="col-12"> <div class="card-deck"> - <div class="card"> - <div class="card-block"> - <h2 class="highlight">Registration</h2> + <div class="card border-0"> + <div class="card-body"> + <h2 class="highlight">Registration</h2> </div> </div> - <div class="card"> - <div class="card-block"> - <h2 class="highlight">Yearly Reports</h2> + <div class="card border-0"> + <div class="card-body"> + <h2 class="highlight">Yearly Reports</h2> <p class="px-2">2016 (to be published)</p> </div> </div> - <div class="card"> - <div class="card-block"> - <h2 class="highlight">Financial Reports</h2> + <div class="card border-0"> + <div class="card-body"> + <h2 class="highlight">Financial Reports</h2> <p class="px-2">2016-7 (to be published)</p> </div> </div> diff --git a/scipost/templates/scipost/index.html b/scipost/templates/scipost/index.html index 6a4824519656a18bdab668c64c071350f3930305..e4123e9a08226077699209ab1b2e29c25aaf9fe2 100644 --- a/scipost/templates/scipost/index.html +++ b/scipost/templates/scipost/index.html @@ -26,21 +26,21 @@ <div class="row"> <div class="col-lg-6"> <!-- Latest publications --> - <div class="card card-grey px-3"> - <div class="card-header"> - <h2 class="card-title mb-0"><a href="{% url 'journals:journals' %}" class="text-black">Latest Publications</a></h2> + <div class="card card-grey px-4"> + <div class="card-header px-0"> + <h2><a href="{% url 'journals:journals' %}" class="text-black">Latest Publications</a></h2> </div> - <div class="card-block pt-0"> + <div class="card-body p-0"> <ul class="list-group list-group-flush"> {% for publication in publications %} <li class="list-group-item"> - <div class="card-block px-0"> + <div class="card-body px-0"> {% include 'journals/_publication_details_small.html' with publication=publication %} </div> </li> {% endfor %} <li class="list-group-item"> - <div class="card-block pt-3"> + <div class="card-body pt-3 mb-2"> <a href="{% url 'journals:journals' %}">All Journals</a> </div> </li> @@ -51,11 +51,11 @@ <div class="col-lg-6"> <!-- Latest submissions --> - <div class="card card-grey px-3"> - <div class="card-header"> - <h2 class="card-title mb-0"><a href="{% url 'submissions:submissions' %}" class="text-black">Latest Submissions</a></h2> + <div class="card card-grey px-4"> + <div class="card-header px-0"> + <h2><a href="{% url 'submissions:submissions' %}" class="text-black">Latest Submissions</a></h2> </div> - <div class="card-block pt-0"> + <div class="card-body p-0"> <ul class="list-group list-group-flush"> {% for submission in submissions %} <li class="list-group-item"> @@ -63,7 +63,7 @@ </li> {% endfor %} <li class="list-group-item"> - <div class="card-block pt-3"> + <div class="card-body pt-3 mb-2"> <a href="{% url 'submissions:submissions' %}">All submissions</a> </div> </li> @@ -78,7 +78,7 @@ {% if not user.is_authenticated %} <!-- Register --> <div class="card card-grey"> - <div class="card-block"> + <div class="card-body"> <h2 class="card-title mb-0">Register</h2> <p class="m-0">Professional scientists (PhD students and above) can become Contributors to SciPost by filling the <a href="{% url 'scipost:register' %}">registration form</a>.</p> </div> @@ -96,7 +96,7 @@ </h2> <h4 class="card-subtitle pb-0 text-muted">Latest news and announcements.</h4> </div> - <div class="card-block"> + <div class="card-body"> <ul class="list-group list-group-flush"> {% if latest_newsitem %} <li class="list-group-item"> @@ -114,7 +114,7 @@ <!-- Partners --><!-- Disabled <div class="card card-grey"> - <div class="card-block"> + <div class="card-body"> <h2 class="card-title"> <a href="{% url 'partners:partners' %}">Partners</a> </h2> @@ -136,7 +136,7 @@ <!-- Summarized --> <div class="card card-grey"> - <div class="card-block"> + <div class="card-body"> <h2 class="card-title"> <a href="{% url 'journals:journals' %}">Journals</a> </h2> diff --git a/scipost/templates/scipost/personal_page.html b/scipost/templates/scipost/personal_page.html index 733abc2826148ebdb0d93869bd1b82458ef3c17e..c7bd7000a7cb2b094874ad646d8e9f3a9b4580f2 100644 --- a/scipost/templates/scipost/personal_page.html +++ b/scipost/templates/scipost/personal_page.html @@ -79,7 +79,7 @@ <div class="row"> <div class="col-12"> <div class="card card-grey"> - <div class="card-block"> + <div class="card-body"> <h2 class="card-title mb-0">Your Account</h2> </div> </div> @@ -103,36 +103,42 @@ {% endif %} </div> <div class="col-md-6"> + {% if not request.user.contributor.is_currently_available %} + <h3 class="text-warning">You are currently unavailable</h3> + <p>Check your availability underneath if this should not be the case.</p> + <hr> + {% endif %} + {% if 'SciPost Administrators' in user_groups %} - <h3>You are a SciPost Administrator.</h3> + <h3>You are a SciPost Administrator.</h3> {% endif %} {% if 'Editorial Administrators' in user_groups %} - <h3>You are a SciPost Editorial Administrator.</h3> + <h3>You are a SciPost Editorial Administrator.</h3> {% endif %} {% if 'Advisory Board' in user_groups %} - <h3>You are a member of the Advisory Board.</h3> + <h3>You are a member of the Advisory Board.</h3> {% endif %} {% if 'Editorial College' in user_groups %} - <h3>You are a member of the Editorial College.</h3> - {% endif %} - {% if 'Vetting Editors' in user_groups %} - <h3>You are a SciPost Vetting Editor.</h3> - {% endif %} - {% if 'Registered Contributors' in user_groups %} - <h3>You are a Registered Contributor.</h3> - {% endif %} - {% if 'Testers' in user_groups %} - <h3>You are a SciPost Tester.</h3> - {% endif %} - {% if 'Ambassadors' in user_groups %} - <h3>You are a SciPost Ambassador.</h3> - {% endif %} - {% if 'Junior Ambassadors' in user_groups %} - <h3>You are a SciPost Junior Ambassador.</h3> - {% endif %} - {% if 'Production Officers' in user_groups %} - <h3>You are a SciPost Production Officer.</h3> - {% endif %} + <h3>You are a member of the Editorial College.</h3> + {% endif %} + {% if 'Vetting Editors' in user_groups %} + <h3>You are a SciPost Vetting Editor.</h3> + {% endif %} + {% if 'Registered Contributors' in user_groups %} + <h3>You are a Registered Contributor.</h3> + {% endif %} + {% if 'Testers' in user_groups %} + <h3>You are a SciPost Tester.</h3> + {% endif %} + {% if 'Ambassadors' in user_groups %} + <h3>You are a SciPost Ambassador.</h3> + {% endif %} + {% if 'Junior Ambassadors' in user_groups %} + <h3>You are a SciPost Junior Ambassador.</h3> + {% endif %} + {% if 'Production Officers' in user_groups %} + <h3>You are a SciPost Production Officer.</h3> + {% endif %} <h3 class="mt-3">Update your personal data or password</h3> @@ -145,16 +151,12 @@ <hr> <div class="row"> - <div class="col-12"> - <div class="card card-grey"> - <div class="card-block"> - <h2 class="card-title mb-0">Your Availability</h2> - </div> - </div> + <div class="col"> + <h2 class="highlight">Your Availability</h2> </div> </div> - <div class="row"> - <div class="col-md-4 offset-md-1"> + <div class="row justify-content-center"> + <div class="col-md-4 mr-md-5"> <p>To help with the editorial workflow, you can inform us of any periods during which you are unavailable. We will do our best to respect these.</p> <h3 class="mb-3">Mark a period as unavailable:</h3> <form action="{% url 'scipost:mark_unavailable_period' %}" method="post"> @@ -163,10 +165,10 @@ <input class="btn btn-secondary" type="submit" value="Submit" /> </form> </div> - <div class="col-md-4 offset-md-1"> + <div class="col-md-4 ml-md-5"> {% if unavailabilities %} <h3>Your unavailability periods in our records</h3> - <p class="text-muted">(YYYY-DD-MM)</p> + <p class="text-muted">(YYYY-MM-DD)</p> <table class="table"> <tr> <th>Start</th> @@ -198,7 +200,7 @@ <div class="row"> <div class="col-12"> <div class="card card-grey"> - <div class="card-block"> + <div class="card-body"> <h2 class="card-title mb-0">Pending Editorial Actions</h2> </div> </div> @@ -350,7 +352,7 @@ <div class="row"> <div class="col-12"> <div class="card card-grey"> - <div class="card-block"> + <div class="card-body"> <h2 class="card-title mb-0">Production Tasks</h2> </div> </div> @@ -374,7 +376,7 @@ <div class="row"> <div class="col-12"> <div class="card card-grey"> - <div class="card-block"> + <div class="card-body"> <h2 class="card-title">Refereeing Tasks</h2> <ul class="mb-0"> <li><a href="{% url 'submissions:accept_or_decline_ref_invitations' %}">Accept/decline refereeing invitations</a> ({{ nr_ref_inv_to_consider }})</li> @@ -431,7 +433,7 @@ {% comment %} Temporary: There is already a template for a "Report summary" in a parallel (unmerged) branch. Awaiting merge to use that template. {% endcomment %} - <div class="card-block {% block cardblock_class_block %}{% endblock %}"> + <div class="card-body {% block cardblock_class_block %}{% endblock %}"> <h3>Report on Submission <a href="{{report.submission.get_absolute_url}}">{{report.submission.title}}</a></h3> <table> <tr> @@ -459,7 +461,7 @@ <div class="row"> <div class="col-12"> <div class="card card-grey"> - <div class="card-block"> + <div class="card-body"> <h2 class="card-title">Submissions</h2> <ul class="mb-0"> {% if nr_submission_authorships_to_claim > 0 %} @@ -499,7 +501,7 @@ <div class="row"> <div class="col-12"> <div class="card card-grey"> - <div class="card-block"> + <div class="card-body"> <h2 class="card-title">Commentaries</h2> <ul class="mb-0"> {% if nr_commentary_authorships_to_claim > 0 %} @@ -535,7 +537,7 @@ <div class="row"> <div class="col-12"> <div class="card card-grey"> - <div class="card-block"> + <div class="card-body"> <h2 class="card-title">Theses</h2> <ul class="mb-0"> {% if nr_thesis_authorships_to_claim > 0 %} @@ -572,7 +574,7 @@ <div class="row"> <div class="col-12"> <div class="card card-grey"> - <div class="card-block"> + <div class="card-body"> <h2 class="card-title mb-0">Your Comments</h2> </div> </div> @@ -599,7 +601,7 @@ <div class="row"> <div class="col-12"> <div class="card card-grey"> - <div class="card-block"> + <div class="card-body"> <h2 class="card-title mb-0">Your Author Replies</h2> </div> </div> diff --git a/scipost/templates/scipost/register.html b/scipost/templates/scipost/register.html index 63f6a0c97c3e53365f07851fe9c8e446198e5729..a5420ffc90fc8d85344482980f288d4ccd8d9ebc 100644 --- a/scipost/templates/scipost/register.html +++ b/scipost/templates/scipost/register.html @@ -16,9 +16,9 @@ </div> <div class="row"> - <div class="col-md-4 mb-3"> + <div class="col-md-4 mb-md-2"> <div class="card card-outline-secondary"> - <div class="card-block"> + <div class="card-body"> <h3>Notes:</h3> <p class="text-danger"><em>Only professional academics (staff members, postdocs, PhD students) can register!</em></p> <p>Required fields are marked with a *.</p> @@ -28,11 +28,11 @@ </div> </div> </div> - <div class="offset-md-1 col-md-7"> + <div class="col-md-8 col-lg-7 ml-lg-auto"> <form action="{% url 'scipost:register' %}" method="post"> {% csrf_token %} - {{ form|bootstrap }} + {{ form|bootstrap:'3,9' }} <input class="btn btn-primary" type="submit" value="Submit" /> </form> diff --git a/scipost/templates/scipost/registration_invitations.html b/scipost/templates/scipost/registration_invitations.html index 1fee0baa3705ccf9843f59d33dfd7a5bb64ed33e..a495c7ce7be80a89ee415f1daa8428276ec7e04e 100644 --- a/scipost/templates/scipost/registration_invitations.html +++ b/scipost/templates/scipost/registration_invitations.html @@ -36,7 +36,7 @@ $(document).ready(function(){ <div class="row"> <div class="col-12"> <div class="card card-grey"> - <div class="card-block"> + <div class="card-body"> <h1 class="card-title">Registration Invitations</h1> {% if request.user|is_in_group:'SciPost Administrators' %} <h3>Perform a <a href="{% url 'scipost:registration_invitations_cleanup' %}">cleanup</a> of existing invitations.</h3> diff --git a/scipost/templates/scipost/reset_password.html b/scipost/templates/scipost/reset_password.html index e8169dba2c0608cf7b3b4d23b8c83c65d12f15f8..48dad3becede7037661443ccf8a70821619269c4 100644 --- a/scipost/templates/scipost/reset_password.html +++ b/scipost/templates/scipost/reset_password.html @@ -7,9 +7,9 @@ {% block content %} -<div class="row"> - <div class="col-md-4 offset-md-4"> - <h3>Reset password request form</h3> +<div class="row justify-content-center"> + <div class="col-md-4"> + <h2>Reset password request form</h2> <form method="post"> {% csrf_token %} {{ form|bootstrap }} diff --git a/scipost/templates/scipost/reset_password_confirm.html b/scipost/templates/scipost/reset_password_confirm.html index 60afebc99f0f143ac49d577665f4475f7e3a6cb2..fe4d5ba196d01f9564082bc223b181a06d1dd59d 100644 --- a/scipost/templates/scipost/reset_password_confirm.html +++ b/scipost/templates/scipost/reset_password_confirm.html @@ -6,8 +6,8 @@ {% block content %} -<div class="row"> - <div class="col-md-6 offset-md-3"> +<div class="row justify-content-center"> + <div class="col-md-8 col-lg-6"> {% if validlink %} <form method="post"> {% csrf_token %} diff --git a/scipost/templates/scipost/unavailability_period_form.html b/scipost/templates/scipost/unavailability_period_form.html index fc4b11d94fad505d3e50293f9104bd09a166ad68..c014e4cea8bc1fa587dabe090ba4afd366c4283b 100644 --- a/scipost/templates/scipost/unavailability_period_form.html +++ b/scipost/templates/scipost/unavailability_period_form.html @@ -11,8 +11,8 @@ {% block content %} -<div class="row"> - <div class="col-lg-8 offset-lg-2"> +<div class="row justify-content-center"> + <div class="col-lg-8"> <h1 class="highlight">Mark a period as unavailable</h1> <form method="post"> diff --git a/scipost/templates/scipost/update_personal_data.html b/scipost/templates/scipost/update_personal_data.html index c78cffd259ee0119827e4d310ae2760db81812f1..ab693489e3a48571ac07aba497bc6e9053c71445 100644 --- a/scipost/templates/scipost/update_personal_data.html +++ b/scipost/templates/scipost/update_personal_data.html @@ -1,9 +1,14 @@ -{% extends 'scipost/base.html' %} +{% extends 'scipost/_personal_page_base.html' %} {% block pagetitle %}: update personal data{% endblock pagetitle %} {% load bootstrap %} +{% block breadcrumb_items %} + {{block.super}} + <span class="breadcrumb-item">Update personal data</span> +{% endblock %} + {% block content %} {% if cont_form %} @@ -86,8 +91,8 @@ {% endif %} -<div class="row"> - <div class="col-lg-10 offset-lg-1"> +<div class="row justify-content-center"> + <div class="col-lg-10"> <h1 class="highlight">Update your personal data</h1> <form action="{% url 'scipost:update_personal_data' %}" method="post"> {% csrf_token %} @@ -95,7 +100,7 @@ {% if cont_form %} {{cont_form|bootstrap}} {% endif %} - <input type="submit" class="btn btn-secondary" value="Update" /> + <input type="submit" class="btn btn-primary" value="Update" /> </form> </div> </div> diff --git a/scipost/templates/scipost/vet_registration_requests.html b/scipost/templates/scipost/vet_registration_requests.html index ba413f069c66dc4085568b4e3c23b1113607cb03..45675acc112a77555438c0232881bbb6bf0c228c 100644 --- a/scipost/templates/scipost/vet_registration_requests.html +++ b/scipost/templates/scipost/vet_registration_requests.html @@ -26,7 +26,7 @@ $(function() { <div class="row"> <div class="col-12"> <div class="card card-grey"> - <div class="card-block"> + <div class="card-body"> <h1 class="card-title">SciPost Registration requests to vet:</h1> <p class="card-text mb-0"> These Contributors are currently not registered (submitting, commenting and voting disabled).<br> diff --git a/scipost/urls.py b/scipost/urls.py index 8eaf7b40ed5126af0d0397149b1081e65ac4c964..eb36c827b2913fe26406a8324c5bc1d35594b782 100644 --- a/scipost/urls.py +++ b/scipost/urls.py @@ -168,11 +168,7 @@ urlpatterns = [ # Editorial College # ##################### url(r'^EdCol_by-laws$', views.EdCol_bylaws, name='EdCol_by-laws'), - url(r'^Fellow_activity_overview/(?P<Fellow_id>[0-9]+)$', - views.Fellow_activity_overview, - name='Fellow_activity_overview'), - url(r'^Fellow_activity_overview$', - views.Fellow_activity_overview, + url(r'^Fellow_activity_overview$', views.Fellow_activity_overview, name='Fellow_activity_overview'), diff --git a/scipost/views.py b/scipost/views.py index 22361d5ad78a62e367d3de67af4123a1843f339b..5d287072bdfd0f40103691857501dc7c44eba629 100644 --- a/scipost/views.py +++ b/scipost/views.py @@ -1299,22 +1299,27 @@ def EdCol_bylaws(request): @permission_required('scipost.can_view_pool', return_403=True) -def Fellow_activity_overview(request, Fellow_id=None): - fellows = Contributor.objects.filter( - user__groups__name='Editorial College').order_by('user__last_name') - context = {'fellows': fellows} - if Fellow_id: - fellow = get_object_or_404(Contributor, pk=Fellow_id) - context['fellow'] = fellow - - assignments_ongoing = (EditorialAssignment.objects.get_for_user_in_pool(request.user) - .filter(accepted=True, completed=False, to=fellow) - .order_by('-date_created')) - context['assignments_ongoing'] = assignments_ongoing - - assignments_completed = (EditorialAssignment.objects.get_for_user_in_pool(request.user) - .filter(completed=True, to=fellow).order_by('-date_created')) - context['assignments_completed'] = assignments_completed +def Fellow_activity_overview(request): + fellows = (Contributor.objects.fellows() + .prefetch_related('editorial_assignments') + .order_by('user__last_name')) + context = { + 'fellows': fellows + } + + if request.GET.get('fellow'): + try: + fellow = fellows.get(pk=request.GET['fellow']) + context['fellow'] = fellow + + context['assignments_ongoing'] = (fellow.editorial_assignments + .ongoing() + .get_for_user_in_pool(request.user)) + context['assignments_completed'] = (fellow.editorial_assignments + .completed() + .get_for_user_in_pool(request.user)) + except Contributor.DoesNotExist: + pass return render(request, 'scipost/Fellow_activity_overview.html', context) diff --git a/submissions/managers.py b/submissions/managers.py index 3465c643a9d6c0accbaf9fafd86763e35c2474dc..e4b5b5f2a6ee91e784ba9b0d144543c2fe02f373 100644 --- a/submissions/managers.py +++ b/submissions/managers.py @@ -144,12 +144,30 @@ class SubmissionEventQuerySet(models.QuerySet): return self.filter(created__gte=timezone.now() - datetime.timedelta(hours=hours)) -class EditorialAssignmentManager(models.Manager): +class EditorialAssignmentQuerySet(models.QuerySet): def get_for_user_in_pool(self, user): return self.exclude(submission__authors=user.contributor)\ .exclude(Q(submission__author_list__icontains=user.last_name), ~Q(submission__authors_false_claims=user.contributor)) + def last_year(self): + return self.filter(date_created__gt=timezone.now() - timezone.timedelta(days=365)) + + def accepted(self): + return self.filter(accepted=True) + + def refused(self): + return self.filter(accepted=False) + + def ignored(self): + return self.filter(accepted=None) + + def completed(self): + return self.filter(completed=True) + + def ongoing(self): + return self.filter(completed=False).accepted() + class EICRecommendationManager(models.Manager): def get_for_user_in_pool(self, user): diff --git a/submissions/models.py b/submissions/models.py index 4c69c9e7061ccf1d4f273bc94a8ee34417772968..f5a03da1d5c5e3bd6f4ff811d39a3162bf9b3a39 100644 --- a/submissions/models.py +++ b/submissions/models.py @@ -15,7 +15,7 @@ from .constants import ASSIGNMENT_REFUSAL_REASONS, ASSIGNMENT_NULLBOOL,\ REPORT_STATUSES, STATUS_UNVETTED, SUBMISSION_EIC_RECOMMENDATION_REQUIRED,\ SUBMISSION_CYCLES, CYCLE_DEFAULT, CYCLE_SHORT, CYCLE_DIRECT_REC,\ EVENT_GENERAL, EVENT_TYPES, EVENT_FOR_AUTHOR, EVENT_FOR_EIC -from .managers import SubmissionQuerySet, EditorialAssignmentManager, EICRecommendationManager,\ +from .managers import SubmissionQuerySet, EditorialAssignmentQuerySet, EICRecommendationManager,\ ReportQuerySet, SubmissionEventQuerySet, RefereeInvitationQuerySet from .utils import ShortSubmissionCycle, DirectRecommendationSubmissionCycle,\ GeneralSubmissionCycle @@ -264,7 +264,11 @@ class EditorialAssignment(SubmissionRelatedObjectMixin, models.Model): date_created = models.DateTimeField(default=timezone.now) date_answered = models.DateTimeField(blank=True, null=True) - objects = EditorialAssignmentManager() + objects = EditorialAssignmentQuerySet.as_manager() + + class Meta: + default_related_name = 'editorial_assignments' + ordering = ['-date_created'] def __str__(self): return (self.to.user.first_name + ' ' + self.to.user.last_name + ' to become EIC of ' + diff --git a/submissions/templates/partials/submissions/admin/editorial_admin_summary.html b/submissions/templates/partials/submissions/admin/editorial_admin_summary.html index 60f10bf1a8c09a4a22ccc488b10801ad09221c97..5d8c754470bb3573e32c6558ef502908143b8117 100644 --- a/submissions/templates/partials/submissions/admin/editorial_admin_summary.html +++ b/submissions/templates/partials/submissions/admin/editorial_admin_summary.html @@ -96,7 +96,7 @@ {% if not submission.editor_in_charge %} <li>EIC Assignment requests:</li> <ul> - {% for assignment in submission.editorialassignment_set.all %} + {% for assignment in submission.editorial_assignments.all %} {% include 'submissions/_assignment_info.html' with assignment=assignment %} {% empty %} <li>None found. <a href="{% url 'submissions:assign_submission' submission.arxiv_identifier_w_vn_nr %}">Send a first assignment request</a></li> diff --git a/submissions/templates/submissions/_arxiv_queryresult.html b/submissions/templates/submissions/_arxiv_queryresult.html index 6d27ad83fbb256515ca15721c543eb0f860e2fd0..5f2ad667f742f9c0ea66a2915602b3fde1172c26 100644 --- a/submissions/templates/submissions/_arxiv_queryresult.html +++ b/submissions/templates/submissions/_arxiv_queryresult.html @@ -1,4 +1,4 @@ -<div class="card-block"> +<div class="card-body"> <h3 class="card-title">{{ item.title }}</h3> <div class="card-text"> {% for author in item.authors %} diff --git a/submissions/templates/submissions/_editorial_communication_content.html b/submissions/templates/submissions/_editorial_communication_content.html index b83bcbcce5ebedea44b9db9c4f9ac823283ed618..3b597d2bd7a8d4866b3ad7031246d8fd7654a3ae 100644 --- a/submissions/templates/submissions/_editorial_communication_content.html +++ b/submissions/templates/submissions/_editorial_communication_content.html @@ -1,4 +1,4 @@ -<div class="card-block"> +<div class="card-body"> <div class="font-weight-bold d-inline-block"> {% if communication.comtype == 'EtoA' %} From you to Authors diff --git a/submissions/templates/submissions/_recommendation_author_content.html b/submissions/templates/submissions/_recommendation_author_content.html index d7a2bee96eb5cf833da8980c3b38ae62da5ef409..abfa95c3d32325ed7ad3eeaa56221bb539421f58 100644 --- a/submissions/templates/submissions/_recommendation_author_content.html +++ b/submissions/templates/submissions/_recommendation_author_content.html @@ -1,4 +1,4 @@ -<div class="card-block"> +<div class="card-body"> <h2 class="pb-0 mb-0">Editorial Recommendation</h2> {% block recommendation_header %} diff --git a/submissions/templates/submissions/_refereeing_invitation_card_content.html b/submissions/templates/submissions/_refereeing_invitation_card_content.html index e90930c773afc24efa3ea9b0e676e25d2f7f617b..383f50fd3d8ea650d0ed908efcce3e7ed7583f54 100644 --- a/submissions/templates/submissions/_refereeing_invitation_card_content.html +++ b/submissions/templates/submissions/_refereeing_invitation_card_content.html @@ -1,4 +1,4 @@ -<div class="card-block"> +<div class="card-body"> <h3 class="card-title">{% if invitation.submission.reporting_deadline_has_passed %}<span class="label label-sm label-danger mr-2">overdue</span> {% endif %}{{ invitation.submission }}</h3> <h4 class="card-subtitle text-muted">due: {{ invitation.submission.reporting_deadline }}</h4> diff --git a/submissions/templates/submissions/_required_actions_block.html b/submissions/templates/submissions/_required_actions_block.html index 59c82998dc34bb6c21c31804385d8b72ffbacea1..33279aa057e062f25f38f6465c00942b341c7e69 100644 --- a/submissions/templates/submissions/_required_actions_block.html +++ b/submissions/templates/submissions/_required_actions_block.html @@ -1,7 +1,9 @@ {% if submission.cycle.has_required_actions %} - <div class="card {% if submission.cycle.get_required_actions %}card-danger text-white{% else %}card-outline-success text-success{% endif %}"> - <div class="card-block"> - <h3 class="card-title pt-0">Required actions:</h3> + <div class="card {% if submission.cycle.get_required_actions %}bg-danger text-white{% else %}border-success text-success{% endif %}"> + <div class="card-header py-1 {% if not submission.cycle.get_required_actions %}bg-transparent border-0 pb-0{% endif %}"> + <h3>Required actions:</h3> + </div> + <div class="card-body"> <ul class="mb-0"> {% for action in submission.cycle.get_required_actions %} <li>{{action.1}}</li> diff --git a/submissions/templates/submissions/_single_report_card_summary.html b/submissions/templates/submissions/_single_report_card_summary.html index e0f9fb2fe14cf4714659a4fde5045bc15771d5eb..d66828aca8076d83b326e8d391b218e61f4cecf1 100644 --- a/submissions/templates/submissions/_single_report_card_summary.html +++ b/submissions/templates/submissions/_single_report_card_summary.html @@ -1,4 +1,4 @@ -<div class="card-block {% block cardblock_class_block %}{% endblock %}"> +<div class="card-body {% block cardblock_class_block %}{% endblock %}"> <h3>{{report.get_status_display}} Report {{report.report_nr}} by {% if report.anonymous %}<em>anonymous</em>{% else %}<a href="{{report.author.get_absolute_url}}">{{ report.author.user.first_name }} {{ report.author.user.last_name }}</a>{% endif %}</h3> <h4>Received: {{ report.date_submitted|date:'Y-n-j' }}</h4> On Submission: <a href="{{report.submission.get_absolute_url}}">{{report.submission}}</a> diff --git a/submissions/templates/submissions/_submission_assignment_request.html b/submissions/templates/submissions/_submission_assignment_request.html index fa5d6099f74988830f2e27c18cac379fc0b2b548..cceb540850b6a489ae5161372e3c018177ad76dd 100644 --- a/submissions/templates/submissions/_submission_assignment_request.html +++ b/submissions/templates/submissions/_submission_assignment_request.html @@ -1,6 +1,6 @@ {% load bootstrap %} -<div class="card-block"> +<div class="card-body"> {% include 'submissions/_submission_summary.html' with submission=assignment.submission %} <br /> </div> diff --git a/submissions/templates/submissions/_submission_card_base.html b/submissions/templates/submissions/_submission_card_base.html index 5f1240e43ea640f4da47a2cd362274b97dde9a51..1ae9aa194280261c3e1bfed398bd75f3818a32d1 100644 --- a/submissions/templates/submissions/_submission_card_base.html +++ b/submissions/templates/submissions/_submission_card_base.html @@ -1,4 +1,4 @@ -<div class="card-block {% block cardblock_class_block %}{% endblock %}"> +<div class="card-body {% block cardblock_class_block %}{% endblock %}"> <h5 class="pb-0">{{submission.get_subject_area_display}}</h5> <h3 class="card-title {% block title_class_block %}{% endblock %}"> <a href="{% url 'submissions:submission' submission.arxiv_identifier_w_vn_nr %}">{{submission.title}}</a> diff --git a/submissions/templates/submissions/_submission_card_in_pool.html b/submissions/templates/submissions/_submission_card_in_pool.html index 4f248454545bd8ed3e8f2405e6ad15bf43532f84..ad484a07864a5b1a45ee339273c28547a87e8cb3 100644 --- a/submissions/templates/submissions/_submission_card_in_pool.html +++ b/submissions/templates/submissions/_submission_card_in_pool.html @@ -5,11 +5,11 @@ {% include 'submissions/_submission_card_fellow_content.html' with submission=submission %} -<div class="card-block"> - {% if submission.remark_set.all %} +<div class="card-body"> + {% if submission.remarks.all %} <h4>Remarks on this submission:</h4> <ul> - {% for rem in submission.remark_set.all %} + {% for rem in submission.remarks.all %} {% include 'scipost/_remark_li.html' with remark=rem %} {% endfor %} </ul> @@ -28,10 +28,10 @@ {% endif %} {% if perms.scipost.can_assign_submissions %} - {% if submission.editorialassignment_set.all %} + {% if submission.editorial_assignments.exists %} <h4>EIC Assignment requests:</h4> <ul> - {% for assignment in submission.editorialassignment_set.all %} + {% for assignment in submission.editorial_assignments.all %} {% include 'submissions/_assignment_info.html' with assignment=assignment %} {% endfor %} </ul> diff --git a/submissions/templates/submissions/admin/editorial_admin.html b/submissions/templates/submissions/admin/editorial_admin.html index 04cb76e2d2a3c39f3059bea66ed65c9ee94028b7..2ce345e547cf2f4c783fecbefc9c35b75a00af86 100644 --- a/submissions/templates/submissions/admin/editorial_admin.html +++ b/submissions/templates/submissions/admin/editorial_admin.html @@ -20,18 +20,18 @@ </p> <h3>Submissions currently in pre-screening</h3> - <ul class="unstyled-list"> + <ul class="list-unstyled"> {% for sub in submission_list.prescreening %} <li> {% include 'partials/submissions/admin/submission_tooltip.html' with submission=sub %} {% if sub == submission %} <strong> <a href="?submission={{sub.arxiv_identifier_w_vn_nr}}">{{sub.title}}</a> - <br>latest activity: {{sub.latest_activity|timesince}} ago + <div class="pl-md-4">latest activity: {{sub.latest_activity|timesince}} ago</div> </strong> {% else %} <a href="?submission={{sub.arxiv_identifier_w_vn_nr}}">{{sub.title}}</a> - <br>latest activity: {{sub.latest_activity|timesince}} ago + <div class="pl-md-4">latest activity: {{sub.latest_activity|timesince}} ago</div> {% endif %} </li> {% empty %} @@ -40,18 +40,18 @@ </ul> <h3>Submissions currently in refereeing round</h3> - <ul class="unstyled-list"> + <ul class="list-unstyled"> {% for sub in submission_list.actively_refereeing %} <li> {% include 'partials/submissions/admin/submission_tooltip.html' with submission=sub %} {% if sub == submission %} <strong> <a href="?submission={{sub.arxiv_identifier_w_vn_nr}}">{{sub.title}}</a> - <br>latest activity: {{sub.latest_activity|timesince}} ago + <div class="pl-md-4">latest activity: {{sub.latest_activity|timesince}} ago</div> </strong> {% else %} <a href="?submission={{sub.arxiv_identifier_w_vn_nr}}">{{sub.title}}</a> - <br>latest activity: {{sub.latest_activity|timesince}} ago + <div class="pl-md-4">latest activity: {{sub.latest_activity|timesince}} ago</div> {% endif %} </li> {% empty %} @@ -60,18 +60,18 @@ </ul> <h3>Submissions accepted</h3> - <ul class="unstyled-list"> + <ul class="list-unstyled"> {% for sub in submission_list.accepted %} <li> {% include 'partials/submissions/admin/submission_tooltip.html' with submission=sub %} {% if sub == submission %} <strong> <a href="?submission={{sub.arxiv_identifier_w_vn_nr}}">{{sub.title}}</a> - <br>latest activity: {{sub.latest_activity|timesince}} ago + <div class="pl-md-4">latest activity: {{sub.latest_activity|timesince}} ago</div> </strong> {% else %} <a href="?submission={{sub.arxiv_identifier_w_vn_nr}}">{{sub.title}}</a> - <br>latest activity: {{sub.latest_activity|timesince}} ago + <div class="pl-md-4">latest activity: {{sub.latest_activity|timesince}} ago</div> {% endif %} </li> {% empty %} @@ -82,8 +82,8 @@ <div class="col-md-5"> {% if submission %} - <div class="card card-outline-secondary mt-2"> - <div class="card-block"> + <div class="card border-secondary mt-2"> + <div class="card-body"> {% include 'partials/submissions/admin/editorial_admin_summary.html' with submission=submission %} </div> </div> diff --git a/submissions/templates/submissions/admin/eic_recommendation_detail.html b/submissions/templates/submissions/admin/eic_recommendation_detail.html index eff698ae3d22c936240b21610a1ecdd0338acdbd..e453c3dc64de64d4d7a1ae07d45b33b4dc8532eb 100644 --- a/submissions/templates/submissions/admin/eic_recommendation_detail.html +++ b/submissions/templates/submissions/admin/eic_recommendation_detail.html @@ -16,7 +16,7 @@ <div class="row"> <div class="col-12"> <div class="card card-grey"> - <div class="card-block"> + <div class="card-body"> <h1 class="card-title">Editorial Recommendation for Submission</h1> <p class="card-text"> Go back to the <a href="{% url 'submissions:editorial_page' arxiv_identifier_w_vn_nr=submission.arxiv_identifier_w_vn_nr %}"> @@ -32,12 +32,12 @@ <div class="card card-outline-secondary"> {% include 'submissions/_recommendation_fellow_content.html' with recommendation=object %} - <div class="card-block"> - {% if object.remark_set.all %} + <div class="card-body"> + {% if object.remarks.all %} <h3 class="card-title">Remarks by Fellows:</h3> <ul> - {% for remark in object.remark_set.all|sort_by:'date' %} - {{ remark.as_li }} + {% for remark in object.remarks.all|sort_by:'date' %} + {% include 'partials/submissions/remark_as_li.html' with remark=remark %} {% endfor %} </ul> {% endif %} @@ -73,10 +73,10 @@ </li> </ul> - {% if object.remark_set %} + {% if object.remarks %} <h3 class="card-title">Remarks:</h3> <ul> - {% for rem in object.remark_set.all %} + {% for rem in object.remarks.all %} <li>{{ rem }}</li> {% empty %} <li><em>No remarks</em></li> diff --git a/submissions/templates/submissions/assign_submission.html b/submissions/templates/submissions/assign_submission.html index 92020ea3209549159a1087065e501131421d4247..ce677a88fe3d4413f8cff2bc61373a0532ce9a89 100644 --- a/submissions/templates/submissions/assign_submission.html +++ b/submissions/templates/submissions/assign_submission.html @@ -39,11 +39,11 @@ <div class="row"> <div class="col-12"> - {% if submission_to_assign.editorialassignment_set.all %} + {% if submission_to_assign.editorial_assignments.exists %} <h4>EIC Assignment requests already sent:</h4> <h3>If more than 5 Fellows have declined an assignment for a red-marked reason, the Submission should be rejected.</h3> <ul> - {% for assignment in sub.editorialassignment_set.all %} + {% for assignment in sub.editorial_assignments.all %} {% include 'submissions/_assignment_info.html' with assignment=assignment %} {% endfor %} </ul> diff --git a/submissions/templates/submissions/editorial_page.html b/submissions/templates/submissions/editorial_page.html index 65a024d1e8dcdf5ecf47910a1fd5f345f84e2845..640dc19b95acc094db71af5acd9f48239973e3d3 100644 --- a/submissions/templates/submissions/editorial_page.html +++ b/submissions/templates/submissions/editorial_page.html @@ -16,7 +16,7 @@ <div class="row"> <div class="col-12"> <div class="card card-grey"> - <div class="card-block"> + <div class="card-body"> <h1>Editorial Page for Submission</h1> {% if not submission.is_current %} <h3 class="text-danger">This is not the editorial page for the current version.</h3> @@ -84,7 +84,7 @@ {% endwith %} <div class="card card-grey my-4"> - <div class="card-block"> + <div class="card-body"> <h2 class="card-title">Editorial Workflow</h2> <a href="{% url 'submissions:editorial_workflow' %}">How-to guide: summary of the editorial workflow</a> </div> @@ -131,7 +131,7 @@ <div class="row"> <div class="col-12"> <div class="card card-outline-warning"> - <div class="card-block"> + <div class="card-body"> <h3 class="mb-3 font-weight-bold">BEWARE: This is not the editorial page for the current version!</h3> <p class="mb-0"> The tools here are thus available only for exceptional circumstances (e.g. vetting a late report on a deprecated version). diff --git a/submissions/templates/submissions/eic_recommendation.html b/submissions/templates/submissions/eic_recommendation.html index 2aecf69d1ac5224e8a70880140bf102a0bfd86b7..08a04e9e5ed04323ade1b43941778e8bfc24e8d1 100644 --- a/submissions/templates/submissions/eic_recommendation.html +++ b/submissions/templates/submissions/eic_recommendation.html @@ -17,7 +17,7 @@ <div class="row"> <div class="col-12"> <div class="card card-grey"> - <div class="card-block"> + <div class="card-body"> <h1 class="card-title">Formulate Editorial Recommendation for Submission</h1> <p class="card-text"> (go to the <a href="{% url 'submissions:submission' arxiv_identifier_w_vn_nr=submission.arxiv_identifier_w_vn_nr %}"> @@ -43,7 +43,7 @@ <div class="row"> <div class="col-12"> <div class="card card-grey"> - <div class="card-block"> + <div class="card-body"> <h1 class="card-title">Your Editorial Recommendation</h1> <p class="card-text">You recommendation will be processed by the Editorial Administration.</p> <ul class="mb-0"> diff --git a/submissions/templates/submissions/new_submission.html b/submissions/templates/submissions/new_submission.html index 5bc100e8bfb215cdbcbbd77716177de5644eaba2..8e842e9ecde3fe5c2a68e70dce6f4af6b8e7d330 100644 --- a/submissions/templates/submissions/new_submission.html +++ b/submissions/templates/submissions/new_submission.html @@ -24,7 +24,7 @@ $(document).ready(function(){ <div class="row"> <div class="col-12"> <div class="card card-grey"> - <div class="card-block"> + <div class="card-body"> <h1 class="card-title mb-0">Submit a manuscript to SciPost</h1> {% if form.arxiv_identifier_w_vn_nr.value %}<h2 class="my-1 py-0 text-blue">{{form.arxiv_identifier_w_vn_nr.value}}{% if form.submission_is_resubmission %} <small>(resubmission)</small>{% endif %}</h2>{% endif %} </div> diff --git a/submissions/templates/submissions/pool.html b/submissions/templates/submissions/pool.html index 3f2911a9c524f928f65d6129b95f97943d34914e..ee80629ae9547d42966b84e0561162da0c09bac8 100644 --- a/submissions/templates/submissions/pool.html +++ b/submissions/templates/submissions/pool.html @@ -50,12 +50,12 @@ <div class="card card-outline-secondary"> {% include 'submissions/_recommendation_fellow_content.html' with recommendation=rec %} - <div class="card-block"> - {% if rec.remark_set.all %} + <div class="card-body"> + {% if rec.remarks.all %} <h3 class="card-title">Remarks by Fellows:</h3> <ul> - {% for remark in rec.remark_set.all|sort_by:'date' %} - {{ remark.as_li }} + {% for remark in rec.remarks.all|sort_by:'date' %} + {% include 'partials/submissions/remark_as_li.html' with remark=remark %} {% endfor %} </ul> {% endif %} @@ -91,10 +91,10 @@ </li> </ul> - {% if rec.remark_set %} + {% if rec.remarks %} <h3 class="card-title">Remarks:</h3> <ul> - {% for rem in rec.remark_set.all %} + {% for rem in rec.remarks.all %} <li>{{ rem }}</li> {% empty %} <li><em>No remarks</em></li> @@ -241,7 +241,7 @@ <!-- Sidebar --> <div class="col-lg-4 hidden-md-down"> <div class="card card-outline-secondary"> - <div class="card-block"> + <div class="card-body"> <h2 class="card-title">Pool</h2> <!-- Status --> <a href="#pool_filter_status" data-toggle="collapse" class="collapsed"> @@ -267,7 +267,7 @@ <ul class="list-group list-group-flush"> {% for recommendation in recommendations_undergoing_voting %} <li class="list-group-item"> - <div class="card-block"> + <div class="card-body"> <a href="#undergoing_rec_{{recommendation.id}}">{{recommendation.submission.title}}</a> <p class="text-muted my-0">{{recommendation.submission.author_list}}</p> <p class="my-0">Formulated on {{recommendation.date_submitted}}</p> @@ -287,7 +287,7 @@ <ul class="list-group list-group-flush"> {% for recommendation in recommendations_to_prepare_for_voting %} <li class="list-group-item"> - <div class="card-block"> + <div class="card-body"> <a href="#prepare_rec_{{recommendation.id}}">{{recommendation.submission.title}}</a> <p class="text-muted my-0">{{recommendation.submission.author_list}}</p> <p class="my-0">Formulated on {{recommendation.date_submitted}}</p> @@ -307,7 +307,7 @@ <ul class="list-group list-group-flush"> {% for submission in submissions_in_pool %} <li class="list-group-item"> - <div class="card-block" style="overflow: auto;"> + <div class="card-body" style="overflow: auto;"> <a href="#pool_submission_{{submission.id}}">{{submission.title}}</a> <p class="text-muted mb-1">{{submission.author_list}}</p> <p class="label label-secondary label-sm my-2">{{submission.get_status_display}}</p> diff --git a/submissions/templates/submissions/prefill_using_identifier.html b/submissions/templates/submissions/prefill_using_identifier.html index fd3781c6fceba5d9ed060ab85395be4d7cb18e8c..86f98da6f7473bc8f45e8cb192b09d94b1452693 100644 --- a/submissions/templates/submissions/prefill_using_identifier.html +++ b/submissions/templates/submissions/prefill_using_identifier.html @@ -29,7 +29,7 @@ <div class="row"> <div class="col-12"> <div class="card card-grey"> - <div class='card-block'> + <div class='card-body'> <h3>Please provide the arXiv identifier for your Submission</h3> <p><em>(give the identifier without prefix but with version number, as per the placeholder)</em></p> <form action="{% url 'submissions:prefill_using_identifier' %}" method="post"> diff --git a/submissions/templates/submissions/prepare_for_voting.html b/submissions/templates/submissions/prepare_for_voting.html index cf1e8af3936202f0377943aaaac21ab9f6db4ce9..0b26ca06cda441e3dab3c9a70ed28bf06b4c9940 100644 --- a/submissions/templates/submissions/prepare_for_voting.html +++ b/submissions/templates/submissions/prepare_for_voting.html @@ -17,7 +17,7 @@ <div class="row"> <div class="col-12"> <div class="card card-grey"> - <div class="card-block"> + <div class="card-body"> <h1 class="card-title">Prepare Editorial Recommendation for Voting</h1> <p class="card-text">(go to the <a href="{% url 'submissions:submission' arxiv_identifier_w_vn_nr=recommendation.submission.arxiv_identifier_w_vn_nr %}">Submissions Page</a> to view Reports and Comments)</p> <p class="card-text">(go back to the <a href="{% url 'submissions:editorial_page' arxiv_identifier_w_vn_nr=recommendation.submission.arxiv_identifier_w_vn_nr %}">Editorial Page</a> to take editorial actions)</p> @@ -75,11 +75,11 @@ <div class="col-12"> {% if coauthorships %} <div class="card card-outline-danger"> - <div class="card-block"> + <div class="card-body"> <h3 class="card-title text-danger">The system identified the following potential coauthorships (from arXiv database)</h3> <p class="card-text text-danger">(only up to 5 most recent shown; if within the last 3 years, referee is disqualified):</p> </div> - <div class="card-block"> + <div class="card-body"> <ul class="list-group list-group-flush"> {% for key, value in coauthorships.items %} <li class="list-group-item pt-3"> diff --git a/submissions/templates/submissions/refereeing_overview.html b/submissions/templates/submissions/refereeing_overview.html index fcf452bd6193f3df996a4b2a08ccc0f1db01281b..cfa01d4dcd69fc930cb87cc111fb78465adfb70e 100644 --- a/submissions/templates/submissions/refereeing_overview.html +++ b/submissions/templates/submissions/refereeing_overview.html @@ -15,7 +15,7 @@ <div class="row"> <div class="col-12"> <div class="card card-grey"> - <div class="card-block"> + <div class="card-body"> <h1>Refereeing overview</h1> </div> </div> @@ -28,7 +28,7 @@ <div class="row"> <div class="col-12"> <div class="card mx-1"> - <div class="card-block"> + <div class="card-body"> <h3><a href="{{ submission.get_absolute_url }}">{{ submission.title }}</a></h3> <p>{{ submission.author_list }}</p> <h4>Editor-in-charge: {{ submission.editor_in_charge }}</h4> diff --git a/submissions/templates/submissions/select_referee.html b/submissions/templates/submissions/select_referee.html index 2ed7a5ed6b6a411d18c8733c820d6452e70e0522..0ab19737d50e444e788d36a77774cfad8f685e89 100644 --- a/submissions/templates/submissions/select_referee.html +++ b/submissions/templates/submissions/select_referee.html @@ -17,7 +17,7 @@ <div class="row"> <div class="col-12"> <div class="card card-grey"> - <div class="card-block"> + <div class="card-body"> <h1 class="card-text">Referee Selection Page for Submission</h1> <p class="card-text">(go to the <a href="{% url 'submissions:submission' arxiv_identifier_w_vn_nr=submission.arxiv_identifier_w_vn_nr %}">Submissions Page</a> to view Reports and Comments)</p> <p class="card-text">(go back to the <a href="{% url 'submissions:editorial_page' arxiv_identifier_w_vn_nr=submission.arxiv_identifier_w_vn_nr %}">Editorial Page</a> to take editorial actions)</p> @@ -54,11 +54,11 @@ <div class="row"> <div class="col-12"> <div class="card card-outline-danger"> - <div class="card-block"> + <div class="card-body"> <h3 class="card-title text-danger">The system identified the following potential coauthorships (from arXiv database)</h3> <p class="card-text text-danger">(only up to 5 most recent shown; if within the last 3 years, referee is disqualified):</p> </div> - <div class="card-block"> + <div class="card-body"> <ul class="list-group list-group-flush"> {% for entry in queryresults.entries %} <li class="list-group-item"> diff --git a/submissions/templates/submissions/submission_detail.html b/submissions/templates/submissions/submission_detail.html index 30dfc87d14ac396c07fe22a56c85c5eec00b6d76..dcc70f4e148f04e612bd9236f704ef7b383f4be8 100644 --- a/submissions/templates/submissions/submission_detail.html +++ b/submissions/templates/submissions/submission_detail.html @@ -24,7 +24,7 @@ <div class="row"> <div class="col-12"> <div class="card card-grey"> - <div class="card-block"> + <div class="card-body"> <h1>SciPost Submission Page</h1> {% if not submission.is_current %} <h3 class="text-danger">This is not the current version.</h3> @@ -145,7 +145,7 @@ <div class="row"> <div class="col-12"> <div class="card card-grey"> - <div class="card-block"> + <div class="card-body"> <h2 class="card-title mb-0">Invited Reports on this Submission</h2> <a href="javascript:;" data-toggle="toggle" data-target="#invitedreportslist">Toggle invited reports view</a> </div> @@ -166,7 +166,7 @@ <div class="row"> <div class="col-12"> <div class="card card-grey"> - <div class="card-block"> + <div class="card-body"> <h2 class="card-title mb-0">Contributed Reports on this Submission</h2> <a href="javascript:;" data-toggle="toggle" data-target="#contributedreportslist">Toggle contributed reports view</a> </div> diff --git a/submissions/templates/submissions/submissions.html b/submissions/templates/submissions/submissions.html index 380ca755ab0b7e6abc482de47cdcd41c2ba268f0..e257bc0782c9141b0e4e71fa6dde3aab5208193e 100644 --- a/submissions/templates/submissions/submissions.html +++ b/submissions/templates/submissions/submissions.html @@ -10,7 +10,7 @@ <div class="row"> <div class="col-md-4"> <div class="card card-grey"> - <div class="card-block min-height-190"> + <div class="card-body min-height-190"> <h1 class="card-title">SciPost Submissions</h1> <h3><a href="{% url 'submissions:sub_and_ref_procedure' %}">Submission and refereeing procedure</a></h3> <h3><a href="{% url 'submissions:submit_manuscript' %}">Submit a manuscript to SciPost</a></h3> @@ -19,7 +19,7 @@ </div> <div class="col-md-4"> <div class="card card-grey"> - <div class="card-block min-height-190"> + <div class="card-body min-height-190"> <h2 class="card-title">Search SciPost Submissions:</h2> <form action="{% url 'submissions:submissions' %}" class="small" method="get"> {{ form|bootstrap:'4,8,sm' }} @@ -30,7 +30,7 @@ </div> <div class="col-md-4"> <div class="card card-grey"> - <div class="card-block min-height-190"> + <div class="card-body min-height-190"> <h2>View SciPost Submissions</h2> <ul> <li>Physics: last <a href="{% url 'submissions:browse' discipline='physics' nrweeksback=1 %}">week</a> <a href="{% url 'submissions:browse' discipline='physics' nrweeksback=4 %}">month</a> <a href="{% url 'submissions:browse' discipline='physics' nrweeksback=52 %}">year</a></li> diff --git a/submissions/templates/submissions/submit_report.html b/submissions/templates/submissions/submit_report.html index fb4029c449a0df7ba6ebd109247bdb01de5e6255..8a47160f086f19f9f9adcd332406c088af09e974 100644 --- a/submissions/templates/submissions/submit_report.html +++ b/submissions/templates/submissions/submit_report.html @@ -80,7 +80,7 @@ <div class="row"> <div class="col-12"> <div class="card card-grey"> - <div class="card-block"> + <div class="card-body"> <h1>Your {% if form.instance.is_followup_report %}followup {% endif %}report:</h1> <p>A preview of text areas will appear below as you type (you can use LaTeX \$...\$ for in-text equations or \ [ ... \ ] for on-line equations).</p> <p class="mb-0">Any fields with an asterisk (*) are required.</p> diff --git a/submissions/views.py b/submissions/views.py index 3294cb0447a351baadec170da5bc914883c759d5..944203d30483dc047d1566618ae0f83bc268af7a 100644 --- a/submissions/views.py +++ b/submissions/views.py @@ -344,7 +344,7 @@ def pool(request): All members of the Editorial College have access. """ submissions_in_pool = (Submission.objects.get_pool(request.user) - .prefetch_related('referee_invitations', 'remark_set', 'comments')) + .prefetch_related('referee_invitations', 'remarks', 'comments')) recommendations_undergoing_voting = (EICRecommendation.objects .get_for_user_in_pool(request.user) .filter(submission__status__in=['put_to_EC_voting'])) @@ -439,7 +439,7 @@ def assign_submission_ack(request, arxiv_identifier_w_vn_nr): if form.is_valid(): suggested_editor_in_charge = form.cleaned_data['editor_in_charge'] # TODO: check for possible co-authorships, disqualifying this suggested EIC - if not suggested_editor_in_charge.is_currently_available(): + if not suggested_editor_in_charge.is_currently_available: errormessage = ('This Fellow is marked as currently unavailable. ' 'Please go back and select another one.') return render(request, 'scipost/error.html', {'errormessage': errormessage}) @@ -774,7 +774,7 @@ def send_refereeing_invitation(request, arxiv_identifier_w_vn_nr, contributor_id submission = get_object_or_404(Submission.objects.get_pool(request.user), arxiv_identifier_w_vn_nr=arxiv_identifier_w_vn_nr) contributor = get_object_or_404(Contributor, pk=contributor_id) - if not contributor.is_currently_available(): + if not contributor.is_currently_available: errormessage = ('This Contributor is marked as currently unavailable. ' 'Please go back and select another referee.') return render(request, 'scipost/error.html', {'errormessage': errormessage}) diff --git a/theses/templates/theses/_thesislink_card_content.html b/theses/templates/theses/_thesislink_card_content.html index ad0ec2cc3e083782b50d01ca35b2ad84cb9f7858..fdca0c00f25b0315d7d9d70cc449942a1b2e73c0 100644 --- a/theses/templates/theses/_thesislink_card_content.html +++ b/theses/templates/theses/_thesislink_card_content.html @@ -1,4 +1,4 @@ -<div class="card-block"> +<div class="card-body"> <h5 class="pb-0">{{ thesislink.get_discipline_display }} · {{ thesislink.get_domain_display }} · {{ thesislink.get_subject_area_display }}</h5> <h3> <a href="{% url 'theses:thesis' thesislink_id=thesislink.id %}">{{ thesislink.title }}</a> diff --git a/theses/templates/theses/request_thesislink.html b/theses/templates/theses/request_thesislink.html index c2274f0d3db222d7b32ded59de8da1fcbf9e6178..7433b1e37b1fb26f44b965ec6e653723cc911a83 100644 --- a/theses/templates/theses/request_thesislink.html +++ b/theses/templates/theses/request_thesislink.html @@ -12,8 +12,8 @@ </div> </div> -<div class="row"> - <div class="col-md-8 offset-md-2"> +<div class="row justify-content-center"> + <div class="col-md-10 col-lg-8"> <form action="{% url 'theses:request_thesislink' %}" method="post"> {% csrf_token %} <table> diff --git a/theses/templates/theses/thesislink_list.html b/theses/templates/theses/thesislink_list.html index c735fd247c1ef7fe05aa75e5887e59007d2f5b54..1b994fd4301f3f35b70e0ac376613de45a6cd9cd 100644 --- a/theses/templates/theses/thesislink_list.html +++ b/theses/templates/theses/thesislink_list.html @@ -14,7 +14,7 @@ <div class="row"> <div class="col-md-4"> <div class="card card-grey"> - <div class="card-block min-height-190"> + <div class="card-body min-height-190"> <h1 class="card-title">SciPost Theses</h1> <h3><a href="{% url 'theses:request_thesislink' %}">Request a new Thesis Link</a></h3> </div> @@ -22,7 +22,7 @@ </div> <div class="col-md-4"> <div class="card card-grey"> - <div class="card-block min-height-190"> + <div class="card-body min-height-190"> <h2 class="card-title">Search SciPost Theses:</h2> <form class="small" action="{% url 'theses:theses' %}" method="get"> {{ form|bootstrap:'4,8,sm' }} @@ -33,7 +33,7 @@ </div> <div class="col-md-4"> <div class="card card-grey"> - <div class="card-block min-height-190"> + <div class="card-body min-height-190"> <h2 class="card-title">View SciPost Theses</h2> <ul> <li>Physics: last <a href="{% url 'theses:browse' discipline='physics' nrweeksback=1 %}">week</a>, <a href="{% url 'theses:browse' discipline='physics' nrweeksback=4 %}">month</a> or <a href="{% url 'theses:browse' discipline='physics' nrweeksback=52 %}">year</a> </li> diff --git a/virtualmeetings/models.py b/virtualmeetings/models.py index 67a42474511244779f1180769a9ffe36819e7803..8a511de9d68dcdd86ece75b38686b0673bbdb42e 100644 --- a/virtualmeetings/models.py +++ b/virtualmeetings/models.py @@ -44,9 +44,6 @@ class Feedback(models.Model): def get_absolute_url(self): return self.VGM.get_absolute_url() + '#feedback' + str(self.id) - def as_li(self): - raise DeprecationWarning - class Nomination(models.Model): """ @@ -84,12 +81,6 @@ class Nomination(models.Model): def get_absolute_url(self): return self.VGM.get_absolute_url() + '#nomination_' + str(self.id) - def as_li(self): - raise DeprecationWarning - - def votes_as_ul(self): - raise DeprecationWarning - def update_votes(self, contributor_id, vote): contributor = get_object_or_404(Contributor, pk=contributor_id) self.in_agreement.remove(contributor) @@ -138,12 +129,6 @@ class Motion(models.Model): def get_absolute_url(self): return self.VGM.get_absolute_url() + '#motion_' + str(self.id) - def as_li(self): - raise DeprecationWarning - - def votes_as_ul(self): - raise DeprecationWarning - def update_votes(self, contributor_id, vote): contributor = get_object_or_404(Contributor, pk=contributor_id) self.in_agreement.remove(contributor) diff --git a/virtualmeetings/templates/virtualmeetings/VGM_detail.html b/virtualmeetings/templates/virtualmeetings/VGM_detail.html index dd260ca9f3760ebe60a288e7e6af98b2ecf47b4c..399a7881308467630fae1f63944cc873828d5df8 100644 --- a/virtualmeetings/templates/virtualmeetings/VGM_detail.html +++ b/virtualmeetings/templates/virtualmeetings/VGM_detail.html @@ -55,7 +55,7 @@ <h2>Feedback on SciPost</h2> <a href="javascript:;" class="btn btn-secondary" data-toggle="toggle" data-target="#submitFeedback">Provide feedback</a> </div> - <div class="card-block" style="display: none;" id="submitFeedback"> + <div class="card-body" style="display: none;" id="submitFeedback"> <form action="{% url 'virtualmeetings:feedback' VGM_id=VGM.id %}" method="post"> {% csrf_token %} {{ feedback_form|bootstrap }} @@ -82,10 +82,10 @@ <input class="btn btn-secondary" type="submit" value="Submit" /> </form> </div> - {% if feedback.remark_set.all %} + {% if feedback.remarks.all %} <h3>Remarks on this feedback:</h3> <ul> - {% for rem in feedback.remark_set.all %} + {% for rem in feedback.remarks.all %} {% include 'scipost/_remark_li.html' with remark=rem %} {% endfor %} </ul> @@ -105,7 +105,7 @@ <h2>Nominations to the Editorial College</h2> <a href="javascript:;" class="btn btn-secondary" data-toggle="toggle" data-target="#submitNominationForm">Nominate an Editorial Fellow candidate</a> </div> - <div class="card-block" style="display: none;" id="submitNominationForm"> + <div class="card-body" style="display: none;" id="submitNominationForm"> <form action="{% url 'virtualmeetings:nominate_Fellow' VGM_id=VGM.id %}" method="post"> {% csrf_token %} {{ nomination_form|bootstrap }} @@ -162,7 +162,7 @@ <ul class="list-group list-group-flush"> {% for nomination in nominations %} <li class="list-group-item border-0"> - <div class="card-block"> + <div class="card-body"> {% include 'virtualmeetings/nomination_content.html' with nomination=nomination %} <br/> <div class="opinionsDisplay mb-3"> @@ -196,10 +196,10 @@ <input type="submit" class="btn btn-secondary" value="Submit" /> </form> </div> - {% if nomination.remark_set.all %} + {% if nomination.remarks.all %} <h3>Remarks on this nomination:</h3> <ul> - {% for rem in nomination.remark_set.all %} + {% for rem in nomination.remarks.all %} {% include 'scipost/_remark_li.html' with remark=rem %} {% endfor %} </ul> @@ -222,7 +222,7 @@ <h2>Submit a new Motion</h2> <a href="javascript:;" class="btn btn-secondary" data-toggle="toggle" data-target="#submitMotionForm">Put a new Motion forward</a> </div> - <div class="card-block" style="display: none;" id="submitMotionForm"> + <div class="card-body" style="display: none;" id="submitMotionForm"> <form action="{% url 'virtualmeetings:put_motion_forward' VGM_id=VGM.id %}" method="post"> {% csrf_token %} {{ motion_form|bootstrap }} @@ -242,7 +242,7 @@ {% for key, val in motion_categories_dict.items %} <div class="row"> <div class="col-12"><h2>{{ val }}:</h2></div> - <div class="col-md-11 offset-md-1"> + <div class="col-md-11 ml-auto"> <ul> {% for motion in VGM.motion_set.all %} {% if motion.category == key %} @@ -278,10 +278,10 @@ <input type="submit" class="btn btn-secondary" value="Submit" /> </form> </div> - {% if motion.remark_set.all %} + {% if motion.remarks.all %} <h3>Remarks on this motion:</h3> <ul> - {% for rem in motion.remark_set.all %} + {% for rem in motion.remarks.all %} {% include 'scipost/_remark_li.html' with remark=rem %} {% endfor %} </ul> diff --git a/webpack.config.js b/webpack.config.js index 9c36140fc0be4445270b73b99f20ad74c799b01c..f24fa865cf54659b7fd00170862292d3787274df 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -9,11 +9,8 @@ module.exports = { context: __dirname, entry: { main: [ + "bootstrap-loader", "./scipost/static/scipost/assets/js/scripts.js", - "./scipost/static/scipost/assets/css/style.scss" - ], - bootstrap: [ - 'bootstrap-loader' ], homepage: [ "./scipost/static/scipost/assets/js/newsticker.js", @@ -31,22 +28,22 @@ module.exports = { { test: /\.css$/, loader: ExtractTextPlugin.extract({ - fallbackLoader: "style-loader", - loader: "css-loader" + fallback: "style-loader", + use: "css-loader" }) }, { test: /\.less$/, loader: ExtractTextPlugin.extract({ - fallbackLoader: "style-loader", - loader: "css-loader!less-loader" + fallback: "style-loader", + use: "css-loader!less-loader" }) }, { test: /\.scss$/, loader: ExtractTextPlugin.extract({ - fallbackLoader: "style-loader", - loader: "css-loader!sass-loader", + fallback: "style-loader", + use: "css-loader!sass-loader", }) } ] @@ -61,6 +58,7 @@ module.exports = { Alert: "exports-loader?Alert!bootstrap/js/dist/alert", Collapse: "exports-loader?Collapse!bootstrap/js/dist/collapse", Util: "exports-loader?Util!bootstrap/js/dist/util", + Popper: ['popper.js', 'default'], }), new BundleTracker({ filename: './webpack-stats.json'