history.pug 2.9 KB

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