1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-08-02 12:05:23 +02:00

document view revisions UX

This commit is contained in:
Harvey Kandola 2017-12-11 13:45:56 +00:00
parent 66bc874d95
commit e61b2d0aa8
13 changed files with 130 additions and 160 deletions

View file

@ -238,6 +238,13 @@ export default Controller.extend(NotifierMixin, TooltipMixin, {
let doc = this.get('model.document');
doc.set('tags', tags);
this.get('documentService').save(doc);
}
},
onRollback(pageId, revisionId) {
this.get('documentService').rollbackPage(this.get('model.document.id'), pageId, revisionId).then(() => {
this.set('tab', 'content');
this.get('target._routerMicrolib').refresh();
});
}
}
});

View file

@ -30,6 +30,10 @@
{{#if (eq tab 'activity')}}
{{document/view-activity document=model.document pages=model.pages permissions=model.permissions}}
{{/if}}
{{#if (eq tab 'revision')}}
{{document/view-revision document=model.document folder=model.folder pages=model.pages onRollback=(action 'onRollback')}}
{{/if}}
<div id="zone-document-content" class="zone-document-content">
{{document/document-sidebar tab=tab