Skip to content
Snippets Groups Projects
Verified Commit 91c23501 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Redesign about page (with new API)

parent 5c02f434
No related branches found
No related tags found
1 merge request!146Resolve "Add licence information page"
Pipeline #1563 failed
......@@ -8,72 +8,115 @@
{% block content %}
<div class="card">
<div class="card-content">
<span class="card-title">{% blocktrans %}About AlekSIS{% endblocktrans %}</span>
<p>
{% blocktrans %}
AlekSIS is a web-based school information system (SIS) which can be used to manage and/or publish
organisational subjects of educational institutions.
{% endblocktrans %}
</p>
</div>
<div class="card-action">
<a class="" href="https://aleksis.org/">{% trans "Website of AlekSIS" %}</a>
<div class="row">
<div class="col s12">
<div class="card">
<div class="card-content">
<span class="card-title">{% blocktrans %}About AlekSIS{% endblocktrans %}</span>
<p>
{% blocktrans %}
This platform is powered by AlekSIS, a web-based school information system (SIS) which can be used
to manage and/or publish organisational subjects of educational institutions. AlekSIS is free software and
can be used by everyone.
{% endblocktrans %}
</p>
</div>
<div class="card-action">
<a class="" href="https://aleksis.org/">{% trans "Website of AlekSIS" %}</a>
<a class="" href="https://edugit.org/AlekSIS/">{% trans "Source code" %}</a>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-content">
<span class="card-title">{% trans "Licence information" %}</span>
<p>
{% blocktrans %}
The core and the official apps of AlekSIS are licenced under the EUPL, version 1.2 or later. For licence
information from third-party apps, if installed, see directly at the respective components below.
{% endblocktrans %}
</p>
</div>
<div class="card-action">
<a href="https://eupl.eu">{% trans "Full licence text" %}</a>
<a href="https://joinup.ec.europa.eu/collection/eupl/guidelines-users-and-developers">{% trans "More information about the EUPL" %}</a>
<div class="row">
<div class="col s12">
<div class="card">
<div class="card-content">
<span class="card-title">{% trans "Licence information" %}</span>
<p>
{% blocktrans %}
The core and the official apps of AlekSIS are licenced under the EUPL, version 1.2 or later. For licence
information from third-party apps, if installed, see directly at the respective components below. The
licences are marked like this:
{% endblocktrans %}
</p>
<br/>
<p>
<span class="chip green white-text">{% trans "Free/Open Source Licence" %}</span>
<span class="chip orange white-text">{% trans "Other Licence" %}</span>
</p>
</div>
<div class="card-action">
<a href="https://eupl.eu">{% trans "Full licence text" %}</a>
<a href="https://joinup.ec.europa.eu/collection/eupl/guidelines-users-and-developers">{% trans "More information about the EUPL" %}</a>
</div>
</div>
</div>
</div>
{% for app in licence_information %}
<div class="card">
<div class="card-content">
<span class="card-title">{{ app.name }}</span>
<div class="row">
{% for app_config in app_configs %}
<div class="col s12 m12 l6">
<div class="card " id="{{ app_config.name }}">
<div class="card-content">
{% if app_config.get_licence.1.isFsfLibre %}
<span class="chip green white-text right">Free Software</span>
{% elif app_config.get_licence.1.isOsiApproved %}
<span class="chip green white-text right">Open Source</span>
{% endif %}
{% if app.copyright_holders %}
<p>
{% for holder in app.copyright_holders %}
Copyright © {{ holder.0|join:", " }}
<span class="card-title">{{ app_config.get_name }} <small>{{ app_config.get_version }}</small></span>
{% if holder.2 %}
<a href="mailto:{{ holder.2 }}">{{ holder.1 }}</a>
{% else %}
{{ holder.1 }}
{% endif %}
{% if app_config.get_copyright %}
<p>
{% for holder in app_config.get_copyright %}
Copyright © {{ holder.0 }}
{% if holder.2 %}
<a href="mailto:{{ holder.2 }}">{{ holder.1 }}</a>
{% else %}
{{ holder.1 }}
{% endif %}
<br/>
{% endfor %}
</p>
<br/>
{% endfor %}
</p>
<br/>
{% endif %}
{% endif %}
{% if app.licence %}
<p>
{% blocktrans with licence=app.licence %}
This part of AlekSIS is licenced under the {{ licence }}.
{% endblocktrans %}
</p>
{% endif %}
{% if app_config.get_licence %}
{% with licence=app_config.get_licence %}
<p>
{% blocktrans with licence=licence.0 %}
This app is licenced under {{ licence }}.
{% endblocktrans %}
</p>
<br/>
<p>
{% for l in licence.2 %}
<a class="chip white-text {% if l.isOsiApproved or l.isFsfLibre %}green{% else %}orange{% endif %}"
href="{{ l.url }}">
{{ l.name }}
</a>
{% endfor %}
</p>
{% endwith %}
{% endif %}
</div>
{% if app_config.get_urls %}
<div class="card-action">
{% for url_name, url in app_config.get_urls.items %}
<a href="{{ url }}">{{ url_name }}</a>
{% endfor %}
</div>
{% endif %}
</div>
</div>
{% if app.repository %}
<div class="card-action">
<a href="{{ app.repository }}">{% trans "Show source code" %}</a>
{% if forloop.counter|divisibleby:2 %}
</div>
<div class="row">
{% endif %}
{% endfor %}
</div>
{% endfor %}
{% endblock %}
from importlib import import_module
from typing import Optional
from django.apps import apps
from django.contrib.auth.decorators import login_required
from django.core.exceptions import PermissionDenied
from django.http import Http404, HttpRequest, HttpResponse
......@@ -23,7 +24,7 @@ from .forms import (
from .models import Activity, Group, Notification, Person, School, DashboardWidget, Announcement
from .tables import GroupsTable, PersonsTable
from .util import messages
from .util.core_helpers import get_app_licence_information
from .util.apps import AppConfig
@person_required
......@@ -57,7 +58,7 @@ def offline(request):
def about(request):
context = {}
context["licence_information"] = get_app_licence_information()
context["app_configs"] = list(filter(lambda a: isinstance(a, AppConfig), apps.get_app_configs()))
return render(request, "core/about.html", context)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment