Browse code

FEATBL-827 Feat: add an paperclip icon

Thomas Fricker authored on 03/09/2019 08:13:03
Showing 3 changed files
... ...
@@ -73,6 +73,9 @@
73 73
     {if $states.meeting}
74 74
       <span class="{css fa} {css fa-users}"></span>
75 75
     {/if}
76
+    {if $states.hasAttachments}
77
+      <span class="{css fa} {css fa-paperclip}"></span>    
78
+  	{/if}
76 79
     {if $states.updatable}
77 80
       <span class="{css ev-resizer} {css fa}">
78 81
         <span class="{css fa-circle}"></span>
... ...
@@ -131,6 +134,9 @@
131 134
   {if $states.meeting}
132 135
     <span class="{css fa} {css fa-users}"></span>    
133 136
   {/if}
137
+  {if $states.hasAttachments}
138
+    <span class="{css fa} {css fa-paperclip}"></span>    
139
+  {/if}
134 140
   {if length($tags) > 0}
135 141
     <div class="{css tag-mark}" title="
136 142
     {foreach $tag in $tags}
... ...
@@ -557,6 +563,9 @@
557 563
   {if $states.meeting}
558 564
     <span class="{css fa} {css fa-users}"></span>    
559 565
   {/if}
566
+  {if $states.hasAttachments}
567
+    <span class="{css fa} {css fa-paperclip}"></span>    
568
+  {/if}
560 569
   </div>
561 570
   <dl>
562 571
     <dt class="{css ev-header}" style="display:none;"></dt>
... ...
@@ -86,6 +86,9 @@
86 86
   {if $states.meeting}
87 87
     <span class="{css fa} {css fa-users}"></span>    
88 88
   {/if}
89
+  {if $states.hasAttachments}
90
+    <span class="{css fa} {css fa-paperclip}"></span>    
91
+  {/if}
89 92
   </div>
90 93
   <dl>
91 94
     <dt class="{css ev-header}" style="display:none;"></dt>
... ...
@@ -115,6 +115,8 @@ net.bluemind.calendar.vevent.VEventAdaptor.prototype.toModelView = function(veve
115 115
     return helper.create(exdate);
116 116
   }, this);
117 117
 
118
+  model.attachments = this.parseAttachments_(vevent);
119
+  
118 120
   model.states = {};
119 121
   model = this.updateStates(model, calendar);
120 122
 
... ...
@@ -123,8 +125,6 @@ net.bluemind.calendar.vevent.VEventAdaptor.prototype.toModelView = function(veve
123 125
     var MSG_PRIVATE = goog.getMsg('Private');
124 126
     model.summary = MSG_PRIVATE;
125 127
   }
126
-  
127
-  model.attachments = this.parseAttachments_(vevent);
128 128
 
129 129
   return model;
130 130
 };
... ...
@@ -203,6 +203,7 @@ net.bluemind.calendar.vevent.VEventAdaptor.prototype.updateStates = function(mod
203 203
   model.states.updatable = (calendar.states.writable) && (!model.states.private_ || (calendar.owner == this.ctx_.user['uid']) || this.canAll_(calendar.verbs)) ;
204 204
   model.states.attendee = goog.isDefAndNotNull(model.attendee) && model.states.meeting && !model.states.master
205 205
   model.states.removable = model.states.updatable && !!model.id;
206
+  model.states.hasAttachments = model.attachments.length > 0;
206 207
 
207 208
   return model;
208 209
 };