Skip to content
Snippets Groups Projects
Commit 2455da83 authored by Benjamin Hättasch's avatar Benjamin Hättasch
Browse files

Upgrade to fontawesome 6

Use official fontawesome django app for static file handling
Switch to fork/new version of django-bootstrap (for icon field and rendering shortcuts)
Add migration to bump icon field of dashboard buttons to new version
Update templates to load new app and use new tags
parent 347a93f4
Branches
No related tags found
1 merge request!158Upgrades (bootstrap, fontawesome, django, js dependencies) and static file compression
Pipeline #129428 passed
Showing
with 65 additions and 46 deletions
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
from django.db import migrations, models from django.db import migrations, models
import django.db.models.deletion import django.db.models.deletion
import fontawesome_5.fields import fontawesome_6.fields
class Migration(migrations.Migration): class Migration(migrations.Migration):
...@@ -20,7 +20,7 @@ class Migration(migrations.Migration): ...@@ -20,7 +20,7 @@ class Migration(migrations.Migration):
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('text', models.CharField(help_text='Text that will be shown on the button', max_length=50, verbose_name='Text')), ('text', models.CharField(help_text='Text that will be shown on the button', max_length=50, verbose_name='Text')),
('url', models.URLField(help_text='URL this button links to', verbose_name='Link URL')), ('url', models.URLField(help_text='URL this button links to', verbose_name='Link URL')),
('icon', fontawesome_5.fields.IconField(blank=True, default='external-link-alt', help_text='Symbol represeting this button.', max_length=60, verbose_name='Icon')), ('icon', fontawesome_6.fields.IconField(blank=True, default='external-link-alt', help_text='Symbol represeting this button.', max_length=60, verbose_name='Icon')),
('color', models.PositiveSmallIntegerField(choices=[(0, 'primary'), (1, 'success'), (2, 'info'), (3, 'warning'), (4, 'danger')], default=0, help_text='Style (Color) of this button (bootstrap class)', verbose_name='Button Style')), ('color', models.PositiveSmallIntegerField(choices=[(0, 'primary'), (1, 'success'), (2, 'info'), (3, 'warning'), (4, 'danger')], default=0, help_text='Style (Color) of this button (bootstrap class)', verbose_name='Button Style')),
('event', models.ForeignKey(help_text='Event this button belongs to', on_delete=django.db.models.deletion.CASCADE, to='AKModel.Event', verbose_name='Event')), ('event', models.ForeignKey(help_text='Event this button belongs to', on_delete=django.db.models.deletion.CASCADE, to='AKModel.Event', verbose_name='Event')),
], ],
......
# Generated by Django 3.2.16 on 2023-01-03 16:50
from django.db import migrations
import fontawesome_6.fields
class Migration(migrations.Migration):
dependencies = [
('AKDashboard', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='dashboardbutton',
name='icon',
field=fontawesome_6.fields.IconField(blank=True, default='external-link-alt', help_text='Symbol represeting this button.', max_length=60, verbose_name='Icon'),
),
]
from django.db import models from django.db import models
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from fontawesome_5.fields import IconField from fontawesome_6.fields import IconField
from AKModel.models import Event from AKModel.models import Event
......
{% extends 'base.html' %} {% extends 'base.html' %}
{% load fontawesome_5 %} {% load fontawesome_6 %}
{% load i18n %} {% load i18n %}
{% load static %} {% load static %}
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
{% include "AKDashboard/dashboard_row.html" %} {% include "AKDashboard/dashboard_row.html" %}
{% if event.contact_email %} {% if event.contact_email %}
<p> <p>
<a href="mailto:{{ event.contact_email }}">{% fa5_icon "envelope" "fas" %} {% trans "Write to organizers of this event for questions and comments" %}</a> <a href="mailto:{{ event.contact_email }}">{% fa6_icon "envelope" "fas" %} {% trans "Write to organizers of this event for questions and comments" %}</a>
</p> </p>
{% endif %} {% endif %}
</div> </div>
......
{% extends 'base.html' %} {% extends 'base.html' %}
{% load fontawesome_5 %} {% load fontawesome_6 %}
{% load i18n %} {% load i18n %}
{% load static %} {% load static %}
{% load tags_AKModel %} {% load tags_AKModel %}
...@@ -27,14 +27,14 @@ ...@@ -27,14 +27,14 @@
<h3 class="mt-1" id="history">{% trans "Recent" %}:</h3> <h3 class="mt-1" id="history">{% trans "Recent" %}:</h3>
<ul id="recent-changes-list"> <ul id="recent-changes-list">
{% for recent in recent_changes %} {% for recent in recent_changes %}
<li><a href="{{ recent.link }}">{% fa5_icon recent.icon.0 recent.icon.1 %} {{ recent.text }}</a> <span style="color: #999999;">{{ recent.timestamp | timezone:event.timezone | date:"d.m. H:i" }}</span></li> <li><a href="{{ recent.link }}">{% fa6_icon recent.icon.0 recent.icon.1 %} {{ recent.text }}</a> <span style="color: #999999;">{{ recent.timestamp | timezone:event.timezone | date:"d.m. H:i" }}</span></li>
{% endfor %} {% endfor %}
</ul> </ul>
{% endif %} {% endif %}
{% if event.contact_email %} {% if event.contact_email %}
<p> <p>
<a href="mailto:{{ event.contact_email }}">{% fa5_icon "envelope" "fas" %} {% trans "Write to organizers of this event for questions and comments" %}</a> <a href="mailto:{{ event.contact_email }}">{% fa6_icon "envelope" "fas" %} {% trans "Write to organizers of this event for questions and comments" %}</a>
</p> </p>
{% endif %} {% endif %}
</div> </div>
......
{% load i18n %} {% load i18n %}
{% load tags_AKModel %} {% load tags_AKModel %}
{% load fontawesome_5 %} {% load fontawesome_6 %}
<h2><a href="{% url 'dashboard:dashboard_event' slug=event.slug %}">{{ event.name }}</a></h2> <h2><a href="{% url 'dashboard:dashboard_event' slug=event.slug %}">{{ event.name }}</a></h2>
<div class="mt-2"> <div class="mt-2">
......
{% extends 'base.html' %} {% extends 'base.html' %}
{% load fontawesome_5 %} {% load fontawesome_6 %}
{% load i18n %} {% load i18n %}
{% load static %} {% load static %}
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
{% load i18n %} {% load i18n %}
{% load django_bootstrap5 %} {% load django_bootstrap5 %}
{% load fontawesome_5 %} {% load fontawesome_6 %}
{% block title %}{{event}}: {{ title }}{% endblock %} {% block title %}{{event}}: {{ title }}{% endblock %}
...@@ -20,11 +20,11 @@ ...@@ -20,11 +20,11 @@
<div class="float-end"> <div class="float-end">
<button type="submit" class="save btn btn-success" value="Submit"> <button type="submit" class="save btn btn-success" value="Submit">
{% fa5_icon "check" 'fas' %} {% trans "Confirm" %} {% fa6_icon "check" 'fas' %} {% trans "Confirm" %}
</button> </button>
</div> </div>
<a href="javascript:history.back()" class="btn btn-info"> <a href="javascript:history.back()" class="btn btn-info">
{% fa5_icon "times" 'fas' %} {% trans "Cancel" %} {% fa6_icon "times" 'fas' %} {% trans "Cancel" %}
</a> </a>
</form> </form>
{% endblock %} {% endblock %}
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
{% load i18n %} {% load i18n %}
{% load django_bootstrap5 %} {% load django_bootstrap5 %}
{% load fontawesome_5 %} {% load fontawesome_6 %}
{% load tz %} {% load tz %}
{% block title %}{% trans "New event wizard" %}: {{ wizard_step_text }}{% endblock %} {% block title %}{% trans "New event wizard" %}: {{ wizard_step_text }}{% endblock %}
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
{% include "admin/AKModel/event_wizard/wizard_steps.html" %} {% include "admin/AKModel/event_wizard/wizard_steps.html" %}
<div class="text-center btn-success disabled mt-3 mb-3" style="font-size: 8em;"> <div class="text-center btn-success disabled mt-3 mb-3" style="font-size: 8em;">
{% fa5_icon "copy" "fas" %} {% fa6_icon "copy" "fas" %}
</div> </div>
<h5 class="mb-3">{% trans "Successfully imported.<br><br>Do you want to activate your event now?" %}</h5> <h5 class="mb-3">{% trans "Successfully imported.<br><br>Do you want to activate your event now?" %}</h5>
...@@ -24,12 +24,12 @@ ...@@ -24,12 +24,12 @@
<div class="float-end"> <div class="float-end">
<button type="submit" class="save btn btn-success" value="Submit"> <button type="submit" class="save btn btn-success" value="Submit">
{% fa5_icon "check" 'fas' %} {% trans "Finish" %} {% fa6_icon "check" 'fas' %} {% trans "Finish" %}
</button> </button>
</div> </div>
<a href="{% url 'admin:event_status' event.slug %}" class="btn btn-info"> <a href="{% url 'admin:event_status' event.slug %}" class="btn btn-info">
{% fa5_icon "info" 'fas' %} {% trans "Status" %} {% fa6_icon "info" 'fas' %} {% trans "Status" %}
</a> </a>
</form> </form>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
{% load i18n %} {% load i18n %}
{% load django_bootstrap5 %} {% load django_bootstrap5 %}
{% load fontawesome_5 %} {% load fontawesome_6 %}
{% load tz %} {% load tz %}
{% block title %}{% trans "New event wizard" %}: {{ wizard_step_text }}{% endblock %} {% block title %}{% trans "New event wizard" %}: {{ wizard_step_text }}{% endblock %}
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
{% endtimezone %} {% endtimezone %}
<div class="text-center btn-success disabled mb-3" style="font-size: 8em;"> <div class="text-center btn-success disabled mb-3" style="font-size: 8em;">
{% fa5_icon "calendar-plus" "fas" %} {% fa6_icon "calendar-plus" "fas" %}
</div> </div>
...@@ -36,16 +36,16 @@ ...@@ -36,16 +36,16 @@
<div class="float-end"> <div class="float-end">
<a href="{% url 'admin:new_event_wizard_activate' event.slug %}" class="btn btn-info"> <a href="{% url 'admin:new_event_wizard_activate' event.slug %}" class="btn btn-info">
{% fa5_icon "forward" 'fas' %} {% trans "Skip Import" %} {% fa6_icon "forward" 'fas' %} {% trans "Skip Import" %}
</a> </a>
<button type="submit" class="save btn btn-success" value="Submit"> <button type="submit" class="save btn btn-success" value="Submit">
{% fa5_icon "check" 'fas' %} {% trans "Continue" %} {% fa6_icon "check" 'fas' %} {% trans "Continue" %}
</button> </button>
</div> </div>
<a href="{% url 'admin:event_status' event.slug %}" class="btn btn-info"> <a href="{% url 'admin:event_status' event.slug %}" class="btn btn-info">
{% fa5_icon "info" 'fas' %} {% trans "Status" %} {% fa6_icon "info" 'fas' %} {% trans "Status" %}
</a> </a>
</form> </form>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
{% load i18n %} {% load i18n %}
{% load django_bootstrap5 %} {% load django_bootstrap5 %}
{% load fontawesome_5 %} {% load fontawesome_6 %}
{% load tz %} {% load tz %}
{% block title %}{% trans "New event wizard" %}: {{ wizard_step_text }}{% endblock %} {% block title %}{% trans "New event wizard" %}: {{ wizard_step_text }}{% endblock %}
...@@ -12,13 +12,13 @@ ...@@ -12,13 +12,13 @@
{% include "admin/AKModel/event_wizard/wizard_steps.html" %} {% include "admin/AKModel/event_wizard/wizard_steps.html" %}
<div class="text-center btn-success disabled mt-3 mb-3" style="font-size: 8em;"> <div class="text-center btn-success disabled mt-3 mb-3" style="font-size: 8em;">
{% fa5_icon "check-circle" "fas" %} {% fa6_icon "check-circle" "fas" %}
</div> </div>
<h5>{% trans "Congratulations. Everything is set up!" %}</h5> <h5>{% trans "Congratulations. Everything is set up!" %}</h5>
<a href="{% url 'admin:event_status' event.slug %}" class="btn btn-info float-end"> <a href="{% url 'admin:event_status' event.slug %}" class="btn btn-info float-end">
{% fa5_icon "info" 'fas' %}&nbsp;{% trans "Status" %} {% fa6_icon "info" 'fas' %}&nbsp;{% trans "Status" %}
</a> </a>
{% endblock %} {% endblock %}
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
{% load i18n %} {% load i18n %}
{% load django_bootstrap5 %} {% load django_bootstrap5 %}
{% load fontawesome_5 %} {% load fontawesome_6 %}
{% load tz %} {% load tz %}
{% block title %}{% trans "New event wizard" %}: {{ wizard_step_text }}{% endblock %} {% block title %}{% trans "New event wizard" %}: {{ wizard_step_text }}{% endblock %}
...@@ -17,11 +17,11 @@ ...@@ -17,11 +17,11 @@
{% bootstrap_form form %} {% bootstrap_form form %}
<button type="submit" class="save btn btn-success float-end" value="Submit"> <button type="submit" class="save btn btn-success float-end" value="Submit">
{% fa5_icon "check" 'fas' %} {% trans "Continue" %} {% fa6_icon "check" 'fas' %} {% trans "Continue" %}
</button> </button>
<a href="{% url 'admin:index' %}" class="btn btn-info"> <a href="{% url 'admin:index' %}" class="btn btn-info">
{% fa5_icon "times" 'fas' %} {% trans "Cancel" %} {% fa6_icon "times" 'fas' %} {% trans "Cancel" %}
</a> </a>
</form> </form>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
{% load i18n %} {% load i18n %}
{% load django_bootstrap5 %} {% load django_bootstrap5 %}
{% load fontawesome_5 %} {% load fontawesome_6 %}
{% load tz %} {% load tz %}
{% block title %}{% trans "New event wizard" %}: {{ wizard_step_text }}{% endblock %} {% block title %}{% trans "New event wizard" %}: {{ wizard_step_text }}{% endblock %}
...@@ -19,14 +19,14 @@ ...@@ -19,14 +19,14 @@
{% bootstrap_form form %} {% bootstrap_form form %}
<button type="submit" class="save btn btn-success float-end" value="Submit"> <button type="submit" class="save btn btn-success float-end" value="Submit">
{% fa5_icon "check" 'fas' %} {% trans "Continue" %} {% fa6_icon "check" 'fas' %} {% trans "Continue" %}
</button> </button>
<a href="{% url 'admin:new_event_wizard_start' %}" class="btn btn-info"> <a href="{% url 'admin:new_event_wizard_start' %}" class="btn btn-info">
{% fa5_icon "chevron-left" 'fas' %} {% trans "Back" %} {% fa6_icon "chevron-left" 'fas' %} {% trans "Back" %}
</a> </a>
<a href="{% url 'admin:index' %}" class="btn btn-warning"> <a href="{% url 'admin:index' %}" class="btn btn-warning">
{% fa5_icon "times" 'fas' %} {% trans "Cancel" %} {% fa6_icon "times" 'fas' %} {% trans "Cancel" %}
</a> </a>
</form> </form>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
{% load i18n %} {% load i18n %}
{% load django_bootstrap5 %} {% load django_bootstrap5 %}
{% load fontawesome_5 %} {% load fontawesome_6 %}
{% block title %}{% trans "New event wizard" %}: {{ wizard_step_text }}{% endblock %} {% block title %}{% trans "New event wizard" %}: {{ wizard_step_text }}{% endblock %}
...@@ -16,11 +16,11 @@ ...@@ -16,11 +16,11 @@
{% bootstrap_form form %} {% bootstrap_form form %}
<button type="submit" class="save btn btn-success float-end" value="Submit"> <button type="submit" class="save btn btn-success float-end" value="Submit">
{% fa5_icon "check" 'fas' %} {% trans "Continue" %} {% fa6_icon "check" 'fas' %} {% trans "Continue" %}
</button> </button>
<a href="{% url 'admin:index' %}" class="btn btn-info"> <a href="{% url 'admin:index' %}" class="btn btn-info">
{% fa5_icon "times" 'fas' %} {% trans "Cancel" %} {% fa6_icon "times" 'fas' %} {% trans "Cancel" %}
</a> </a>
</form> </form>
{% endblock %} {% endblock %}
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
{% load tags_AKModel %} {% load tags_AKModel %}
{% load i18n %} {% load i18n %}
{% load fontawesome_5 %} {% load fontawesome_6 %}
{% block action_preview %} {% block action_preview %}
<p>{% blocktrans with message_count=ak_messages.count %}Are you sure you want to delete all orga messages for {{ event }}? This will permanently delete {{ message_count }} message(s):{% endblocktrans %}</p> <p>{% blocktrans with message_count=ak_messages.count %}Are you sure you want to delete all orga messages for {{ event }}? This will permanently delete {{ message_count }} message(s):{% endblocktrans %}</p>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
{% load i18n %} {% load i18n %}
{% load tz %} {% load tz %}
{% load fontawesome_5 %} {% load fontawesome_6 %}
{% block title %}{% trans "Status" %}: {{event}}{% endblock %} {% block title %}{% trans "Status" %}: {{event}}{% endblock %}
...@@ -25,11 +25,11 @@ ...@@ -25,11 +25,11 @@
<td class="text-end"> <td class="text-end">
<a href="{% url 'submit:ak_detail' event_slug=ak.event.slug pk=ak.pk %}" data-bs-toggle="tooltip" <a href="{% url 'submit:ak_detail' event_slug=ak.event.slug pk=ak.pk %}" data-bs-toggle="tooltip"
title="{% trans 'Details' %}" title="{% trans 'Details' %}"
class="btn btn-primary">{% fa5_icon 'info' 'fas' %}</a> class="btn btn-primary">{% fa6_icon 'info' 'fas' %}</a>
{% if event.active %} {% if event.active %}
<a href="{% url 'submit:ak_edit' event_slug=event.slug pk=ak.pk %}" data-bs-toggle="tooltip" <a href="{% url 'submit:ak_edit' event_slug=event.slug pk=ak.pk %}" data-bs-toggle="tooltip"
title="{% trans 'Edit' %}" title="{% trans 'Edit' %}"
class="btn btn-success">{% fa5_icon 'pencil-alt' 'fas' %}</a> class="btn btn-success">{% fa6_icon 'pencil-alt' 'fas' %}</a>
{% endif %} {% endif %}
{% endif %} {% endif %}
</td> </td>
......
{% extends "base.html" %} {% extends "base.html" %}
{% load fontawesome_5 %} {% load fontawesome_6 %}
{% load i18n %} {% load i18n %}
{% load static %} {% load static %}
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
{% block footer_custom %} {% block footer_custom %}
{% if event.contact_email %} {% if event.contact_email %}
<h4> <h4>
<a href="mailto:{{ event.contact_email }}">{% fa5_icon "envelope" "far" %} {% trans "Write to organizers of this event for questions and comments" %}</a> <a href="mailto:{{ event.contact_email }}">{% fa6_icon "envelope" "far" %} {% trans "Write to organizers of this event for questions and comments" %}</a>
</h4> </h4>
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% extends "AKPlan/plan_base.html" %} {% extends "AKPlan/plan_base.html" %}
{% load fontawesome_5 %} {% load fontawesome_6 %}
{% load i18n %} {% load i18n %}
{% load static %} {% load static %}
{% load tz %} {% load tz %}
......
{% extends "AKPlan/plan_base.html" %} {% extends "AKPlan/plan_base.html" %}
{% load fontawesome_5 %} {% load fontawesome_6 %}
{% load i18n %} {% load i18n %}
{% load static %} {% load static %}
{% load tz %} {% load tz %}
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
{% if event.active %} {% if event.active %}
<li class="nav-item"> <li class="nav-item">
<a class="nav-link active" <a class="nav-link active"
href="{% url 'plan:plan_wall' event_slug=event.slug %}">{% fa5_icon 'desktop' 'fas' %}&nbsp;&nbsp;{% trans "AK Wall" %}</a> href="{% url 'plan:plan_wall' event_slug=event.slug %}">{% fa6_icon 'desktop' 'fas' %}&nbsp;&nbsp;{% trans "AK Wall" %}</a>
</li> </li>
{% endif %} {% endif %}
</ul> </ul>
......
{% extends "AKPlan/plan_detail.html" %} {% extends "AKPlan/plan_detail.html" %}
{% load fontawesome_5 %} {% load fontawesome_6 %}
{% load tags_AKModel %} {% load tags_AKModel %}
{% load tz %} {% load tz %}
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
{% if "AKOnline"|check_app_installed and room.virtualroom and room.virtualroom.url != '' %} {% if "AKOnline"|check_app_installed and room.virtualroom and room.virtualroom.url != '' %}
<a class="btn btn-success" target="_parent" href="{{ room.virtualroom.url }}"> <a class="btn btn-success" target="_parent" href="{{ room.virtualroom.url }}">
{% fa5_icon 'external-link-alt' 'fas' %} {% trans "Go to virtual room" %} {% fa6_icon 'external-link-alt' 'fas' %} {% trans "Go to virtual room" %}
</a> </a>
{% endif %} {% endif %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment