mail/src/tpl/read.html

88 lines
4.8 KiB
HTML

<div class="view-read" ng-controller="ReadCtrl">
<div class="headers">
<div class="controls">
<button wo-touch="state.mailList.remove(state.mailList.selected)" class="btn-icon" title="Delete mail">&#xe005;</button>
<button class="btn-icon" title="Reply to" reply-selection>&#xe002;</button>
<button wo-touch="state.writer.write()" class="btn-icon" title="New mail">&#xe006;</button>
</div><!--/.controls-->
<p class="subject" wo-touch="state.read.toggle(false)" data-icon="&#xe016;">{{state.mailList.selected.subject ? state.mailList.selected.subject : 'No subject'}}</p>
<p class="date">{{state.mailList.selected.sentDate | date:'EEEE, MMM d, yyyy h:mm a'}}</p>
<div class="mail-addresses">
<p>
<label>From:</label>
<span ng-repeat="u in state.mailList.selected.from">
<span class="label" ng-class="{'label-primary': u.secure === false, 'label-primary-click': u.secure === false}" data-icon-append="{{(u.secure === false) ? '&#xe001;' : ''}}" ng-mouseover="getKeyId(u.address)" wo-touch="invite(u)" popover="#fingerprint-info">{{u.name || u.address}}</span>
</span>
</p>
<p>
<label>To:</label>
<span ng-repeat="u in state.mailList.selected.to">
<span class="label" ng-class="{'label-primary': u.secure === false, 'label-primary-click': u.secure === false}" data-icon-append="{{(u.secure === false) ? '&#xe001;' : ''}}" ng-mouseover="getKeyId(u.address)" wo-touch="invite(u)" popover="#fingerprint-info">{{u.name || u.address}}</span>
</span>
</p>
<p ng-show="state.mailList.selected.cc && state.mailList.selected.cc.length > 0">
<label>Cc:</label>
<span ng-repeat="u in state.mailList.selected.cc">
<span class="label" ng-class="{'label-primary': u.secure === false, 'label-primary-click': u.secure === false}" data-icon-append="{{(u.secure === false) ? '&#xe001;' : ''}}" ng-mouseover="getKeyId(u.address)" wo-touch="invite(u)" popover="#fingerprint-info">{{u.name || u.address}}</span>
</span>
</p>
</div><!--/.mail-addresses-->
</div><!--/.headers-->
<div class="attachments-wrapper"
ng-switch="state.mailList.selected.attachments !== undefined && state.mailList.selected.attachments.length > 0">
<div class="attachments" ng-switch-when="true">
<span class="attachment"
ng-repeat="attachment in state.mailList.selected.attachments"
wo-touch="download(attachment)">
<span data-icon="&#xe003;"></span>
{{attachment.filename}}
</span><!--/.attachment-->
</div><!--/.attachments-->
<div ng-switch-default class="seperator-line"></div>
</div><!--/.attachments-wrapper-->
<!-- Show working spinner -->
<div class="working-wrapper"
ng-if="state.mailList.selected && state.mailList.selected.html === undefined && (state.mailList.selected.body === undefined || (state.mailList.selected.encrypted && !state.mailList.selected.decrypted))">
<div class="working">
<span class="spinner"></span>
<strong ng-bind="(state.mailList.selected.decryptingBody) ? 'Decrypting...' : 'Loading...' "></strong>
</div><!--/.working-->
</div><!--/.working-wrapper-->
<div class="signature-status"
ng-show="(state.mailList.selected.body || state.mailList.selected.html) && state.mailList.selected.signed && !state.mailList.selected.signaturesValid">
<p>Invalid PGP signature. This message could have been tampered with.</p>
</div>
<div class="display-images">
<a ng-show="state.mailList.selected.html && showImageButton" href='#' wo-touch="displayImages(); $event.preventDefault()">Display images</a>
</div>
<!-- Render html body in sandboxed iframe -->
<div class="frame-wrapper"
ng-show="state.mailList.selected && (!state.mailList.selected.encrypted && (state.mailList.selected.body || state.mailList.selected.html)) || (state.mailList.selected.encrypted && state.mailList.selected.decrypted)">
<iframe sandbox="allow-popups allow-scripts" src="tpl/read-sandbox.html"
frame-load>
</iframe>
</div><!--/.frame-wrapper-->
<!-- popovers -->
<div id="fingerprint-info" class="popover right" ng-controller="PopoverCtrl">
<div class="arrow"></div>
<div class="popover-content">{{keyId}}</div>
</div><!--/.popover-->
<div class="reply-selection popover bottom">
<div class="arrow"></div>
<ul class="popover-content">
<li><button data-icon="&#xe014;" wo-touch="state.writer.write(state.mailList.selected)">Reply</button></li>
<li><button data-icon="&#xe013;" wo-touch="state.writer.write(state.mailList.selected, true)">Reply All</button></li>
<li><button data-icon="&#xe015;" wo-touch="state.writer.write(state.mailList.selected, null, true)">Forward</button></li>
</ul>
</div><!--/.reply-selection-->
</div><!--/.view-read-->