page_alerts.html 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <div class="row row-alerts d-edit-none">
  2. <div class="col-sm-12">
  3. {% if page && page.grant && page.grant > 1 %}
  4. <p class="alert alert-primary py-3 px-4">
  5. {% if page.grant == 2 %}
  6. <i class="icon-fw icon-link"></i><strong>{{ t('Anyone with the link') }}</strong> ({{ t('Browsing of this page is restricted') }})
  7. {% elseif page.grant == 4 %}
  8. <i class="icon-fw icon-lock"></i><strong>{{ t('Only me') }}</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 getConfig('crowi', 'customize:isEnabledStaleNotification') %}
  15. {% if page && page.updatedAt && page.getContentAge() > 0 %}
  16. {% if page.getContentAge() == 1 %}
  17. <div class="alert alert-info">
  18. {% elseif page.getContentAge() == 2 %}
  19. <div class="alert alert-warning">
  20. {% else %}
  21. <div class="alert alert-danger">
  22. {% endif %}
  23. <i class="icon-fw icon-hourglass"></i>
  24. <strong>{{ t('page_page.notice.stale', { count: page.getContentAge() }) }}</strong>
  25. </div>
  26. {% endif %}
  27. {% endif %}
  28. <!-- This code has been replaced to <PageRedirectedAlert /> -->
  29. <!-- {% if redirectFrom or req.query.redirectFrom %}
  30. <div class="alert alert-pink d-edit-none py-3 px-4 d-flex align-items-center justify-content-between">
  31. <span>
  32. {% set fromPath = req.query.redirectFrom %}
  33. {% if redirectFrom or req.query.redirectFrom %}
  34. <div id="redirected-alert"></div>
  35. {% endif %}
  36. </span>
  37. {% set hasRedirectLink = redirectFrom or req.query.redirectFrom or req.query.withRedirect %}
  38. {% if user and not page.isDeleted() and hasRedirectLink %}
  39. <button type="button" id="unlink-page-button" class="btn btn-outline-dark btn-sm float-right">
  40. <i class="ti ti-unlink" aria-hidden="true"></i>
  41. Unlink redirection
  42. </button>
  43. {% endif %}
  44. </div>
  45. {% endif %} -->
  46. {% if req.query.unlinked %}
  47. <div class="alert alert-info d-edit-none py-3 px-4">
  48. <strong>{{ t('Unlinked') }}: </strong> {{ t('page_page.notice.unlinked') }}
  49. </div>
  50. {% endif %}
  51. {% set dmessage = req.flash('dangerMessage') %}
  52. {% if dmessage.length %}
  53. <div class="alert alert-danger mb-4">
  54. {{ dmessage }}
  55. </div>
  56. {% endif %}
  57. {% if isTrashPage(page.path) %}
  58. <div id="trash-page-alert"></div>
  59. {% endif %}
  60. <div id="fix-page-grant-alert"></div>
  61. </div>
  62. </div>