Browse Source

if not then the board list create board show button.

Yasar icli 10 years ago
parent
commit
2fb317d753

+ 4 - 3
client/components/boards/boardList.jade

@@ -6,7 +6,7 @@ template(name="boards")
   +boardList
 
 template(name="boardList")
-  if boards
+  if boards.count
     ul.board-list.clearfix
       each boards
         li(class="{{#if isStarred}}starred{{/if}}" class=colorClass)
@@ -17,5 +17,6 @@ template(name="boardList")
                 class="{{#if isStarred}}is-star-active{{/if}}"
                 title="{{_ 'star-board-title'}}")
   else
-    p.quiet {{_ 'no-boards'}}
-    button.js-add-board {{_ 'add-board'}}
+    ul.board-list.clearfix
+      li.js-add-board
+        a.label {{_ 'add-board'}}

+ 2 - 1
client/components/boards/boardList.js

@@ -25,10 +25,11 @@ BlazeComponent.extendComponent({
 
   events: function() {
     return [{
+      'click .js-add-board': Popup.open('createBoard'),
       'click .js-star-board': function(evt) {
         Meteor.user().toggleBoardStar(this._id);
         evt.preventDefault();
-      }
+      },
     }];
   }
 }).register('boardList');

+ 10 - 0
client/components/boards/boardList.styl

@@ -37,6 +37,16 @@
     font-weight: 400
     line-height: 22px
 
+  .js-add-board
+    text-align:center
+
+    .label
+      font-weight: normal
+      line-height:90px
+
+    :hover
+      background-color:#939393
+
   .fa-star-o
     bottom: 0
     font-size: 14px