widget_unportalize.html 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. {% if isTopPage() %}
  2. {% set unportalizedPath = '/top-' + Date.now() %}
  3. {% else %}
  4. {% set unportalizedPath = page.path|replace('(\/)$', '') %}
  5. {% endif %}
  6. <div class="modal fade" id="unportalize">
  7. <div class="modal-dialog">
  8. <div class="modal-content">
  9. <form role="form" id="unportalize-form" onsubmit="return false;">
  10. <div class="modal-header">
  11. <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
  12. <h4 class="modal-title">ポータル化を解除する</h4>
  13. </div>
  14. <div class="modal-body">
  15. <ul>
  16. <li>このポータル化を解除し、通常のページに戻します。</li>
  17. </ul>
  18. <div class="form-group">
  19. <p>
  20. <label for="">このページ</label><br><code>{{ page.path }}</code>
  21. </p>
  22. <p>
  23. <label for="">解除後のページ</label><br><code>{{ unportalizedPath }}</code>
  24. </p>
  25. {% if isTopPage() %}
  26. <p class="alert alert-info">
  27. このポータルはトップページのポータルのため、特別なページに移動します。
  28. </p>
  29. {% endif %}
  30. </div>
  31. </div>
  32. <div class="modal-footer">
  33. <p><small class="pull-left" id="newPageNameCheck"></small></p>
  34. <input type="hidden" name="_csrf" value="{{ _csrf() }}">
  35. <input type="hidden" name="path" value="{{ page.path }}">
  36. <input type="hidden" class="form-control" name="new_path" id="newPageName" value="{{ unportalizedPath }}">
  37. <input type="hidden" name="page_id" value="{{ page._id.toString() }}">
  38. <input type="hidden" name="revision_id" value="{{ page.revision._id.toString() }}">
  39. <input type="submit" class="btn btn-primary" value="Unportalize!">
  40. </div>
  41. </form>
  42. </div><!-- /.modal-content -->
  43. </div><!-- /.modal-dialog -->
  44. </div><!-- /.modal -->