summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/meetingtools/apps/cluster/models.py5
-rw-r--r--src/meetingtools/apps/room/views.py25
-rw-r--r--src/meetingtools/urls.py3
-rw-r--r--src/templates/apps/room/list.html7
4 files changed, 34 insertions, 6 deletions
diff --git a/src/meetingtools/apps/cluster/models.py b/src/meetingtools/apps/cluster/models.py
index 7dba80e..9921dd4 100644
--- a/src/meetingtools/apps/cluster/models.py
+++ b/src/meetingtools/apps/cluster/models.py
@@ -16,4 +16,7 @@ class ACCluster(models.Model):
domain_match = TextField()
def __unicode__(self):
- return self.url \ No newline at end of file
+ return self.url
+
+ def make_url(self,path=""):
+ return "%s%s" % (self.url,path) \ No newline at end of file
diff --git a/src/meetingtools/apps/room/views.py b/src/meetingtools/apps/room/views.py
index 97a487c..b0297cd 100644
--- a/src/meetingtools/apps/room/views.py
+++ b/src/meetingtools/apps/room/views.py
@@ -440,4 +440,27 @@ def tag(request,rid):
else:
form = TagRoomForm()
- return respond_to(request, {'text/html': "apps/room/tag.html"}, {'form': form,'formtitle': 'Add Tag','cancelname':'Done','submitname': 'Add Tag','room': room, 'tags': Tag.objects.get_for_object(room)}) \ No newline at end of file
+ return respond_to(request,
+ {'text/html': "apps/room/tag.html"},
+ {'form': form,'formtitle': 'Add Tag','cancelname':'Done','submitname': 'Add Tag','room': room, 'tags': Tag.objects.get_for_object(room)})
+
+
+from time import mktime
+from feedparser import _parse_date as parse_date
+
+@login_required
+def recordings(request,rid):
+ room = get_object_or_404(Room,pk=rid)
+ api = ac_api_client(request, room.acc)
+
+ r = api.request('sco-expanded-contents',{'sco-id': room.sco_id,'filter-icon':'archive'},True)
+ recordings = [{'name': sco.findtext('name'),
+ 'sco_id': sco.get('sco-id'),
+ 'url': room.acc.make_url(sco.findtext('url-path')),
+ 'description': sco.findtext('description'),
+ 'date_created': datetime.fromtimestamp(mktime(parse_date(sco.findtext('date-created')))),
+ 'date_modified': datetime.fromtimestamp(mktime(parse_date(sco.findtext('date-modified'))))} for sco in r.et.findall(".//sco")]
+
+ return respond_to(request,
+ {'text/html': 'apps/room/recordings.html'},
+ {'recordings': recordings,'room':room}) \ No newline at end of file
diff --git a/src/meetingtools/urls.py b/src/meetingtools/urls.py
index d927409..7df1ea0 100644
--- a/src/meetingtools/urls.py
+++ b/src/meetingtools/urls.py
@@ -18,7 +18,7 @@ urlpatterns = patterns('',
(r'^accounts/login?$','meetingtools.apps.auth.views.login'),
(r'^accounts/login-federated$','meetingtools.apps.auth.views.accounts_login_federated'),
(r'^accounts/logout$','meetingtools.apps.auth.views.logout'),
- (r'^rooms?$','meetingtools.apps.room.views.user_rooms'),
+ (r'^(?:room|rooms)$','meetingtools.apps.room.views.user_rooms'),
(r'^go/(\d+)$','meetingtools.apps.room.views.go_by_id'),
(r'^go/(.+)$','meetingtools.apps.room.views.go_by_path'),
(r'^launch/(\d+)$','meetingtools.apps.room.views.launch'),
@@ -29,6 +29,7 @@ urlpatterns = patterns('',
(r'^room/(\d+)/delete$','meetingtools.apps.room.views.delete'),
(r'^room/(\d+)/tag$','meetingtools.apps.room.views.tag'),
(r'^room/(\d+)/untag/(.+)$','meetingtools.apps.room.views.untag'),
+ (r'^room/(\d+)/recordings$','meetingtools.apps.room.views.recordings'),
(r'^widget/\+(.+)$','meetingtools.apps.room.views.widget'),
(r'^room/\+(.+)\.(?:json|html|htm)$','meetingtools.apps.room.views.list_by_tag'),
(r'^room/\+(.+)\.(?:atom)$',RoomAtomTagFeed()),
diff --git a/src/templates/apps/room/list.html b/src/templates/apps/room/list.html
index f529650..c47763d 100644
--- a/src/templates/apps/room/list.html
+++ b/src/templates/apps/room/list.html
@@ -7,7 +7,7 @@
$("#rooms").accordion({
header: 'h3',
active: false,
- event: "click",
+ event: "click",
collapsible: true,
navigation: true,
animated: true,
@@ -29,7 +29,7 @@
<h3 class="listheader">{{r.name}}</h3>
<div>
{% tags_for_object r as tags %}
- <p><a href="{{r|roomurl}}">{{r|roomurl}}<span style="vertical-align: bottom;" class="ui-icon ui-icon-extlink"></span></a></p>
+ <p><a target="_connect" href="{{r|roomurl}}">{{r|roomurl}}<span style="vertical-align: bottom;" class="ui-icon ui-icon-extlink"></span></a></p>
<p class="infopanel ui-widget ui-corner-all ui-state-highlight">{% if r.description %}{{r.description|safe}}{% else %}<em>No description available...</em>{% endif %}</p>
<ul class="nlist square" style="padding-left: 2px;">
<li>&raquo;&nbsp;Tags: {% for tag in tags %}<a style="margin-right: 5px;" class="ui-widget" href="{% prefix %}/room/+{{tag}}">{{tag}}</a>{% endfor %} {%if edit %}<a style="font-size: 75%;" href="{% prefix %}/room/{{r.id}}/tag"><em>... manage room tags</em></a>{%endif%}</li>
@@ -40,9 +40,10 @@
</ul>
<br/>
<ul class="ilist">
- <li class="button"><a href="{% prefix %}/go/{{r.id}}">Enter Room</a></li>
+ <li class="button"><a target="_connect" href="{% prefix %}/go/{{r.id}}">Enter Room</a></li>
{% if edit %}
<li class="button"><a href="{% prefix %}/room/{{r.id}}/tag">Room Tags</a></li>
+ <li class="button"><a href="{% prefix %}/room/{{r.id}}/recordings">Room Recordings</a></li>
<li class="button"><a href="{% prefix %}/room/{{r.id}}/modify">Modify Room</a></li>
<li class="button"><a href="{% prefix %}/room/{{r.id}}/delete">Delete Room</a></li>
{% endif %}