Merge lp:~rww-deactivatedaccount/loco-team-portal/608797 into lp:loco-team-portal

Proposed by rww
Status: Merged
Merged at revision: 205
Proposed branch: lp:~rww-deactivatedaccount/loco-team-portal/608797
Merge into: lp:loco-team-portal
Diff against target: 119 lines (+50/-0)
7 files modified
loco_directory/teams/urls.py (+1/-0)
loco_directory/teams/views.py (+14/-0)
loco_directory/templates/events/event_history_list.html (+4/-0)
loco_directory/templates/events/event_list.html (+1/-0)
loco_directory/templates/teams/team_detail.html (+1/-0)
loco_directory/templates/teams/team_event_history.html (+28/-0)
loco_directory/templates/teams/team_event_list.html (+1/-0)
To merge this branch: bzr merge lp:~rww-deactivatedaccount/loco-team-portal/608797
Reviewer Review Type Date Requested Status
Daniel Holbach (community) Approve
Review via email: mp+31302@code.launchpad.net

Description of the change

 - Adds /teams/teamname/events/history
 - Exposes relevant history page on /teams/teamname, /teams/teamname/events, and /events

To post a comment you must log in.
Revision history for this message
Daniel Holbach (dholbach) wrote :

Good work!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== 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 @@
3urlpatterns = patterns('',3urlpatterns = patterns('',
4 url(r'^$', 'teams.views.team_list', name='team-list'),4 url(r'^$', 'teams.views.team_list', name='team-list'),
5 url(r'(?P<team_slug>[a-zA-Z0-9\-\.\+?]+)/edit$', 'teams.views.team_edit', name='team-edit'),5 url(r'(?P<team_slug>[a-zA-Z0-9\-\.\+?]+)/edit$', 'teams.views.team_edit', name='team-edit'),
6 url(r'(?P<team_slug>[a-zA-Z0-9\-\.\+?]+)/events/history$', 'teams.views.team_event_history', name='team-event-history'),
6 url(r'(?P<team_slug>[a-zA-Z0-9\-\.\+?]+)/events$', 'teams.views.team_event_list', name='team-event-list'),7 url(r'(?P<team_slug>[a-zA-Z0-9\-\.\+?]+)/events$', 'teams.views.team_event_list', name='team-event-list'),
7 url(r'(?P<team_slug>[a-zA-Z0-9\-\.\+?]+)$', 'teams.views.team_detail', name='team-detail'),8 url(r'(?P<team_slug>[a-zA-Z0-9\-\.\+?]+)$', 'teams.views.team_detail', name='team-detail'),
8)9)
910
=== 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 @@
72 return render_to_response('teams/team_event_list.html', context,72 return render_to_response('teams/team_event_list.html', context,
73 RequestContext(request))73 RequestContext(request))
7474
75def team_event_history(request, team_slug):
76 """
77 list with all team events in past for the given team
78 """
79 team_object = get_object_or_404(Team, lp_name=team_slug)
80 team_event_list = team_object.teamevent_set.history_events()
81 print team_event_list
82 context = {
83 'team_object': team_object,
84 'team_event_list': team_event_list,
85 }
86 return render_to_response('teams/team_event_history.html', context,
87 RequestContext(request))
88
75def team_detail(request, team_slug):89def team_detail(request, team_slug):
76 team_object = get_object_or_404(Team, lp_name=team_slug)90 team_object = get_object_or_404(Team, lp_name=team_slug)
77 is_member = False91 is_member = False
7892
=== 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 @@
33
4{% block title %}{% trans "Ubuntu LoCo Events History" %}{% endblock %}4{% block title %}{% trans "Ubuntu LoCo Events History" %}{% endblock %}
55
6{% block sub_nav_links %}
7<a class="sub-nav-item" href="{% url event-list %}">{% trans "Upcoming Events" %}</a>
8{% endblock %}
9
6{% block content %}10{% block content %}
7<article class="main-content">11<article class="main-content">
8<h2>{% trans "Ubuntu LoCo Global Events History" %}</h2>12<h2>{% trans "Ubuntu LoCo Global Events History" %}</h2>
913
=== 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 @@
10{% if user.is_authenticated %}10{% if user.is_authenticated %}
11<a class="sub-nav-item" href="{% url team-event-select %}">{% trans "Add Team Event" %}</a>11<a class="sub-nav-item" href="{% url team-event-select %}">{% trans "Add Team Event" %}</a>
12{% endif %}12{% endif %}
13<a class="sub-nav-item" href="{% url event-history-list %}">{% trans "Past Events" %}</a>
13{% endblock %}14{% endblock %}
1415
15{% block search_box %}16{% block search_box %}
1617
=== 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 @@
120 </li> 120 </li>
121 {% endfor %}121 {% endfor %}
122 <li><a href="{% url team-event-list team.lp_name %}">{% trans "Show detailed Event List" %}</a></li>122 <li><a href="{% url team-event-list team.lp_name %}">{% trans "Show detailed Event List" %}</a></li>
123 <li><a href="{% url team-event-history team.lp_name %}">{% trans "Show detailed list of past events" %}</a></li>
123 </ul> 124 </ul>
124 {% else %}{% trans "None Specified" %}{% endif %}125 {% else %}{% trans "None Specified" %}{% endif %}
125 </td>126 </td>
126127
=== 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 @@
1{% extends "base.html" %}
2{% load i18n %}
3
4{% block title %}{% blocktrans with team_object.lp_name as teamname %}{{teamname}} Events History{% endblocktrans %}{% endblock %}
5
6{% block sub_nav_links %}
7<a class="sub-nav-item" href="{% url team-detail team_object.lp_name %}">{% trans "Go back to team details" %}</a>
8<a class="sub-nav-item" href="{% url team-event-list team_object.lp_name %}">{% trans "Upcoming Events" %}</a>
9{% endblock %}
10
11{% block search %}{% endblock %}
12
13{% block content %}
14<article class="main-content">
15<h1>{% blocktrans with team_object.lp_name as teamname %}{{teamname}} Events History{% endblocktrans %}</h1>
16
17{% if team_event_list %}
18<p>{% trans "Select a team event below to see more information about it:" %}</p>
19
20{% include "events/team_event_list.inc.html" %}
21
22{% else %}
23<p>{% blocktrans with team_object.lp_name as teamname %}There are no past events for LoCo Team {{teamname}} :({% endblocktrans %}</p>
24{% endif %}
25
26
27</article>
28{% endblock %}
029
=== 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 @@
55
6{% block sub_nav_links %}6{% block sub_nav_links %}
7<a class="sub-nav-item" href="{% url team-detail team_object.lp_name %}">{% trans "Go back to team details" %}</a>7<a class="sub-nav-item" href="{% url team-detail team_object.lp_name %}">{% trans "Go back to team details" %}</a>
8<a class="sub-nav-item" href="{% url team-event-history team_object.lp_name %}">{% trans "Past Events" %}</a>
8<a class="sub-nav-item" href="{% url team-events-rss team_object.lp_name %}" title="{% trans "Team Events (RSS)" %}"">{% trans "Team Events (RSS)" %}</a>9<a class="sub-nav-item" href="{% url team-events-rss team_object.lp_name %}" title="{% trans "Team Events (RSS)" %}"">{% trans "Team Events (RSS)" %}</a>
9{% endblock %}10{% endblock %}
1011

Subscribers

People subscribed via source and target branches