Merge lp:~summit-hackers/summit/private-rooms into lp:summit

Proposed by Chris Johnston
Status: Merged
Approved by: Michael Hall
Approved revision: 152
Merge reported by: Michael Hall
Merged at revision: not available
Proposed branch: lp:~summit-hackers/summit/private-rooms
Merge into: lp:summit
Diff against target: 72 lines (+28/-1)
4 files modified
summit/schedule/models/summitmodel.py (+6/-0)
summit/schedule/render.py (+4/-0)
summit/schedule/templates/schedule/schedule.html (+4/-1)
summit/schedule/templates/schedule/schedule_list.html (+14/-0)
To merge this branch: bzr merge lp:~summit-hackers/summit/private-rooms
Reviewer Review Type Date Requested Status
Summit Hackers Pending
Review via email: mp+73856@code.launchpad.net

Commit message

Adds Private Rooms to the views pages for schedulers and allows them to schedule meetings in those rooms.

Description of the change

Adds Private Rooms to the views pages for schedulers and allows them to schedule meetings in those rooms.

To post a comment you must log in.
151. By Chris Johnston

Adds private rooms to edit page

152. By Chris Johnston

Adds ability for schedulers to schedule private rooms.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'summit/schedule/models/summitmodel.py'
2--- summit/schedule/models/summitmodel.py 2011-07-19 01:30:45 +0000
3+++ summit/schedule/models/summitmodel.py 2011-09-02 17:52:09 +0000
4@@ -159,6 +159,12 @@
5 rooms = self.room_set.filter(type__exact='open')
6 return sorted(rooms, cmp=by_title)
7
8+ def private_rooms(self):
9+ """List fo private rooms for this summit."""
10+
11+ rooms = self.room_set.filter(type__exact='private')
12+ return sorted(rooms)
13+
14 def update_from_launchpad(self):
15 """Update from Launchpad data."""
16 url = ("https://launchpad.net/sprints/%s/+temp-meeting-export"
17
18=== modified file 'summit/schedule/render.py'
19--- summit/schedule/render.py 2011-07-22 01:34:00 +0000
20+++ summit/schedule/render.py 2011-09-02 17:52:09 +0000
21@@ -87,6 +87,10 @@
22 self.room = None
23 self.rooms = self.summit.open_rooms()
24
25+ if self.request.user.is_authenticated():
26+ if self.request.user.is_staff:
27+ self.rooms = self.rooms + self.summit.private_rooms()
28+
29 if track is not None:
30 self.track = track
31 else:
32
33=== modified file 'summit/schedule/templates/schedule/schedule.html'
34--- summit/schedule/templates/schedule/schedule.html 2011-07-20 18:21:35 +0000
35+++ summit/schedule/templates/schedule/schedule.html 2011-09-02 17:52:09 +0000
36@@ -121,7 +121,10 @@
37 </div>
38 {% endif %}
39 {% if schedule.room %}
40- <h1 class="schedule-head">{{ schedule.room.title }}</h1>
41+ <h1 class="schedule-head">{{ schedule.room.title }}
42+ {% ifequal schedule.room.type 'private' %}
43+ - Private
44+ {% endifequal %}</h1>
45 <h2>
46 {% if schedule.room.track %}
47 {{ schedule.room.track.title }}
48
49=== modified file 'summit/schedule/templates/schedule/schedule_list.html'
50--- summit/schedule/templates/schedule/schedule_list.html 2011-04-20 19:27:44 +0000
51+++ summit/schedule/templates/schedule/schedule_list.html 2011-09-02 17:52:09 +0000
52@@ -37,6 +37,20 @@
53 {% endif %}
54 {% endif %}
55 {% endfor %}
56+ {% if user.is_authenticated %}
57+ {% if user.is_staff %}
58+ <br />
59+ Private:
60+ {% for room in summit.private_rooms %}
61+ {% if edit %}
62+ <li><a href="/{{ summit.name }}/{{ room.name }}">{{ room.title }}</a> ({{ room.size }})</li>
63+ {% else %}
64+ <li><a href="/{{ summit.name }}/{{ room.name }}">{{ room.title }}</a></li>
65+ {% endif %}
66+ {% endfor %}
67+ {% endif %}
68+ {% endif %}
69+
70 </ul>
71 </td>
72 </tr>

Subscribers

People subscribed via source and target branches