passman/templates/views/credential_revisions.html

241 lines
8.4 KiB
HTML
Raw Normal View History

2016-09-24 16:59:55 +08:00
<div id="controls">
<div class="actions creatable">
<div class="breadcrumb">
<div class="crumb svg ui-droppable">
2016-09-24 16:59:55 +08:00
<a ng-click="logout()"><i class="fa fa-home"></i></a>
</div>
<div class="crumb svg">
<a ng-click="cancelRevision()">{{active_vault.name}}</a>
2016-09-24 16:59:55 +08:00
</div>
<div class="crumb svg last">
<a ng-if="storedCredential.credential_id">{{ 'showing.revisions' | translate}} "{{revision.credential_data.label}}"</a>
2016-09-24 16:59:55 +08:00
</div>
</div>
</div>
</div>
2016-09-24 18:16:07 +08:00
<div off-click="closeSelected()">
<table class="credential-table" ng-init="menuOpen = false;">
<tr ng-repeat="revision in revisions | orderBy:'-created'"
ng-click="selectRevision(revision)"
ng-class="{'selected': selectedRevision.revision_id == revision.revision_id}">
<td>
<span class="icon"><i class="fa fa-lock"></i> </span>
2016-12-20 06:51:15 +08:00
<span class="label">
{{ 'revision.of' | translate}} {{revision.created * 1000 | date:'dd-MM-yyyy @ HH:mm:ss'}} ({{revision.credential_data.label}})
<span ng-if="revision.edited_by">{{ 'revision.edited.by' | translate}} {{revision.edited_by}}</span></span>
2016-09-24 18:16:07 +08:00
</td>
</tr>
2016-09-24 23:13:27 +08:00
<tr ng-show="revisions.length == 0">
2016-12-20 06:51:15 +08:00
<td>{{ 'no.revisions' | translate}}</td>
2016-09-24 23:13:27 +08:00
</tr>
2016-09-24 18:16:07 +08:00
</table>
<div id="app-sidebar" class="detailsView scroll-container app_sidebar"
ng-show="selectedRevision">
<span class="close icon-close" ng-click="closeSelected()"
alt="Close"></span>
2016-12-20 06:51:15 +08:00
<b ng-show="selectedRevision">{{ 'revision.of' | translate}} {{selectedRevision.created * 1000 | date:'dd-MM-yyyy @ HH:mm:ss'}}</b>
2017-01-12 03:56:31 +08:00
<div class="credential-data">
<div class="row" ng-show="selectedRevision.credential_data.label">
<div class="col-xs-4 col-md-3 col-lg-3">{{ 'label' | translate }}</div>
<div class="col-xs-8 col-md-9 col-lg-9"><span credential-field
value="selectedRevision.credential_data.label"></span></div>
</div>
<div class="row" ng-show="selectedRevision.credential_data.username">
<div class="col-xs-4 col-md-3 col-lg-3">{{ 'account' | translate }}</div>
<div class="col-xs-8 col-md-9 col-lg-9"><span credential-field
value="selectedRevision.credential_data.username"></span></div>
</div>
<div class="row" ng-show="selectedRevision.credential_data.password">
<div class="col-xs-4 col-md-3 col-lg-3">{{ 'password' | translate }}</div>
<div class="col-xs-8 col-md-9 col-lg-9">
<span credential-field value="selectedRevision.credential_data.password" secret="'true'">
</span>
</div>
</div>
<div class="row" ng-show="selectedRevision.credential_data.otp.secret">
<div class="col-xs-4 col-md-3 col-lg-3">{{'otp' | translate}}</div>
<div class="col-xs-8 col-md-9 col-lg-9"><span otp-generator
secret="selectedRevision.credential_data.otp.secret"></span></div>
</div>
<div class="row" ng-show="selectedRevision.credential_data.email">
<div class="col-xs-4 col-md-3 col-lg-3">{{'email' | translate}}</div>
<div class="col-xs-8 col-md-9 col-lg-9"><span credential-field
value="selectedRevision.credential_data.email"></span></div>
</div>
<div class="row" ng-show="selectedRevision.credential_data.url">
<div class="col-xs-4 col-md-3 col-lg-3">{{ 'url' | translate}}</div>
<div class="col-xs-8 col-md-9 col-lg-9"><span credential-field
value="selectedRevision.credential_data.url"></span></div>
</div>
<div class="row" ng-show="selectedRevision.credential_data.description">
<div class="col-xs-4 col-md-3 col-lg-3">{{'notes' | translate}}</div>
<div class="col-xs-8 col-md-9 col-lg-9"><span credential-field value="selectedRevision.credential_data.description_html"></span></div>
</div>
<div class="row" ng-show="selectedRevision.credential_data.files.length > 0">
<div class="col-xs-4 col-md-3 col-lg-3">{{ 'files' | translate}}</div>
<div class="col-xs-8 col-md-9 col-lg-9"><div ng-repeat="file in selectedRevision.credential_data.files"
class="link" ng-click="downloadFile(selectedRevision.credential_data, file)">
{{file.filename}} ({{file.size | bytes}})
</div></div>
</div>
<div class="row" ng-repeat="field in selectedRevision.credential_data.custom_fields">
<div class="col-xs-4 col-md-3 col-lg-3">{{field.label}}</div>
<div class="col-xs-8 col-md-9 col-lg-9">
<span credential-field value="field.value" secret="field.secret" ng-if="field.field_type !== 'file' || !field.field_type"></span>
<span ng-if="field.field_type === 'file'" class="link" ng-click="downloadFile(selectedCredential, field.value)">{{field.value.filename}} ({{field.value.size | bytes}})</span>
</div>
</div>
<div class="row" ng-show="selectedRevision.credential_data.expire_time > 0">
<div class="col-xs-4 col-md-3 col-lg-3">{{ 'expire.time' | translate }}</div>
<div class="col-xs-8 col-md-9 col-lg-9">
{{selectedRevision.credential_data.expire_time * 1000 | date:'dd-MM-yyyy @ HH:mm:ss'}}
</div>
</div>
<div class="row" ng-show="selectedRevision.credential_data.changed">
<div class="col-xs-4 col-md-3 col-lg-3">{{ 'changed' | translate}}</div>
<div class="col-xs-8 col-md-9 col-lg-9">
{{selectedRevision.credential_data.changed * 1000 | date:'dd-MM-yyyy @ HH:mm:ss'}}
</div>
</div>
<div class="row" ng-show="selectedRevision.credential_data.created">
<div class="col-xs-4 col-md-3 col-lg-3">{{ 'created' | translate}}</div>
<div class="col-xs-8 col-md-9 col-lg-9">
{{selectedRevision.credential_data.created * 1000 | date:'dd-MM-yyyy @ HH:mm:ss'}}
</div>
</div>
<div class="row">
<div class="col-xs-12">
<div class="tags">
<span class="tag" ng-repeat="tag in selectedRevision.credential_data.tags">{{tag.text}}</span>
</div>
</div>
</div>
</div>
<!--
2016-09-24 18:16:07 +08:00
<table class="revision-details">
<tr ng-show="selectedRevision.credential_data.label">
<td>
2016-12-20 06:51:15 +08:00
{{ 'label' | translate}}
2016-09-24 18:16:07 +08:00
</td>
<td>
{{selectedRevision.credential_data.label}}
</td>
</tr>
<tr ng-show="selectedRevision.credential_data.username">
<td>
2016-12-20 06:51:15 +08:00
{{ 'account' | translate}}
2016-09-24 18:16:07 +08:00
</td>
<td>
<span credential-field
value="selectedRevision.credential_data.username"></span>
</td>
</tr>
<tr ng-show="selectedRevision.credential_data.password">
<td>
2016-12-20 06:51:15 +08:00
{{ 'password' | translate}}
2016-09-24 18:16:07 +08:00
</td>
<td>
<span credential-field value="selectedRevision.credential_data.password"
secret="'true'"></span>
</td>
</tr>
<tr ng-show="selectedRevision.credential_data.otp.secret">
<td>
2016-12-20 06:51:15 +08:00
{{ 'otp' | translate}}
2016-09-24 18:16:07 +08:00
</td>
<td>
<span otp-generator
secret="selectedRevision.credential_data.otp.secret"></span>
</td>
</tr>
<tr ng-show="selectedRevision.credential_data.email">
<td>
2016-12-20 06:51:15 +08:00
{{ 'email' | translate}}
2016-09-24 18:16:07 +08:00
</td>
<td>
<span credential-field
value="selectedRevision.credential_data.email"></span>
</td>
</tr>
<tr ng-show="selectedRevision.credential_data.url">
<td>
2016-12-20 06:51:15 +08:00
{{ 'url' | translate}}
2016-09-24 18:16:07 +08:00
</td>
<td>
<span credential-field
value="selectedRevision.url"></span>
</td>
</tr>
<tr ng-show="selectedRevision.credential_data.files.length > 0">
<td>
2016-12-20 06:51:15 +08:00
{{ 'files' | translate}}
2016-09-24 18:16:07 +08:00
</td>
<td>
<div ng-repeat="file in selectedRevision.credential_data.files"
class="link" ng-click="downloadFile(file)">
{{file.filename}} ({{file.size | bytes}})
</div>
</td>
</tr>
<tr ng-repeat="field in selectedRevision.credential_data.custom_fields">
<td>
{{field.label}}
</td>
<td>
<span credential-field value="field.value"
secret="field.secret"></span>
</td>
</tr>
<tr ng-show="selectedRevision.credential_data.changed">
<td>
2016-12-20 06:51:15 +08:00
{{ 'changed' | translate}}
2016-09-24 18:16:07 +08:00
</td>
<td>
{{selectedRevision.credential_data.changed * 1000 | date:'dd-MM-yyyy @ HH:mm:ss'}}
</td>
</tr>
<tr ng-show="selectedRevision.credential_data.created">
<td>
2016-12-20 06:51:15 +08:00
{{ 'created' | translate}}
2016-09-24 18:16:07 +08:00
</td>
<td>
{{selectedRevision.credential_data.created * 1000 | date:'dd-MM-yyyy @ HH:mm:ss'}}
</td>
</tr>
</table>
2017-01-12 03:56:31 +08:00
-->
2016-09-24 18:16:07 +08:00
<div ng-show="selectedRevision">
<button class="button" ng-click="restoreRevision(selectedRevision)" >
2016-12-20 06:51:15 +08:00
<span class="fa fa-edit"></span> {{ 'restore.revision' | translate}}
2016-09-24 18:16:07 +08:00
</button>
<button class="button" ng-click="deleteRevision(selectedRevision)" >
2016-12-20 06:51:15 +08:00
<span class="fa fa-trash"></span> {{ 'delete.revision' | translate}}
2016-09-24 18:16:07 +08:00
</button>
</div>
</div>
2016-09-24 19:18:11 +08:00
</div>