history.pug 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. div#history(ng-show="ui.view == 'history' && history.updates.length > 0")
  2. include ./history/entriesListV1
  3. include ./history/entriesListV2
  4. include ./history/diffPanelV1
  5. include ./history/previewPanelV2
  6. .full-size(ng-if="ui.view == 'history' && history.updates.length === 0 && !isHistoryLoading()")
  7. .no-history-available
  8. h3
  9. | #{translate('no_history_available')}
  10. script(type="text/ng-template", id="historyRestoreDiffModalTemplate")
  11. .modal-header
  12. button.close(
  13. type="button"
  14. data-dismiss="modal"
  15. ng-click="cancel()"
  16. aria-label="Close"
  17. )
  18. span(aria-hidden="true") ×
  19. h3 #{translate("restore")} {{diff.doc.name}}
  20. .modal-body.modal-body-share
  21. p !{translate("sure_you_want_to_restore_before", {filename: "{{diff.doc.name}}", date:"{{diff.start_ts | formatDate}}"}, ['strong'])}
  22. .modal-footer
  23. button.btn.btn-default(
  24. ng-click="cancel()",
  25. ng-disabled="state.inflight"
  26. ) #{translate("cancel")}
  27. button.btn.btn-danger(
  28. ng-click="restore()",
  29. ng-disabled="state.inflight"
  30. )
  31. span(ng-show="!state.inflight") #{translate("restore")}
  32. span(ng-show="state.inflight") #{translate("restoring")} …
  33. script(type="text/ng-template", id="historyLabelTpl")
  34. .history-label(
  35. ng-class="{\
  36. 'history-label-own' : $ctrl.isOwnedByCurrentUser,\
  37. 'history-label-pseudo-current-state': $ctrl.isPseudoCurrentStateLabel,\
  38. }"
  39. )
  40. span.history-label-comment(
  41. tooltip-append-to-body="true"
  42. tooltip-template="'historyLabelTooltipTpl'"
  43. tooltip-placement="left"
  44. tooltip-enable="$ctrl.showTooltip"
  45. )
  46. i.fa.fa-tag
  47. |  {{ ::$ctrl.isPseudoCurrentStateLabel ? '#{translate("history_label_project_current_state")}' : $ctrl.labelText }}
  48. button.history-label-delete-btn(
  49. ng-if="$ctrl.isOwnedByCurrentUser && !$ctrl.isPseudoCurrentStateLabel"
  50. stop-propagation="click"
  51. ng-click="$ctrl.onLabelDelete()"
  52. aria-label=translate("delete")
  53. )
  54. span(aria-hidden="true") ×
  55. script(type="text/ng-template", id="historyLabelTooltipTpl")
  56. .history-label-tooltip
  57. p.history-label-tooltip-title
  58. i.fa.fa-tag
  59. |  {{ $ctrl.labelText }}
  60. p.history-label-tooltip-owner #{translate("history_label_created_by")} {{ $ctrl.labelOwnerName }}
  61. time.history-label-tooltip-datetime {{ $ctrl.labelCreationDateTime | formatDate }}
  62. script(type="text/ng-template", id="historyV2DeleteLabelModalTemplate")
  63. .modal-header
  64. h3 #{translate("history_delete_label")}
  65. .modal-body
  66. .alert.alert-danger(ng-show="state.error.message") {{ state.error.message}}
  67. .alert.alert-danger(ng-show="state.error && !state.error.message") #{translate("generic_something_went_wrong")}
  68. p(ng-if="labelDetails")
  69. | #{translate("history_are_you_sure_delete_label")}
  70. strong "{{ labelDetails.comment }}"
  71. | ?
  72. .modal-footer
  73. button.btn.btn-secondary(
  74. type="button"
  75. ng-disabled="state.inflight"
  76. ng-click="$dismiss()"
  77. ) #{translate("cancel")}
  78. button.btn.btn-danger(
  79. type="button"
  80. ng-click="deleteLabel()"
  81. ng-disabled="state.inflight"
  82. ) {{ state.inflight ? '#{translate("history_deleting_label")}' : '#{translate("history_delete_label")}' }}