sogo/UI/Templates/MailerUI/UIxMailViewTemplate.wox
2015-06-12 11:59:04 -04:00

115 lines
5.2 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="iconButton show-sm" ng-click="toggleDetailView()">
<i class="md-icon-close"><!--icon--></i>
</md-button>
<header class="msg-header">
<div class="msg-header-content">
<div layout="row" layout-align="start center">
<md-button class="iconButton" aria-label="flagged" ng-click="markAsFlaggedOrUnflagged()">
<i ng-class="{'md-icon-star-outline' :
!message.isflagged, 'md-icon-star': message.isflagged}"><!-- not flagged --></i>
</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]}}
<button md-chip-remove="md-chip-remove"
class="md-chip-remove"
ng-click="addOrRemoveTag('remove', $chip)">
<i class="md-icon-close"><!-- delete tag --></i>
</button>
</md-chip-template>
<md-autocomplete
md-selected-item="tags.selected"
md-selected-item-change="addOrRemoveTag('add', 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="iconButton"
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>
<i class="md-icon-reply"><!-- reply --></i>
</md-button>
<md-button class="iconButton" 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'})">
<i class="md-icon-reply-all"><!-- reply all --></i>
</md-button>
<md-button class="iconButton" 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'})">
<i class="md-icon-forward"><!-- forward --></i>
</md-button>
<md-button class="iconButton" aria-label="Edit"
ng-show="message.isDraft"
ui-sref="mail.account.mailbox.message.edit({accountId: account.id, mailboxId: (mailbox.path | encodeUri), messageId: message.uid})">
<i class="md-icon-create"><!-- edit --></i>
</md-button>
<md-button class="iconButton" aria-label="Delete"
ng-click="doDelete(message)">
<i class="md-icon-delete"><!-- delete --></i>
</md-button>
<md-button class="iconButton" 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>
<i class="md-icon-image"><!--icon--></i>
</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-bind-html="message.$content()"><!-- msg --></div>
</div>
</md-content>
</container>