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
=== modified file 'loco_directory/teams/views.py'
--- loco_directory/teams/views.py 2013-02-09 16:26:04 +0000
+++ loco_directory/teams/views.py 2013-02-10 15:12:21 +0000
@@ -148,11 +148,11 @@
148 """148 """
149 list with all team meetings in past for the given team149 list with all team meetings in past for the given team
150 """150 """
151 team_object = get_object_or_404(Team, lp_name=team_slug)151 team = get_object_or_404(Team, lp_name=team_slug)
152 team_meeting_list = team_object.teammeeting_set.history_meetings()152 team_meetings = team.teammeeting_set.history_meetings()
153 context = {153 context = {
154 'team_object': team_object,154 'team': team,
155 'team_meeting_list': team_meeting_list,155 'team_meetings': team_meetings,
156 }156 }
157 return render_to_response('teams/team_meeting_history.html', context,157 return render_to_response('teams/team_meeting_history.html', context,
158 RequestContext(request))158 RequestContext(request))
159159
=== modified file 'loco_directory/templates/teams/team_detail.html'
--- loco_directory/templates/teams/team_detail.html 2012-12-18 22:25:30 +0000
+++ loco_directory/templates/teams/team_detail.html 2013-02-10 15:12:21 +0000
@@ -154,10 +154,10 @@
154 </div>154 </div>
155155
156 <div id="loco-support">156 <div id="loco-support">
157 <span title="{% trans "Reapproval Date:" %}" class="pictogram calendar"></span>157 <span title="{% trans "Reapproval Date" %}" class="pictogram calendar"></span>
158 <span class="value ellipsis medium-ellipsis">158 <span class="value ellipsis medium-ellipsis">
159 {% if team.approved %}159 {% if team.approved %}
160 {% trans "Reapproval Date:" %} {{ team.expires_date }}160 {{ team.expires_date }}
161 {% endif %}161 {% endif %}
162 </span>162 </span>
163 </div>163 </div>
@@ -179,6 +179,9 @@
179 <a href="{% url team-event-history team.lp_name %}" title="{% trans "Past Events" %}">{% trans "Past Events" %}</a>179 <a href="{% url team-event-history team.lp_name %}" title="{% trans "Past Events" %}">{% trans "Past Events" %}</a>
180 </span>180 </span>
181 <span>181 <span>
182 <a href="{% url team-meeting-history team.lp_name %}" title="{% trans "Past Meetings" %}">{% trans "Past Meetings" %}</a>
183 </span>
184 <span>
182 <a class="pictogram rss action" href="/feeds/teams/{{ team.lp_name }}/" title="{% trans "RSS Feed" %}"></a>185 <a class="pictogram rss action" href="/feeds/teams/{{ team.lp_name }}/" title="{% trans "RSS Feed" %}"></a>
183 </span>186 </span>
184 <span>187 <span>
@@ -196,7 +199,7 @@
196 {% endfor %}199 {% endfor %}
197 {% else %}200 {% else %}
198 <div class="no-results">201 <div class="no-results">
199 {% trans "There are currently no upcoming events :(" %}202 {% trans "There are currently no upcoming events or meetings :(" %}
200 </div>203 </div>
201 {% endif %}204 {% endif %}
202 </div>205 </div>
203206
=== modified file 'loco_directory/templates/teams/team_event_history.html'
--- loco_directory/templates/teams/team_event_history.html 2013-02-09 17:15:00 +0000
+++ loco_directory/templates/teams/team_event_history.html 2013-02-10 15:12:21 +0000
@@ -109,10 +109,10 @@
109 </div>109 </div>
110110
111 <div id="loco-support">111 <div id="loco-support">
112 <span title="{% trans "Reapproval Date:" %}" class="pictogram calendar"></span>112 <span title="{% trans "Reapproval Date" %}" class="pictogram calendar"></span>
113 <span class="value ellipsis medium-ellipsis">113 <span class="value ellipsis medium-ellipsis">
114 {% if team.approved %}114 {% if team.approved %}
115 {% trans "Reapproval Date:" %} {{ team.expires_date }}115 {{ team.expires_date }}
116 {% endif %}116 {% endif %}
117 </span>117 </span>
118 </div>118 </div>
@@ -134,6 +134,9 @@
134 <a href="{% url team-event-history team.lp_name %}" title="{% trans "Past Events" %}">{% trans "Past Events" %}</a>134 <a href="{% url team-event-history team.lp_name %}" title="{% trans "Past Events" %}">{% trans "Past Events" %}</a>
135 </span>135 </span>
136 <span>136 <span>
137 <a href="{% url team-meeting-history team.lp_name %}" title="{% trans "Past Meetings" %}">{% trans "Past Meetings" %}</a>
138 </span>
139 <span>
137 <a class="pictogram rss action" href="/feeds/teams/{{ team.lp_name }}/" title="{% trans "RSS Feed" %}"></a>140 <a class="pictogram rss action" href="/feeds/teams/{{ team.lp_name }}/" title="{% trans "RSS Feed" %}"></a>
138 </span>141 </span>
139 <span>142 <span>
@@ -172,7 +175,7 @@
172 {% endfor %}175 {% endfor %}
173 {% else %}176 {% else %}
174 <div class="no-results">177 <div class="no-results">
175 {% trans "There team has no events yet :(" %}178 {% trans "This team has no events yet :(" %}
176 </div>179 </div>
177 {% endif %}180 {% endif %}
178 </div>181 </div>
179182
=== modified file 'loco_directory/templates/teams/team_meeting_history.html'
--- loco_directory/templates/teams/team_meeting_history.html 2012-06-02 11:50:27 +0000
+++ loco_directory/templates/teams/team_meeting_history.html 2013-02-10 15:12:21 +0000
@@ -1,27 +1,217 @@
1{% extends "base.html" %}1{% extends "base.html" %}
2{% load i18n %}2{% load i18n teams_tags %}
33
4{% block page_name %}{% blocktrans with team_object.name as teamname %}{{teamname}} Meeting History{% endblocktrans %}{% endblock %}4{% block page_name %}{% blocktrans with team_object.name as teamname %}{{teamname}} Meetings History{% endblocktrans %}{% endblock %}
55
6{% block sub_nav_links %}6{% block sub_nav_links %}
7<li><a class="sub-nav-item" href="{% url team-detail team_object.lp_name %}">{% trans "Back to Team Details" %}</a></li>7 <li><a class="sub-nav-item" href="{% url team-list %}" title="{% trans "Back to Teams List" %}">{% trans "Back to Teams List" %}</a></li>
8<li><a class="sub-nav-item" href="{% url team-meeting-list team_object.lp_name %}">{% trans "Upcoming Meetings" %}</a></li>8 {% 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 %}
9 {% 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 %}
10 {% 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 %}
11 {% 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 %}
12 {% 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 %}
13{% endblock %}
14
15{% block extrahead %}{{ block.super }}
16<link type="application/rss+xml" rel="alternate" title="{% trans "Team (RSS)" %}" href="/feeds/teams/{{ team.lp_name }}" />
9{% endblock %}17{% endblock %}
1018
11{% block content %}19{% block content %}
12<div class="row">20<div class="row">
13<section class="span-12">21 <section class="span-9">
14<h1>{% blocktrans with team_object.name as teamname %}{{teamname}} Meeting History{% endblocktrans %}</h1>22 <div class="box_content">
1523 <div class="pagelet">
16{% if team_meeting_list %}24 <div id="locobranding">
17<p>{% trans "Select a team meeting below to see more information about it:" %}</p>25 <img src="{{ team.mugshot_url }}" alt="{{ team.name }}" title="{{ team.name }}" />
1826 </div>
19{% include "meetings/team_meeting_list.inc.html" %}27 <div id="loco-name">
2028 <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>
21{% else %}29 <div style="display:block;">
22<p>{% blocktrans with team_object.lp_name as teamname %}There are no past meetings for {{teamname}} :({% endblocktrans %}</p>30 <div id="loco-location">
23{% endif %}31 <span title="{% trans "Location" %}" class="pictogram place"></span>
2432 <span class="value ellipsis small-ellipsis">
25</section>33 {% if team.countries.all %}
34 {% for country in team.countries.all %}
35 {% if not forloop.first %}, {% endif %}{{ country.name }}
36 {% endfor %}
37 {% if team.spr %}, {% trans team.spr %}{% endif %}{% if team.city %}, {% trans team.city %}
38 {% endif %}
39 {% else %}
40 {% trans "None Specified" %}
41 {% endif %}
42 </span>
43 </div>
44
45 <div id="loco-language">
46 <span title="{% trans "Languages" %}" class="pictogram language"></span>
47 <span class="value ellipsis">
48 {% if team.languages.all %}
49 {% for language in team.languages.all %}
50 {% if not forloop.first %}, {% endif %}{{ language.name }}
51 {% endfor %}
52 {% else %}
53 {% trans "None Specified" %}
54 {% endif %}
55 </span>
56 </div>
57
58 <div id="loco-support">
59 <span title="{% trans "Local Support" %}" class="pictogram support"></span>
60 <span class="value ellipsis medium-ellipsis">
61 {% if team.provides_support %}
62 {% trans "This LoCo provides support :)" %}
63 {% else %}
64 {% trans "This LoCo doesn't provide support :(" %}
65 {% endif %}
66 </span>
67 </div>
68 </div>
69
70 <div style="display:block;">
71 <div id="loco-location">
72 <span title="{% trans "Resources" %}" class="pictogram ml"></span>
73 <span class="value ellipsis small-ellipsis">
74 {% if team.web_url %}
75 <a href="{{ team.web_url }}" title="{% trans "Website" %}" target="_blank">
76 {% trans "Website" %}
77 </a>
78 {% endif %}
79 {% if team.web_url and team.wiki_url %} / {% endif %}
80 {% if team.wiki_url %}
81 <a href="{{ team.wiki_url }}" title="{% trans "Wiki" %}" target="_blank">
82 {% trans "Wiki" %}
83 </a>
84 {% endif %}
85 </span>
86 </div>
87
88
89 <div id="loco-support">
90 <span class="pictogram forums" title="{% trans "Support" %}"></span>
91 <span class="value ellipsis">
92 {% if team.ml_url %}
93 <a href="{{ team.ml_url }}" title="{% trans "Mailing List" %}" target="_blank">
94 {% trans "Mailing List" %}
95 </a>
96 {% endif %} /
97 {% if team.forum_url %}
98 <a href="{{ team.forum_url }}" title="{% trans "Forums" %}" target="_blank">
99 {% trans "Forums" %}
100 </a>
101 {% endif %} /
102 {% if team.irc_chan %}
103 <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">
104 {% trans "IRC" %}
105 </a>
106 {% endif %}
107 </span>
108 </div>
109
110 <div id="loco-support">
111 <span title="{% trans "Reapproval Date" %}" class="pictogram calendar"></span>
112 <span class="value ellipsis medium-ellipsis">
113 {% if team.approved %}
114 {{ team.expires_date }}
115 {% endif %}
116 </span>
117 </div>
118
119 </div>
120 </div>
121 </div>
122 <div class="events-meetings-wrapper">
123 <div style="overflow: auto; margin-bottom: 10px;border-bottom: 1px solid #E6E6E6;">
124 <h3 class="title">{% trans "Past Meetings" %}</h3>
125 <div class="team-actions">
126 <span>
127 <a href="{% url team-event-list team.lp_name %}" title="{% trans "All Events" %}">{% trans "All Events" %}</a>
128 </span>
129 <span>
130 <a href="{% url team-meeting-list team.lp_name %}" title="{% trans "All Meetings" %}">{% trans "All Meetings" %}</a>
131 </span>
132 <span>
133 <a href="{% url team-event-history team.lp_name %}" title="{% trans "Past Events" %}">{% trans "Past Events" %}</a>
134 </span>
135 <span>
136 <a href="{% url team-meeting-history team.lp_name %}" title="{% trans "Past Meetings" %}">{% trans "Past Meetings" %}</a>
137 </span>
138 <span>
139 <a class="pictogram rss action" href="/feeds/teams/{{ team.lp_name }}/" title="{% trans "RSS Feed" %}"></a>
140 </span>
141 <span>
142 <a class="pictogram ical action" href="{% url team-calendar team.lp_name %}" title="{% trans "iCal Feed" %}"></a>
143 </span>
144 </div>
145 </div>
146 {% if team_meetings %}
147 {% regroup team_meetings by date_begin|date:"Y" as meetings %}
148 {% for year in meetings %}
149 <a name="y{{ year.grouper }}"></a>
150 <div style="font-size: 12px;float: right; padding-top: 10px;padding-right: 15px;">
151 <span style="margin-left: 10px; text-transform: uppercase;">{% trans "Browse by year" %} </span>
152 {% for y in meetings %}
153 <span style="margin-left: 10px;">
154 {% if y == year %}
155 {{ y.grouper }}
156 {% else %}
157 <a href="#y{{ y.grouper }}" title="{{ y.grouper }}">{{ y.grouper }}</a>
158 {% endif %}
159 </span>
160 {% endfor %}
161 </div>
162 <h3 style="padding-left: 15px;">{{ year.grouper }}
163 {% with meetings_count=year.list|length %}
164 ({% blocktrans with meetings_count as meetings_count %}{{ meetings_count }} meetings{% endblocktrans %})
165 {% endwith %}
166 </h3>
167 {% for event in year.list %}
168 <a href="{{ event.get_absolute_url }}" title="{% if event.venue %}{% else %}{{event.date_begin|date:"M d"}}{% endif %}" class="event-meetings">
169 <span class="title">{{ event.name }}</span>
170 <small>{{ event.local_date_begin|date:"l, d N Y" }} {% trans "at " %}{{ event.local_date_begin|date:"H:i T" }}</small>
171 <p>{{ event.description|truncatewords:50 }}</p>
172 </a>
173 {% endfor %}
174 {% endfor %}
175 {% else %}
176 <div class="no-results">
177 {% trans "This team has no meetings yet :(" %}
178 </div>
179 {% endif %}
180 </div>
181 </div>
182 </section>
183 <section class="span-3 box_content last">
184 <div class="sidebar-inner">
185 <h3 class="title">{% trans "Team Admin(s)" %}</h3>
186 <div class="team-admins">
187 {% for admin in team.admin_profiles.all %}
188 {% ifequal team.owner admin.user.username %}
189 <a href="{% url profile-detail admin.user.username %}">
190 <img alt="" class="photo fn" src="{% if admin.mugshot %}{{ admin.mugshot }}{% else %}{{MEDIA_URL}}img/default-mugshot.png{% endif %}" class="mugshot">
191 <p>{{ admin.realname }}</p>
192 </a>
193 {% else %}
194 <a href="{% url profile-detail admin.user.username %}">
195 <img alt="{{ admin.realname }}" src="{% if admin.mugshot %}{{ admin.mugshot }}{% else %}{{MEDIA_URL}}img/default-mugshot.png{% endif %}" class="mugshot" height="50" width="50">
196 <p>{{ admin.realname }}</p>
197 </a>
198 {% endifequal %}
199 {% endfor %}
200 </div>
201 <h3 class="title">{% trans "Team Contact(s)" %}</h3>
202 <div class="team-admins">
203 {% if team.contact_profiles.all %}
204 {% for contact in team.contact_profiles.all %}
205 <a href="{% url profile-detail contact.user.username %}">
206 <img alt="{{ contact.realname }}" src="{% if contact.mugshot %}{{ contact.mugshot }}{% else %}{{MEDIA_URL}}img/default-mugshot.png{% endif %}" class="mugshot" height="50" width="50">
207 <p>{{ contact.realname }}</p>
208 </a>
209 {% endfor %}
210 {% else %}
211 <p>{% trans "No LoCo Team contacts are set." %}</p>
212 {% endif %}
213 </div>
214 </div>
215 </section>
26</div>216</div>
27{% endblock %}217{% endblock %}

Subscribers

People subscribed via source and target branches