Add alumni page

parent c8a84f47
This diff was suppressed by a .gitattributes entry.
......@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-11-14 20:54+0100\n"
"PO-Revision-Date: 2018-11-14 20:54+0100\n"
"POT-Creation-Date: 2018-11-14 22:31+0100\n"
"PO-Revision-Date: 2018-11-14 22:33+0100\n"
"Last-Translator: Thom Wiggers <thom@thomwiggers.nl>\n"
"Language-Team: \n"
"Language: nl\n"
......@@ -150,6 +150,14 @@ msgstr "Algemene ledenvergadering"
msgid "Workshop"
msgstr "Workshop"
#: models.py templates/events/alumni.html
msgid "Alumni"
msgstr "Alumni"
#: models.py
msgid "Party"
msgstr "Feest"
#: models.py
msgid "Other"
msgstr "Overig"
......@@ -544,6 +552,35 @@ msgstr "aangemeld"
msgid "Nobody %(verb)s yet"
msgstr "Niemand heeft zich %(verb)s"
#: templates/events/alumni.html
msgid ""
"Thalia's Alumni committee, together with <a href=\"https://ninja4ru."
"wordpress.com/\">Ninja</a>, organizes several events each year. We welcome "
"anyone who studies or has studied Computing Science or Information Sciences "
"at Radboud University. The main purpose of the events we organize is to "
"relive moments from the past in an informal way and to compare the "
"atmospheres of today and the past. We hope to form a bridge between alumni "
"and students. In addition, there is the possibility to speak with old "
"friends again while enjoying a snack and a drink. At the bottom of this page "
"you can follow our agenda, indicating where and when these events take place "
"and what they are exactly. You can also register for the events on the "
"regarding pages. Questions, comments or suggestions? We can be reached at <a "
"href=\"mailto:alumni@thalia.nu\">alumni@thalia.nu</a>."
msgstr ""
"De alumnicommissie van Thalia organiseert samen met <a href=\"https://"
"ninja4ru.wordpress.com/\">Ninja</a> jaarlijks een aantal evenementen, "
"toegankelijk voor iedereen die informatica of informatiekunde aan de Radboud "
"Universiteit studeert of heeft gestudeerd. De evenementen die we organiseren "
"hebben als voornaamste doel op een informele wijze zowel momenten uit het "
"verleden te herbeleven, als de sfeer van nu te proeven in vergelijking met "
"die van vroeger. We hopen zo een brug te slaan tussen alumni en studenten. "
"Daarnaast is er de mogelijkheid onder het genot van een hapje en een drankje "
"kennissen van toen weer te spreken. Onderaan deze pagina kan je via onze "
"agenda volgen wanneer deze evenementen plaatsvinden en wat ze inhouden. Ook "
"kan je je daar aanmelden voor het betreffende evenement. Vragen, opmerkingen "
"of suggesties? Wij zijn te bereiken op <a href=\"alumni@thalia.nu"
"\">alumni@thalia.nu<a/>."
#: templates/events/event.html templates/events/index.html
#: templates/events/registration.html
msgid "Calendar"
......@@ -690,19 +727,23 @@ msgstr "Bestellen"
msgid "Registrations"
msgstr "Aanmeldingen"
#: templates/events/frontpage.html
#: templates/events/event_cards.html
msgid "Upcoming events"
msgstr "Aanstaande evenementen"
#: templates/events/frontpage.html
#: templates/events/event_cards.html
msgid "There are currently no events planned"
msgstr "Er zijn op het moment geen geplande evenementen"
#: templates/events/event_cards.html
msgid "Registered for this event"
msgstr "Aangemeld voor dit evenement"
#: templates/events/frontpage.html
#: templates/events/event_cards.html
msgid "Not registered for this event"
msgstr "Niet aangemeld voor dit evenement"
#: templates/events/frontpage.html
#: templates/events/event_cards.html
#, python-format
msgid ""
"Searching for another event? <a href=\"%(events_index)s\">Take a look at the "
......
# Generated by Django 2.0.9 on 2018-11-12 19:02
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('events', '0027_merge_20180618_1438'),
]
operations = [
migrations.AlterField(
model_name='event',
name='category',
field=models.CharField(choices=[('drinks', 'Drinks'), ('activity', 'Activity'), ('lunchlecture', 'Lunch Lecture'), ('generalmeeting', 'General Meeting'), ('workshop', 'Workshop'), ('alumni', 'Alumni'), ('party', 'Party'), ('other', 'Other')], default='other', max_length=40, verbose_name='category'),
),
]
......@@ -7,7 +7,7 @@ class Migration(migrations.Migration):
dependencies = [
('members', '0027_auto_20181024_2000'),
('events', '0027_merge_20180618_1438'),
('events', '0028_auto_20181112_2002'),
]
operations = [
......
......@@ -7,7 +7,7 @@ import tinymce.models
class Migration(migrations.Migration):
dependencies = [
('events', '0028_auto_20181111_1712'),
('events', '0029_auto_20181111_1712'),
]
operations = [
......
......@@ -19,13 +19,24 @@ from utils.translation import ModelTranslateMeta, MultilingualField
class Event(models.Model, metaclass=ModelTranslateMeta):
"""Describes an event"""
CATEGORY_DRINKS = 'drinks'
CATEGORY_ACTIVITY = 'activity'
CATEGORY_LUNCH = 'lunchlecture'
CATEGORY_MEETING = 'generalmeeting'
CAGTEGORY_WORKSHOP = 'workshop'
CATEGORY_ALUMNI = 'alumni'
CATEGORY_PARTY = 'party'
CATEGORY_OTHER = 'other'
EVENT_CATEGORIES = (
('drinks', _('Drinks')),
('activity', _('Activity')),
('lunchlecture', _('Lunch Lecture')),
('generalmeeting', _('General Meeting')),
('workshop', _('Workshop')),
('other', _('Other')))
(CATEGORY_DRINKS, _('Drinks')),
(CATEGORY_ACTIVITY, _('Activity')),
(CATEGORY_LUNCH, _('Lunch Lecture')),
(CATEGORY_MEETING, _('General Meeting')),
(CAGTEGORY_WORKSHOP, _('Workshop')),
(CATEGORY_ALUMNI, _('Alumni')),
(CATEGORY_PARTY, _('Party')),
(CATEGORY_OTHER, _('Other')))
DEFAULT_NO_REGISTRATION_MESSAGE = _('No registration required')
......
#events-frontpage {
#events-cards {
.card {
-moz-transition: 0.2s ease-in;
-o-transition: 0.2s ease-in;
......
{% extends "base.html" %}
{% load i18n event_cards %}
{% block title %}{% trans "Alumni" %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans "Alumni" %} — {{ block.super }}{% endblock %}
{% block body %}
<section class="page-section">
<div class="container">
<h1 class="text-center section-title">{% trans "Alumni" %}</h1>
<p class="text-center">
{% blocktrans trimmed %}
Thalia's Alumni committee, together with <a href="https://ninja4ru.wordpress.com/">Ninja</a>, organizes several events each year.
We welcome anyone who studies or has studied Computing Science or Information Sciences at Radboud University.
The main purpose of the events we organize is to relive moments from the past in an informal way and to compare the atmospheres of today and the past.
We hope to form a bridge between alumni and students. In addition, there is the possibility to speak with old friends again while enjoying a snack and a drink.
At the bottom of this page you can follow our agenda, indicating where and when these events take place and what they are exactly.
You can also register for the events on the regarding pages. Questions, comments or suggestions? We can be reached at <a href="mailto:alumni@thalia.nu">alumni@thalia.nu</a>.
{% endblocktrans %}
</p>
</div>
</section>
{% render_event_cards events %}
{% endblock body %}
{% load i18n bleach_tags alert %}
<section id="events-cards" class="page-section">
<div class="container">
<h1 class="text-center section-title">{% trans "Upcoming events" %}</h1>
<div class="row">
{% if not events %}
<div class="mt-4 col-12">
{% trans 'There are currently no events planned' as info_text %}
{% alert 'info' info_text dismissable=False %}
</div>
{% else %}
{% for next_event in events %}
<div class="col-md-6 col-lg-4">
<a href="{{ next_event.event.get_absolute_url }}">
<div class="card animated fadeIn">
<div class="card-body">
{% if next_event.current_user_registration is not None %}
{% if next_event.current_user_registration %}
<div class="event-indication" data-toggle="tooltip"
data-placement="top" title="{% trans "Registered for this event" %}">
<div class="has-registration"></div>
</div>
{% else %}
<div class="event-indication" data-toggle="tooltip"
data-placement="top" title="{% trans "Not registered for this event" %}">
<div class="no-registration"></div>
</div>
{% endif %}
{% endif %}
<h6 class="card-date">{{ next_event.event.start|date:"d F Y" }}</h6>
<h5 class="card-title">{{ next_event.event.title }}</h5>
<p class="card-text">{{ next_event.event.description|striptags|bleach|truncatechars:110 }}</p>
</div>
</div>
</a>
</div>
{% endfor %}
{% endif %}
</div>
<p class="text-center">
{% url 'events:index' as events_index %}
{% blocktrans trimmed %}
Searching for another event? <a href="{{ events_index }}">Take a look at the entire agenda.</a>
{% endblocktrans %}
</p>
</div>
</section>
{% load i18n bleach_tags %}
<section id="events-frontpage" class="page-section">
<div class="container">
<h1 class="text-center section-title">{% trans "Upcoming events" %}</h1>
<div class="row">
{% for next_event in upcoming %}
<div class="col-md-6 col-lg-4">
<a href="{{ next_event.event.get_absolute_url }}">
<div class="card animated fadeIn">
<div class="card-body">
{% if next_event.current_user_registration is not None %}
{% if next_event.current_user_registration %}
<div class="event-indication" data-toggle="tooltip"
data-placement="top" title="{% trans "Registered for this event" %}">
<div class="has-registration"></div>
</div>
{% else %}
<div class="event-indication" data-toggle="tooltip"
data-placement="top" title="{% trans "Not registered for this event" %}">
<div class="no-registration"></div>
</div>
{% endif %}
{% endif %}
<h6 class="card-date">{{ next_event.event.start|date:"d F Y" }}</h6>
<h5 class="card-title">{{ next_event.event.title }}</h5>
<p class="card-text">{{ next_event.event.description|striptags|bleach|truncatechars:110 }}</p>
</div>
</div>
</a>
</div>
{% endfor %}
</div>
<p class="text-center">
{% url 'events:index' as events_index %}
{% blocktrans trimmed %}
Searching for another event? <a href="{{ events_index }}">Take a look at the entire agenda.</a>
{% endblocktrans %}
</p>
</div>
</section>
......@@ -7,23 +7,24 @@ from events.models import Event
register = template.Library()
@register.inclusion_tag('events/frontpage.html', takes_context=True)
def render_frontpage_events(context):
upcoming_events = Event.objects.filter(
published=True,
end__gte=timezone.now()
).order_by('end')
@register.inclusion_tag('events/event_cards.html', takes_context=True)
def render_event_cards(context, events=None):
if events is None:
events = Event.objects.filter(
published=True,
end__gte=timezone.now()
).order_by('end')[:6]
try:
upcoming = [{
cards = [{
'event': x,
'current_user_registration': services.is_user_registered(
context['user'], x),
} for x in upcoming_events[:6]]
} for x in events]
except AttributeError:
upcoming = [{
cards = [{
'event': x,
'current_user_registration': None
} for x in upcoming_events[:6]]
} for x in events]
return {'upcoming': upcoming}
return {'events': cards}
......@@ -67,6 +67,25 @@ class EventDetail(DetailView):
return context
class AlumniEventsView(TemplateView):
"""
Renders the alumni events page
"""
template_name = 'events/alumni.html'
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
events = Event.objects.filter(
published=True,
category=Event.CATEGORY_ALUMNI,
end__gte=timezone.now()
).order_by('end')[:3]
context['events'] = events
return context
@method_decorator(login_required, name='dispatch')
class EventRegisterView(View):
"""
......
This diff was suppressed by a .gitattributes entry.
......@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-11-14 21:52+0100\n"
"PO-Revision-Date: 2018-11-14 21:53+0100\n"
"POT-Creation-Date: 2018-11-14 22:34+0100\n"
"PO-Revision-Date: 2018-11-14 22:34+0100\n"
"Last-Translator: Sébastiaan Versteeg <se_bastiaan@outlook.com>\n"
"Language-Team: \n"
"Language: nl\n"
......@@ -62,6 +62,10 @@ msgstr "Lid Worden"
msgid "Thabloid"
msgstr "Thabloid"
#: menus.py
msgid "Alumni"
msgstr "Alumni"
#: menus.py
msgid "For Members"
msgstr "Voor Leden"
......
......@@ -28,6 +28,7 @@ MAIN_MENU = [
'name': 'sibling-associations'},
{'title': _('Become a Member'), 'name': 'registrations:index'},
{'title': _('Thabloid'), 'name': 'thabloid:index'},
{'title': _('Alumni'), 'name': 'alumni'},
],
},
{
......
{% extends 'base.html' %}
{% load i18n frontpage_events frontpage_articles partner_banners slider %}
{% load i18n event_cards frontpage_articles partner_banners slider %}
{% block body_class %}home{% endblock %}
......@@ -20,5 +20,5 @@
</section>
{% render_frontpage_articles %}
{% render_frontpage_events %}
{% render_event_cards %}
{% endblock %}
......@@ -45,6 +45,7 @@ from members.views import ObtainThaliaAuthToken
from activemembers.sitemaps import sitemap as activemembers_sitemap
from documents.sitemaps import sitemap as documents_sitemap
from events.sitemaps import sitemap as events_sitemap
from events.views import AlumniEventsView
from partners.sitemaps import sitemap as partners_sitemap
from thabloid.sitemaps import sitemap as thabloid_sitemap
from thaliawebsite.forms import AuthenticationForm
......@@ -73,6 +74,7 @@ urlpatterns = [ # pylint: disable=invalid-name
url(r'^privacy-policy/', TemplateView.as_view(template_name='singlepages/privacy_policy.html'), name='privacy-policy'),
url(r'^event-registration-terms/', TemplateView.as_view(template_name='singlepages/event_registration_terms.html'), name='event-registration-terms'),
url(r'^admin/', admin.site.urls),
url(r'^alumni/$', AlumniEventsView.as_view(), name='alumni'),
url(r'^members/', include('members.urls')),
url(r'^registration/', include('registrations.urls')),
url(r'^payment/', include('payments.urls')),
......
Markdown is supported
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