page_alerts.html 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <div class="row row-alerts">
  2. <div class="col-xs-12">
  3. {% if page && page.grant != 1 %}
  4. <p class="alert alert-inverse alert-grant">
  5. <i class="icon-fw icon-lock"></i><strong>{{ consts.pageGrants[page.grant] }}</strong> ({{ t('Browsing of this page is restricted') }})
  6. </p>
  7. {% endif %}
  8. {% if page.isDeleted() %}
  9. <div class="alert alert-warning alert-trash d-flex align-items-center justify-content-between">
  10. <div>
  11. <i class="icon-trash" aria-hidden="true"></i>
  12. This page is in the trash.<br>
  13. Deleted by <img src="{{ page.lastUpdateUser|picture }}" class="picture picture-sm img-circle"> {{ page.lastUpdateUser.name }} at {{ page.updatedAt|datetz('Y-m-d H:i:s') }}
  14. </div>
  15. {% if user %}
  16. <ul class="list-inline">
  17. <li>
  18. <a href="#" class="btn btn-default btn-rounded btn-sm" data-target="#putBackPage" data-toggle="modal"><i class="icon-action-undo" aria-hidden="true"></i> {{ t('Put Back') }}</a>
  19. </li>
  20. <li>
  21. <a href="#" class="btn btn-danger btn-rounded btn-sm" data-target="#deletePage" data-toggle="modal"><i class="icon-fire" aria-hidden="true"></i> {{ t('Delete Completely') }}</a>
  22. </li>
  23. </ul>{# /.pull-right #}
  24. {% endif %}
  25. </div>
  26. {% endif %}
  27. {% if req.query.renamed and not page.isDeleted() %}
  28. <div class="alert alert-info alert-moved">
  29. <span>
  30. <strong>{{ t('Moved') }}: </strong> {{ t('page_page.notice.moved', req.query.renamed) }}
  31. </span>
  32. </div>
  33. {% endif %}
  34. {% if req.query.redirectFrom and not page.isDeleted() %}
  35. <div class="alert alert-info alert-moved d-flex align-items-center justify-content-between">
  36. <span>
  37. <strong>{{ t('Moved') }}: </strong> {{ t('page_page.notice.moved', req.query.redirectFrom) }}
  38. </span>
  39. {% if user %}
  40. <form role="form" id="unlink-page-form" onsubmit="return false;">
  41. <input type="hidden" name="_csrf" value="{{ csrf() }}">
  42. <input type="hidden" name="path" value="{{ page.path }}">
  43. <input type="hidden" name="page_id" value="{{ page._id.toString() }}">
  44. <button type="submit" class="btn btn-default btn-sm pull-right">
  45. <i class="fa fa-unlink" aria-hidden="true"></i>
  46. Unlink
  47. </button>
  48. </form>
  49. {% endif %}
  50. </div>
  51. {% endif %}
  52. {% if req.query.duplicated and not page.isDeleted() %}
  53. <div class="alert alert-success alert-moved">
  54. <span>
  55. <strong>{{ t('Duplicated') }}: </strong> {{ t('page_page.notice.duplicated', req.query.duplicated) }}
  56. </span>
  57. </div>
  58. {% endif %}
  59. {% if req.query.unlinked %}
  60. <div class="alert alert-info alert-unlinked">
  61. <strong>{{ t('Unlinked') }}: </strong> {{ t('page_page.notice.unlinked') }}
  62. </div>
  63. {% endif %}
  64. {% if page and not page.isLatestRevision() %}
  65. <div class="alert alert-warning">
  66. <strong>{{ t('Warning') }}: </strong> {{ t('page_page.notice.version') }}
  67. <a href="{{ page.path }}"><i class="icon-fw icon-arrow-right-circle"></i>{{ t('Show latest') }}</a>
  68. </div>
  69. {% endif %}
  70. </div>
  71. </div>