Skip to content
Snippets Groups Projects
Commit 9cc32b5e authored by Nadja Geisler's avatar Nadja Geisler :sunny:
Browse files

Merge branch 'upgrades' into 'main'

Upgrades (bootstrap, fontawesome, django, js dependencies) and static file compression

Closes #158, #157, #186, and #185

See merge request !158
parents 31c2fe19 02561e08
Branches
No related tags found
1 merge request!158Upgrades (bootstrap, fontawesome, django, js dependencies) and static file compression
Pipeline #131716 passed
Showing
with 109 additions and 88 deletions
......@@ -2,7 +2,7 @@
from django.db import migrations, models
import django.db.models.deletion
import fontawesome_5.fields
import fontawesome_6.fields
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')),
('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')),
('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')),
('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.utils.translation import gettext_lazy as _
from fontawesome_5.fields import IconField
from fontawesome_6.fields import IconField
from AKModel.models import Event
......
......@@ -18,7 +18,6 @@
}
.dashboard-box {
display: block;
padding: 2em;
margin-right: 1em;
min-width: 15em;
......
{% extends 'base.html' %}
{% load fontawesome_5 %}
{% load fontawesome_6 %}
{% load i18n %}
{% load static %}
{% block imports %}
{{ block.super }}
<link rel="stylesheet" href="{% static 'AKDashboard/style.css' %}">
{% endblock %}
{% block breadcrumbs %}
<li class="breadcrumb-item">AKPlanning</li>
{% endblock %}
......@@ -22,7 +14,7 @@
{% include "AKDashboard/dashboard_row.html" %}
{% if event.contact_email %}
<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>
{% endif %}
</div>
......
{% extends 'base.html' %}
{% load fontawesome_5 %}
{% load fontawesome_6 %}
{% load i18n %}
{% load static %}
{% load tags_AKModel %}
{% load tz %}
{% block imports %}
{{ block.super }}
<link rel="stylesheet" href="{% static 'AKDashboard/style.css' %}">
{% endblock %}
{% block breadcrumbs %}
<li class="breadcrumb-item"><a href="{% url 'dashboard:dashboard' %}">AKPlanning</a></li>
<li class="breadcrumb-item active">{{ event }}</li>
......@@ -27,14 +19,14 @@
<h3 class="mt-1" id="history">{% trans "Recent" %}:</h3>
<ul id="recent-changes-list">
{% 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 %}
</ul>
{% endif %}
{% if event.contact_email %}
<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>
{% endif %}
</div>
......
{% load i18n %}
{% load tags_AKModel %}
{% load fontawesome_5 %}
{% load fontawesome_6 %}
<h2><a href="{% url 'dashboard:dashboard_event' slug=event.slug %}">{{ event.name }}</a></h2>
<div class="row">
<div class="mt-2">
{% if 'AKSubmission'|check_app_installed %}
<a class="dashboard-box btn btn-primary"
href="{% url 'submit:ak_list' event_slug=event.slug %}">
......@@ -67,4 +67,3 @@
</a>
{% endfor %}
</div>
......@@ -80,7 +80,7 @@ class AvailabilitiesFormMixin(forms.Form):
if not obj:
raise TypeError
if obj.tzinfo is None:
obj = tz.localize(obj)
obj = obj.astimezone(tz)
return obj
......
import csv
import io
from bootstrap_datepicker_plus import DateTimePickerInput
from bootstrap_datepicker_plus.widgets import DateTimePickerInput
from django import forms
from django.forms.utils import ErrorList
from django.utils.translation import gettext_lazy as _
......
# Generated by Django 4.1.5 on 2023-01-03 17:04
from django.db import migrations
import timezone_field.fields
class Migration(migrations.Migration):
dependencies = [
('AKModel', '0056_remove_tags'),
]
operations = [
migrations.AlterField(
model_name='event',
name='timezone',
field=timezone_field.fields.TimeZoneField(choices_display='WITH_GMT_OFFSET', default='Europe/Berlin', help_text='Time Zone where this event takes place in', verbose_name='Time Zone'),
),
]
......@@ -22,7 +22,7 @@ class Event(models.Model):
place = models.CharField(max_length=128, blank=True, verbose_name=_('Place'),
help_text=_('City etc. the event takes place in'))
timezone = TimeZoneField(default='Europe/Berlin', display_GMT_offset=True, blank=False,
timezone = TimeZoneField(default='Europe/Berlin', blank=False, choices_display="WITH_GMT_OFFSET",
verbose_name=_('Time Zone'), help_text=_('Time Zone where this event takes place in'))
start = models.DateTimeField(verbose_name=_('Start'), help_text=_('Time the event begins'))
end = models.DateTimeField(verbose_name=_('End'), help_text=_('Time the event ends'))
......
{% load compress %}
{% load static %}
{% load i18n %}
{% get_current_language as LANGUAGE_CODE %}
<link href='{% static 'common/vendor/fullcalendar-scheduler/main.css' %}' rel='stylesheet'/>
<script src='{% static 'common/vendor/fullcalendar-scheduler/main.js' %}'></script>
{% compress js %}
<script src='{% static 'common/vendor/fullcalendar-scheduler/fullcalendar-6.0.2.js' %}'></script>
<script src='{% static 'common/vendor/fullcalendar-scheduler/fullcalendar.bootstrap5-5.0.2.min.js' %}'></script>
{% with 'common/vendor/fullcalendar-scheduler/locales/'|add:LANGUAGE_CODE|add:'.js' as locale_file %}
{% if LANGUAGE_CODE != "en" %}
......@@ -11,3 +13,6 @@
<script src="{% static locale_file %}"></script>
{% endif %}
{% endwith %}
{% endcompress %}
{% load compress %}
{% load static %}
{% load i18n %}
{% get_current_language as LANGUAGE_CODE %}
<link href='{% static 'common/vendor/fullcalendar-scheduler/main.css' %}' rel='stylesheet'/>
<script src='{% static 'common/vendor/fullcalendar-scheduler/main.js' %}'></script>
{% compress js %}
<script src='{% static 'common/vendor/fullcalendar-scheduler/fullcalendar-6.0.2.js' %}'></script>
<script src='{% static 'common/vendor/fullcalendar-scheduler/fullcalendar.bootstrap5-5.0.2.min.js' %}'></script>
<script src="{% static "common/vendor/moment/moment-with-locales.js" %}"></script>
<script src="{% static "common/js/availabilities.js" %}"></script>
......@@ -13,3 +15,4 @@
<script src="{% static locale_file %}"></script>
{% endif %}
{% endwith %}
{% endcompress %}
{% extends 'base.html' %}
{% load fontawesome_5 %}
{% load fontawesome_6 %}
{% load i18n %}
{% load static %}
{% load tags_AKModel %}
{% block imports %}
{{ block.super }}
<link rel="stylesheet" href="{% static 'AKDashboard/style.css' %}">
{% endblock %}
{% block breadcrumbs %}
<li class="breadcrumb-item">
{% if 'AKDashboard'|check_app_installed %}
......
......@@ -2,8 +2,8 @@
{% load tags_AKModel %}
{% load i18n %}
{% load bootstrap4 %}
{% load fontawesome_5 %}
{% load django_bootstrap5 %}
{% load fontawesome_6 %}
{% block title %}{{event}}: {{ title }}{% endblock %}
......@@ -18,13 +18,13 @@
<form method="post">{% csrf_token %}
{% bootstrap_form form %}
<div class="float-right">
<div class="float-end">
<button type="submit" class="save btn btn-success" value="Submit">
{% fa5_icon "check" 'fas' %} {% trans "Confirm" %}
{% fa6_icon "check" 'fas' %} {% trans "Confirm" %}
</button>
</div>
<a href="javascript:history.back()" class="btn btn-info">
{% fa5_icon "times" 'fas' %} {% trans "Cancel" %}
{% fa6_icon "times" 'fas' %} {% trans "Cancel" %}
</a>
</form>
{% endblock %}
......@@ -2,12 +2,13 @@
{% load tags_AKModel %}
{% load i18n admin_urls %}
{% load static %}
{% load bootstrap4 %}
{% load django_bootstrap5 %}
{% load tz %}
{% block extrahead %}
{{ block.super }}
{% bootstrap_javascript jquery='slim' %}
{% bootstrap_javascript %}
<script src="{% static 'common/vendor/jquery/jquery-3.6.3.min.js' %}"></script>
{% include "AKModel/load_fullcalendar_availabilities.html" %}
<script>
......
......@@ -2,8 +2,8 @@
{% load tags_AKModel %}
{% load i18n %}
{% load bootstrap4 %}
{% load fontawesome_5 %}
{% load django_bootstrap5 %}
{% load fontawesome_6 %}
{% load tz %}
{% block title %}{% trans "New event wizard" %}: {{ wizard_step_text }}{% endblock %}
......@@ -12,7 +12,7 @@
{% include "admin/AKModel/event_wizard/wizard_steps.html" %}
<div class="text-center btn-success disabled mt-3 mb-3" style="font-size: 8em;">
{% fa5_icon "copy" "fas" %}
{% fa6_icon "copy" "fas" %}
</div>
<h5 class="mb-3">{% trans "Successfully imported.<br><br>Do you want to activate your event now?" %}</h5>
......@@ -22,14 +22,14 @@
<form method="post">{% csrf_token %}
{% bootstrap_form form %}
<div class="float-right">
<div class="float-end">
<button type="submit" class="save btn btn-success" value="Submit">
{% fa5_icon "check" 'fas' %} {% trans "Finish" %}
{% fa6_icon "check" 'fas' %} {% trans "Finish" %}
</button>
</div>
<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>
</form>
......
......@@ -2,8 +2,8 @@
{% load tags_AKModel %}
{% load i18n %}
{% load bootstrap4 %}
{% load fontawesome_5 %}
{% load django_bootstrap5 %}
{% load fontawesome_6 %}
{% load tz %}
{% block title %}{% trans "New event wizard" %}: {{ wizard_step_text }}{% endblock %}
......@@ -22,7 +22,7 @@
{% endtimezone %}
<div class="text-center btn-success disabled mb-3" style="font-size: 8em;">
{% fa5_icon "calendar-plus" "fas" %}
{% fa6_icon "calendar-plus" "fas" %}
</div>
......@@ -34,18 +34,18 @@
<form method="post">{% csrf_token %}
{% bootstrap_form form %}
<div class="float-right">
<div class="float-end">
<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>
<button type="submit" class="save btn btn-success" value="Submit">
{% fa5_icon "check" 'fas' %} {% trans "Continue" %}
{% fa6_icon "check" 'fas' %} {% trans "Continue" %}
</button>
</div>
<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>
</form>
......
......@@ -2,8 +2,8 @@
{% load tags_AKModel %}
{% load i18n %}
{% load bootstrap4 %}
{% load fontawesome_5 %}
{% load django_bootstrap5 %}
{% load fontawesome_6 %}
{% load tz %}
{% block title %}{% trans "New event wizard" %}: {{ wizard_step_text }}{% endblock %}
......@@ -12,13 +12,13 @@
{% include "admin/AKModel/event_wizard/wizard_steps.html" %}
<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>
<h5>{% trans "Congratulations. Everything is set up!" %}</h5>
<a href="{% url 'admin:event_status' event.slug %}" class="btn btn-info float-right">
{% fa5_icon "info" 'fas' %}&nbsp;{% trans "Status" %}
<a href="{% url 'admin:event_status' event.slug %}" class="btn btn-info float-end">
{% fa6_icon "info" 'fas' %}&nbsp;{% trans "Status" %}
</a>
{% endblock %}
......@@ -2,8 +2,8 @@
{% load tags_AKModel %}
{% load i18n %}
{% load bootstrap4 %}
{% load fontawesome_5 %}
{% load django_bootstrap5 %}
{% load fontawesome_6 %}
{% load tz %}
{% block title %}{% trans "New event wizard" %}: {{ wizard_step_text }}{% endblock %}
......@@ -16,12 +16,12 @@
<form method="post">{% csrf_token %}
{% bootstrap_form form %}
<button type="submit" class="save btn btn-success float-right" value="Submit">
{% fa5_icon "check" 'fas' %} {% trans "Continue" %}
<button type="submit" class="save btn btn-success float-end" value="Submit">
{% fa6_icon "check" 'fas' %} {% trans "Continue" %}
</button>
<a href="{% url 'admin:index' %}" class="btn btn-info">
{% fa5_icon "times" 'fas' %} {% trans "Cancel" %}
{% fa6_icon "times" 'fas' %} {% trans "Cancel" %}
</a>
</form>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment