Merge lp:~daker/loco-team-portal/fix.meetings.history into lp:loco-team-portal

Proposed by Adnane Belmadiaf
Status: Merged
Approved by: Adnane Belmadiaf
Approved revision: 610
Merged at revision: 609
Proposed branch: lp:~daker/loco-team-portal/fix.meetings.history
Merge into: lp:loco-team-portal
Diff against target: 330 lines (+223/-27)
4 files modified
loco_directory/teams/views.py (+4/-4)
loco_directory/templates/teams/team_detail.html (+6/-3)
loco_directory/templates/teams/team_event_history.html (+6/-3)
loco_directory/templates/teams/team_meeting_history.html (+207/-17)
To merge this branch: bzr merge lp:~daker/loco-team-portal/fix.meetings.history
Reviewer Review Type Date Requested Status
LoCo Team Portal Developers Pending
Review via email: mp+147560@code.launchpad.net

Commit message

Fixed the Team Meetings history

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'loco_directory/teams/views.py'
2--- loco_directory/teams/views.py 2013-02-09 16:26:04 +0000
3+++ loco_directory/teams/views.py 2013-02-10 15:12:21 +0000
4@@ -148,11 +148,11 @@
5 """
6 list with all team meetings in past for the given team
7 """
8- team_object = get_object_or_404(Team, lp_name=team_slug)
9- team_meeting_list = team_object.teammeeting_set.history_meetings()
10+ team = get_object_or_404(Team, lp_name=team_slug)
11+ team_meetings = team.teammeeting_set.history_meetings()
12 context = {
13- 'team_object': team_object,
14- 'team_meeting_list': team_meeting_list,
15+ 'team': team,
16+ 'team_meetings': team_meetings,
17 }
18 return render_to_response('teams/team_meeting_history.html', context,
19 RequestContext(request))
20
21=== modified file 'loco_directory/templates/teams/team_detail.html'
22--- loco_directory/templates/teams/team_detail.html 2012-12-18 22:25:30 +0000
23+++ loco_directory/templates/teams/team_detail.html 2013-02-10 15:12:21 +0000
24@@ -154,10 +154,10 @@
25 </div>
26
27 <div id="loco-support">
28- <span title="{% trans "Reapproval Date:" %}" class="pictogram calendar"></span>
29+ <span title="{% trans "Reapproval Date" %}" class="pictogram calendar"></span>
30 <span class="value ellipsis medium-ellipsis">
31 {% if team.approved %}
32- {% trans "Reapproval Date:" %} {{ team.expires_date }}
33+ {{ team.expires_date }}
34 {% endif %}
35 </span>
36 </div>
37@@ -179,6 +179,9 @@
38 <a href="{% url team-event-history team.lp_name %}" title="{% trans "Past Events" %}">{% trans "Past Events" %}</a>
39 </span>
40 <span>
41+ <a href="{% url team-meeting-history team.lp_name %}" title="{% trans "Past Meetings" %}">{% trans "Past Meetings" %}</a>
42+ </span>
43+ <span>
44 <a class="pictogram rss action" href="/feeds/teams/{{ team.lp_name }}/" title="{% trans "RSS Feed" %}"></a>
45 </span>
46 <span>
47@@ -196,7 +199,7 @@
48 {% endfor %}
49 {% else %}
50 <div class="no-results">
51- {% trans "There are currently no upcoming events :(" %}
52+ {% trans "There are currently no upcoming events or meetings :(" %}
53 </div>
54 {% endif %}
55 </div>
56
57=== modified file 'loco_directory/templates/teams/team_event_history.html'
58--- loco_directory/templates/teams/team_event_history.html 2013-02-09 17:15:00 +0000
59+++ loco_directory/templates/teams/team_event_history.html 2013-02-10 15:12:21 +0000
60@@ -109,10 +109,10 @@
61 </div>
62
63 <div id="loco-support">
64- <span title="{% trans "Reapproval Date:" %}" class="pictogram calendar"></span>
65+ <span title="{% trans "Reapproval Date" %}" class="pictogram calendar"></span>
66 <span class="value ellipsis medium-ellipsis">
67 {% if team.approved %}
68- {% trans "Reapproval Date:" %} {{ team.expires_date }}
69+ {{ team.expires_date }}
70 {% endif %}
71 </span>
72 </div>
73@@ -134,6 +134,9 @@
74 <a href="{% url team-event-history team.lp_name %}" title="{% trans "Past Events" %}">{% trans "Past Events" %}</a>
75 </span>
76 <span>
77+ <a href="{% url team-meeting-history team.lp_name %}" title="{% trans "Past Meetings" %}">{% trans "Past Meetings" %}</a>
78+ </span>
79+ <span>
80 <a class="pictogram rss action" href="/feeds/teams/{{ team.lp_name }}/" title="{% trans "RSS Feed" %}"></a>
81 </span>
82 <span>
83@@ -172,7 +175,7 @@
84 {% endfor %}
85 {% else %}
86 <div class="no-results">
87- {% trans "There team has no events yet :(" %}
88+ {% trans "This team has no events yet :(" %}
89 </div>
90 {% endif %}
91 </div>
92
93=== modified file 'loco_directory/templates/teams/team_meeting_history.html'
94--- loco_directory/templates/teams/team_meeting_history.html 2012-06-02 11:50:27 +0000
95+++ loco_directory/templates/teams/team_meeting_history.html 2013-02-10 15:12:21 +0000
96@@ -1,27 +1,217 @@
97 {% extends "base.html" %}
98-{% load i18n %}
99+{% load i18n teams_tags %}
100
101-{% block page_name %}{% blocktrans with team_object.name as teamname %}{{teamname}} Meeting History{% endblocktrans %}{% endblock %}
102+{% block page_name %}{% blocktrans with team_object.name as teamname %}{{teamname}} Meetings History{% endblocktrans %}{% endblock %}
103
104 {% block sub_nav_links %}
105-<li><a class="sub-nav-item" href="{% url team-detail team_object.lp_name %}">{% trans "Back to Team Details" %}</a></li>
106-<li><a class="sub-nav-item" href="{% url team-meeting-list team_object.lp_name %}">{% trans "Upcoming Meetings" %}</a></li>
107+ <li><a class="sub-nav-item" href="{% url team-list %}" title="{% trans "Back to Teams List" %}">{% trans "Back to Teams List" %}</a></li>
108+ {% if is_member %}{% else %}<li><a class="sub-nav-item" href="https://launchpad.net/~{{ team.lp_name }}/+join">{% trans "Join This Team!" %}</a></li>{% endif %}
109+ {% if is_admin %}<li><a class="sub-nav-item" href="{% url team-edit team.lp_name %}" title="{% trans "Edit Details" %}">{% trans "Edit Details" %}</a></li>{% endif %}
110+ {% if is_admin and not team.active %}<li><a class="sub-nav-item" href="{% url select-other-team team.lp_name %}" title="{% trans "Merge with another team" %}">{% trans "Merge team" %}</a></li>{% endif %}
111+ {% if is_member %}<li><a class="sub-nav-item" href="{% url team-event-new team.lp_name %}" title="{% trans "Add New Event" %}">{% trans "Add New Event" %}</a></li>{% endif %}
112+ {% if is_member %}<li><a class="sub-nav-item" href="{% url team-meeting-new team.lp_name %}" title="{% trans "Add New Meeting" %}">{% trans "Add New Meeting" %}</a></li>{% endif %}
113+{% endblock %}
114+
115+{% block extrahead %}{{ block.super }}
116+<link type="application/rss+xml" rel="alternate" title="{% trans "Team (RSS)" %}" href="/feeds/teams/{{ team.lp_name }}" />
117 {% endblock %}
118
119 {% block content %}
120 <div class="row">
121-<section class="span-12">
122-<h1>{% blocktrans with team_object.name as teamname %}{{teamname}} Meeting History{% endblocktrans %}</h1>
123-
124-{% if team_meeting_list %}
125-<p>{% trans "Select a team meeting below to see more information about it:" %}</p>
126-
127-{% include "meetings/team_meeting_list.inc.html" %}
128-
129-{% else %}
130-<p>{% blocktrans with team_object.lp_name as teamname %}There are no past meetings for {{teamname}} :({% endblocktrans %}</p>
131-{% endif %}
132-
133-</section>
134+ <section class="span-9">
135+ <div class="box_content">
136+ <div class="pagelet">
137+ <div id="locobranding">
138+ <img src="{{ team.mugshot_url }}" alt="{{ team.name }}" title="{{ team.name }}" />
139+ </div>
140+ <div id="loco-name">
141+ <h2>{{ team.name }} <a class="contact-button" href="https://launchpad.net/~{{ team.lp_name }}/+contactuser/" title="{% trans "Contact this team" %}" target="_blank">{% trans "Contact this team" %}</a></h2>
142+ <div style="display:block;">
143+ <div id="loco-location">
144+ <span title="{% trans "Location" %}" class="pictogram place"></span>
145+ <span class="value ellipsis small-ellipsis">
146+ {% if team.countries.all %}
147+ {% for country in team.countries.all %}
148+ {% if not forloop.first %}, {% endif %}{{ country.name }}
149+ {% endfor %}
150+ {% if team.spr %}, {% trans team.spr %}{% endif %}{% if team.city %}, {% trans team.city %}
151+ {% endif %}
152+ {% else %}
153+ {% trans "None Specified" %}
154+ {% endif %}
155+ </span>
156+ </div>
157+
158+ <div id="loco-language">
159+ <span title="{% trans "Languages" %}" class="pictogram language"></span>
160+ <span class="value ellipsis">
161+ {% if team.languages.all %}
162+ {% for language in team.languages.all %}
163+ {% if not forloop.first %}, {% endif %}{{ language.name }}
164+ {% endfor %}
165+ {% else %}
166+ {% trans "None Specified" %}
167+ {% endif %}
168+ </span>
169+ </div>
170+
171+ <div id="loco-support">
172+ <span title="{% trans "Local Support" %}" class="pictogram support"></span>
173+ <span class="value ellipsis medium-ellipsis">
174+ {% if team.provides_support %}
175+ {% trans "This LoCo provides support :)" %}
176+ {% else %}
177+ {% trans "This LoCo doesn't provide support :(" %}
178+ {% endif %}
179+ </span>
180+ </div>
181+ </div>
182+
183+ <div style="display:block;">
184+ <div id="loco-location">
185+ <span title="{% trans "Resources" %}" class="pictogram ml"></span>
186+ <span class="value ellipsis small-ellipsis">
187+ {% if team.web_url %}
188+ <a href="{{ team.web_url }}" title="{% trans "Website" %}" target="_blank">
189+ {% trans "Website" %}
190+ </a>
191+ {% endif %}
192+ {% if team.web_url and team.wiki_url %} / {% endif %}
193+ {% if team.wiki_url %}
194+ <a href="{{ team.wiki_url }}" title="{% trans "Wiki" %}" target="_blank">
195+ {% trans "Wiki" %}
196+ </a>
197+ {% endif %}
198+ </span>
199+ </div>
200+
201+
202+ <div id="loco-support">
203+ <span class="pictogram forums" title="{% trans "Support" %}"></span>
204+ <span class="value ellipsis">
205+ {% if team.ml_url %}
206+ <a href="{{ team.ml_url }}" title="{% trans "Mailing List" %}" target="_blank">
207+ {% trans "Mailing List" %}
208+ </a>
209+ {% endif %} /
210+ {% if team.forum_url %}
211+ <a href="{{ team.forum_url }}" title="{% trans "Forums" %}" target="_blank">
212+ {% trans "Forums" %}
213+ </a>
214+ {% endif %} /
215+ {% if team.irc_chan %}
216+ <a href="http://webchat.freenode.net/?channels={{ team.irc_chan }}&prompt=1&uio=OT10cnVlJjEwPXRydWUmMTE9MjM218&nick={% if user.is_authenticated %}{{ user.username|irc }}{% else %}locodir-user{% endif %}" title="{% trans "IRC" %}" target="_blank">
217+ {% trans "IRC" %}
218+ </a>
219+ {% endif %}
220+ </span>
221+ </div>
222+
223+ <div id="loco-support">
224+ <span title="{% trans "Reapproval Date" %}" class="pictogram calendar"></span>
225+ <span class="value ellipsis medium-ellipsis">
226+ {% if team.approved %}
227+ {{ team.expires_date }}
228+ {% endif %}
229+ </span>
230+ </div>
231+
232+ </div>
233+ </div>
234+ </div>
235+ <div class="events-meetings-wrapper">
236+ <div style="overflow: auto; margin-bottom: 10px;border-bottom: 1px solid #E6E6E6;">
237+ <h3 class="title">{% trans "Past Meetings" %}</h3>
238+ <div class="team-actions">
239+ <span>
240+ <a href="{% url team-event-list team.lp_name %}" title="{% trans "All Events" %}">{% trans "All Events" %}</a>
241+ </span>
242+ <span>
243+ <a href="{% url team-meeting-list team.lp_name %}" title="{% trans "All Meetings" %}">{% trans "All Meetings" %}</a>
244+ </span>
245+ <span>
246+ <a href="{% url team-event-history team.lp_name %}" title="{% trans "Past Events" %}">{% trans "Past Events" %}</a>
247+ </span>
248+ <span>
249+ <a href="{% url team-meeting-history team.lp_name %}" title="{% trans "Past Meetings" %}">{% trans "Past Meetings" %}</a>
250+ </span>
251+ <span>
252+ <a class="pictogram rss action" href="/feeds/teams/{{ team.lp_name }}/" title="{% trans "RSS Feed" %}"></a>
253+ </span>
254+ <span>
255+ <a class="pictogram ical action" href="{% url team-calendar team.lp_name %}" title="{% trans "iCal Feed" %}"></a>
256+ </span>
257+ </div>
258+ </div>
259+ {% if team_meetings %}
260+ {% regroup team_meetings by date_begin|date:"Y" as meetings %}
261+ {% for year in meetings %}
262+ <a name="y{{ year.grouper }}"></a>
263+ <div style="font-size: 12px;float: right; padding-top: 10px;padding-right: 15px;">
264+ <span style="margin-left: 10px; text-transform: uppercase;">{% trans "Browse by year" %} </span>
265+ {% for y in meetings %}
266+ <span style="margin-left: 10px;">
267+ {% if y == year %}
268+ {{ y.grouper }}
269+ {% else %}
270+ <a href="#y{{ y.grouper }}" title="{{ y.grouper }}">{{ y.grouper }}</a>
271+ {% endif %}
272+ </span>
273+ {% endfor %}
274+ </div>
275+ <h3 style="padding-left: 15px;">{{ year.grouper }}
276+ {% with meetings_count=year.list|length %}
277+ ({% blocktrans with meetings_count as meetings_count %}{{ meetings_count }} meetings{% endblocktrans %})
278+ {% endwith %}
279+ </h3>
280+ {% for event in year.list %}
281+ <a href="{{ event.get_absolute_url }}" title="{% if event.venue %}{% else %}{{event.date_begin|date:"M d"}}{% endif %}" class="event-meetings">
282+ <span class="title">{{ event.name }}</span>
283+ <small>{{ event.local_date_begin|date:"l, d N Y" }} {% trans "at " %}{{ event.local_date_begin|date:"H:i T" }}</small>
284+ <p>{{ event.description|truncatewords:50 }}</p>
285+ </a>
286+ {% endfor %}
287+ {% endfor %}
288+ {% else %}
289+ <div class="no-results">
290+ {% trans "This team has no meetings yet :(" %}
291+ </div>
292+ {% endif %}
293+ </div>
294+ </div>
295+ </section>
296+ <section class="span-3 box_content last">
297+ <div class="sidebar-inner">
298+ <h3 class="title">{% trans "Team Admin(s)" %}</h3>
299+ <div class="team-admins">
300+ {% for admin in team.admin_profiles.all %}
301+ {% ifequal team.owner admin.user.username %}
302+ <a href="{% url profile-detail admin.user.username %}">
303+ <img alt="" class="photo fn" src="{% if admin.mugshot %}{{ admin.mugshot }}{% else %}{{MEDIA_URL}}img/default-mugshot.png{% endif %}" class="mugshot">
304+ <p>{{ admin.realname }}</p>
305+ </a>
306+ {% else %}
307+ <a href="{% url profile-detail admin.user.username %}">
308+ <img alt="{{ admin.realname }}" src="{% if admin.mugshot %}{{ admin.mugshot }}{% else %}{{MEDIA_URL}}img/default-mugshot.png{% endif %}" class="mugshot" height="50" width="50">
309+ <p>{{ admin.realname }}</p>
310+ </a>
311+ {% endifequal %}
312+ {% endfor %}
313+ </div>
314+ <h3 class="title">{% trans "Team Contact(s)" %}</h3>
315+ <div class="team-admins">
316+ {% if team.contact_profiles.all %}
317+ {% for contact in team.contact_profiles.all %}
318+ <a href="{% url profile-detail contact.user.username %}">
319+ <img alt="{{ contact.realname }}" src="{% if contact.mugshot %}{{ contact.mugshot }}{% else %}{{MEDIA_URL}}img/default-mugshot.png{% endif %}" class="mugshot" height="50" width="50">
320+ <p>{{ contact.realname }}</p>
321+ </a>
322+ {% endfor %}
323+ {% else %}
324+ <p>{% trans "No LoCo Team contacts are set." %}</p>
325+ {% endif %}
326+ </div>
327+ </div>
328+ </section>
329 </div>
330 {% endblock %}

Subscribers

People subscribed via source and target branches