diff options
-rw-r--r-- | agenda/admin.py | 109 | ||||
-rw-r--r-- | agenda/billboardviews.py | 10 | ||||
-rw-r--r-- | agenda/icalviews.py | 109 | ||||
-rwxr-xr-x | agenda/models.py | 106 | ||||
-rwxr-xr-x | agenda/urls.py | 10 | ||||
-rwxr-xr-x | agenda/views.py | 12 | ||||
-rw-r--r-- | cal/models.py | 1 | ||||
-rw-r--r-- | locale/ca/LC_MESSAGES/django.mo | bin | 446 -> 2752 bytes | |||
-rw-r--r-- | locale/es/LC_MESSAGES/django.mo | bin | 3881 -> 4636 bytes | |||
-rw-r--r-- | locale/it/LC_MESSAGES/django.mo | bin | 0 -> 1357 bytes | |||
-rwxr-xr-x | templates/agenda/user_page.html | 43 | ||||
-rwxr-xr-x | templates/agenda/wishlist.html | 36 |
12 files changed, 294 insertions, 142 deletions
diff --git a/agenda/admin.py b/agenda/admin.py new file mode 100644 index 0000000..df5cd5a --- /dev/null +++ b/agenda/admin.py @@ -0,0 +1,109 @@ +from django.contrib import admin +from infopoint.agenda.models import * +from django.utils.translation import ugettext as _ +class LocationInline(admin.TabularInline): + model = Location + +class TodoInline(admin.TabularInline): + model = Todo + +class EventInline(admin.TabularInline): + model = Event + extra = 1 + +class GroupInline(admin.TabularInline): + model = Group + +class AttendanceInline(admin.TabularInline): + model = Attendance + +class NetworkInline(admin.TabularInline): + model = Network + +class AttendanceAdmin(admin.ModelAdmin): + list_display = ('event', 'person', 'attendance' ) +admin.site.register(Attendance,AttendanceAdmin) + +class LocationAdmin(admin.ModelAdmin): + list_display = ('title', 'description', 'size' , 'picture') + inlines = [EventInline] +admin.site.register(Location,LocationAdmin) + +class TodoAdmin(admin.ModelAdmin): + list_display = ('title', 'public','due_date','creator', 'done') + date_hierarchy = 'due_date' + +admin.site.register(Todo,TodoAdmin) + +class WishAdmin(admin.ModelAdmin): + list_display = ('title', 'public','due_date','creator', 'done') + date_hierarchy = 'due_date' + +admin.site.register(Wish,WishAdmin) + +class EventAdmin(admin.ModelAdmin): + list_display = ('title', 'confirmed','description', 'location', 'start_date', 'public') + list_filter = ('location', 'public') + save_as = True +admin.site.register(Event,EventAdmin) + +class NetworkAdmin(admin.ModelAdmin): + list_display = ('event', 'group') +admin.site.register(Network,NetworkAdmin) + +class Billboard(models.Model): + title = models.CharField(max_length=100) + groups = models.ManyToManyField(Group, null=True,blank=True,related_name='cartel') + refresh = models.IntegerField(help_text=_('In seconds'),max_length=3) + published = models.BooleanField(null=True,blank=True) + location = models.ManyToManyField(Location, null=True,blank=True, related_name='cartel') + timespan = models.CharField(max_length=1, choices=TIMESPAN_CHOICES) + color1 = models.CharField(max_length=6) + color2 = models.CharField(max_length=6) + color3 = models.CharField(max_length=6) + color4 = models.CharField(max_length=6) + csstitle = models.TextField(max_length=500, help_text="decide the style of the title here",blank=True,default="padding: 30px;font-family: verdana, arial, sans-serif;text-transform: capitalize;BORder: 10px dotted;") + cssdate = models.TextField(max_length=500, help_text="decide the style of the date here",blank=True,default="padding: 30px;") + csslocation = models.TextField(max_length=500, help_text="decide the style of the location here",blank=True,default="padding: 30px;text-transform: capitalize;") + cssdescription = models.TextField(max_length=500, help_text="decide the style of the description here",blank=True) + + def __unicode__(self): + return self.title + +class BillboardInline(admin.TabularInline): + model = Billboard + +class BillboardAdmin(admin.ModelAdmin): + list_display = ('title', 'refresh','timespan','published') + fieldsets = ( + (None, { + 'fields': (('title', 'refresh'), ('published')) + }), + ('content', { + 'fields': (('groups', 'location'), ('timespan')) + }), + ('css', { + 'classes': ('collapse','small'), + 'fields': (('csstitle', 'cssdescription'),('cssdate', 'csslocation')) + }), + ('colors', { + 'fields': (('color1', 'color2'), ('color3', 'color4')) + }), + + ) + +admin.site.register(Billboard,BillboardAdmin) + + + +databrowse.site.register(Event) +databrowse.site.register(Location) +databrowse.site.register(Comment) +databrowse.site.register(Billboard) +databrowse.site.register(ContentType) +databrowse.site.register(Group) +databrowse.site.register(Network) +databrowse.site.register(Todo) +databrowse.site.register(Wish) +databrowse.site.register(User) + diff --git a/agenda/billboardviews.py b/agenda/billboardviews.py index 50139ee..fb5ee83 100644 --- a/agenda/billboardviews.py +++ b/agenda/billboardviews.py @@ -1,3 +1,4 @@ +# vim: ai ts=4 sts=4 et sw=4 # Create your views here. from django.shortcuts import render_to_response, get_object_or_404, get_list_or_404 from infopoint.agenda.models import * @@ -8,7 +9,7 @@ from django.contrib.auth import authenticate, login from django.contrib.auth.models import Group,User from django.contrib.comments.models import Comment from infopoint.agenda.templatetags import * -from infopoint.agenda.models import Event, Attendance,Todo, Billboard +from infopoint.agenda.models import * from infopoint.agenda.forms import TodoCreateForm, TodoForm from django.contrib.formtools.preview import FormPreview from django.views.generic import create_update @@ -30,15 +31,16 @@ def event_galaxy(request,object_id): map = pydot.Dot("ev"+str(event.id), graph_type="digraph",strict="True", suppress_disconnected="False", fontname="Arial",ratio="compress",size="8,8",overlap="False", bgcolor="#ffffff6d", packmode="clust",URL="/",remincross="True" ) map.add_node(pydot.Node("ev"+str(event.id),label=str(event.title)+" "+str(event.start_date.strftime('%d %b')),color='purple',fontname='Arial',style='filled',fontsize='30',shape='record' ,URL="/agenda/map/"+str(object_id))) map.add_node(pydot.Node("lo"+str(event.location.id),label=str(event.location.title),fontname='Arial',style='filled',fontsize='20',shape='record', fillcolor='#00ff005d',URL='/agenda/location/'+str(event.location.id))) - map.add_edge(pydot.Edge("ev"+str(event.id),"lo"+str(event.location.id),style='rounded',len='1')) + map.add_edge(pydot.Edge("ev"+str(event.id),"lo"+str(event.location.id),len='4')) cluster_Groups = pydot.Subgraph(graph_name='cluster_Groups',label='Groups',fontname='Arial',style='rounded') todos = pydot.Subgraph(graph_name='cluster_Todos',label='Tasks',fontname='Arial',style='rounded') events = pydot.Subgraph(label='Events',shape='note',fillcolor='lightgrey',fontname='Arial',style='rounded') comments_graph = pydot.Subgraph(graph_name='Comments',label='Comments',style='rounded',fontname='Arial') for todo in event.todo.all()[:3]: - todos.add_node(pydot.Node("td"+str(todo.id),label=todo.title,color='lightpink',fontname='Arial',style='filled',fontsize='10',shape='box')) - events.add_edge(pydot.Edge("ev"+str(event.id),"td"+str(todo.id))) + if todo.closed != True: + todos.add_node(pydot.Node("td"+str(todo.id),label=todo.title,color='lightpink',fontname='Arial',style='filled',fontsize='10',shape='box')) + events.add_edge(pydot.Edge("ev"+str(event.id),"td"+str(todo.id))) for todo in event.location.todolocation.all()[:3]: todos.add_node(pydot.Node("td"+str(todo.id),label=todo.title,color='lightpink',fontname='Arial',style='filled',fontsize='10',shape='box')) events.add_edge(pydot.Edge("lo"+str(event.location.id),"td"+str(todo.id))) diff --git a/agenda/icalviews.py b/agenda/icalviews.py new file mode 100644 index 0000000..5081365 --- /dev/null +++ b/agenda/icalviews.py @@ -0,0 +1,109 @@ +# vim: ai ts=4 sts=4 et sw=4 +# Create your views here. +from django.shortcuts import render_to_response, get_object_or_404, get_list_or_404 +from infopoint.agenda.models import * +from datetime import date +from django.http import HttpResponse, HttpResponseRedirect +from django.contrib.contenttypes.models import ContentType +from django.contrib.auth import authenticate, login +from django.contrib.auth.models import Group,User +from django.contrib.comments.models import Comment +from infopoint.agenda.templatetags import * +from django.contrib.formtools.preview import FormPreview +from django.views.generic import create_update +from django.template import RequestContext +from django.forms import ModelForm +import pydot,vobject + +today = date.today() + +EVENT_ITEMS = ( + ('uid', 'uid'), + ('dtstart', 'start'), + ('dtend', 'end'), + ('summary', 'summary'), + ('status', 'status'), + ('location', 'location'), + ('last_modified', 'last_modified'), + ('created', 'created'), +) + +class ICalendarFeed(object): + def __call__(self, *args, **kwargs): + cal = vobject.iCalendar() + for item in self.items(): + event = cal.add('vevent') + for vkey, key in EVENT_ITEMS: + value = getattr(self, 'item_' + key)(item) + if value: + event.add(vkey).value = value + event.add('TRANSP').value = 'OPAQUE' + + + return cal + + def items(self): + return [] + + def item_status(self, item): + pass + + def item_uid(self, item): + pass + + def item_start(self, item): + pass + + def item_end(self, item): + pass + + def item_summary(self, item): + return str(item) + + def item_location(self, item): + pass + + def item_last_modified(self, item): + pass + + def item_created(self, item): + pass + + +class SomeEventCalendar(ICalendarFeed): + def items(self): + return Event.events.next_events() + + def item_uid(self, item): + return str(item.id) + + def item_start(self, item): + return item.start_date + + def item_summary(self, item): + return "%s - %s" % (item.title, item.description) + + def item_location(self, item): + return item.location.title + + def item_status(self, item): + if item.confirmed == 1: + return "CONFIRMED" + else: + return "PENDING" + + + def item_end(self, item): + return item.end_date + + +def user_freebusy(request,user_id): + event_list = Event.events.next_events().select_related() + ical = SomeEventCalendar() + ical.items = Event.events.next_events() + response = HttpResponse(ical.serialize()) + response['Content-Type'] = 'text/calendar' + response['Filename'] = 'filename.ics' # IE needs this + response['Content-Disposition'] = 'attachment; filename=filename.ics' + return response + diff --git a/agenda/models.py b/agenda/models.py index 0574098..06ad072 100755 --- a/agenda/models.py +++ b/agenda/models.py @@ -232,109 +232,3 @@ class Attendance(models.Model): -class LocationInline(admin.TabularInline): - model = Location - -class TodoInline(admin.TabularInline): - model = Todo - -class EventInline(admin.TabularInline): - model = Event - extra = 1 - -class GroupInline(admin.TabularInline): - model = Group - -class AttendanceInline(admin.TabularInline): - model = Attendance - -class NetworkInline(admin.TabularInline): - model = Network - -class AttendanceAdmin(admin.ModelAdmin): - list_display = ('event', 'person', 'attendance' ) -admin.site.register(Attendance,AttendanceAdmin) - -class LocationAdmin(admin.ModelAdmin): - list_display = ('title', 'description', 'size' , 'picture') - inlines = [EventInline] -admin.site.register(Location,LocationAdmin) - -class TodoAdmin(admin.ModelAdmin): - list_display = ('title', 'public','due_date','creator', 'done') - date_hierarchy = 'due_date' - -admin.site.register(Todo,TodoAdmin) - -class WishAdmin(admin.ModelAdmin): - list_display = ('title', 'public','due_date','creator', 'done') - date_hierarchy = 'due_date' - -admin.site.register(Wish,WishAdmin) - -class EventAdmin(admin.ModelAdmin): - list_display = ('title', 'confirmed','description', 'location', 'start_date', 'public') - list_filter = ('location', 'public') - save_as = True -admin.site.register(Event,EventAdmin) - -class NetworkAdmin(admin.ModelAdmin): - list_display = ('event', 'group') -admin.site.register(Network,NetworkAdmin) - -class Billboard(models.Model): - title = models.CharField(max_length=100) - groups = models.ManyToManyField(Group, null=True,blank=True,related_name='cartel') - refresh = models.IntegerField(help_text=_('In seconds'),max_length=3) - published = models.BooleanField(null=True,blank=True) - location = models.ManyToManyField(Location, null=True,blank=True, related_name='cartel') - timespan = models.CharField(max_length=1, choices=TIMESPAN_CHOICES) - color1 = models.CharField(max_length=6) - color2 = models.CharField(max_length=6) - color3 = models.CharField(max_length=6) - color4 = models.CharField(max_length=6) - csstitle = models.TextField(max_length=500, help_text="decide the style of the title here",blank=True,default="padding: 30px;font-family: verdana, arial, sans-serif;text-transform: capitalize;BORder: 10px dotted;") - cssdate = models.TextField(max_length=500, help_text="decide the style of the date here",blank=True,default="padding: 30px;") - csslocation = models.TextField(max_length=500, help_text="decide the style of the location here",blank=True,default="padding: 30px;text-transform: capitalize;") - cssdescription = models.TextField(max_length=500, help_text="decide the style of the description here",blank=True) - - def __unicode__(self): - return self.title - -class BillboardInline(admin.TabularInline): - model = Billboard - -class BillboardAdmin(admin.ModelAdmin): - list_display = ('title', 'refresh','timespan','published') - fieldsets = ( - (None, { - 'fields': (('title', 'refresh'), ('published')) - }), - ('content', { - 'fields': (('groups', 'location'), ('timespan')) - }), - ('css', { - 'classes': ('collapse','small'), - 'fields': (('csstitle', 'cssdescription'),('cssdate', 'csslocation')) - }), - ('colors', { - 'fields': (('color1', 'color2'), ('color3', 'color4')) - }), - - ) - -admin.site.register(Billboard,BillboardAdmin) - - - -databrowse.site.register(Event) -databrowse.site.register(Location) -databrowse.site.register(Comment) -databrowse.site.register(Billboard) -databrowse.site.register(ContentType) -databrowse.site.register(Group) -databrowse.site.register(Network) -databrowse.site.register(Todo) -databrowse.site.register(Wish) -databrowse.site.register(User) - diff --git a/agenda/urls.py b/agenda/urls.py index 72f093a..47aee05 100755 --- a/agenda/urls.py +++ b/agenda/urls.py @@ -17,7 +17,7 @@ from django.shortcuts import render_to_response from django.core.exceptions import * from django.http import Http404 from django.core import urlresolvers -from django.contrib.sites.models import Site +#from django.contrib.sites.models import Site from django.utils.translation import ugettext as _ from django.utils.safestring import mark_safe import inspect, os, re @@ -27,7 +27,9 @@ from django.contrib.comments.urls import * from django import forms from django.contrib.formtools.preview import FormPreview from infopoint.agenda.forms import * +from infopoint.agenda.icalviews import SomeEventCalendar +events_list = Event.events.next_events() urlpatterns = patterns('infopoint.agenda.views', (r'^agenda/(?P<object_id>\d+)/$', 'event'), @@ -38,6 +40,7 @@ urlpatterns = patterns('infopoint.agenda.views', (r'^agenda/$', 'calendar'), (r'^orphan/$', 'orphan_events'), (r'^agenda/wishlist/$', 'wishlist'), + (r'^agenda/wishlist/(?P<wish_id>\d+)/done$', 'closewishitem'), (r'^agenda/add/$', 'add_new_event'), (r'^cal/(?P<year>\d+)/(?P<month>\d+)/$', 'calendarshape'), (r'^agenda/add/submit/$', 'submit_new_event'), @@ -56,6 +59,11 @@ urlpatterns = patterns('infopoint.agenda.views', ) + +urlpatterns += patterns('infopoint.agenda.icalviews', + (r'^user/(?P<user_id>\d+)/fb$', 'user_freebusy'), + (r'^ical/$', SomeEventCalendar() ), +) urlpatterns += patterns('infopoint.agenda.billboardviews', (r'^agenda/map/(?P<object_id>\d+)/$', 'event_galaxy'), (r'^agenda/map2/(?P<object_id>\d+)/$', 'event_galaxy_for_map'), diff --git a/agenda/views.py b/agenda/views.py index 524558c..1f2ceb3 100755 --- a/agenda/views.py +++ b/agenda/views.py @@ -84,8 +84,9 @@ def mismensajes(request): if request.user.is_authenticated(): missing_pixies = Event.events.missing_pixies().filter(redes__user=user.id).distinct() group_todos = Todo.todos.pending_todos().filter(network__user=request.user).order_by('due_date') + attending = user.event_set.all().filter(end_date__gte=datetime.now()) my_mentored_events = Event.events.next_events().filter(pixie=user).select_related() - return render_to_response('agenda/user_page.html', {'wishlist':wishlist, 'todolist':todolist,'group_todos': group_todos, 'my_mentored_events': my_mentored_events,'newtodo': newtodo, 'missing_pixies': missing_pixies },context_instance=RequestContext(request)) + return render_to_response('agenda/user_page.html', {'wishlist':wishlist, 'attending': attending,'todolist':todolist,'group_todos': group_todos, 'my_mentored_events': my_mentored_events,'newtodo': newtodo, 'missing_pixies': missing_pixies },context_instance=RequestContext(request)) else: event = Event.calendar.filter(public=True) return render_to_response('agenda/event_list.html', {'event':event }) @@ -128,7 +129,8 @@ def calendar (request): def wishlist (request): wishlist = Wish.objects.all().filter(done=False).order_by('due_date') - return render_to_response('agenda/wishlist.html', {'wishlist': wishlist}, context_instance=RequestContext(request)) + done = Wish.objects.all().filter(done=True).order_by('due_date')[:10] + return render_to_response('agenda/wishlist.html', {'wishlist': wishlist, 'done': done }, context_instance=RequestContext(request)) @@ -224,6 +226,12 @@ def closetodo(request,todo_id,event_id): request.user.message_set.create(message=todo.title+' has been closed as completed') return HttpResponseRedirect('/agenda/map/'+event_id) +def closewishitem(request,wish_id): + wish = get_object_or_404(Wish, pk=wish_id) + wish.done = True + wish.save() + return HttpResponseRedirect('/agenda/wishlist/') + def closegrouptodo(request,todo_id,object_id): if request.method == 'POST': todo = get_object_or_404(Todo, pk=todo_id) diff --git a/cal/models.py b/cal/models.py index ae46f3f..9bfeca6 100644 --- a/cal/models.py +++ b/cal/models.py @@ -1,6 +1,5 @@ from django.db import models from django.contrib.auth.models import User,Group -from infopoint.agenda import * from infopoint.agenda.models import * import eventCalBase diff --git a/locale/ca/LC_MESSAGES/django.mo b/locale/ca/LC_MESSAGES/django.mo Binary files differindex 38a0365..aeb4434 100644 --- a/locale/ca/LC_MESSAGES/django.mo +++ b/locale/ca/LC_MESSAGES/django.mo diff --git a/locale/es/LC_MESSAGES/django.mo b/locale/es/LC_MESSAGES/django.mo Binary files differindex 5014028..f41c9aa 100644 --- a/locale/es/LC_MESSAGES/django.mo +++ b/locale/es/LC_MESSAGES/django.mo diff --git a/locale/it/LC_MESSAGES/django.mo b/locale/it/LC_MESSAGES/django.mo Binary files differnew file mode 100644 index 0000000..ccaf191 --- /dev/null +++ b/locale/it/LC_MESSAGES/django.mo diff --git a/templates/agenda/user_page.html b/templates/agenda/user_page.html index f9ac453..a5b490d 100755 --- a/templates/agenda/user_page.html +++ b/templates/agenda/user_page.html @@ -1,5 +1,6 @@ {% extends 'agenda/base.html' %} {% load i18n %} +{% load comments %} {% if name %}{% block content_title %}<h1>{{ name|escape }}</h1>{% endblock %} {% endif %} {% load calendartable %} @@ -21,6 +22,31 @@ {% endif %} {% endblock %} {% block content %} + <h1>{% trans 'Home page of' %}: {{ user.username }}</h1> + <div class="module"> + <h2>{% trans 'User info' %}</h2> + <ul class="actionlist"> + <li>{% trans 'Date Joined' %}: {{ user.date_joined|date }}</li> + {% if user.is_staff %}<li>{% trans 'User is staff' %}</li>{% endif %} + {% if user.is_superuser %}<li><b>{% trans 'User is superuser' %}</b></li>{% endif %} + <li>{% trans 'email' %} {{ user.email }}</li> + </ul> + </div> + <div class="module"> + <h2>{% trans 'Your groups' %}</h2> + <ul> + {% for group in user.groups.all %} + <li><a href="{% url agenda.views.justonegroup group.id %}">{{ group }}</a><br> + Members: {{ group.user_set.count }} - Comments: {% get_comment_count for group as comment_count %} + {% get_comment_list for group as comment_list %} {% if comment_list %}{% for comment in comment_list %} + {{ comment.comment }} - posted by {{ comment.user_name }} on {{ comment.submit_date|date }} + +{% endfor %} +{% endif %} +</li> + {% endfor %} + </ul> + </div> {% if group_todos.count %} <div class="module"> <h2>{% trans 'Pending ToDos on your groups' %}:</h2> @@ -32,19 +58,6 @@ </ul> </div> {% endif %} - <div class="module"> - - <h2>{% trans 'Your groups' %}</h2> - - <ul> - {% for group in user.groups.all %} - <li><a href="{% url agenda.views.justonegroup group.id %}">{{ group }}</a> - </li> - {% endfor %} - </ul> - - - </div> <div class="module"> <h2>{% trans 'Your events' %}</h2> {% if my_mentored_events %} @@ -55,10 +68,10 @@ {% endfor %} </ul> {% endif %} - {% if user.event_set.count %} + {% if attending %} <h3>{% trans 'Events you are attending' %}</h3> <ul class="actionlist"> - {% for event in user.event_set.all %} + {% for event in attending %} <li><a href="{% url agenda.views.event event.id %}">{{ event.title }}</a> - {{ event.start_date|date }}</li> {% endfor %} </ul> diff --git a/templates/agenda/wishlist.html b/templates/agenda/wishlist.html index 26f6e50..e361b7f 100755 --- a/templates/agenda/wishlist.html +++ b/templates/agenda/wishlist.html @@ -28,30 +28,28 @@ {% endfor %} {% endif %} - {% if user.is_staff %} - <a href="/admin/agenda/wish/{{ object.id }}" class="changelink">{% trans 'Modify' %}</a> - <a href="/admin/agenda/wish/{{ object.id }}/delete" class="deletelink">{% trans 'Delete' %}</a> + {% if user.is_staff %} - <a href="/admin/agenda/wish/{{ object.id }}" class="changelink">{% trans 'Modify' %}</a> - <a href="{% url agenda.views.closewishitem object.id %}" class="deletelink">{% trans 'Close' %}</a> {% endif %} - {% if object.comment_set.all %}{% trans 'Comments' %}: {{ object.comment_set.count }}{% endif %} - {% get_comment_list for object as comment_list %} -{% if comment_list %} -<div class="module"> -<h4>{% trans 'Comments about this item' %}:</h4> -{% for comment in comment_list %} -{% if comment.is_public %} -<h3>{{ comment.headline }}</h3> -<p>{{ comment.comment|linebreaks }} -<p>{% trans 'Posted by' %} {{ comment.user }} on {{ comment.submit_date|date }} -{% if user.is_authenticated %} <a href="/admin/comments/comment/{{ comment.id }}/delete" class="deletelink">{% trans 'Delete' %}</a>{% endif %} + {% if comment_list %} + <div class="module"> + <h4>{% trans 'Comments about this item' %}:</h4> + {% for comment in comment_list %} + {% if comment.is_public %} + <p>{{ comment.headline }} {{ comment.comment|linebreaks }} <i>{% trans 'Posted by' %} {{ comment.user }} on {{ comment.submit_date|date }}</i>{% if user.is_authenticated %} <a href="/admin/comments/comment/{{ comment.id }}/delete" class="deletelink">{% trans 'Delete' %}</a> {% endif %} {% endif %} {% endfor %} </div> {% endif %} + {% if user.is_staff %} <a href="#" onClick="toggleDisplay('comment-{{ object.id }}');return false;"> -Add a comment</a> +Add a comment</a>{% endif %} + <div id="comment-{{ object.id }}" class="invisible"> <form action="{% comment_form_target %}" method="POST"> {% render_comment_form for object %} +<input type="hidden" name="next" value="{% url agenda.views.wishlist %}" /> </div> @@ -60,6 +58,7 @@ Add a comment</a> </li> {% endfor %} </ul> +<p><a href="/admin/agenda/wish/add" class="actionlink">{% trans 'Add another item' %}</a> {% else %} <p>{% trans 'There are no items on the wishlist! Do you want to add one?' %}<a href="/admin/agenda/wish/add" class="actionlink">{% trans ' Click here.' %}</a> </div> @@ -67,6 +66,17 @@ Add a comment</a> {% endblock %} {% block sidebar %} {{ block.super }} +{% if done %} + <div class="module"> + <h2>{% trans 'Already gotten' %}</h2> + <ul> + {% for object in done %} + <li><h3>{{ object.title|title }}</h3> + <p>{{ object.description }}</p> + {% endfor %} + </div> + {% endif %} + {% endblock %} {% block info %} template: "agenda/wishlist.html" |