| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- <div class="row row-alerts">
- <div class="col-xs-12">
- {% if page && page.grant && page.grant > 1 %}
- <p class="alert alert-inverse alert-grant">
- {% if page.grant == 2 %}
- <i class="icon-fw icon-link"></i><strong>{{ consts.pageGrants[page.grant] }}</strong> ({{ t('Browsing of this page is restricted') }})
- {% elseif page.grant == 4 %}
- <i class="icon-fw icon-lock"></i><strong>{{ consts.pageGrants[page.grant] }}</strong> ({{ t('Browsing of this page is restricted') }})
- {% elseif page.grant == 5 %}
- <i class="icon-fw icon-organization"></i><strong>'{{ page.grantedGroup.name | preventXss }}' only</strong> ({{ t('Browsing of this page is restricted') }})
- {% endif %}
- </p>
- {% endif %}
- {% if getConfig('crowi', 'customize:isEnabledStaleNotification') %}
- {% if page && page.updatedAt && page.getContentAge() > 0 %}
- {% if page.getContentAge() == 1 %}
- <div class="alert alert-info">
- {% elseif page.getContentAge() == 2 %}
- <div class="alert alert-warning">
- {% else %}
- <div class="alert alert-danger">
- {% endif %}
- <i class="icon-fw icon-hourglass"></i>
- <strong>{{ t('page_page.notice.stale', { count: page.getContentAge() }) }}</strong>
- </div>
- {% endif %}
- {% endif %}
- {% if redirectFrom or req.query.renamed or req.query.redirectFrom %}
- <div class="alert alert-info alert-moved d-flex align-items-center justify-content-between">
- <span>
- {% set fromPath = req.query.renamed or req.query.redirectFrom %}
- {% if redirectFrom or req.query.redirectFrom %}
- <strong>{{ t('Redirected') }}:</strong> {{ t('page_page.notice.redirected', req.sanitize(fromPath)) }}
- {% endif %}
- {% if req.query.renamed %}
- <strong>{{ t('Moved') }}:</strong> {{ t('page_page.notice.moved', req.sanitize(fromPath)) }}
- {% endif %}
- </span>
- {% if user and not page.isDeleted() %}
- <form role="form" id="unlink-page-form" onsubmit="return false;">
- <input type="hidden" name="_csrf" value="{{ csrf() }}">
- <input type="hidden" name="path" value="{{ path }}">
- <button type="submit" class="btn btn-default btn-sm pull-right">
- <i class="ti-unlink" aria-hidden="true"></i>
- Unlink
- </button>
- </form>
- {% endif %}
- </div>
- {% endif %}
- {% if req.query.duplicated and not page.isDeleted() %}
- <div class="alert alert-success alert-moved">
- <span>
- <strong>{{ t('Duplicated') }}: </strong> {{ t('page_page.notice.duplicated', req.sanitize(req.query.duplicated)) }}
- </span>
- </div>
- {% endif %}
- {% if req.query.unlinked %}
- <div class="alert alert-info alert-unlinked">
- <strong>{{ t('Unlinked') }}: </strong> {{ t('page_page.notice.unlinked') }}
- </div>
- {% endif %}
- {% if page and not page.isLatestRevision() %}
- <div class="alert alert-warning">
- <strong>{{ t('Warning') }}: </strong> {{ t('page_page.notice.version') }}
- <a href="{{ page.path }}"><i class="icon-fw icon-arrow-right-circle"></i>{{ t('Show latest') }}</a>
- </div>
- {% endif %}
- {% set dmessage = req.flash('dangerMessage') %}
- {% if dmessage.length %}
- <div class="alert alert-danger m-b-15">
- {{ dmessage }}
- </div>
- {% endif %}
- {% if isTrashPage() %}
- <div class="alert alert-warning alert-trash d-flex align-items-center justify-content-between">
- <div>
- This page is in the trash <i class="icon-trash" aria-hidden="true"></i>.
- {% if page.isDeleted() %}
- <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') }}
- {% endif %}
- </div>
- <ul class="list-inline">
- {% if user and user.admin and req.path == '/trash' and pages.length > 0 %}
- <li>
- <button href="#" class="btn btn-danger btn-rounded btn-sm" data-target="#emptyTrash" data-toggle="modal"><i class="icon-trash" aria-hidden="true"></i>{{ t('modal_empty.empty_the_trash') }}</button>
- </li>
- {% endif %}
- {% if page.isDeleted() and user %}
- <li>
- <button 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') }}</button>
- </li>
- <li>
- <button href="#" class="btn btn-danger btn-rounded btn-sm" {% if !user.canDeleteCompletely(page.creator._id) %} disabled="disabled" {% endif %} data-target="#deletePage" data-toggle="modal"><i class="icon-fire" aria-hidden="true"></i> {{ t('Delete Completely') }}</button>
- </li>
- {% endif %}
- </ul>{# /.pull-right #}
- </div>
- {% endif %}
- </div>
- </div>
|