diff --git a/scipost/templates/scipost/index.html b/scipost/templates/scipost/index.html index 76cb80bbb7853b0d72ca0a75aaa5b776a86b7f3e..259a446c8815743f3634d25de3a38c1404fab39a 100644 --- a/scipost/templates/scipost/index.html +++ b/scipost/templates/scipost/index.html @@ -51,18 +51,21 @@ <div class="col-md-5"> <div class="pl-lg-5"> - {# <!-- Info -->#} - {# <div class="card">#} - {# <div class="card-block text-center pt-0">#} - {# <h3 class="m-0 orange-underline" style="line-height: 1.3;">SciPost is a complete scientific publication portal managed by active professional scientists.</h3>#} - {# </div>#} - {# </div><!-- End info -->#} + {% if not user.is_authenticated %} + <!-- Register --> + <div class="card card-grey"> + <div class="card-block"> + <h2 class="card-title mb-0"><a href="{% url 'scipost:register' %}">Register</a></h2> + <p class="m-0">Professional scientists (PhD students and above) can become Contributors to SciPost by filling the <a href="/register">registration form</a>.</p> + </div> + </div><!-- End Register --> + {% endif %} <!-- News --> <div class="card card-grey"> <div class="card-header border-0"> <h2 class="card-title mb-0"> - <a href="{% url 'news:news' %}">News</a> + News <a class="floating-rss-icon" href="{% url 'scipost:feeds' %}"> <img src="{% static 'scipost/images/feed-icon-14x14.png' %}" alt="Feed logo" width="14"> </a> @@ -88,7 +91,7 @@ <!-- Latest issues --> <div class="card card-grey"> <div class="card-header border-0 pb-0"> - <h2 class="card-title mb-0"><a href="/issues/">Latest issues</a></h2> + <h2 class="card-title mb-0">Latest issues</h2> </div> <div class="card-block"> <ul class="m-0 pl-4"> @@ -104,16 +107,6 @@ </div> </div><!-- End latest issues --> - {% if not user.is_authenticated %} - <!-- Register --> - <div class="card card-grey"> - <div class="card-block"> - <h2 class="card-title mb-0"><a href="{% url 'scipost:register' %}">Register</a></h2> - <p class="m-0">Professional scientists (PhD students and above) can become Contributors to SciPost by filling the <a href="/register">registration form</a>.</p> - </div> - </div><!-- End Register --> - {% endif %} - <!-- Summarized --> <div class="card card-grey"> <div class="card-block"> diff --git a/theses/views.py b/theses/views.py index 72856c885224b4f0c2534714e737e208ed9b8fbb..4666b92c6c2cc24d30b532ab1ef24f54fede9948 100644 --- a/theses/views.py +++ b/theses/views.py @@ -2,9 +2,9 @@ import datetime from django.utils import timezone from django.shortcuts import get_object_or_404, render -from django.contrib.auth.decorators import permission_required +from django.contrib.auth.decorators import login_required, permission_required from django.contrib import messages -from django.core.urlresolvers import reverse, reverse_lazy +from django.core.urlresolvers import reverse_lazy from django.http import HttpResponseRedirect from django.views.generic.edit import CreateView, UpdateView from django.views.generic.list import ListView @@ -22,6 +22,7 @@ import strings # Theses ################ +@method_decorator(login_required, name='dispatch') @method_decorator(permission_required( 'scipost.can_request_thesislinks', raise_exception=True), name='dispatch') class RequestThesisLink(CreateView):