- extra column in events grid with location & time
- bugfixes in locationwidget
- prepared email notifications
This commit is contained in:
Martin Bauer
2013-11-01 12:42:57 +01:00
parent cd635aff9b
commit 82de9eaa84
56 changed files with 800 additions and 44 deletions

View File

@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-09-28 16:56+0200\n"
"POT-Creation-Date: 2013-11-01 10:52+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -18,93 +18,117 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: models.py:14
#: models.py:15
msgid "Rehearsal"
msgstr "Probe"
#: models.py:15
#: models.py:16
msgid "Concert"
msgstr "Konzert"
#: models.py:16
#: models.py:17
msgid "Party"
msgstr "Feier"
#: models.py:17
#: models.py:18
msgid "Travel"
msgstr "Dienstreise"
#: models.py:20
#: models.py:19
msgid "Option"
msgstr "Vorschlag"
#: models.py:22
msgid "type"
msgstr "Typ"
#: models.py:21
#: models.py:23
msgid "Short Description"
msgstr "Kurzbeschreibung"
#: models.py:22
#: models.py:24
msgid "location"
msgstr "Ort"
#: models.py:23
#: models.py:25
msgid "Location on map"
msgstr "Ort auf Karte"
#: models.py:24
#: models.py:26
msgid "description"
msgstr "Beschreibung"
#: models.py:26
#: models.py:28
msgid "date"
msgstr "Datum"
#: models.py:27
#: models.py:29
msgid "time"
msgstr "Uhrzeit"
#: models.py:28
#: models.py:30
msgid "meeting_time"
msgstr "Treffen um"
#: models.py:30
#: models.py:32
msgid "End Date"
msgstr "Bis:"
#: models.py:32
#: models.py:34
msgid "participants"
msgstr "Teilnehmer"
#: models.py:64
#: models.py:68
msgid "?"
msgstr "?"
#: models.py:65
#: models.py:69
msgid "Yes"
msgstr "Ja"
#: models.py:66
#: models.py:70
msgid "No"
msgstr "Nein"
#: models.py:69
#: models.py:73
msgid "event"
msgstr "Termin"
#: models.py:70
#: models.py:74
msgid "user"
msgstr "Benutzer"
#: models.py:71
#: models.py:75
msgid "status"
msgstr "Status"
#: models.py:72
#: models.py:76
msgid "comment"
msgstr "Kommentar"
#: models.py:100
msgid "Can modify participation status of other users"
msgstr "Darf Teilnahmestatus von anderen ändern"
#: models.py:121
msgid "Admin"
msgstr ""
#: models.py:122
msgid "Member"
msgstr ""
#: templates/eventplanner/admin_tabular.html:17
msgid "Delete?"
msgstr "Löschen"
#: templates/eventplanner/admin_tabular.html:74
#, python-format
msgid "Add another %(verbose_name)s"
msgstr ""
#: templates/eventplanner/admin_tabular.html:75
msgid "Remove"
msgstr ""
#~ msgid "Can modify participation status of other users"
#~ msgstr "Darf Teilnahmestatus von anderen ändern"
#~ msgid "General Rehearsal"
#~ msgstr "Generalprobe"
@@ -114,6 +138,3 @@ msgstr "Darf Teilnahmestatus von anderen ändern"
#~ msgid "musician"
#~ msgstr "Musiker"
#~ msgid "Delete?"
#~ msgstr "Löschen"

View File

@@ -15,12 +15,13 @@ class Event ( models.Model ):
( 'Reh', _('Rehearsal') ),
( 'Conc', _('Concert') ),
( 'Party', _('Party') ),
( 'Travel', _('Travel') )
( 'Travel', _('Travel') ),
( 'Option', _('Option') ),
)
type = models.CharField( max_length=6, choices=EVENT_TYPES, default='Reh', verbose_name= _("type") )
short_desc = models.CharField( null=True, max_length=100, blank = True, verbose_name= _("Short Description") )
location = models.TextField( blank=False, verbose_name=_("location") )
location = models.TextField( blank=True, verbose_name=_("location") )
map_location = PlainLocationField(blank=True, based_field = location, zoom=7, verbose_name=_("Location on map") )
desc = models.TextField( blank=True, verbose_name=_("description") )
@@ -49,7 +50,7 @@ class Event ( models.Model ):
def title(self):
res = self.get_type_display()
if ( self.short_desc ):
res += " ( " + self.short_desc + " ) "
res += " (" + self.short_desc + ") "
return res

