2016-10-05 06:04:39 -04:00
|
|
|
div#history(ng-show="ui.view == 'history'")
|
|
|
|
span(ng-controller="HistoryPremiumPopup")
|
2016-10-28 09:40:04 -04:00
|
|
|
.upgrade-prompt(ng-if="project.features.versioning === false && ui.view === 'history'")
|
2018-03-26 06:43:48 -04:00
|
|
|
.message(ng-if="project.owner._id == user.id")
|
|
|
|
p.text-center: strong #{translate("upgrade_to_get_feature", {feature:"full Project History"})}
|
|
|
|
p.text-center.small(ng-show="startedFreeTrial") #{translate("refresh_page_after_starting_free_trial")}
|
|
|
|
ul.list-unstyled
|
|
|
|
li
|
|
|
|
i.fa.fa-check
|
|
|
|
| #{translate("unlimited_projects")}
|
|
|
|
|
|
|
|
li
|
|
|
|
i.fa.fa-check
|
|
|
|
| #{translate("collabs_per_proj", {collabcount:'Multiple'})}
|
|
|
|
|
|
|
|
li
|
|
|
|
i.fa.fa-check
|
|
|
|
| #{translate("full_doc_history")}
|
|
|
|
|
|
|
|
li
|
|
|
|
i.fa.fa-check
|
|
|
|
| #{translate("sync_to_dropbox")}
|
2015-11-02 13:44:26 -05:00
|
|
|
|
2018-03-26 06:43:48 -04:00
|
|
|
li
|
|
|
|
i.fa.fa-check
|
|
|
|
| #{translate("sync_to_github")}
|
2016-10-27 07:05:32 -04:00
|
|
|
|
2018-03-26 06:43:48 -04:00
|
|
|
li
|
|
|
|
i.fa.fa-check
|
|
|
|
|#{translate("compile_larger_projects")}
|
|
|
|
p.text-center(ng-controller="FreeTrialModalController")
|
|
|
|
a.btn.btn-success(
|
|
|
|
href
|
|
|
|
ng-class="buttonClass"
|
|
|
|
ng-click="startFreeTrial('history')"
|
|
|
|
sixpack-convert="teaser-history"
|
|
|
|
) #{translate("start_free_trial")}
|
2015-02-18 12:50:14 -05:00
|
|
|
|
2015-11-11 12:25:28 -05:00
|
|
|
.message(ng-show="project.owner._id != user.id")
|
|
|
|
p #{translate("ask_proj_owner_to_upgrade_for_history")}
|
|
|
|
p
|
2016-10-05 06:04:39 -04:00
|
|
|
a.small(href, ng-click="toggleHistory()") #{translate("cancel")}
|
2014-07-03 06:18:15 -04:00
|
|
|
|
2014-06-26 12:22:06 -04:00
|
|
|
aside.change-list(
|
2016-10-05 06:04:39 -04:00
|
|
|
ng-controller="HistoryListController"
|
2014-06-27 10:45:14 -04:00
|
|
|
infinite-scroll="loadMore()"
|
2016-10-05 06:04:39 -04:00
|
|
|
infinite-scroll-disabled="history.loading || history.atEnd"
|
|
|
|
infinite-scroll-initialize="ui.view == 'history'"
|
2014-06-26 12:22:06 -04:00
|
|
|
)
|
2014-06-27 10:45:14 -04:00
|
|
|
.infinite-scroll-inner
|
|
|
|
ul.list-unstyled(
|
2014-06-26 11:39:52 -04:00
|
|
|
ng-class="{\
|
2016-10-05 06:04:39 -04:00
|
|
|
'hover-state': history.hoveringOverListSelectors\
|
2014-06-26 11:39:52 -04:00
|
|
|
}"
|
|
|
|
)
|
2014-06-27 10:45:14 -04:00
|
|
|
li.change(
|
2016-10-05 06:04:39 -04:00
|
|
|
ng-repeat="update in history.updates"
|
2014-06-27 10:45:14 -04:00
|
|
|
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,\
|
|
|
|
}"
|
2016-10-05 06:04:39 -04:00
|
|
|
ng-controller="HistoryListItemController"
|
2014-06-27 10:45:14 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
div.day(ng-show="update.meta.first_in_day") {{ update.meta.end_ts | relativeDate }}
|
2014-06-26 11:39:52 -04:00
|
|
|
|
2014-06-27 10:45:14 -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
|
|
|
|
2014-06-27 10:45:14 -04:00
|
|
|
div.description(ng-click="select()")
|
|
|
|
div.time {{ update.meta.end_ts | formatDate:'h:mm a' }}
|
2017-12-13 12:09:55 -05:00
|
|
|
div.action.action-edited(ng-if="history.isV2 && update.pathnames.length > 0")
|
|
|
|
| Edited
|
2017-12-13 11:11:12 -05:00
|
|
|
div.docs(ng-repeat="pathname in update.pathnames")
|
2017-12-13 12:09:55 -05:00
|
|
|
.doc {{ pathname }}
|
2017-12-13 11:11:12 -05:00
|
|
|
div.docs(ng-repeat="project_op in update.project_ops")
|
2017-12-13 12:09:55 -05:00
|
|
|
div(ng-if="project_op.rename")
|
|
|
|
.action Renamed
|
|
|
|
.doc {{ project_op.rename.pathname }} → {{ project_op.rename.newPathname }}
|
|
|
|
div(ng-if="project_op.add")
|
|
|
|
.action Created
|
|
|
|
.doc {{ project_op.add.pathname }}
|
2017-12-20 08:59:17 -05:00
|
|
|
div(ng-if="project_op.remove")
|
|
|
|
.action Deleted
|
|
|
|
.doc {{ project_op.remove.pathname }}
|
2014-06-27 10:45:14 -04:00
|
|
|
div.users
|
|
|
|
div.user(ng-repeat="update_user in update.meta.users")
|
2015-09-10 09:35:09 -04:00
|
|
|
.color-square(ng-if="update_user != null", ng-style="{'background-color': 'hsl({{ update_user.hue }}, 70%, 50%)'}")
|
|
|
|
.color-square(ng-if="update_user == null", ng-style="{'background-color': 'hsl(100, 70%, 50%)'}")
|
2015-09-14 07:27:27 -04:00
|
|
|
.name(ng-if="update_user && update_user.id != user.id" ng-bind="displayName(update_user)")
|
|
|
|
.name(ng-if="update_user && update_user.id == user.id") You
|
2015-09-10 09:35:09 -04:00
|
|
|
.name(ng-if="update_user == null") #{translate("anonymous")}
|
2014-07-03 10:05:35 -04:00
|
|
|
div.user(ng-if="update.meta.users.length == 0")
|
|
|
|
.color-square(style="background-color: hsl(100, 100%, 50%)")
|
2014-07-31 12:07:43 -04:00
|
|
|
span #{translate("anonymous")}
|
2014-06-26 11:39:52 -04:00
|
|
|
|
2016-10-05 06:04:39 -04:00
|
|
|
.loading(ng-show="history.loading")
|
2014-06-27 10:45:14 -04:00
|
|
|
i.fa.fa-spin.fa-refresh
|
2014-07-31 12:07:43 -04:00
|
|
|
| #{translate("loading")}...
|
2014-06-27 07:45:37 -04:00
|
|
|
|
2016-10-05 06:04:39 -04:00
|
|
|
.diff-panel.full-size(ng-controller="HistoryDiffController")
|
2014-07-11 08:55:14 -04:00
|
|
|
.diff(
|
2017-12-22 11:28:36 -05:00
|
|
|
ng-if="!!history.diff && !history.diff.loading && !history.diff.deleted && !history.diff.error && !history.diff.binary"
|
2014-06-27 07:45:37 -04:00
|
|
|
)
|
2014-07-11 08:55:14 -04:00
|
|
|
.toolbar.toolbar-alt
|
2014-07-11 11:34:12 -04:00
|
|
|
span.name
|
2016-10-05 06:04:39 -04:00
|
|
|
| <strong>{{history.diff.highlights.length}} </strong>
|
2014-07-11 11:34:12 -04:00
|
|
|
ng-pluralize(
|
2016-10-05 06:04:39 -04:00
|
|
|
count="history.diff.highlights.length",
|
2014-07-11 11:34:12 -04:00
|
|
|
when="{\
|
|
|
|
'one': 'change',\
|
|
|
|
'other': 'changes'\
|
|
|
|
}"
|
|
|
|
)
|
2017-12-13 11:48:48 -05:00
|
|
|
| in <strong>{{history.diff.pathname}}</strong>
|
2017-12-20 10:08:45 -05:00
|
|
|
.toolbar-right
|
2014-07-11 08:55:14 -04:00
|
|
|
a.btn.btn-danger.btn-sm(
|
|
|
|
href,
|
2017-12-20 10:08:45 -05:00
|
|
|
ng-if="!history.isV2"
|
2014-07-11 08:55:14 -04:00
|
|
|
ng-click="openRestoreDiffModal()"
|
2014-07-31 12:07:43 -04:00
|
|
|
) #{translate("restore_to_before_these_changes")}
|
2017-12-20 10:08:45 -05:00
|
|
|
.deleted-warning(
|
|
|
|
ng-show="history.selection.docs[history.selection.pathname].deleted"
|
|
|
|
) This file was deleted
|
2014-07-11 08:55:14 -04:00
|
|
|
.diff-editor.hide-ace-cursor(
|
2016-10-05 06:04:39 -04:00
|
|
|
ace-editor="history",
|
2014-07-11 08:55:14 -04:00
|
|
|
theme="settings.theme",
|
|
|
|
font-size="settings.fontSize",
|
2016-10-05 06:04:39 -04:00
|
|
|
text="history.diff.text",
|
|
|
|
highlights="history.diff.highlights",
|
2014-07-11 08:55:14 -04:00
|
|
|
read-only="true",
|
2014-07-11 11:17:59 -04:00
|
|
|
resize-on="layout:main:resize",
|
|
|
|
navigate-highlights="true"
|
2014-07-11 08:55:14 -04:00
|
|
|
)
|
2017-12-22 11:28:36 -05:00
|
|
|
|
|
|
|
.diff.diff-binary(ng-show="history.diff.binary")
|
|
|
|
.toolbar.toolbar-alt
|
|
|
|
span.name
|
|
|
|
strong {{history.diff.pathname}}
|
|
|
|
.alert.alert-info We're still working on showing image and binary changes, sorry. Stay tuned!
|
|
|
|
|
2014-06-27 12:11:26 -04:00
|
|
|
.diff-deleted.text-centered(
|
2016-10-05 06:04:39 -04:00
|
|
|
ng-show="history.diff.deleted && !history.diff.restoreDeletedSuccess"
|
2014-06-27 12:11:26 -04:00
|
|
|
)
|
2016-10-05 06:04:39 -04:00
|
|
|
p.text-serif #{translate("file_has_been_deleted", {filename:"{{ history.diff.doc.name }} "})}
|
2014-07-11 08:55:14 -04:00
|
|
|
p
|
2014-06-27 12:11:26 -04:00
|
|
|
a.btn.btn-primary.btn-lg(
|
|
|
|
href,
|
2016-08-03 11:05:19 -04:00
|
|
|
ng-click="restoreDeletedDoc()",
|
2016-10-05 06:04:39 -04:00
|
|
|
ng-disabled="history.diff.restoreInProgress"
|
2014-07-31 12:07:43 -04:00
|
|
|
) #{translate("restore")}
|
2016-08-03 11:05:19 -04:00
|
|
|
|
|
|
|
.diff-deleted.text-centered(
|
2016-10-05 06:04:39 -04:00
|
|
|
ng-show="history.diff.deleted && history.diff.restoreDeletedSuccess"
|
2016-08-03 11:05:19 -04:00
|
|
|
)
|
2016-10-05 06:04:39 -04:00
|
|
|
p.text-serif #{translate("file_restored", {filename:"{{ history.diff.doc.name }} "})}
|
2016-08-03 11:09:45 -04:00
|
|
|
p.text-serif #{translate("file_restored_back_to_editor")}
|
2016-08-03 11:05:19 -04:00
|
|
|
p
|
|
|
|
a.btn.btn-default(
|
|
|
|
href,
|
|
|
|
ng-click="backToEditorAfterRestore()",
|
2016-08-03 11:09:45 -04:00
|
|
|
) #{translate("file_restored_back_to_editor_btn")}
|
2016-08-03 11:05:19 -04:00
|
|
|
|
2016-10-05 06:04:39 -04:00
|
|
|
.loading-panel(ng-show="history.diff.loading")
|
2014-06-27 07:45:37 -04:00
|
|
|
i.fa.fa-spin.fa-refresh
|
2014-07-31 12:07:43 -04:00
|
|
|
| #{translate("loading")}...
|
2016-10-05 06:04:39 -04:00
|
|
|
.error-panel(ng-show="history.diff.error")
|
2014-07-31 12:07:43 -04:00
|
|
|
.alert.alert-danger #{translate("generic_something_went_wrong")}
|
2014-07-11 08:55:14 -04:00
|
|
|
|
2016-10-05 06:04:39 -04:00
|
|
|
script(type="text/ng-template", id="historyRestoreDiffModalTemplate")
|
2014-07-11 08:55:14 -04:00
|
|
|
.modal-header
|
|
|
|
button.close(
|
|
|
|
type="button"
|
|
|
|
data-dismiss="modal"
|
|
|
|
ng-click="cancel()"
|
|
|
|
) ×
|
2014-07-31 12:07:43 -04:00
|
|
|
h3 #{translate("restore")} {{diff.doc.name}}
|
2014-07-11 08:55:14 -04:00
|
|
|
.modal-body.modal-body-share
|
2014-10-20 10:46:42 -04:00
|
|
|
p !{translate("sure_you_want_to_restore_before", {filename:"<strong>{{diff.doc.name}}</strong>", date:"{{diff.start_ts | formatDate}}"})}
|
2014-07-11 08:55:14 -04:00
|
|
|
.modal-footer
|
|
|
|
button.btn.btn-default(
|
|
|
|
ng-click="cancel()",
|
|
|
|
ng-disabled="state.inflight"
|
2014-07-31 12:07:43 -04:00
|
|
|
) #{translate("cancel")}
|
2014-07-11 08:55:14 -04:00
|
|
|
button.btn.btn-danger(
|
|
|
|
ng-click="restore()",
|
|
|
|
ng-disabled="state.inflight"
|
|
|
|
)
|
2014-07-31 12:07:43 -04:00
|
|
|
span(ng-show="!state.inflight") #{translate("restore")}
|
|
|
|
span(ng-show="state.inflight") #{translate("restoring")} ...
|