]> khamidou — GitHub mirrors - kite.git/commitdiff
added thread page
authorkarim hamidou <khamidou@gmail.com>
Wed, 16 Oct 2013 18:01:20 +0000 (20:01 +0200)
committerkarim hamidou <khamidou@gmail.com>
Wed, 16 Oct 2013 18:01:20 +0000 (20:01 +0200)
src/front/app/js/app.js
src/front/app/js/controllers.js
src/front/app/partials/thread.html [new file with mode: 0644]

index 339ad9a476e0b066b606ef3cc0591d979b3884a3..d65c5c9ca7644851cd55e730ac6ce99276bb0531 100644 (file)
@@ -6,5 +6,6 @@ angular.module('KiteMail', ['KiteMail.filters', 'KiteMail.services', 'KiteMail.d
   config(['$routeProvider', function($routeProvider) {
     $routeProvider.when('/mail', {templateUrl: 'partials/mailbox.html', controller: 'InboxesListController'});
     $routeProvider.when('/login', {templateUrl: 'partials/login.html', controller: 'LoginController'});
+    $routeProvider.when('/thread', {templateUrl: 'partials/thread.html', controller: 'ThreadController'});
     $routeProvider.otherwise({redirectTo: '/login'});
   }]);
index 55f2ef47afcd972ab3d360fc0b4d6a676fccd519..2d82c7b07c417865c09fe0495644a7b029ada424 100644 (file)
@@ -34,4 +34,21 @@ angular.module('KiteMail.controllers', []).
 }]).controller('LoginController', function($scope) {
     
     
+}).controller('ThreadController', function($scope) {
+    $scope.thread = [
+        {"subject": "Hi",
+         "contents": "We haven't spoke in a long time !",
+         "name": "Michel De Test",
+         "from": "michel@example.com",
+         "to": "gerard@example.com",
+         "date": new Date(1992, 4, 24),
+        },
+        {"subject": "Hi",
+         "contents": "We haven't spoke in a long time !",
+         "from": "michel@example.com",
+         "to": "gerard@example.com",
+         "name": "Gerard Le Test",
+         "date": new Date(),
+        }
+    ]
 });
diff --git a/src/front/app/partials/thread.html b/src/front/app/partials/thread.html
new file mode 100644 (file)
index 0000000..b44d425
--- /dev/null
@@ -0,0 +1,23 @@
+<div base-layout>
+    <div class="row-fluid buttonsRow">
+        <div class="span4">
+            <button class="btn">Select</button>
+            <button class="btn">Reload</button>
+            <button class="btn">More</button>
+        </div>
+    </div>
+    <div class="row-fluid">
+            <div ng-repeat="mail in thread | orderBy:'date'">
+                    <!-- FIXME: make a directive of this -->
+                    <span ng-show="mail.name">
+                        {{mail.name}} ({{mail.from}})
+                    </span>
+                    <span ng-hide="mail.name">
+                        {{ mail.from }}
+                    </span>
+                    <div>{{mail.subject}}</div>
+                    <div>{{mail.date|formatDate}}</div>
+            </div>
+        </table>
+    </div> <!-- row-fluid -->
+</div>