page_alerts.html 3.5 KB

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