From 1c37e49ef311148ce99e675a3a1ca86d2fac8873 Mon Sep 17 00:00:00 2001 From: Ilias Trichopoulos Date: Thu, 5 Mar 2015 10:26:49 +0100 Subject: [PATCH] Chat: Use new layout for list of chat rooms --- chat/indico_chat/templates/event_page.html | 104 ++++++++++----------- chat/indico_chat/views.py | 6 ++ 2 files changed, 53 insertions(+), 57 deletions(-) diff --git a/chat/indico_chat/templates/event_page.html b/chat/indico_chat/templates/event_page.html index 9d22141..bdbc39e 100644 --- a/chat/indico_chat/templates/event_page.html +++ b/chat/indico_chat/templates/event_page.html @@ -1,65 +1,55 @@

{% trans %}Chat Rooms{% endtrans %}

- - - - - - - - {% if 'description' in cols -%} - - {% endif %} - {% if 'password' in cols -%} - - {% endif %} - {% if chat_links %} - - {% endif %} - - - - {% for event_chatroom in event_chatrooms %} - {% set chatroom = event_chatroom.chatroom %} - {% set server = chatroom.server %} - - - - - - {% if 'description' in cols -%} - - {% endif %} - {% if 'password' in cols %} - - {% endif %} - {% if chat_links %} - - {% endif %} - - {% endfor %} - -
{% trans %}Name{% endtrans %}{% trans %}JID{% endtrans %}{% trans %}Server{% endtrans %}{% trans %}Description{% endtrans %}{% trans %}Password{% endtrans %}{% trans %}Actions{% endtrans %}
{{ chatroom.name }}{{ chatroom.jid_node }}{{ server }}{{ chatroom.description }} - {% if chatroom.password %} +
+ {% for event_chatroom in event_chatrooms %} + {% set chatroom = event_chatroom.chatroom %} + {% set server = chatroom.server %} +
+
+
+ + {{ chatroom.name }} +
+
+ {% if chat_links %} +
+ {% trans %}Join{% endtrans %} + +
+ {% endif %} +
+
+
+
+ {% if chatroom.jid_node != chatroom.name.lower() %} +
JID:
+
{{ chatroom.jid_node }}
+ {% endif %} +
{% trans %}Server{% endtrans %}:
+
{{ chatroom.server }}
+ {% if chatroom.description %} +
{% trans %}Description{% endtrans %}:
+
{{ chatroom.description }}
+ {% endif %} + {% if chatroom.password %} +
{% trans %}Password{% endtrans %}:
+
{% if event_chatroom.show_password %} {{ chatroom.password }} {% else %} {% trans %}Hidden{% endtrans %} {% endif %} - {% else %} - {% trans %}None{% endtrans %} - {% endif %} -
- -
+ + {% endif %} + + + + + {% endfor %} + diff --git a/chat/indico_chat/views.py b/chat/indico_chat/views.py index 163d819..33cdddd 100644 --- a/chat/indico_chat/views.py +++ b/chat/indico_chat/views.py @@ -33,6 +33,12 @@ class WPChatEventPage(WPJinjaMixinPlugin, WPConferenceDefaultDisplayBase): WPConferenceDefaultDisplayBase._defineSectionMenu(self) self._sectionMenu.setCurrentItem(self._sectionMenu.getLinkByName('chat-event-page')) + def getCSSFiles(self): + return WPConferenceDefaultDisplayBase.getCSSFiles(self) + self._asset_env['eventservices_sass'].urls() + + def getJSFiles(self): + return WPConferenceDefaultDisplayBase.getJSFiles(self) + self._asset_env['modules_event_display_js'].urls() + class WPChatEventMgmt(WPJinjaMixinPlugin, WPConferenceModifBase): def _setActiveSideMenuItem(self):