Robert Wall has proposed merging lp:~robertwall/loco-directory/608797 into 
lp:loco-directory.

Requested reviews:
  loco-directory-dev (loco-directory-dev)
Related bugs:
  #608797 Expose past events
  https://bugs.launchpad.net/bugs/608797


 - Adds /teams/teamname/events/history
 - Exposes relevant history page on /teams/teamname, /teams/teamname/events, 
and /events
-- 
https://code.launchpad.net/~robertwall/loco-directory/608797/+merge/31302
Your team loco-directory-dev is requested to review the proposed merge of 
lp:~robertwall/loco-directory/608797 into lp:loco-directory.
=== modified file 'loco_directory/teams/urls.py'
--- loco_directory/teams/urls.py	2010-07-15 07:56:44 +0000
+++ loco_directory/teams/urls.py	2010-07-29 15:46:42 +0000
@@ -3,6 +3,7 @@
 urlpatterns = patterns('',
     url(r'^$', 'teams.views.team_list', name='team-list'),
     url(r'(?P<team_slug>[a-zA-Z0-9\-\.\+?]+)/edit$', 'teams.views.team_edit', name='team-edit'),
+    url(r'(?P<team_slug>[a-zA-Z0-9\-\.\+?]+)/events/history$', 'teams.views.team_event_history', name='team-event-history'),
     url(r'(?P<team_slug>[a-zA-Z0-9\-\.\+?]+)/events$', 'teams.views.team_event_list', name='team-event-list'),
     url(r'(?P<team_slug>[a-zA-Z0-9\-\.\+?]+)$', 'teams.views.team_detail', name='team-detail'),
 )

=== modified file 'loco_directory/teams/views.py'
--- loco_directory/teams/views.py	2010-07-15 13:37:00 +0000
+++ loco_directory/teams/views.py	2010-07-29 15:46:42 +0000
@@ -72,6 +72,20 @@
     return render_to_response('teams/team_event_list.html', context,
                   RequestContext(request))
 
+def team_event_history(request, team_slug):
+    """
+    list with all team events in past for the given team
+    """
+    team_object = get_object_or_404(Team, lp_name=team_slug)
+    team_event_list = team_object.teamevent_set.history_events()
+    print team_event_list
+    context = {
+        'team_object': team_object,
+        'team_event_list': team_event_list,
+    }
+    return render_to_response('teams/team_event_history.html', context,
+                  RequestContext(request))
+
 def team_detail(request, team_slug):
     team_object = get_object_or_404(Team, lp_name=team_slug)
     is_member = False

=== modified file 'loco_directory/templates/events/event_history_list.html'
--- loco_directory/templates/events/event_history_list.html	2010-07-26 00:35:03 +0000
+++ loco_directory/templates/events/event_history_list.html	2010-07-29 15:46:42 +0000
@@ -3,6 +3,10 @@
 
 {% block title %}{% trans "Ubuntu LoCo Events History" %}{% endblock %}
 
+{% block sub_nav_links %}
+<a class="sub-nav-item" href="{% url event-list %}">{% trans "Upcoming Events" %}</a>
+{% endblock %}
+
 {% block content %}
 <article class="main-content">
 <h2>{% trans "Ubuntu LoCo Global Events History" %}</h2>

=== modified file 'loco_directory/templates/events/event_list.html'
--- loco_directory/templates/events/event_list.html	2010-06-24 19:18:57 +0000
+++ loco_directory/templates/events/event_list.html	2010-07-29 15:46:42 +0000
@@ -10,6 +10,7 @@
 {% if user.is_authenticated %}
 <a class="sub-nav-item" href="{% url team-event-select %}">{% trans "Add Team Event" %}</a>
 {% endif %}
+<a class="sub-nav-item" href="{% url event-history-list %}">{% trans "Past Events" %}</a>
 {% endblock %}
 
 {% block search_box %}

=== modified file 'loco_directory/templates/teams/team_detail.html'
--- loco_directory/templates/teams/team_detail.html	2010-07-15 15:07:52 +0000
+++ loco_directory/templates/teams/team_detail.html	2010-07-29 15:46:42 +0000
@@ -120,6 +120,7 @@
                         </li>  
                     {% endfor %}
                     <li><a href="{% url team-event-list team.lp_name %}">{% trans "Show detailed Event List" %}</a></li>
+                    <li><a href="{% url team-event-history team.lp_name %}">{% trans "Show detailed list of past events" %}</a></li>
                 </ul>   
 			{% else %}{% trans "None Specified" %}{% endif %}
           </td>

=== added file 'loco_directory/templates/teams/team_event_history.html'
--- loco_directory/templates/teams/team_event_history.html	1970-01-01 00:00:00 +0000
+++ loco_directory/templates/teams/team_event_history.html	2010-07-29 15:46:42 +0000
@@ -0,0 +1,28 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block title %}{% blocktrans with team_object.lp_name as teamname %}{{teamname}} Events History{% endblocktrans %}{% endblock %}
+
+{% block sub_nav_links %}
+<a class="sub-nav-item" href="{% url team-detail team_object.lp_name %}">{% trans "Go back to team details" %}</a>
+<a class="sub-nav-item" href="{% url team-event-list team_object.lp_name %}">{% trans "Upcoming Events" %}</a>
+{% endblock %}
+
+{% block search %}{% endblock %}
+
+{% block content %}
+<article class="main-content">
+<h1>{% blocktrans with team_object.lp_name as teamname %}{{teamname}} Events History{% endblocktrans %}</h1>
+
+{% if team_event_list %}
+<p>{% trans "Select a team event below to see more information about it:" %}</p>
+
+{% include "events/team_event_list.inc.html" %}
+
+{% else %}
+<p>{% blocktrans with team_object.lp_name as teamname %}There are no past events for LoCo Team {{teamname}} :({% endblocktrans %}</p>
+{% endif %}
+
+
+</article>
+{% endblock %}

=== modified file 'loco_directory/templates/teams/team_event_list.html'
--- loco_directory/templates/teams/team_event_list.html	2010-07-14 14:00:27 +0000
+++ loco_directory/templates/teams/team_event_list.html	2010-07-29 15:46:42 +0000
@@ -5,6 +5,7 @@
 
 {% block sub_nav_links %}
 <a class="sub-nav-item" href="{% url team-detail team_object.lp_name %}">{% trans "Go back to team details" %}</a>
+<a class="sub-nav-item" href="{% url team-event-history team_object.lp_name %}">{% trans "Past Events" %}</a>
 <a class="sub-nav-item" href="{% url team-events-rss team_object.lp_name %}" title="{% trans "Team Events (RSS)" %}"">{% trans "Team Events (RSS)" %}</a>
 {% endblock %}
 

_______________________________________________
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