sogo/UI/Templates/MailerUI/UIxMailViewTemplate.wox
2015-07-03 21:42:21 -04:00

114 lines
5.1 KiB
XML

<?xml version='1.0' standalone='yes'?>
<container
xmlns="http://www.w3.org/1999/xhtml"
xmlns:var="http://www.skyrix.com/od/binding"
xmlns:const="http://www.skyrix.com/od/constant"
xmlns:rsrc="OGo:url"
xmlns:label="OGo:label"
xmlns:uix="OGo:uix">
<md-content md-scroll-y="md-scroll-y" class="md-padding bg-sogoPaper-50 md-whiteframe-z1">
<md-button class="sg-icon-button show-sm" ng-click="toggleDetailView()">
<md-icon>close</md-icon>
</md-button>
<header class="msg-header">
<div class="msg-header-content">
<div layout="row" layout-align="start center">
<md-button class="sg-icon-button sg-msg-flag" label:aria-label="flagged" ng-click="message.toggleFlag()">
<md-icon ng-class="{'flagged': message.isflagged}">star</md-icon>
</md-button>
<h3 class="sg-md-title-msg" ng-bind="message.subject"><!-- subject --></h3>
</div>
<div class="pseudo-input-container--compact">
<label class="pseudo-input-label">
<var:string label:value="From"/>
</label>
<div class="pseudo-input-field">
<a ng-href="mailto:{{message.from[0].email}}" ng-bind="message.from[0].full"><!-- from --></a>
</div>
</div>
<div class="pseudo-input-container--compact">
<label class="pseudo-input-label">
<var:string label:value="To"/>
</label>
<div class="pseudo-input-field">
<a ng-href="mailto:{{message.to[0].email}}" ng-bind="message.to[0].full"><!-- to --></a>
</div>
</div>
<md-chips ng-model="message.flags">
<md-chip-template>{{message.constructor.$tags[$chip][0]}}</md-chip-template>
<button md-chip-remove="md-chip-remove"
class="md-chip-remove"
ng-click="message.removeTag($chip)">
<md-icon>close</md-icon>
</button>
<md-autocomplete
md-selected-item="tags.selected"
md-selected-item-change="message.addTag(tag)"
md-search-text="tags.searchText"
md-items="tag in message.constructor.filterTags(tags.searchText)"
label:placeholder="Add a tag">
<span md-highlight-text="tags.searchText">{{message.constructor.$tags[tag][0]}}</span>
</md-autocomplete>
</md-chips>
</div>
<!-- <p class="flags">
&lt;!&ndash; Todo: change the text for an icon (conditional ?) The read/unread flag doesn't make sense at his place&ndash;&gt;
<span class="pseudo-input-label" ng-repeat="flag in message.flags">{{flag}}</span>
</p>
-->
<div class="sg-icon-bar--vertical">
<!-- todo: Replace md-tooltip values by localizable string variable -->
<md-button class="sg-icon-button"
ng-hide="message.isDraft"
ui-sref="mail.account.mailbox.message.action({accountId: account.id, mailboxId: (mailbox.path | encodeUri), messageId: message.uid, actionName: 'reply'})"
aria-label="reply">
<md-tooltip md-direction="left"><var:string label:value="Reply to Sender Only"/></md-tooltip>
<md-icon>reply</md-icon>
</md-button>
<md-button class="sg-icon-button" aria-label="Reply All"
ng-hide="message.isDraft"
ui-sref="mail.account.mailbox.message.action({accountId: account.id, mailboxId: (mailbox.path | encodeUri), messageId: message.uid, actionName: 'replyall'})">
<md-icon>reply_all</md-icon>
</md-button>
<md-button class="sg-icon-button" aria-label="Forward"
ng-hide="message.isDraft"
ui-sref="mail.account.mailbox.message.action({accountId: account.id, mailboxId: (mailbox.path | encodeUri), messageId: message.uid, actionName: 'forward'})">
<md-icon>forward</md-icon>
</md-button>
<md-button class="sg-icon-button" aria-label="Edit"
ng-show="message.isDraft"
ui-sref="mail.account.mailbox.message.edit({accountId: account.id, mailboxId: (mailbox.path | encodeUri), messageId: message.uid})">
<md-icon>create</md-icon>
</md-button>
<md-button class="sg-icon-button" aria-label="Delete"
ng-click="doDelete(message)">
<md-icon>delete</md-icon>
</md-button>
<md-button class="sg-icon-button" aria-label="Load Images"
ng-show="message.$hasUnsafeContent"
ng-click="message.loadUnsafeContent()">
<md-tooltip md-direction="left"><var:string label:value="Load Images"/></md-tooltip>
<md-icon>image</md-icon>
</md-button>
</div>
</header>
<md-divider><!-- divider --></md-divider>
<div class="msg-body">
<div class="msg-date sg-md-body-multi">
<time datetime="message.date" ng-bind="message.date"><!-- date --></time>
</div>
<div class="mailer_mailcontent" ng-repeat="part in message.$content()">
<div ng-if="part.html" ng-bind-html="part.content"><!-- msg --></div>
<div ng-if="part.compile" sg-compile="part.content"><!-- msg --></div>
</div>
</div>
</md-content>
</container>