page_alerts.html 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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>'{{ page.grantedGroup.name | preventXss }}' only</strong> ({{ t('Browsing of this page is restricted') }})
  11. {% endif %}
  12. </p>
  13. {% endif %}
  14. {% if isTrashPage() %}
  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.
  19. {% if page.isDeleted() %}
  20. <br>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') }}
  21. {% endif %}
  22. </div>
  23. {% if page.isDeleted() and user %}
  24. <ul class="list-inline">
  25. <li>
  26. <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>
  27. </li>
  28. {% if user.canDeleteCompletely(user) %}
  29. <li>
  30. <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>
  31. </li>
  32. {% endif %}
  33. </ul>{# /.pull-right #}
  34. {% endif %}
  35. </div>
  36. {% endif %}
  37. {% if not page.isDeleted() and (redirectFrom or req.query.renamed or req.query.redirectFrom) %}
  38. <div class="alert alert-info alert-moved d-flex align-items-center justify-content-between">
  39. <span>
  40. {% set fromPath = req.query.renamed or req.query.redirectFrom %}
  41. <strong>{{ t('Moved') }}: </strong> {{ t('page_page.notice.moved', req.sanitize(fromPath)) }}
  42. </span>
  43. {% if user %}
  44. <form role="form" id="unlink-page-form" onsubmit="return false;">
  45. <input type="hidden" name="_csrf" value="{{ csrf() }}">
  46. <input type="hidden" name="path" value="{{ path }}">
  47. <button type="submit" class="btn btn-default btn-sm pull-right">
  48. <i class="ti-unlink" aria-hidden="true"></i>
  49. Unlink
  50. </button>
  51. </form>
  52. {% endif %}
  53. </div>
  54. {% endif %}
  55. {% if req.query.duplicated and not page.isDeleted() %}
  56. <div class="alert alert-success alert-moved">
  57. <span>
  58. <strong>{{ t('Duplicated') }}: </strong> {{ t('page_page.notice.duplicated', req.sanitize(req.query.duplicated)) }}
  59. </span>
  60. </div>
  61. {% endif %}
  62. {% if req.query.unlinked %}
  63. <div class="alert alert-info alert-unlinked">
  64. <strong>{{ t('Unlinked') }}: </strong> {{ t('page_page.notice.unlinked') }}
  65. </div>
  66. {% endif %}
  67. {% if page and not page.isLatestRevision() %}
  68. <div class="alert alert-warning">
  69. <strong>{{ t('Warning') }}: </strong> {{ t('page_page.notice.version') }}
  70. <a href="{{ page.path }}"><i class="icon-fw icon-arrow-right-circle"></i>{{ t('Show latest') }}</a>
  71. </div>
  72. {% endif %}
  73. {% set dmessage = req.flash('dangerMessage') %}
  74. {% if dmessage.length %}
  75. <div class="alert alert-danger m-b-15">
  76. {{ dmessage }}
  77. </div>
  78. {% endif %}
  79. </div>
  80. </div>