overleaf/services/web/app/views/project/editor/track-changes.jade

139 lines
4.7 KiB
Text
Raw Normal View History

2014-06-26 11:39:52 -04:00
div#trackChanges(ng-show="ui.view == 'track-changes'")
2014-07-03 06:18:15 -04:00
.upgrade-prompt(ng-show="!project.features.versioning")
.message(ng-show="project.owner._id == user.id")
p You need to upgrade your account to use the History feature.
p
a.btn.btn-info(
href="/user/subscription/plans"
target="_blank"
ng-click="startedFreeTrial = true"
) Start Free Trial
p.small(ng-show="startedFreeTrial") Please refresh the page after starting your free trial.
.message(ng-show="project.owner._id != user.id")
p Please ask the project owner to upgrade to use the History feature.
2014-06-26 12:22:06 -04:00
aside.change-list(
ng-controller="TrackChangesListController"
infinite-scroll="loadMore()"
infinite-scroll-disabled="trackChanges.loading || trackChanges.atEnd"
infinite-scroll-initialize="ui.view == 'track-changes'"
2014-06-26 12:22:06 -04:00
)
.infinite-scroll-inner
ul.list-unstyled(
2014-06-26 11:39:52 -04:00
ng-class="{\
'hover-state': trackChanges.hoveringOverListSelectors\
2014-06-26 11:39:52 -04:00
}"
)
li.change(
ng-repeat="update in trackChanges.updates"
ng-class="{\
'first-in-day': update.meta.first_in_day,\
'selected': update.inSelection,\
'selected-to': update.selectedTo,\
'selected-from': update.selectedFrom,\
'hover-selected': update.inHoverSelection,\
'hover-selected-to': update.hoverSelectedTo,\
'hover-selected-from': update.hoverSelectedFrom,\
}"
ng-controller="TrackChangesListItemController"
)
div.day(ng-show="update.meta.first_in_day") {{ update.meta.end_ts | relativeDate }}
2014-06-26 11:39:52 -04:00
div.selectors
div.range
form
input.selector-from(
type="radio"
name="fromVersion"
ng-model="update.selectedFrom"
ng-value="true"
ng-mouseover="mouseOverSelectedFrom()"
ng-mouseout="mouseOutSelectedFrom()"
ng-show="update.afterSelection || update.inSelection"
)
form
input.selector-to(
type="radio"
name="toVersion"
ng-model="update.selectedTo"
ng-value="true"
ng-mouseover="mouseOverSelectedTo()"
ng-mouseout="mouseOutSelectedTo()"
ng-show="update.beforeSelection || update.inSelection"
)
2014-06-26 11:39:52 -04:00
div.description(ng-click="select()")
div.time {{ update.meta.end_ts | formatDate:'h:mm a' }}
div.docs(ng-repeat="(doc_id, doc) in update.docs")
span.doc {{ doc.entity.name }}
div.users
div.user(ng-repeat="update_user in update.meta.users")
.color-square(ng-style="{'background-color': 'hsl({{ update_user.hue }}, 100%, 50%)'}")
span(ng-if="update_user.id != user.id") {{update_user.first_name}} {{update_user.last_name}}
span(ng-if="update_user.id == user.id") You
div.user(ng-if="update.meta.users.length == 0")
.color-square(style="background-color: hsl(100, 100%, 50%)")
span Anonymous
2014-06-26 11:39:52 -04:00
.loading(ng-show="trackChanges.loading")
i.fa.fa-spin.fa-refresh
|   Loading...
2014-06-27 07:45:37 -04:00
2014-07-11 08:55:14 -04:00
.diff-panel.full-size(ng-controller="TrackChangesDiffController")
.diff(
ng-show="!!trackChanges.diff && !trackChanges.diff.loading && !trackChanges.diff.deleted && !trackChanges.diff.error"
2014-06-27 07:45:37 -04:00
)
2014-07-11 08:55:14 -04:00
.toolbar.toolbar-alt
span.name Changes to <strong>{{trackChanges.diff.doc.name}}</strong>
.toolbar-right
a.btn.btn-danger.btn-sm(
href,
ng-click="openRestoreDiffModal()"
) Restore to before these changes
.diff-editor.hide-ace-cursor(
ace-editor="track-changes",
theme="settings.theme",
font-size="settings.fontSize",
text="trackChanges.diff.text",
highlights="trackChanges.diff.highlights",
read-only="true",
resize-on="layout:main:resize"
)
2014-06-27 12:11:26 -04:00
.diff-deleted.text-centered(
ng-show="trackChanges.diff.deleted"
)
p.text-serif {{ trackChanges.diff.doc.name }} has been deleted.
2014-07-11 08:55:14 -04:00
p
2014-06-27 12:11:26 -04:00
a.btn.btn-primary.btn-lg(
href,
ng-click="restoreDeletedDoc()"
) Restore
2014-06-27 07:45:37 -04:00
.loading-panel(ng-show="trackChanges.diff.loading")
i.fa.fa-spin.fa-refresh
| &nbsp;&nbsp;Loading...
.error-panel(ng-show="trackChanges.diff.error")
2014-07-11 08:55:14 -04:00
.alert.alert-danger Sorry, something went wrong :(
script(type="text/ng-template", id="trackChangesRestoreDiffModalTemplate")
.modal-header
button.close(
type="button"
data-dismiss="modal"
ng-click="cancel()"
) &times;
h3 Restore {{diff.doc.name}}
.modal-body.modal-body-share
p Are you sure you want to restore <strong>{{diff.doc.name}}</strong> to before the changes on {{diff.start_ts | formatDate}}?
.modal-footer
button.btn.btn-default(
ng-click="cancel()",
ng-disabled="state.inflight"
) Cancel
button.btn.btn-danger(
ng-click="restore()",
ng-disabled="state.inflight"
)
span(ng-show="!state.inflight") Restore
span(ng-show="state.inflight") Restoring...