Terminals, landing page, SMTP settings in admin panel, other smaller changes

Merge request reports

Loading
+2 −2
Changes for elections/models.py: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ class Election(models.Model):

        return super().save(*args, **kwargs)

    def cast_vote(self, voter, choice):
    def cast_vote(self, voter, choice, terminal=None):
        if choice == "invalid":
            self.invalid_votes += 1
            self.save()
@@ -111,7 +111,7 @@ class Election(models.Model):

        from vote.models import Participation

        participation = Participation(voter=voter, election=self)
        participation = Participation(voter=voter, election=self, assigned_by=(terminal.assigned_by if terminal else None), is_remote=(False if terminal is not None else True))
        participation.save()

    class Meta:
+101 −0
Changes for home/templates/home/about.html: 101 added lines, 0 removed lines.
Original line number Diff line number Diff line
{% extends 'home/base.html' %}

{% block title %}O projekcie{% endblock %}

{% block content %}
<section class="py-3 py-md-4 mb-4">
    <h1 class="display-5 fw-bold text-dark mb-3">
        Informacje o projekcie
    </h1>

    <p class="fs-5 text-secondary mb-0">
        Samorządowy System Wyborczy
    </p>
</section>


<section aria-label="Informacje o projekcie" class="mb-4">
    <p class="text-secondary text-uppercase fw-semibold small mb-3">
        Otwarty Kod Źródłowy
    </p>

    <div class="d-grid gap-3">
        
        <!-- Open Source Repo Link Card matching Landing Style -->
        <a href="https://git.staszic.waw.pl/su/wybory"
            target="_blank"
            rel="noopener noreferrer"
            class="d-flex align-items-center justify-content-between gap-3 p-4 bg-white border rounded-3 text-decoration-none text-dark">

            <div class="d-flex align-items-center gap-3">
                <div class="bg-primary-subtle text-primary rounded-3 p-3">
                    <i class="fab fa-git-alt fa-lg" aria-hidden="true"></i>
                </div>

                <div>
                    <h2 class="h6 fw-bold mb-1">
                        Repozytorium Git
                    </h2>
                    <p class="small text-secondary mb-0">
                        Projekt ma charakter otwartoźródłowy. Zapoznaj się z kodem na <span class="text-primary text-decoration-underline">git.staszic.waw.pl/su/wybory</span>.
                    </p>
                </div>
            </div>

            <i class="fas fa-external-link-alt text-secondary ms-2" aria-hidden="true"></i>
        </a>

    </div>
    </section>

    <section aria-label="Twórcy projektu" class="mb-4">
    <p class="text-secondary text-uppercase fw-semibold small mb-3">
        Autorzy
    </p>

    <div class="p-4 bg-white border rounded-3">
        <div class="d-flex align-items-center gap-3 mb-4">
            <div class="bg-primary-subtle text-primary rounded-3 p-3">
                <i class="fas fa-users" aria-hidden="true"></i>
            </div>
            <div>
                <h2 class="h6 fw-bold mb-1">
                    Zespół Projektowy
                </h2>
                <p class="small text-secondary mb-0">
                    System stworzony przez uczniów XIV LO im. Stanisława Staszica w Warszawie.
                </p>
            </div>
        </div>

        <div class="row g-3">
            <div class="col-md-4">
                <div class="p-3 bg-light border rounded-3 h-100 d-flex align-items-center gap-3">
                    <div>
                        <h3 class="h6 fw-bold text-dark mb-0">Staś Kycia</h3>
                        <span class="small text-secondary">Twórca / Developer</span>
                    </div>
                </div>
            </div>

            <div class="col-md-4">
                <div class="p-3 bg-light border rounded-3 h-100 d-flex align-items-center gap-3">
                    <div>
                        <h3 class="h6 fw-bold text-dark mb-0">Joachim Kołodziejski</h3>
                        <span class="small text-secondary">Twórca / Developer</span>
                    </div>
                </div>
            </div>

            <div class="col-md-4">
                <div class="p-3 bg-light border rounded-3 h-100 d-flex align-items-center gap-3">
                    <div>
                        <h3 class="h6 fw-bold text-dark mb-0">Józek Klata</h3>
                        <span class="small text-secondary">Twórca / Developer</span>
                    </div>
                </div>
            </div>
        </div>
    </div>
    </section>
{% endblock %}
 No newline at end of file
+35 −0
Changes for home/templates/home/base.html: 35 added lines, 0 removed lines.
Original line number Diff line number Diff line
{% load static %}

<!DOCTYPE html>
<html data-bs-theme="light" lang="pl">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
    <title>{% block title %}{% endblock %} | Wybory</title>
    {% include "home/links.html" %}
</head>

<body class="d-flex min-vh-100 flex-column">
    {% include "home/header.html" %}

    {% if messages %}
        <div class="container my-2">
            {% for message in messages %}
                <div class="alert alert-{{ message.tags }}">
                    {{ message }}
                </div>
            {% endfor %}
        </div>
    {% endif %}
    <main class="container my-5 flex-grow-1">
        <div class="row justify-content-center">
            <div class="col-lg-9 col-xl-8">
                {% block content %}{% endblock %}
            </div>
        </div>
    </main>
    {% include "home/footer.html" %}
    {% include "home/scripts.html" %}
</body>
</html>
+13 −0
Changes for home/templates/home/footer.html: 13 added lines, 0 removed lines.
Original line number Diff line number Diff line
<footer class="text-center bg-primary" data-bs-theme="dark">
    <div class="container d-flex flex-column py-2">
        {{ extrafoot }}
        {% if footer_links.count > 0 %}
        <ul class="list-inline">
            {% for link in footer_links %}
                <li class="list-inline-item {% if not forloop.last %}me-4{% endif %}"><a class="link-body-emphasis link-underline-opacity-0" href="{{link.url}}" {% if link.open_in_new_tab %}target="_blank"{% endif %}>{{link.text}}</a></li>
            {% endfor %}
        </ul>
        {% endif %}
        <a class="link-body-emphasis link-underline-opacity-0" href="{% url 'home:about' %}">Twórcy projektu: Staś Kycia, Joachim Kołodziejski i Józek Klata</a>
    </div>
</footer>
 No newline at end of file
+6 −0
Changes for home/templates/home/header.html: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
<header class="text-white-50 bg-primary w-100 py-2 sticky-top">
    <div class="d-flex flex-column justify-content-between align-items-center flex-md-row container">
        <div>{% if extraheader %}<span>Głosujesz jako:&nbsp;</span><span class="fw-bold text-white">{{ voter.name }} ({{ voter.group.display_name }})</span><i class="far fa-question-circle mx-2" data-bs-toggle="tooltip" data-bss-tooltip="" data-bs-placement="bottom" title="Dane nie zostaną zapisane"></i>{% endif %}</div>
        <div><span id="server-clock">...</span></div>
    </div>
</header>
 No newline at end of file
Loading
Loading