From f2170da73142c4f4698177c1b7866fb18477bff9 Mon Sep 17 00:00:00 2001 From: Leif Johansson Date: Tue, 10 May 2011 23:23:20 +0200 Subject: style polish --- src/meetingtools/apps/room/models.py | 6 ++++++ src/meetingtools/apps/room/views.py | 6 ++---- src/site-media/css/style.css | 9 +++++---- src/templates/apps/room/list.html | 26 +++++++++++++++++++++----- src/templates/apps/room/tag.html | 13 ++++++++++++- src/templates/edit.html | 4 +++- 6 files changed, 49 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/meetingtools/apps/room/models.py b/src/meetingtools/apps/room/models.py index a71e608..00f54b4 100644 --- a/src/meetingtools/apps/room/models.py +++ b/src/meetingtools/apps/room/models.py @@ -40,4 +40,10 @@ class Room(models.Model): else: return int(time.mktime(self.lastvisited.timetuple())*1000) + def nusers(self): + if not self.user_count: + return "unknown" + else: + return self.user_count + tagging.register(Room) \ No newline at end of file diff --git a/src/meetingtools/apps/room/views.py b/src/meetingtools/apps/room/views.py index 201509e..c77f81d 100644 --- a/src/meetingtools/apps/room/views.py +++ b/src/meetingtools/apps/room/views.py @@ -330,13 +330,11 @@ def go_by_path(request,path): def goto(request,room): api = ac_api_client(request, room.acc) session_info = api.request('report-meeting-sessions',{'sco-id':room.sco_id}) - now = time.time() + room.user_count = _nusers(session_info) if room.self_cleaning: - nusers = _nusers(session_info) - if (nusers == 0) and (abs(room.lastvisit() - now) > GRACE): + if (room.user_count == 0) and (abs(room.lastvisit() - now) > GRACE): room = _clean(request,room) - room.user_count = nusers room.lastvisited = datetime.now() room.save() diff --git a/src/site-media/css/style.css b/src/site-media/css/style.css index e241b06..87e6bec 100644 --- a/src/site-media/css/style.css +++ b/src/site-media/css/style.css @@ -10,8 +10,8 @@ div#footer ul { list-style: none; padding: 0; margin: 0; } div#footer li { display: inline; } div#footer li li { display: block; } div#footer ul ul { float: left; padding-right: 50px; } -div#header { margin: 0; padding: 0; padding-bottom: 30px; } -div#header img { width: 100%; border: 0;} +div#header { margin: 0; padding: 0; padding-bottom: 30px; } +div#header img { width: 100%; border: 0; margin-top: 5px;} #headline { position: absolute; top: 20px; left: 150px; z-index: 1; } div#headline a { text-decoration: none; } h3.listheader { padding-left: 20px; } @@ -25,7 +25,9 @@ h3.listheader { padding-left: 20px; } .rlist ul { list-style: none inside; padding: inherit; } .rlist li { float: right; display: inline; padding: inherit; } .clist ul { list-style: none; } -.clist li { display: block; } +.clist li { display: list-item; } +.nlist ul { list-style: none; } +.nlist li { display: list-item; list-style: none inside none; } .description { clear: both; margin-top: 10px; padding-top: 15px; } p.info { font-size: 120%; margin-top: 10px; padding-top: 15px; } div.toolbar{ padding: 4px; float: right; margin-right: 30px; margin-bottom: 20px; margin-top: 50px; } @@ -60,7 +62,6 @@ form .ui-widget li { float: right; border-right: 1px solid #CECECE; padding-righ .fieldinput li { padding: 0; margin: 0; display: inline; float: left; } div .fieldinput { margin-top: 10px; } a, a:hover, a:visited { - text-decoration: none; color: #E37424; } h1, h1 a { diff --git a/src/templates/apps/room/list.html b/src/templates/apps/room/list.html index fb47ca1..6423296 100644 --- a/src/templates/apps/room/list.html +++ b/src/templates/apps/room/list.html @@ -3,6 +3,7 @@ {% load datehumanize %} {% load roomurl %} {% load prefix %} +{% load tagging_tags %} {% block widgets %} $("#rooms").accordion({ header: 'h3', @@ -22,11 +23,26 @@

{{r.name}}

-
    -
  • Created by {{r.creator}} {{r.timecreated|datehumanize}}.
  • - {% if r.lastvisited %}
  • Last visited {{r.lastvisited|datehumanize}}{% if r.user_count %}when there was {{r.user_count}} user{{r.user_count|pluralize}} in the room{%endif%}.
  • {%endif%} -
  • Meeting room URL: {{r|roomurl}}
  • -
+
    +
  • +
      + {% if r.self_cleaning %}
    • Room will be reset when empty.
    • {% endif %} +
    • Created by {{r.creator}} {{r.timecreated|datehumanize}}.
    • + {% if r.lastvisited %}
    • Last visited {{r.lastvisited|datehumanize}} when there was {{r.nusers}} user{{r.nusers|pluralize}} in the room.
    • {%endif%} +
    • Meeting room URL: {{r|roomurl}}
    • +
    +
  • + {% tags_for_object r as tags %} +
  • + +
  • +
+
{% if r.description %}

{{r.description|safe}}

diff --git a/src/templates/apps/room/tag.html b/src/templates/apps/room/tag.html index d8c666e..6bf01a0 100644 --- a/src/templates/apps/room/tag.html +++ b/src/templates/apps/room/tag.html @@ -6,8 +6,19 @@ {% block widgets %} {% endblock %} +{% block beforefields %} +
+
+

+ Note WellTags are a way to group related rooms together. Tagging your + room makes your room show up in public lists of rooms hosted on this service and it + therefore makes your room more visible.

+
+
+
+{% endblock %} {% block beforeform %} -

Tags for {{room.name}}

+

Current tags for {{room.name}}

{% if tags %}
    {% for tag in tags %} diff --git a/src/templates/edit.html b/src/templates/edit.html index 400a087..a5986bb 100644 --- a/src/templates/edit.html +++ b/src/templates/edit.html @@ -3,7 +3,8 @@ {% block content %} {% block beforeform %}{% endblock %}

    {{formtitle}}

    -
    + +{% block beforefields %}{% endblock %}
    • +
    -- cgit v1.1