page_alerts.html 2.8 KB

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