diff --git a/locale/en/LC_MESSAGES/django.mo b/locale/en/LC_MESSAGES/django.mo index 647f6b6..d97e0dc 100644 Binary files a/locale/en/LC_MESSAGES/django.mo and b/locale/en/LC_MESSAGES/django.mo differ diff --git a/locale/en/LC_MESSAGES/django.po b/locale/en/LC_MESSAGES/django.po index b815b0c..d5b3b4c 100644 --- a/locale/en/LC_MESSAGES/django.po +++ b/locale/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-10-17 19:55+0300\n" +"POT-Creation-Date: 2017-10-18 12:06+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -168,7 +168,7 @@ msgid "id" msgstr "id" #: infoscreen/templates/infoscreen_admin.html:141 webapp/models.py:110 -#: webapp/models.py:144 webapp/templates/kaehmy_list.html:40 +#: webapp/models.py:144 webapp/templates/kaehmy_list.html:36 msgid "Name" msgstr "Name" @@ -192,11 +192,9 @@ msgid "English" msgstr "English" #: infoscreen/templates/infoscreen_admin.html:166 -#: members/templates/settings.html:23 webapp/templates/kaehmy.html:65 -#, fuzzy -#| msgid "Submitted" +#: members/templates/settings.html:23 webapp/templates/kaehmy.html:77 msgid "Submit" -msgstr "Submitted" +msgstr "Submit" #: members/forms.py:115 members/tables.py:32 msgid "Member" @@ -211,7 +209,7 @@ msgid "Last name" msgstr "Last name" #: members/models.py:16 webapp/models.py:145 -#: webapp/templates/kaehmy_list.html:44 +#: webapp/templates/kaehmy_list.html:40 msgid "Email" msgstr "Email" @@ -353,7 +351,7 @@ msgstr "" #: members/templates/member_add_many.html:48 #: members/templates/member_add_many_confirm.html:22 -#: webapp/templates/kaehmy_list.html:52 +#: webapp/templates/kaehmy_list.html:48 msgid "Send" msgstr "Send" @@ -551,16 +549,12 @@ msgid "Phone number (not public)" msgstr "" #: webapp/forms.py:44 -#, fuzzy -#| msgid "Total challenges:" msgid "Custom roles" -msgstr "Total challenges:" +msgstr "" #: webapp/forms.py:52 webapp/templates/kaehmy.html:41 -#, fuzzy -#| msgid "Total challenges:" msgid "Preset roles" -msgstr "Total challenges:" +msgstr "" #: webapp/forms.py:76 msgid "Invalid phone number" @@ -599,38 +593,28 @@ msgid "Feeds" msgstr "" #: webapp/models.py:68 -#, fuzzy -#| msgid "Events" msgid "Event: {}" -msgstr "Events" +msgstr "" #: webapp/models.py:71 -#, fuzzy -#| msgid "Events" msgid "Event" -msgstr "Events" +msgstr "" #: webapp/models.py:83 msgid "Registration: {}" msgstr "" #: webapp/models.py:86 -#, fuzzy -#| msgid "Rotation" msgid "Registration" -msgstr "Rotation" +msgstr "" #: webapp/models.py:87 -#, fuzzy -#| msgid "Rotations" msgid "Registrations" -msgstr "Rotations" +msgstr "" #: webapp/models.py:94 -#, fuzzy -#| msgid "Corporate" msgid "Corporate affairs" -msgstr "Corporate" +msgstr "" #: webapp/models.py:95 webapp/templates/freshmen.html:7 #: webapp/templates/navigation.html:16 @@ -643,10 +627,8 @@ msgid "International" msgstr "International" #: webapp/models.py:97 -#, fuzzy -#| msgid "External image" msgid "External affairs" -msgstr "External image" +msgstr "" #: webapp/models.py:98 msgid "Media" @@ -692,7 +674,7 @@ msgstr "Applications" msgid "Others" msgstr "" -#: webapp/models.py:111 webapp/models.py:184 +#: webapp/models.py:111 webapp/models.py:192 #, fuzzy #| msgid "Add member" msgid "Board member" @@ -742,60 +724,92 @@ msgstr "Total challenges:" msgid "Custom kaehmy roles" msgstr "Total challenges:" -#: webapp/models.py:158 -msgid "Message" -msgstr "" - -#: webapp/models.py:160 +#: webapp/models.py:146 msgid "Timestamp" msgstr "" -#: webapp/models.py:178 webapp/models.py:249 +#: webapp/models.py:160 +msgid "Kaehmykommentti" +msgstr "Kaehmy comment" + +#: webapp/models.py:161 +msgid "Kaehmykommentit" +msgstr "Kaehmy comments" + +#: webapp/models.py:163 +msgid "Message" +msgstr "" + +#: webapp/models.py:182 webapp/templates/kaehmy.html:12 +msgid "Kaehmylomake" +msgstr "Kaehmy application" + +#: webapp/models.py:183 +msgid "Kaehmylomakkeet" +msgstr "Kaehmy applications" + +#: webapp/models.py:186 webapp/models.py:259 msgid "Phone number" msgstr "" -#: webapp/models.py:179 +#: webapp/models.py:187 msgid "Year" msgstr "" -#: webapp/models.py:180 +#: webapp/models.py:188 msgid "Text" msgstr "" -#: webapp/models.py:182 +#: webapp/models.py:190 msgid "Custom role name" msgstr "" -#: webapp/models.py:192 +#: webapp/models.py:200 #, fuzzy #| msgid "Member applications" msgid "Kaehmy application: {}" msgstr "Member applications" -#: webapp/models.py:214 +#: webapp/models.py:222 msgid "Board: {}" msgstr "" -#: webapp/models.py:220 +#: webapp/models.py:228 msgid "Official: {}" msgstr "" -#: webapp/models.py:234 +#: webapp/models.py:242 msgid "Role" msgstr "" -#: webapp/models.py:236 +#: webapp/models.py:243 +msgid "Roles" +msgstr "" + +#: webapp/models.py:245 msgid "Start date" msgstr "" -#: webapp/models.py:237 +#: webapp/models.py:246 msgid "End date" msgstr "" -#: webapp/models.py:247 +#: webapp/models.py:256 msgid "Official" msgstr "" +#: webapp/models.py:257 +msgid "Officials" +msgstr "" + +#: webapp/models.py:285 +msgid "Telegram channel" +msgstr "" + +#: webapp/models.py:286 +msgid "Telegram channels" +msgstr "" + #: webapp/templates/admin_index.html:6 msgid "SIK Admin" msgstr "SIK Admin" @@ -820,10 +834,6 @@ msgstr "Guild" msgid "Jobs" msgstr "Jobs" -#: webapp/templates/kaehmy.html:12 -msgid "Kaehmylomake" -msgstr "Kaehmy application" - #: webapp/templates/kaehmy.html:16 msgid "" "Kaehmykoneella voit ilmaista kiinnostuksesi toimia killassa ensi vuonna.\n" @@ -881,28 +891,34 @@ msgstr "Deadline to apply as a non-board official!" msgid "Vaalikokous, osa 3 (toimarien valinta)" msgstr "Election meeting, part 3 (non-board election)" -#: webapp/templates/kaehmy_list.html:24 +#: webapp/templates/kaehmy_list.html:24 webapp/templates/kaehmy_list.html:59 msgid "All kaehmys" msgstr "All applications" -#: webapp/templates/kaehmy_list.html:28 +#: webapp/templates/kaehmy_list.html:32 +msgid "Commenting on post by " +msgstr "" + +#: webapp/templates/kaehmy_list.html:44 +msgid "Comment" +msgstr "" + +#: webapp/templates/kaehmy_list.html:57 +#, fuzzy +#| msgid "List kaehmys" +msgid "Filter kaehmys" +msgstr "List applications" + +#: webapp/templates/kaehmy_list.html:70 #: webapp/templates/kaehmy_statistics.html:18 msgid "Total kaehmys:" msgstr "Total applications:" -#: webapp/templates/kaehmy_list.html:36 -msgid "Commenting on post by " -msgstr "" - -#: webapp/templates/kaehmy_list.html:48 -msgid "Comment" -msgstr "" - -#: webapp/templates/kaehmy_list.html:73 +#: webapp/templates/kaehmy_list.html:88 msgid "Show comments" msgstr "" -#: webapp/templates/kaehmy_list.html:79 +#: webapp/templates/kaehmy_list.html:94 msgid "Add comment" msgstr "" diff --git a/locale/fi/LC_MESSAGES/django.mo b/locale/fi/LC_MESSAGES/django.mo index 9d377dd..18db113 100644 Binary files a/locale/fi/LC_MESSAGES/django.mo and b/locale/fi/LC_MESSAGES/django.mo differ diff --git a/locale/fi/LC_MESSAGES/django.po b/locale/fi/LC_MESSAGES/django.po index f4a03cb..9de7b01 100644 --- a/locale/fi/LC_MESSAGES/django.po +++ b/locale/fi/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-10-17 19:55+0300\n" +"POT-Creation-Date: 2017-10-18 12:06+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -169,7 +169,7 @@ msgid "id" msgstr "id" #: infoscreen/templates/infoscreen_admin.html:141 webapp/models.py:110 -#: webapp/models.py:144 webapp/templates/kaehmy_list.html:40 +#: webapp/models.py:144 webapp/templates/kaehmy_list.html:36 msgid "Name" msgstr "Nimi" @@ -193,7 +193,7 @@ msgid "English" msgstr "englanti" #: infoscreen/templates/infoscreen_admin.html:166 -#: members/templates/settings.html:23 webapp/templates/kaehmy.html:65 +#: members/templates/settings.html:23 webapp/templates/kaehmy.html:77 msgid "Submit" msgstr "Lisää" @@ -210,7 +210,7 @@ msgid "Last name" msgstr "Sukunimi" #: members/models.py:16 webapp/models.py:145 -#: webapp/templates/kaehmy_list.html:44 +#: webapp/templates/kaehmy_list.html:40 msgid "Email" msgstr "Sähköposti" @@ -356,7 +356,7 @@ msgstr "" #: members/templates/member_add_many.html:48 #: members/templates/member_add_many_confirm.html:22 -#: webapp/templates/kaehmy_list.html:52 +#: webapp/templates/kaehmy_list.html:48 msgid "Send" msgstr "Lähetä" @@ -673,7 +673,7 @@ msgstr "Alumnisuhteet" msgid "Others" msgstr "Muut" -#: webapp/models.py:111 webapp/models.py:184 +#: webapp/models.py:111 webapp/models.py:192 msgid "Board member" msgstr "Hallituksen jäsen" @@ -709,58 +709,90 @@ msgstr "Uusi virka" msgid "Custom kaehmy roles" msgstr "Uudet kaehmyvirat" -#: webapp/models.py:158 -msgid "Message" -msgstr "Viesti" - -#: webapp/models.py:160 +#: webapp/models.py:146 msgid "Timestamp" msgstr "Aikaleima" -#: webapp/models.py:178 webapp/models.py:249 +#: webapp/models.py:160 +msgid "Kaehmykommentti" +msgstr "" + +#: webapp/models.py:161 +msgid "Kaehmykommentit" +msgstr "" + +#: webapp/models.py:163 +msgid "Message" +msgstr "Viesti" + +#: webapp/models.py:182 webapp/templates/kaehmy.html:12 +msgid "Kaehmylomake" +msgstr "Kaehmylomake" + +#: webapp/models.py:183 +msgid "Kaehmylomakkeet" +msgstr "" + +#: webapp/models.py:186 webapp/models.py:259 msgid "Phone number" msgstr "Puhelinnumero" -#: webapp/models.py:179 +#: webapp/models.py:187 msgid "Year" msgstr "Vuosi" -#: webapp/models.py:180 +#: webapp/models.py:188 msgid "Text" msgstr "Teksti" -#: webapp/models.py:182 +#: webapp/models.py:190 msgid "Custom role name" msgstr "Uusi virka" -#: webapp/models.py:192 +#: webapp/models.py:200 msgid "Kaehmy application: {}" msgstr "Kaehmy: {}" -#: webapp/models.py:214 +#: webapp/models.py:222 msgid "Board: {}" msgstr "Hallitus: {}" -#: webapp/models.py:220 +#: webapp/models.py:228 msgid "Official: {}" msgstr "Toimari: {}" -#: webapp/models.py:234 +#: webapp/models.py:242 msgid "Role" msgstr "Rooli" -#: webapp/models.py:236 +#: webapp/models.py:243 +msgid "Roles" +msgstr "Roolit" + +#: webapp/models.py:245 msgid "Start date" msgstr "Alkupäivämäärä" -#: webapp/models.py:237 +#: webapp/models.py:246 msgid "End date" msgstr "Loppupäivämäärä" -#: webapp/models.py:247 +#: webapp/models.py:256 msgid "Official" msgstr "Toimihenkilö" +#: webapp/models.py:257 +msgid "Officials" +msgstr "Toimihenkilöt" + +#: webapp/models.py:285 +msgid "Telegram channel" +msgstr "Telegram-kanava" + +#: webapp/models.py:286 +msgid "Telegram channels" +msgstr "Telegram-kanavat" + #: webapp/templates/admin_index.html:6 msgid "SIK Admin" msgstr "SIK Hallintapaneeli" @@ -785,10 +817,6 @@ msgstr "Kilta" msgid "Jobs" msgstr "Työpaikat" -#: webapp/templates/kaehmy.html:12 -msgid "Kaehmylomake" -msgstr "Kaehmylomake" - #: webapp/templates/kaehmy.html:16 msgid "" "Kaehmykoneella voit ilmaista kiinnostuksesi toimia killassa ensi vuonna.\n" @@ -846,28 +874,32 @@ msgstr "" msgid "Vaalikokous, osa 3 (toimarien valinta)" msgstr "" -#: webapp/templates/kaehmy_list.html:24 +#: webapp/templates/kaehmy_list.html:24 webapp/templates/kaehmy_list.html:59 msgid "All kaehmys" msgstr "Kaikki kaehmyt" -#: webapp/templates/kaehmy_list.html:28 +#: webapp/templates/kaehmy_list.html:32 +msgid "Commenting on post by " +msgstr "Kommentoidaan viestiin lähettäjältä" + +#: webapp/templates/kaehmy_list.html:44 +msgid "Comment" +msgstr "Kommentti" + +#: webapp/templates/kaehmy_list.html:57 +msgid "Filter kaehmys" +msgstr "Rajaa kaehmyjä" + +#: webapp/templates/kaehmy_list.html:70 #: webapp/templates/kaehmy_statistics.html:18 msgid "Total kaehmys:" msgstr "Kaehmyjä yhteensä:" -#: webapp/templates/kaehmy_list.html:36 -msgid "Commenting on post by " -msgstr "Kommentoidaan viestiin lähettäjältä" - -#: webapp/templates/kaehmy_list.html:48 -msgid "Comment" -msgstr "Kommentti" - -#: webapp/templates/kaehmy_list.html:73 +#: webapp/templates/kaehmy_list.html:88 msgid "Show comments" msgstr "Näytä kommentit" -#: webapp/templates/kaehmy_list.html:79 +#: webapp/templates/kaehmy_list.html:94 msgid "Add comment" msgstr "Kommentoi" diff --git a/webapp/migrations/0034_auto_20171018_1017.py b/webapp/migrations/0034_auto_20171018_1017.py new file mode 100644 index 0000000..c765c87 --- /dev/null +++ b/webapp/migrations/0034_auto_20171018_1017.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2017-10-18 07:17 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.utils.timezone + + +class Migration(migrations.Migration): + + dependencies = [ + ('webapp', '0033_telegramchannel_name'), + ] + + operations = [ + migrations.AlterModelOptions( + name='kaehmyform', + options={'verbose_name': 'Kaehmylomake', 'verbose_name_plural': 'Kaehmylomakkeet'}, + ), + migrations.AlterModelOptions( + name='kaehmymessage', + options={'verbose_name': 'Kaehmykommentti', 'verbose_name_plural': 'Kaehmykommentit'}, + ), + migrations.AlterModelOptions( + name='telegramchannel', + options={'verbose_name': 'Telegram channel', 'verbose_name_plural': 'Telegram channels'}, + ), + migrations.RemoveField( + model_name='kaehmymessage', + name='timestamp', + ), + migrations.AddField( + model_name='messageparent', + name='timestamp', + field=models.DateTimeField(default=django.utils.timezone.now, verbose_name='Timestamp'), + ), + ] diff --git a/webapp/models.py b/webapp/models.py index 2aa1ed5..12428b5 100644 --- a/webapp/models.py +++ b/webapp/models.py @@ -143,6 +143,7 @@ class MessageParent(models.Model): name = models.CharField(_('Name'), max_length=255, default='') email = models.EmailField(_('Email'), default='') + timestamp = models.DateTimeField(_('Timestamp'), default=timezone.now) def __str__(self): return 'Message parent #{}'.format(self.id) @@ -155,9 +156,12 @@ class KaehmyMessage(MessageParent): Every message relates to certain kaehmyform or parent message. """ + class Meta: + verbose_name = _('Kaehmykommentti') + verbose_name_plural = _('Kaehmykommentit') + message = models.TextField(_('Message')) parent = models.ForeignKey('MessageParent', related_name='messages') - timestamp = models.DateTimeField(_('Timestamp'), default=timezone.now) class KaehmyForm(MessageParent): @@ -174,6 +178,10 @@ class KaehmyForm(MessageParent): (5, 'N'), ) + class Meta: + verbose_name = _('Kaehmylomake') + verbose_name_plural = _('Kaehmylomakkeet') + phone_number = models.CharField( _('Phone number'), max_length=10, default="") year = models.IntegerField(_('Year'), choices=YEAR_CHOICES) @@ -232,6 +240,7 @@ class Role(PresetRole): """Meta class for Role model.""" verbose_name = _('Role') + verbose_name_plural = _('Roles') start_date = models.DateField(_('Start date')) end_date = models.DateField(_('End date')) @@ -245,6 +254,7 @@ class Official(User): """Meta class for Official class.""" verbose_name = _('Official') + verbose_name_plural = _('Officials') phone_number = PhoneNumberField(_('Phone number')) @@ -271,6 +281,10 @@ class OhlhafvChallenge(models.Model): class TelegramChannel(models.Model): """Model containing the channel id of a Telegram chat""" + class Meta: + verbose_name = _('Telegram channel') + verbose_name_plural = _('Telegram channels') + name = models.CharField(max_length=255) channel_id = models.CharField(max_length=255, unique=True) diff --git a/webapp/static/css/webapp.css b/webapp/static/css/webapp.css index 1a745fa..ff016f1 100644 --- a/webapp/static/css/webapp.css +++ b/webapp/static/css/webapp.css @@ -17,4 +17,10 @@ div.tooltip-inner { .tooltip { margin-left: 1rem; +} + +.role-filter-form { + max-width: 30rem; + width: auto; + margin-bottom: 1rem; } \ No newline at end of file diff --git a/webapp/templates/kaehmy_list.html b/webapp/templates/kaehmy_list.html index e9b81ca..9729e01 100644 --- a/webapp/templates/kaehmy_list.html +++ b/webapp/templates/kaehmy_list.html @@ -24,10 +24,6 @@

{% trans "All kaehmys" %}

-
-
{% trans "Total kaehmys:" %} {{ application_count }}
-
-
@@ -56,6 +52,25 @@
+
+
+ + +
+
+ +
+
{% trans "Total kaehmys:" %} {{ application_count }}
+
+ + {% for application in applications %}

{{ application.name }}

@@ -66,7 +81,7 @@ {% if application.official_roles|length > 0 %}
{{ application.official_roles }}
{% endif %} -

{{ application.text }}

+

{{ application.text|linebreaks }}

{% if application.comment_count > 0 %}