summary refs log tree commit diff
path: root/webclient/home/home.html
diff options
context:
space:
mode:
authorEmmanuel ROHEE <erohee@amdocs.com>2014-08-27 15:09:16 +0200
committerEmmanuel ROHEE <erohee@amdocs.com>2014-08-27 15:55:51 +0200
commit308c9273fadefd072f157620225515eb7395633d (patch)
treebeced39a06cbe836b028ccc73f211aa636d49a22 /webclient/home/home.html
parentMoved assignRoomAliases into a central piece: matrixService for now (diff)
downloadsynapse-308c9273fadefd072f157620225515eb7395633d.tar.xz
Moved recents things into a separate (and reusable) controler
Diffstat (limited to 'webclient/home/home.html')
-rw-r--r--webclient/home/home.html54
1 files changed, 1 insertions, 53 deletions
diff --git a/webclient/home/home.html b/webclient/home/home.html
index 49eb56a602..d38b843d83 100644
--- a/webclient/home/home.html
+++ b/webclient/home/home.html
@@ -24,59 +24,7 @@
     </div>
     
     <h3>Recents</h3>
-
-    <div class="recentsTableWrapper">
-    <table class="recentsTable">
-        <tbody ng-repeat="(rm_id, room) in rooms" ng-click="goToPage('room/' + (room.room_alias ? room.room_alias : rm_id) )" class ="recentsRoom" >
-            <tr>
-                <td class="recentsRoomName">
-                    {{ room.room_display_name }}
-                </td>
-                <td class="recentsRoomSummaryTS">
-                    {{ (room.lastMsg.ts) | date:'MMM d HH:mm' }}
-                </td>
-            </tr>
-
-            <tr>
-                <td colspan="2" class="recentsRoomSummary">
-
-                    <div ng-show="room.membership === 'invite'" >
-                        {{ room.inviter }} invited you
-                    </div>
-
-                    <div ng-hide="room.membership === 'invite'" ng-switch="room.lastMsg.type" >
-                         <div ng-switch-when="m.room.member">
-                            {{ room.lastMsg.user_id }}
-                            {{ {"join": "joined", "leave": "left", "invite": "invited"}[room.lastMsg.content.membership] }}
-                            {{ room.lastMsg.content.membership === "invite" ? (room.lastMsg.state_key || '') : '' }}
-                        </div>
-
-                        <div ng-switch-when="m.room.message">
-                            <div ng-switch="room.lastMsg.content.msgtype">
-                                <div ng-switch-when="m.text">
-                                    {{ room.lastMsg.user_id }} :
-                                    <span ng-bind-html="(room.lastMsg.content.body) | linky:'_blank'">
-                                    </span>
-                                </div>
-
-                                <div ng-switch-when="m.image">
-                                    {{ room.lastMsg.user_id }} sent an image
-                                </div>
-
-                                <div ng-switch-default>
-                                    {{ room.lastMsg.content }}
-                                </div>
-                            </div>
-                        </div>
-
-                        <div ng-switch-default>
-                            {{ room.lastMsg }}
-                        </div>
-                    </div>
-                </td>
-            </tr>
-        </tbody>
-    </table>
+        <div ng-include="'recents/recents.html'"></div>
     <br/>
 
     <h3>Public rooms</h3>