View File

@@ -69,6 +69,15 @@ $(document).ready(function(){
defaultTime: false
});
$('form').submit(function() {
if ( $("#id_type").val() != "Option" && $("#id_location").val().trim() == "" ) {
alert("Bitte Ort angeben");
return false;
}
else
return true;
});
function onTypeChange( val )
{
if ( val == "Reh") {
@@ -76,6 +85,7 @@ $(document).ready(function(){
$("#div_id_meeting_time").hide();
$("#div_id_map_location").hide();
$("#div_id_end_date").hide();
$("#div_id_location").show();
if ( ! $("#id_time").val() ) {
$("#id_time").val("19:00");
@@ -87,18 +97,36 @@ $(document).ready(function(){
else if ( val == "Conc" ) {
$("#div_id_time").show();
$("#div_id_meeting_time").show();
$("#div_id_location").show();
$("#div_id_map_location").show();
$("#div_id_end_date").hide();
}
else if ( val == "Party") {
$("#div_id_time").show();
$("#div_id_meeting_time").hide();
$("#div_id_meeting_time").hide();
$("#div_id_location").show();
$("#div_id_map_location").show();
$("#div_id_end_date").hide();
}
else if ( val == "Travel") {
$("#div_id_time").hide();
$("#div_id_meeting_time").hide();
$("#div_id_meeting_time").hide();
$("#div_id_location").show();
$("#div_id_map_location").show();
$("#div_id_end_date").show();
}
else if ( val == "Option" ) {
$("#div_id_time").hide();
$("#div_id_meeting_time").hide();
$("#div_id_location").hide();
$("#div_id_map_location").hide();
$("#div_id_end_date").show();
}
else
{
$("#div_id_time").show();
$("#div_id_meeting_time").show();
$("#div_id_location").show();
$("#div_id_map_location").show();
$("#div_id_end_date").show();
}

View File

@@ -16,6 +16,12 @@
{% block content %}
{% addtoblock "css" %}
<style>
.infoColumn {
text-align: center;
font-size: 11px;
}
button.eventButton {
width: 42px;
}
@@ -130,8 +136,8 @@
<thead>
<tr>
<th> Termin </th>
<th> Datum </th>
<th> </th>
<th> </th>
{% for name in usernames %}
<th class='usernameHeader'> {{ name|capfirst }} </th>
{% endfor %}
@@ -143,8 +149,8 @@
{% for event in events %}
<tr class="eventRow">
<td class="center"> <a href="{{ event.pk }}"> {{ event.title }} </a> </td>
<td class="center"> {{ event.date | date:"SHORT_DATE_FORMAT" }} </td>
<td class="center" > <a href="{{ event.pk }}" > {{ event.title }} </a> </td>
<td class="center infoColumn" > {{ event.location }}<br/> {{ event.date | date:"SHORT_DATE_FORMAT" }} </td>
{% for p in event.participation %}

View File

@@ -68,7 +68,7 @@ def eventplanning( request ):
return events_grid(request)
# All events in the future sorted by date
all_future_events = list ( Event.objects.filter( date__gte = datetime.date.today() ) )
all_future_events = list ( Event.objects.filter( date__gte = datetime.date.today() ).order_by( 'date') )
for e in all_future_events:
e.participation = EventParticipation.get_or_create( event = e, user = request.user )
@@ -81,7 +81,7 @@ def eventplanning( request ):
def events_grid( request ):
usernames = [ u.username for u in EventParticipation.members() ]
all_future_events = list ( Event.objects.filter( date__gte = datetime.date.today() ) )
all_future_events = list ( Event.objects.filter( date__gte = datetime.date.today() ).order_by( 'date') )
for e in all_future_events:
e.participation = [ EventParticipation.get_or_create( event = e, user = u ) for u in EventParticipation.members() ]