mirror of
https://github.com/godotengine/godot-showreel-voting.git
synced 2026-01-04 14:11:00 +03:00
Allow unauthenticated users access to about page
This commit is contained in:
@@ -129,6 +129,10 @@ h4 {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.flex .noshrink {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.actions {
|
||||
float: right;
|
||||
margin-top: 20px;
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
{% include "includes/navbar.html" %}
|
||||
{% endblock %}
|
||||
</nav>
|
||||
{% if user.is_authenticated %}
|
||||
<span class="username">{{ user }}</span>
|
||||
<form action="{% url 'oidc_logout' %}" method="post" id="logout-link">
|
||||
{% csrf_token %}
|
||||
@@ -21,7 +22,11 @@
|
||||
<i class="fas fa-sign-out-alt"></i>
|
||||
</button>
|
||||
</form>
|
||||
|
||||
{% else %}
|
||||
<a class="fabutton noshrink" href="{% url 'oidc_authentication_init' %}">
|
||||
Login <i class="fas fa-sign-in-alt"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</header>
|
||||
{% if messages %}
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
<ul>
|
||||
{% if can_vote %}<li class="{% if active == "vote" %}active{% endif %}"><a href="{% url 'vote' %}">Vote</a></li>{% endif %}
|
||||
{% if user.is_staff %}<li class="{% if active == "showreels" %}active{% endif %}"><a href="{% url 'showreels' %}">Showreels</a></li>{% endif %}
|
||||
<li class="{% if active == "submissions" %}active{% endif %}"><a href="{% url 'submissions' %}">My submissions</a></li>
|
||||
<li class="{% if active == "about" %}active{% endif %}"><a href="{% url 'about' %}">About</a></li>
|
||||
{% if user.is_staff %}<li><a href="{% url 'admin:index' %}">Admin</a></li>{% endif %}
|
||||
{% if user.is_authenticated %}
|
||||
{% if can_vote %}<li class="{% if active == 'vote' %}active{% endif %}"><a href="{% url 'vote' %}">Vote</a></li>{% endif %}
|
||||
{% if user.is_staff %}<li class="{% if active == 'showreels' %}active{% endif %}"><a href="{% url 'showreels' %}">Showreels</a></li>{% endif %}
|
||||
<li class="{% if active == 'submissions' %}active{% endif %}"><a href="{% url 'submissions' %}">My submissions</a></li>
|
||||
{% endif %}
|
||||
<li class="{% if active == 'about' %}active{% endif %}"><a href="{% url 'about' %}">About</a></li>
|
||||
{% if user.is_authenticated and user.is_staff %}
|
||||
<li><a href="{% url 'admin:index' %}">Admin</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
@@ -1,23 +0,0 @@
|
||||
{% load static %}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<link rel="stylesheet" type="text/css" href="{% static 'vote/css/main.css' %}">
|
||||
|
||||
<body>
|
||||
{% if messages %}
|
||||
<ul class="messages">
|
||||
{% for message in messages %}
|
||||
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
<div class="container">
|
||||
<div class="">
|
||||
<div class="content">
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,7 +1,9 @@
|
||||
{% extends 'registration/base_login.html' %}
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% load static %}
|
||||
|
||||
{% block title %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="login_wrapper">
|
||||
<img src="{% static 'vote/images/Godot_logo.svg' %}" alt="Godot Engine" width="300px">
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
{% extends 'registration/base_login.html' %}
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% load static %}
|
||||
|
||||
{% block title %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="login_wrapper">
|
||||
<img src="{% static 'vote/images/Godot_logo.svg' %}" alt="Godot Engine" width="300px">
|
||||
|
||||
@@ -178,7 +178,7 @@ class ShowreelListView(LoginRequiredMixin, UserPassesTestMixin, ListView):
|
||||
return self.request.user.is_staff
|
||||
|
||||
# Display the about page
|
||||
class AboutView(LoginRequiredMixin, TemplateView):
|
||||
class AboutView(TemplateView):
|
||||
template_name = "vote/about.html"
|
||||
|
||||
# Download a csv of a showreel results
|
||||
|
||||
Reference in New Issue
Block a user