Verified Commit a6ba523c authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Fix pizzas classes in HTML, better member ordering by default and fix event...

Fix pizzas classes in HTML, better member ordering by default and fix event detail page responsive styling
parent 44ea0425
...@@ -20,6 +20,20 @@ ...@@ -20,6 +20,20 @@
</div> </div>
</section> </section>
{% if membergroup.description %}
<section id="activemembers-membergroup-description" class="page-section">
<div class="container">
<h1 class="text-center section-title">
{% trans 'Description' %}
</h1>
<div class="text-center">
{{ membergroup.description|safe }}
</div>
</div>
</section>
{% endif %}
<section id="activemembers-membergroup-members" class="page-section"> <section id="activemembers-membergroup-members" class="page-section">
<div class="container"> <div class="container">
<h1 class="text-center section-title"> <h1 class="text-center section-title">
......
.association-document-card, .annual-document-card { .association-document-card, .annual-document-card {
.name {
-webkit-hyphens: auto;
-moz-hyphens: auto;
-ms-hyphens: auto;
hyphens: auto;
}
.overlay {
h5 {
-webkit-hyphens: auto;
-moz-hyphens: auto;
-ms-hyphens: auto;
hyphens: auto;
}
}
&:after { &:after {
padding-bottom: 141%; padding-bottom: 141%;
} }
...@@ -27,8 +43,8 @@ ...@@ -27,8 +43,8 @@
} }
#documents-annual { #documents-annual {
.dropdown-years { .dropdown-years {
max-height: 200px; max-height: 200px;
overflow-y: scroll; overflow-y: scroll;
} }
} }
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
{% trans "Submit Exam" %} {% trans "Submit Exam" %}
</a> </a>
<a href="{% url 'education:submit-summary' course.id %}" <a href="{% url 'education:submit-summary' course.id %}"
class="btn btn-primary"> class="btn btn-primary mt-2">
{% trans "Submit Summary" %} {% trans "Submit Summary" %}
</a> </a>
{% endif %} {% endif %}
......
...@@ -93,11 +93,11 @@ ...@@ -93,11 +93,11 @@
#events-index { #events-index {
.fc-right { .fc-right {
> div { > div {
margin-bottom: 1rem; margin-bottom: 0.5rem;
float: right; float: right;
clear: both;
} }
> button { > button {
clear: both;
float: right; float: right;
} }
} }
......
...@@ -20,7 +20,7 @@ ListView = View.extend({ ...@@ -20,7 +20,7 @@ ListView = View.extend({
break; break;
} }
var date = e.start.format('YYYY-MM-DD HH:mm:ss'); var date = e.start.format('YYYY-MM-DD HH:mm');
var eventCard = $("<div>").addClass("card mb-0"); var eventCard = $("<div>").addClass("card mb-0");
......
...@@ -19,12 +19,12 @@ ...@@ -19,12 +19,12 @@
{% endfor %} {% endfor %}
{% endif %} {% endif %}
<div class="m-4"> <div class="mx-4 m-lg-4">
{{ event.description|bleach }} {{ event.description|bleach }}
</div> </div>
<div class="clearfix row"> <div class="clearfix row">
<div class="col-6"> <div class="col-12 col-md-6 order-1">
<table class="table table-borderless"> <table class="table table-borderless">
<tbody> <tbody>
<tr> <tr>
...@@ -214,7 +214,7 @@ ...@@ -214,7 +214,7 @@
</table> </table>
</div> </div>
<div class="col-6"> <div class="col-12 col-md-6 order-0 order-md-1 mb-4 mb-md-0">
<div class="location-map"> <div class="location-map">
<img src="{% google_map_url event.map_location %}" alt="{{ event.location }}" /> <img src="{% google_map_url event.map_location %}" alt="{{ event.location }}" />
</div> </div>
......
...@@ -68,7 +68,6 @@ ...@@ -68,7 +68,6 @@
var tmpView = ($(window).width() < 979) ? 'list' : 'agendaWeek'; var tmpView = ($(window).width() < 979) ? 'list' : 'agendaWeek';
if (Cookies.get('agendaview') !== undefined) { if (Cookies.get('agendaview') !== undefined) {
tmpView = Cookies.get('agendaview'); tmpView = Cookies.get('agendaview');
console.log(tmpView);
} }
// History idea and code parts from // History idea and code parts from
...@@ -91,6 +90,7 @@ ...@@ -91,6 +90,7 @@
} }
calendarElement.fullCalendar({ calendarElement.fullCalendar({
aspectRatio: 1.8,
theme: 'bootstrap4', theme: 'bootstrap4',
eventSources: eventSources, eventSources: eventSources,
defaultView: tmpView, defaultView: tmpView,
...@@ -155,8 +155,37 @@ ...@@ -155,8 +155,37 @@
} }
if (view.name !== prevView) { if (view.name !== prevView) {
var windowWidth = $(window).width();
Cookies.set('agendaview', view.name); Cookies.set('agendaview', view.name);
if (view.name === 'list') { if (windowWidth <= 768) {
calendarElement.fullCalendar('option', 'header', {
right: 'prev,next today'
});
} else {
if (view.name === 'list') {
calendarElement.fullCalendar('option', 'header', {
right: 'list,agendaWeek,month prev,next today'
});
} else {
calendarElement.fullCalendar('option', 'header', {
right: 'showBirthdays, list,agendaWeek,month prev,next today'
});
}
}
}
},
windowResize: function () {
var windowWidth = $(window).width();
var view = (windowWidth <= 768) ? 'list' : Cookies.get('agendaview');
var currentView = $('#calendar').fullCalendar('getView');
if (view !== currentView.name) {
calendarElement.fullCalendar('changeView', view);
} else if (windowWidth <= 768) {
calendarElement.fullCalendar('option', 'header', {
right: 'prev,next today'
});
} else {
if (currentView.name === 'list') {
calendarElement.fullCalendar('option', 'header', { calendarElement.fullCalendar('option', 'header', {
right: 'list,agendaWeek,month prev,next today' right: 'list,agendaWeek,month prev,next today'
}); });
...@@ -177,18 +206,26 @@ ...@@ -177,18 +206,26 @@
date.getDate() !== moment.format('DD')) { date.getDate() !== moment.format('DD')) {
calendarElement.fullCalendar('gotoDate', date); calendarElement.fullCalendar('gotoDate', date);
} }
if (view.name !== tmpView) { if (view.name !== tmpView) {
calendarElement.fullCalendar('changeView', tmpView); calendarElement.fullCalendar('changeView', tmpView);
} }
if (view.name === 'list') { var windowWidth = $(window).width();
if (windowWidth <= 768) {
calendarElement.fullCalendar('option', 'header', { calendarElement.fullCalendar('option', 'header', {
right: 'list,agendaWeek,month prev,next today' right: 'prev,next today'
}); });
} else { } else {
calendarElement.fullCalendar('option', 'header', { if (view.name === 'list') {
right: 'showBirthdays, list,agendaWeek,month prev,next today' calendarElement.fullCalendar('option', 'header', {
}); right: 'list,agendaWeek,month prev,next today'
});
} else {
calendarElement.fullCalendar('option', 'header', {
right: 'showBirthdays, list,agendaWeek,month prev,next today'
});
}
} }
}); });
</script> </script>
......
...@@ -62,6 +62,7 @@ ...@@ -62,6 +62,7 @@
{% endif %} {% endif %}
</ul> </ul>
{% if achievements %}
<hr class="separator"> <hr class="separator">
<h4>{% trans "Achievements for Thalia" %}</h4> <h4>{% trans "Achievements for Thalia" %}</h4>
...@@ -85,6 +86,7 @@ ...@@ -85,6 +86,7 @@
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
{% endif %}
</div> </div>
</div> </div>
</div> </div>
......
...@@ -3,7 +3,7 @@ import json ...@@ -3,7 +3,7 @@ import json
from datetime import date, datetime from datetime import date, datetime
from django.contrib.auth.decorators import login_required, permission_required from django.contrib.auth.decorators import login_required, permission_required
from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator
from django.db.models import Q from django.db.models import Q, F
from django.http import HttpResponse, Http404 from django.http import HttpResponse, Http404
from django.shortcuts import get_object_or_404, render from django.shortcuts import get_object_or_404, render
from django.template.response import TemplateResponse from django.template.response import TemplateResponse
...@@ -84,7 +84,8 @@ def filter_users(tab, keywords, year_range): ...@@ -84,7 +84,8 @@ def filter_users(tab, keywords, year_range):
members_query &= Q(pk__in=memberships.values('user__pk')) members_query &= Q(pk__in=memberships.values('user__pk'))
return (models.Member.objects return (models.Member.objects
.filter(members_query) .filter(members_query)
.order_by('-profile__starting_year', .annotate()
.order_by(F('profile__starting_year').desc(nulls_last=True),
'first_name')) 'first_name'))
......
...@@ -100,8 +100,8 @@ ...@@ -100,8 +100,8 @@
img { img {
width: auto; width: auto;
height: auto; height: auto;
max-width: 100%; max-width: 90%;
max-height: 100%; max-height: 90%;
} }
} }
} }
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<div class="row"> <div class="row">
{% for vacancy in vacancies %} {% for vacancy in vacancies %}
<div class="col-6 col-md-4 my-3 mix {% for cat in vacancy.categories.all %}category-{{ cat.id }} {% endfor %}"> <div class="col-12 col-md-6 col-lg-4 my-3 mix {% for cat in vacancy.categories.all %}category-{{ cat.id }} {% endfor %}">
{% vacancy_card vacancy %} {% vacancy_card vacancy %}
</div> </div>
{% endfor %} {% endfor %}
......
/* Solving this with dynamic a data attribute (i.e. attr(data-rotation)) does not work, as that's a string. */ /* Solving this with dynamic a data attribute (i.e. attr(data-rotation)) does not work, as that's a string. */
#photos-index, #photos-album { #page-content {
.rotate90 { #photos-index, #photos-album {
img { .rotate90 {
transform: rotate(90deg); img {
transform: rotate(90deg);
}
} }
} .rotate180 {
.rotate180 { img {
img { transform: rotate(180deg);
transform: rotate(180deg); }
} }
} .rotate270 {
.rotate270 { img {
img { transform: rotate(270deg);
transform: rotate(270deg); }
} }
} .grayscale {
.grayscale { img {
img { filter: grayscale(1);
filter: grayscale(1); }
}
.grid-item.grayscale {
.overlay {
background-color: rgba(88, 88, 88, 0.6);
}
} }
}
.grid-item.grayscale { h1.section-title {
.overlay { padding: 20px 40px 0 40px;
background-color: rgba(88, 88, 88, 0.6);
} }
} }
} }
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
{{ block.super }}{% endblock %} {{ block.super }}{% endblock %}
{% block body %} {% block body %}
<section class="page-section" id="events-detail"> <section class="page-section" id="pizzas-orders">
<div class="container"> <div class="container">
<h1 class="text-center section-title"> <h1 class="text-center section-title">
{% blocktrans trimmed with title=event.title %} {% blocktrans trimmed with title=event.title %}
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
{% block body %} {% block body %}
<section class="page-section" id="events-detail"> <section class="page-section" id="pizzas-overview">
<div class="container"> <div class="container">
<h1 class="text-center section-title"> <h1 class="text-center section-title">
{% blocktrans trimmed with title=event.title %} {% blocktrans trimmed with title=event.title %}
......
...@@ -7,8 +7,8 @@ msgid "" ...@@ -7,8 +7,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-10-31 19:22+0100\n" "POT-Creation-Date: 2018-11-06 21:48+0100\n"
"PO-Revision-Date: 2018-10-31 19:20+0100\n" "PO-Revision-Date: 2018-11-06 21:49+0100\n"
"Last-Translator: Thom Wiggers <thom@thomwiggers.nl>\n" "Last-Translator: Thom Wiggers <thom@thomwiggers.nl>\n"
"Language-Team: \n" "Language-Team: \n"
"Language: nl\n" "Language: nl\n"
...@@ -844,14 +844,13 @@ msgstr "" ...@@ -844,14 +844,13 @@ msgstr ""
#: templates/registrations/renewal.html #: templates/registrations/renewal.html
msgid "" msgid ""
"You currently have an active membership for your entire study duration.<br/> " "You currently have an active membership for your entire study duration. Did "
"Did you graduate or stop with your studies for some other reason?<br/> " "you graduate or stop with your studies for some other reason? Please let us "
"Please let us know by sending an email to info@thalia.nu." "know by sending an email to info@thalia.nu."
msgstr "" msgstr ""
"Je hebt op dit moment een actief lidmaatschap dat geldig is totdat je " "Je hebt op dit moment een actief lidmaatschap dat geldig is totdat je "
"afstudeert.<br/>Ben je klaar met studeren of ben je om een andere reden " "afstudeert. Ben je klaar met studeren of ben je om een andere reden gestopt? "
"gestopt?<br/>Laat ons dat alsjeblieft weten door een mail te sturen naar " "Laat ons dat alsjeblieft weten door een mail te sturen naar info@thalia.nu."
"info@thalia.nu."
#: templates/registrations/renewal.html #: templates/registrations/renewal.html
msgid "Benefactor" msgid "Benefactor"
......
...@@ -117,14 +117,12 @@ ...@@ -117,14 +117,12 @@
{% endblocktrans %} {% endblocktrans %}
</p> </p>
{% elif latest_membership.until is None %} {% elif latest_membership.until is None %}
<p class="text-center"> <p class="col-12 col-md-6 offset-md-3 text-center">
{% blocktrans trimmed %} {% blocktrans trimmed %}
You currently have an active membership for your entire You currently have an active membership for your entire
study duration.<br/> study duration. Did you graduate or stop with your
Did you graduate or stop with your studies for some studies for some other reason? Please let us know by
other reason?<br/> sending an email to info@thalia.nu.
Please let us know by sending an email to
info@thalia.nu.
{% endblocktrans %} {% endblocktrans %}
</p> </p>
{% else %} {% else %}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment