diff --git a/notifications/templates/notifications/partials/notification_list_popover.html b/notifications/templates/notifications/partials/notification_list_popover.html index 0082ba201a27f8c136fb461bc2794073e92307ff..51d41f67f37fc56b830e694907c577f136ea5d2b 100644 --- a/notifications/templates/notifications/partials/notification_list_popover.html +++ b/notifications/templates/notifications/partials/notification_list_popover.html @@ -5,7 +5,7 @@ <div class="popover-template"> <div class="popover notifications" role="tooltip"> - <div class="arrow"></div> + <div class="arrow"></div> {% if user.contributor %} <div class="header"> <h3>{{ user.contributor.get_title_display }} {{ user.first_name }} {{ user.last_name }}</h3> @@ -23,28 +23,6 @@ </div> {% endif %} - <div class="links"> - <a class="item {% active 'scipost:personal_page' %}" href="{% url 'scipost:personal_page' %}">Personal Page</a> - - {% if is_financial_admin %} - <a class="item {% active 'finances:finances' %}" href="{% url 'finances:finances' %}">Financial Administration</a> - {% endif %} - - {% if perms.scipost.can_view_all_funding_info %} - <a class="item {% active 'funders:funders_dashboard' %}" href="{% url 'funders:funders_dashboard' %}">Funders</a> - {% endif %} - - {% if perms.scipost.can_view_production %} - <a class="item {% active 'production:production' %}" href="{% url 'production:production' %}">Production</a> - {% endif %} - - {% if perms.scipost.can_view_pool %} - <a class="item {% active 'submissions:pool' %}" href="{% url 'submissions:pool' %}">Submissions Pool</a> - {% endif %} - - <a class="item" href="{% url 'scipost:logout' %}">Logout</a> - </div> - <h4 class="inbox-header">Inbox</h4> <div class="live_notify_list"></div> </div> diff --git a/scipost/static/scipost/assets/css/_navbar.scss b/scipost/static/scipost/assets/css/_navbar.scss index 53b72a433a9576062b17e6f98068113d86c73445..33cf6d68cd17f64c9efe6bae0500e38cb409a79e 100644 --- a/scipost/static/scipost/assets/css/_navbar.scss +++ b/scipost/static/scipost/assets/css/_navbar.scss @@ -30,6 +30,22 @@ } } + .dropdown-menu { + background-color: $scipost-lightblue; + font-size: 100%; + + a { + &:hover { + color: $scipost-lightblue; + } + } + + h2, h3 { + color: $scipost-orange; + margin: 0.8rem 0rem 0.3rem 0.8rem; + } + } + .nav-item.active a { font-weight: 700; text-decoration: underline; diff --git a/scipost/templates/partials/scipost/notification_center_modal.html b/scipost/templates/partials/scipost/notification_center_modal.html index 51d2561efad7e1e2eafe1c10d8f21f620cda4cba..e2102d5c937d1898c32fedfbd4c2161c224f92ed 100644 --- a/scipost/templates/partials/scipost/notification_center_modal.html +++ b/scipost/templates/partials/scipost/notification_center_modal.html @@ -15,27 +15,6 @@ </button> </div> <div class="modal-body pb-2"> - <ul class="list-unstyled links mb-0"> - <li><a class="item {% active 'scipost:personal_page' %}" href="{% url 'scipost:personal_page' %}">Personal Page</a></li> - - {% if perms.scipost.can_view_timesheets %} - <li><a class="item {% active 'finances:finances' %}" href="{% url 'finances:finances' %}">Financial Administration</a></li> - {% endif %} - - {% if perms.scipost.can_view_all_funding_info %} - <li><a class="item {% active 'funders:funders_dashboard' %}" href="{% url 'funders:funders_dashboard' %}">Funders</a></li> - {% endif %} - - {% if perms.scipost.can_view_production %} - <li><a class="item {% active 'production:production' %}" href="{% url 'production:production' %}">Production</a></li> - {% endif %} - - {% if perms.scipost.can_view_pool %} - <li><a class="item {% active 'submissions:pool' %}" href="{% url 'submissions:pool' %}">Submissions Pool</a></li> - {% endif %} - - <li><a class="item" href="{% url 'scipost:logout' %}">Logout</a></li> - </ul> </div> <div class="modal-header"> <h4 class="modal-title">Inbox</h4> diff --git a/scipost/templates/scipost/footer.html b/scipost/templates/scipost/footer.html index a3567ffb2be657a052892a4b91083edc4efa04f7..6cd0ab77ae9504660c97c01b61dafc702e08da0f 100644 --- a/scipost/templates/scipost/footer.html +++ b/scipost/templates/scipost/footer.html @@ -6,8 +6,6 @@ <div class="col-md-4 mb-3 mb-md-0"> Copyright © <a href="{% url 'scipost:foundation' %}" target="_">SciPost Foundation</a> <br/> - Contact the <a href="mailto:admin@scipost.org">administrators</a> or <a href="mailto:techsupport@scipost.org">tech support</a> - <br/> <a href="{% url 'scipost:terms_and_conditions' %}">Terms and conditions</a> <table class="mt-2 social-media"> @@ -25,20 +23,15 @@ </tr> </table> </div> - <div class="col-md-4 mb-3 mb-md-0"> + <div class="col-md-5 mb-3 mb-md-0"> <a rel="license" href="//creativecommons.org/licenses/by/4.0/" target="_blank"><img alt="Creative Commons License" style="border-width:0" src="//licensebuttons.net/l/by/4.0/80x15.png" /></a><br />Except where otherwise noted, all content on SciPost is licensed under a <a rel="license" href="//creativecommons.org/licenses/by/4.0/" target="_blank">Creative Commons Attribution 4.0 International License</a>. </div> - <div class="col-md-4 mb-3 mb-md-0 text-md-right"> - <a href="{% url 'journals:journals' %}">Journals</a> - <br> - <a href="{% url 'submissions:submissions' %}">Submissions</a> - <br> - <a href="{% url 'commentaries:commentaries' %}">Commentaries</a> - <br> - <a href="{% url 'theses:theses' %}">Theses</a> - <br> - <a href="{% url 'scipost:about' %}">About SciPost</a> - <br> + <div class="col-md-3 mb-3 mb-md-0 text-md-right"> + <ul class="list-unstyled"> + <li>Contact the <a href="mailto:admin@scipost.org">administrators</a></li> + <li>Write to <a href="mailto:techsupport@scipost.org">tech support</a></li> + <li><a href="https://code.scipost.org" target="_blank">code.scipost.org</a></li> + </ul> </div> </div> </div> diff --git a/scipost/templates/scipost/header.html b/scipost/templates/scipost/header.html index 45650f3d04032ee8610a78381024b36993107071..ff6767969af27aa1f83a2f410b2cb56b61b9b052 100644 --- a/scipost/templates/scipost/header.html +++ b/scipost/templates/scipost/header.html @@ -1,5 +1,4 @@ {% load staticfiles %} -{% load notifications_tags %} <header> <div class="container"> @@ -21,7 +20,6 @@ <div class="btn-group"> <button type="submit" class="btn btn-link"> <i class="fa fa-search"></i> - Search </button> <a href="javascript:;" class="btn btn-link close-form" id="header-search-close-btn"> <i class="fa fa-times"></i> @@ -30,24 +28,6 @@ </form> </div> </li> - <li class="nav-item"> - <span class="separator">·</span> - <a class="nav-link" href="{% url 'scipost:about' %}">About</a> - </li> - <li class="nav-item dropdown"> - <span class="separator">·</span> - <a class="nav-link dropdown-toggle" href="javascript:;" data-toggle="dropdown">Our journals </a> - - <div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenuButton"> - {% for journal in journals %} - {% if journal.active %} - <a href="{{ journal.get_absolute_url }}" class="dropdown-item">{{journal}}</a> - {% elif perms.scipost.can_view_pool %} - <a href="{% url 'journal:about' journal.name %}" class="dropdown-item">{{journal}}</a> - {% endif %} - {% endfor %} - </div> - </li> </ul> </div> diff --git a/scipost/templates/scipost/navbar.html b/scipost/templates/scipost/navbar.html index 27ea2e08562b974fba2a1032c2daf322d63d2c20..a4ede07bcb4b3c89bf4df3cc206cd11e78a610ca 100644 --- a/scipost/templates/scipost/navbar.html +++ b/scipost/templates/scipost/navbar.html @@ -20,79 +20,91 @@ <div class="collapse navbar-collapse" id="main-navbar"> <ul class="navbar-nav mr-auto"> - <li class="nav-item{% if request.path == '/' %} active{% endif %}"> - <a href="{% url 'scipost:index' %}" class="nav-link">Home</a> - </li> - - <li class="nav-item{% if '/journals/' == request.path %} active{% endif %}"> - <a href="{% url 'journals:journals' %}" class="nav-link">Journals</a> - </li> - <li class="nav-item{% if '/journals/publications' in request.path %} active{% endif %}"> - <a href="{% url 'journals:publications' %}" class="nav-link">Publications</a> - </li> - <li class="nav-item{% if '/submissions/' in request.path %} active{% endif %}"> - <a class="nav-link" href="{% url 'submissions:submissions' %}">Submissions</a> - </li> - <li class="nav-item{% if '/commentaries/' in request.path %} active{% endif %}"> - <a class="nav-link" href="{% url 'commentaries:commentaries' %}">Commentaries</a> - </li> - <li class="nav-item{% if '/theses/' in request.path %} active{% endif %}"> - <a class="nav-link" href="{% url 'theses:theses' %}">Theses</a> - </li> + <li class="nav-item{% if request.path == '/' %} active{% endif %}"> + <a href="{% url 'scipost:index' %}" class="nav-link">Home</a> + </li> + <li class="nav-item dropdown"> + <a class="nav-link dropdown-toggle" href="#" id="JournalsDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Journals</a> + <div class="dropdown-menu" aria-labelledby="JournalsDropdown"> + <a href="{% url 'journals:journals' %}" class="dropdown-item">Journals homepage</a> + <a href="{% url 'journals:publications' %}" class="dropdown-item">View all publications</a> + <div class="dropdown-divider"></div> + <h3 class="dropdown-headline"><strong>Physics</strong></h3> + {% for journal in journals %} + {% if journal.active %} + <a href="{{ journal.get_absolute_url }}" class="dropdown-item">{{ journal }}</a> + {% elif perms.scipost.can_view_pool %} + <a href="{% url 'journal:about' journal.name %}" class="dropdown-item">{{ journal }}</a> + {% endif %} + {% endfor %} + </div> + </li> + <li class="nav-item{% if '/journals/publications' in request.path %} active{% endif %}"> + </li> + <li class="nav-item{% if '/submissions/' in request.path %} active{% endif %}"> + <a class="nav-link" href="{% url 'submissions:submissions' %}">Submissions</a> + </li> + <li class="nav-item{% if '/commentaries/' in request.path %} active{% endif %}"> + <a class="nav-link" href="{% url 'commentaries:commentaries' %}">Commentaries</a> + </li> + <li class="nav-item{% if '/theses/' in request.path %} active{% endif %}"> + <a class="nav-link" href="{% url 'theses:theses' %}">Theses</a> + </li> + <li class="nav-item dropdown"> + <a class="nav-link dropdown-toggle" href="#" id="MoreDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">More</a> + <div class="dropdown-menu" aria-labelledby="MoreDropdown"> + <a class="dropdown-item" href="{% url 'scipost:about' %}">About SciPost</a> + <a class="dropdown-item" href="{% url 'scipost:foundation' %}">The Foundation</a> + <a class="dropdown-item" href="{% url 'scipost:FAQ' %}">FAQ</a> + <a class="dropdown-item" href="{% url 'news:news' %}">News</a> + <a class="dropdown-item" href="{% url 'scipost:feeds' %}">Feeds</a> + <div class="dropdown-divider"></div> + <a class="dropdown-item" href="{% url 'organizations:organizations' %}">Organizations<br/><span class="small">benefitting from our activities</span></a> + <a class="dropdown-item" href="{% url 'sponsors:sponsors' %}">Sponsors</a> + <a class="dropdown-item" href="{% url 'finances:finances' %}">Finances</a> + </div> + </li> </ul> <hr class="lg d-lg-none"> <ul class="navbar-nav mr-0"> - {% if user.is_authenticated %} - <li class="nav-item"> - <span class="nav-link text-white"> - Welcome {% if user.last_name %}{% if user.contributor %}{{ user.contributor.get_title_display }} {% endif %}{{ user.first_name }} {{ user.last_name }}{% else %}{{ user.username }}{% endif %} - {% if request.user.contributor and not request.user.contributor.is_currently_available %} - <a href="javascript:;" class="text-warning" data-toggle="tooltip" data-title="You are currently unavailable.<br>Check your availability on your Personal Page if this should not be the case." data-html="true"><i class="fa fa-warning"></i></a> - {% endif %} - </span> - </li> - {% if user.contributor %} - {% if is_editorial_college %} - <li class="nav-item{% if '/submissions/pool/' in request.path %} active{% endif %}"> - <span class="separator">·</span> - <a class="nav-link" href="{% url 'submissions:pool' %}">Submissions Pool</a> - </li> - {% endif %} - <li class="nav-item{% if '/personal_page' in request.path %} active{% endif %}"> - <span class="separator">·</span> - <a class="nav-link" href="{% url 'scipost:personal_page' %}">My Personal Page</a> - </li> - {% if perms.scipost.can_view_production %} - <li class="nav-item {% active 'production:production' %}"> - <span class="separator">·</span> - <a class="nav-link" href="{% url 'production:production' %}">Production</a> - </li> - {% endif %} - {% endif %} - {% if perms.scipost.can_manage_organizations or user.org_contact %} - <li class="nav-item{% if '/organizations/dashboard' in request.path %} active{% endif %}"> - <span class="separator">·</span> - <a class="nav-link" href="{% url 'organizations:dashboard' %}">Orgs dashboard</a> - </li> - {% endif %} - <li class="nav-item navbar-counter"> - <span class="separator">·</span> - <div class="d-inline-block notifications_container"> - <a href="javascript:;" class="d-inline-block badge_link nav-link" id="notifications_badge" data-toggle="modal" data-target="#notification_center"> - <span class="user d-inline d-lg-none d-xl-inline">Notifications</span> - <i class="fa fa-inbox" aria-hidden="true" style="min-width: 16px;"></i> - {% live_notify_badge classes="badge badge-pill" %} - </a> - {% live_notify_list %} - </div> - </li> - <li class="nav-item"> - <span class="separator">·</span> - <a class="nav-link" href="{% url 'scipost:logout' %}?next={{ request.path }}">Logout</a> - </li> - {% else %} + {% if user.is_authenticated %} + <li class="nav-item dropdown"> + <a class="nav-link dropdown-toggle" href="#" id="PersonalDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> + Logged in as {% if user.last_name %}{% if user.contributor %}{{ user.contributor.get_title_display }} {% endif %}{{ user.first_name }} {{ user.last_name }}{% else %}{{ user.username }}{% endif %} + {% if request.user.contributor and not request.user.contributor.is_currently_available %} + <a href="javascript:;" class="text-warning" data-toggle="tooltip" data-title="You are currently unavailable.<br>Check your availability on your Personal Page if this should not be the case." data-html="true"><i class="fa fa-warning"></i></a> + {% endif %} + </a> + <div class="dropdown-menu" aria-labelledby="PersonalDropdown"> + + {% if user.contributor %} + <a class="dropdown-item" href="{% url 'scipost:personal_page' %}">Personal Page</a> + {% if is_editorial_college %} + <a class="dropdown-item" href="{% url 'submissions:pool' %}">Submissions Pool</a> + {% endif %} + {% if perms.scipost.can_view_production %} + <a class="dropdown-item" href="{% url 'production:production' %}">Production</a> + {% endif %} + {% if perms.scipost.can_manage_organizations or user.org_contact %} + <a class="dropdown-item" href="{% url 'organizations:dashboard' %}">Orgs dashboard</a> + {% endif %} + {% endif %} + <a class="dropdown-item" href="{% url 'scipost:logout' %}?next={{ request.path }}">Logout</a> + </li> + + <li class="nav-item navbar-counter"> + <div class="d-inline-block notifications_container"> + <a href="javascript:;" class="d-inline-block badge_link nav-link" id="notifications_badge" data-toggle="modal" data-target="#notification_center"> + <i class="fa fa-inbox" aria-hidden="true" style="min-width: 16px;"></i> + {% live_notify_badge classes="badge badge-pill" %} + </a> + {% live_notify_list %} + </div> + </li> + + {% else %} <li class="nav-item{% if request.path == '/login/' %} active{% endif %}"> <a class="nav-link" href="{% url 'scipost:login' %}?next={{request.path}}">Login or register</a> </li>