page_alerts.html 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. {% if page.grant == 2 %}
  6. <i class="icon-fw icon-link"></i><strong>{{ consts.pageGrants[page.grant] }}</strong> ({{ t('Browsing of this page is restricted') }})
  7. {% elseif page.grant == 4 %}
  8. <i class="icon-fw icon-lock"></i><strong>{{ consts.pageGrants[page.grant] }}</strong> ({{ t('Browsing of this page is restricted') }})
  9. {% elseif page.grant == 5 %}
  10. <i class="icon-fw icon-organization"></i><strong>'{{ pageRelatedGroup.name }}' only</strong> ({{ t('Browsing of this page is restricted') }})
  11. {% endif %}
  12. </p>
  13. {% endif %}
  14. {% if page.isDeleted() %}
  15. <div class="alert alert-warning alert-trash d-flex align-items-center justify-content-between">
  16. <div>
  17. <i class="icon-trash" aria-hidden="true"></i>
  18. This page is in the trash.<br>
  19. 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') }}
  20. </div>
  21. {% if user %}
  22. <ul class="list-inline">
  23. <li>
  24. <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>
  25. </li>
  26. <li>
  27. <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>
  28. </li>
  29. </ul>{# /.pull-right #}
  30. {% endif %}
  31. </div>
  32. {% endif %}
  33. {% if req.query.renamed and not page.isDeleted() %}
  34. <div class="alert alert-info alert-moved">
  35. <span>
  36. <strong>{{ t('Moved') }}: </strong> {{ t('page_page.notice.moved', req.sanitize(req.query.renamed)) }}
  37. </span>
  38. </div>
  39. {% endif %}
  40. {% if req.query.redirectFrom and not page.isDeleted() %}
  41. <div class="alert alert-info alert-moved d-flex align-items-center justify-content-between">
  42. <span>
  43. <strong>{{ t('Moved') }}: </strong> {{ t('page_page.notice.moved', req.sanitize(req.query.redirectFrom)) }}
  44. </span>
  45. {% if user %}
  46. <form role="form" id="unlink-page-form" onsubmit="return false;">
  47. <input type="hidden" name="_csrf" value="{{ csrf() }}">
  48. <input type="hidden" name="path" value="{{ page.path }}">
  49. <input type="hidden" name="page_id" value="{{ page._id.toString() }}">
  50. <button type="submit" class="btn btn-default btn-sm pull-right">
  51. <i class="ti-unlink" aria-hidden="true"></i>
  52. Unlink
  53. </button>
  54. </form>
  55. {% endif %}
  56. </div>
  57. {% endif %}
  58. {% if req.query.duplicated and not page.isDeleted() %}
  59. <div class="alert alert-success alert-moved">
  60. <span>
  61. <strong>{{ t('Duplicated') }}: </strong> {{ t('page_page.notice.duplicated', req.sanitize(req.query.duplicated)) }}
  62. </span>
  63. </div>
  64. {% endif %}
  65. {% if req.query.unlinked %}
  66. <div class="alert alert-info alert-unlinked">
  67. <strong>{{ t('Unlinked') }}: </strong> {{ t('page_page.notice.unlinked') }}
  68. </div>
  69. {% endif %}
  70. {% if page and not page.isLatestRevision() %}
  71. <div class="alert alert-warning">
  72. <strong>{{ t('Warning') }}: </strong> {{ t('page_page.notice.version') }}
  73. <a href="{{ page.path }}"><i class="icon-fw icon-arrow-right-circle"></i>{{ t('Show latest') }}</a>
  74. </div>
  75. {% endif %}
  76. </div>
  77. </div>