Commit bbfe6cb7bc0eb1fce7570884f1b5163e4c1c299c
1 parent
b3ae5cd5
updates
Showing
1 changed file
with
25 additions
and
1 deletions
controllets/cocreation-paper-card-controllet/cocreation-paper-card-controllet.html
1 | 1 | <link rel="import" href="../../bower_components/polymer/polymer.html"/> |
2 | 2 | <link rel="import" href="../../bower_components/paper-card/paper-card.html"/> |
3 | +<link rel="import" href="../../bower_components/paper-fab/paper-fab.html"> | |
3 | 4 | <link rel="import" href="../../bower_components/paper-icon-button/paper-icon-button.html"/> |
4 | 5 | <link rel="import" href="../../bower_components/paper-button/paper-button.html"/> |
5 | 6 | <link rel="import" href="../../bower_components/iron-icon/iron-icon.html"/> |
... | ... | @@ -67,6 +68,13 @@ |
67 | 68 | min-width: 310px; |
68 | 69 | min-height: 188px; |
69 | 70 | } |
71 | + .badge{ | |
72 | + position: absolute; | |
73 | + right: 5px; | |
74 | + bottom: 5px; | |
75 | + background: #2196F3; | |
76 | + } | |
77 | + | |
70 | 78 | </style> |
71 | 79 | |
72 | 80 | |
... | ... | @@ -80,6 +88,12 @@ |
80 | 88 | <span class="from">{{from}}</span> |
81 | 89 | <iron-icon class="icon-to" icon="alarm-off"></iron-icon> |
82 | 90 | <span class="to">{{to}}</span> |
91 | + <template is="dom-if" if="{{!checkRoomType(roomType)}}"> | |
92 | + <paper-fab mini icon="assessment" class="badge data"></paper-fab> | |
93 | + </template> | |
94 | + <template is="dom-if" if="{{checkRoomType(roomType)}}"> | |
95 | + <paper-fab mini icon="description" class="badge knowledge"></paper-fab> | |
96 | + </template> | |
83 | 97 | </div> |
84 | 98 | </div> |
85 | 99 | <div class="card-actions"> |
... | ... | @@ -127,6 +141,10 @@ |
127 | 141 | roomUrl: { |
128 | 142 | type: String, |
129 | 143 | value: undefined |
144 | + }, | |
145 | + roomType:{ | |
146 | + type: String, | |
147 | + value: undefined | |
130 | 148 | } |
131 | 149 | }, |
132 | 150 | |
... | ... | @@ -142,8 +160,14 @@ |
142 | 160 | |
143 | 161 | _onExplore: function(e){ |
144 | 162 | window.location = this.roomUrl; |
145 | - } | |
163 | + }, | |
146 | 164 | |
165 | + checkRoomType: function(type){ | |
166 | + if(type == "knowledge") | |
167 | + return true; | |
168 | + else | |
169 | + return false; | |
170 | + } | |
147 | 171 | }) |
148 | 172 | </script> |
149 | 173 | ... | ... |