Michael Hall has proposed merging 
lp:~mhall119/loco-directory/meeting-count-on-homepage into lp:loco-directory.

Requested reviews:
  loco-directory-dev (loco-directory-dev)

For more details, see:
https://code.launchpad.net/~mhall119/loco-directory/meeting-count-on-homepage/+merge/50267

Adds a count of upcoming team meetings under the count of upcoming team events 
on the main page.
-- 
https://code.launchpad.net/~mhall119/loco-directory/meeting-count-on-homepage/+merge/50267
Your team loco-directory-dev is requested to review the proposed merge of 
lp:~mhall119/loco-directory/meeting-count-on-homepage into lp:loco-directory.
=== modified file 'loco_directory/common/views.py'
--- loco_directory/common/views.py	2011-01-23 15:02:32 +0000
+++ loco_directory/common/views.py	2011-02-18 03:18:53 +0000
@@ -8,9 +8,12 @@
 
 def index(request):
     from events.models import GlobalEvent, TeamEvent
+    from meetings.models import TeamMeeting
     team_event_count = TeamEvent.objects.next_events().count()
+    team_meeting_count = TeamMeeting.objects.next_meetings().count()
     global_event_list = GlobalEvent.objects.next_events()[:5]
     context = {'team_event_count': team_event_count,
+               'team_meeting_count': team_meeting_count,
                'global_event_list': global_event_list,}
 
     return render_to_response('index.html', context,

=== modified file 'loco_directory/templates/index.html'
--- loco_directory/templates/index.html	2011-02-03 15:34:03 +0000
+++ loco_directory/templates/index.html	2011-02-18 03:18:53 +0000
@@ -69,6 +69,12 @@
             <a class="teams_event_ical" href="{% url teams-event-list-ical %}">
             <img src="/media/images/ical.png" title="{% trans "Team Events as ical" %}"/></a></h3>
         {% endif %}
+
+        {% if team_meeting_count %}
+            <h3><a href="{% url meeting-list %}">{{ team_meeting_count }} {% trans "Upcoming Team Meetings" %}</a>
+            <a class="teams_meeting_ical" href="{% url teams-meeting-list-ical %}">
+            <img src="/media/images/ical.png" title="{% trans "Team Meetings as ical" %}"/></a></h3>
+        {% endif %}
 </article>
 
 <article class="minor-content alone">

_______________________________________________
Mailing list: https://launchpad.net/~loco-directory-dev
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~loco-directory-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to