1 <div ms-timeline="vm.timelineOptions" ms-timeline-load-more="vm.loadNextPage()">
3 ng-repeat="message in vm.messages.rows track by message.id"
4 ng-init="vm.selectedMailShowSystemMessage[message.id] = false"
8 class="md-padding md-yellow-100-bg"
11 <div layout="row" layout-align="start center">
12 <img class="avatar" ng-src="api/users/{{message.UserId}}/avatar" />
15 >{{vm.agent.fullname || vm.usersMap[message.UserId]}}</span
17 <span class="grey-fg">{{message.createdAt | date:'medium'}}</span>
22 layout-align="center center"
24 ng-if="message.attach"
27 <md-divider></md-divider>
31 aria-label="attachments"
32 class="md-icon-button"
33 ng-click="vm.getAttachments(message); $mdMenu.open($event);"
35 <md-tooltip md-direction="bottom"
36 ><span translate="MAIL.ATTACHMENTS">Attachments</span>
38 <div layout="row" layout-align="start center">
39 <md-icon md-font-icon="icon-paperclip" class="icon s24"></md-icon>
40 <span>{{message.attach}}</span>
43 <md-menu-content width="4">
46 layout-align="center center"
47 ng-if="!message.attachments"
50 md-mode="indeterminate"
51 ></md-progress-circular>
52 <span translate="MAIL.ATTACHMENTS">Attachments</span>
55 ng-if="message.attachments"
56 ng-repeat="attachment in message.attachments"
58 <md-button ng-click="vm.getAttachment(attachment)">
59 {{ attachment.name || ('attachment-' + $index) }}</md-button
65 <md-divider></md-divider>
68 <div class="padding-top-5" ng-bind-html-unsafe="message.body"></div>
70 <div ng-if="!message.secret">
73 layout-align="center center"
74 ng-if="message.direction == 'out' && !message.UserId && !vm.selectedMailShowSystemMessage[message.id]"
77 class="md-raised blue-grey-300-bg white-fg"
78 ng-click="vm.selectedMailShowSystemMessage[message.id] = !vm.selectedMailShowSystemMessage[message.id]"
80 [{{message.createdAt | date: 'medium'}}] {{ 'MAIL.SHOW_AUTOREPLY' |
81 translate }}</md-button
86 class="md-padding message-row"
87 ng-if="message.direction == 'in' || (message.direction == 'out' && (message.UserId || vm.selectedMailShowSystemMessage[message.id]))"
89 <md-content class="mail-content">
90 <div class="info" layout="row" layout-align="space-between start">
91 <div layout="column" layout-align="start start">
92 <div layout="row" layout-align="start start">
93 <div layout="column" layout-align="start start">
96 ng-click="message.Contact && vm.openContact(ev, message.Contact)"
98 <strong>{{message.from}}</strong>
100 ng-if="message.attach"
101 md-font-icon="icon-paperclip"
107 <div>{{message.subject}}</div>
109 <div class="name" layout="row" layout-align="start center">
110 <span translate="MAIL.TO">To</span>:
111 <span class="padding-left-5 subject text-truncate"
112 >{{ message.originTo || message.to }}</span
116 class="name padding-top-10"
118 layout-align="start center"
119 ng-if="message.direction == 'in' && message.originCc && message.originCc.indexOf(vm.account.email) >= 0"
124 translate="MAIL.YOU_ARE_REGISTERED_AS_A"
125 >You are registered as a</span
127 <span class="blue-grey">CC</span></em
131 class="name padding-top-10"
133 layout-align="start center"
134 ng-if="message.direction == 'in' && message.bcc && message.bcc.indexOf(vm.account.email) >= 0"
139 translate="MAIL.YOU_ARE_REGISTERED_AS_A"
140 >You are registered as a</span
142 <span class="red-fg">BCC</span></em
149 class="toggle-details md-accent-color"
150 ng-hide="vm.selectedMailShowDetails[message.id]"
151 ng-click="vm.selectedMailShowDetails[message.id] = !vm.selectedMailShowDetails[message.id]"
152 translate="MAIL.SHOW_DETAILS"
157 class="toggle-details md-accent-color"
158 ng-show="vm.selectedMailShowDetails[message.id]"
159 ng-click="vm.selectedMailShowDetails[message.id] = !vm.selectedMailShowDetails[message.id]"
160 translate="MAIL.HIDE_DETAILS"
165 ng-show="vm.selectedMailShowDetails[message.id]"
168 layout-align="start start"
170 <div layout="column">
171 <span class="title" translate="MAIL.DATE">Date:</span>
172 <span class="title" translate="MAIL.FROM">From:</span>
173 <span class="title" translate="MAIL.TO">To:</span>
174 <!-- NOTE: Start retrocompatibility with replyCc 2.0.66 -->
178 ng-if="message.direction === 'in' && message.originCc"
184 ng-if="message.direction === 'in' && !message.originCc && !message.originTo && message.cc"
190 ng-if="message.direction === 'out' && message.cc"
193 <!-- End retrocompatibility -->
194 <span class="title" translate="MAIL.BCC" ng-if="message.bcc"
199 translate="MAIL.ACCEPTED"
200 ng-if="message.UserId && message.direction ==='in'"
205 <div layout="column">
207 >{{message.createdAt | date:'medium'}}</span
209 <span class="detail">{{message.from}}</span>
210 <span class="detail">{{message.originTo || message.to}}</span>
211 <!-- NOTE: Start retrocompatibility with replyCc 2.0.66 -->
214 ng-if="message.direction === 'in' && message.originCc"
215 >{{ message.originCc }}</span
219 ng-if="message.direction === 'in' && !message.originCc && !message.originTo && message.cc"
220 >{{ message.cc }}</span
224 ng-if="message.direction === 'out' && message.cc"
225 >{{ message.cc }}</span
227 <!-- End retrocompatibility -->
228 <span class="detail" ng-if="message.bcc"
229 >{{message.bcc}}</span
233 ng-if="message.UserId && message.direction ==='in'"
234 >{{vm.usersMap[message.UserId]}}</span
240 <div layout="row" layout-align="center center">
241 <div layout="column" layout-align="center end" class="md-padding">
242 <span class="grey-fg" ng-if="message.direction ==='in'"
243 >{{message.from.indexOf(vm.contact.email) >= 0 ?
244 vm.contact.firstName + ' ' + vm.contact.lastName : '*' +
249 ng-if="message.direction ==='out' && message.UserId"
250 >{{vm.agent.fullname || vm.usersMap[message.UserId]}}</span
254 ng-if="message.direction ==='out' && !message.UserId"
257 <span class="grey-fg"
258 >{{message.createdAt | date:'medium'}}</span
262 ng-if="message.direction ==='in'"
263 ng-src="assets/images/avatars/customer.png"
268 ng-if="message.direction ==='out' && message.UserId"
270 ng-src="api/users/{{message.UserId}}/avatar"
273 ng-if="message.direction ==='out' && !message.UserId"
275 src="assets/images/avatars/robot.png"
277 <!-- <md-button class="md-fab md-mini no-margin" aria-label="Download" ng-click="vm.downloadMessage(message)">
278 <md-icon md-font-icon="icon-download" class="icon s24"></md-icon>
283 <div layout="row" layout-align="center center" layout-fill>
285 <md-divider></md-divider>
288 <div class="interaction-reply-button-container">
289 <md-tooltip md-direction="bottom"
290 ><span translate="DASHBOARDS.DRAFT">Draft</span>
293 ng-if="!vm.interaction.closed && !vm.tab.spy"
294 class="md-icon-button"
296 ng-disabled="!vm.draft"
297 ng-click="vm.openDraft(message.id)"
300 md-font-icon="icon-pencil-box"
306 ng-if="!vm.interaction.closed && !vm.tab.spy"
307 class="md-icon-button"
309 ng-click="vm.composeMailInteraction('reply', message)"
311 <md-tooltip md-direction="bottom"
312 ><span translate="MAIL.REPLY">Reply</span></md-tooltip
314 <md-icon md-font-icon="icon-reply" class="icon s24"></md-icon>
317 ng-if="!vm.interaction.closed && !vm.tab.spy"
318 class="md-icon-button"
319 aria-label="replyAll"
320 ng-click="vm.composeMailInteraction('replyAll', message)"
322 <md-tooltip md-direction="bottom"
323 ><span translate="MAIL.REPLY_ALL">Reply All</span>
326 md-font-icon="icon-reply-all"
331 ng-if="!vm.interaction.closed && !vm.tab.spy"
332 class="md-icon-button"
334 ng-click="vm.composeMailInteraction('forward', message)"
336 <md-tooltip md-direction="bottom"
337 ><span translate="MAIL.FORWARD">Forward</span>
339 <md-icon md-font-icon="icon-forward" class="icon s24"></md-icon>
342 ng-if="!message.attach"
343 class="md-icon-button"
345 ng-click="vm.downloadMessage(message)"
347 <md-tooltip md-direction="bottom"
348 ><span translate="MAIL.DOWNLOAD">Download</span>
351 md-font-icon="icon-download"
356 ng-if="message.attach"
358 md-position-mode="target-right target"
361 class="md-icon-button"
362 ng-click="$mdMenu.open()"
363 aria-label="download"
365 <md-tooltip md-direction="bottom"
366 ><span translate="MAIL.DOWNLOAD">Download</span>
368 <md-icon md-font-icon="icon-download"></md-icon>
370 <md-menu-content width="2">
373 ng-click="vm.downloadMessage(message, true)"
374 translate="MAIL.DOWNLOAD_WITH_ATTACHMENTS"
376 Download with attachments
381 ng-click="vm.downloadMessage(message)"
382 translate="MAIL.DOWNLOAD_WITHOUT_ATTACHMENTS"
384 Download without attachments
389 <md-menu ng-if="message.attach">
391 aria-label="attachments"
392 class="md-icon-button"
393 ng-click="vm.getAttachments(message); $mdMenu.open($event);"
395 <md-tooltip md-direction="bottom"
396 ><span translate="MAIL.ATTACHMENTS"
400 <div layout="row" layout-align="start center">
402 md-font-icon="icon-paperclip"
405 <span>{{message.attach}}</span>
408 <md-menu-content width="4">
411 layout-align="center center"
412 ng-if="!message.attachments"
414 <md-progress-circular
415 md-mode="indeterminate"
416 ></md-progress-circular>
417 <span translate="MAIL.ATTACHMENTS">Attachments</span>
420 ng-if="message.attachments"
421 ng-repeat="attachment in message.attachments"
423 <md-button ng-click="vm.getAttachment(attachment)">
424 {{ attachment.name || ('attachment-' + $index)
432 <md-divider></md-divider>
436 <md-content ng-bind-html-unsafe="message.body"></md-content>