header.html 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <div class="header-wrap">
  2. {% if not page.isDeleted() %}
  3. <header id="page-header">
  4. <p class="stopper"><a href="#" data-affix-disable="#page-header"><i class="fa fa-chevron-up"></i></a></p>
  5. <div class="flex-title-line">
  6. <div>
  7. <h1 class="title flex-item-title" id="revision-path"></h1>
  8. <div id="revision-url" class="url-line"></div>
  9. </div>
  10. {% if page %}
  11. <div class="flex-item-action">
  12. {% if user %}
  13. <span id="bookmark-button">
  14. <p class="bookmark-link">
  15. <i class="fa fa-star-o"></i>
  16. </p>
  17. </span>
  18. {% endif %}
  19. </div>
  20. <div class="flex-item-action visible-xs visible-sm">
  21. <button
  22. data-csrftoken="{{ csrf() }}"
  23. data-liked="{% if page.isLiked(user) %}1{% else %}0{% endif %}"
  24. class="like-button btn btn-default btn-sm {% if page.isLiked(user) %}active{% endif %}"
  25. ><i class="fa fa-thumbs-o-up"></i></button>
  26. </div>
  27. <ul class="authors visible-md visible-lg">
  28. <li>
  29. <div class="creator-picture">
  30. <a href="{{ userPageRoot(page.creator) }}">
  31. <img src="{{ page.creator|default(author)|picture }}" class="picture picture-rounded"><br>
  32. </a>
  33. </div>
  34. <div class="">
  35. <div>Created by <a href="{{ userPageRoot(page.creator) }}">{{ page.creator.name|default(author.name) }}</a></div>
  36. <div class="text-muted">{{ page.createdAt|datetz('Y/m/d H:i:s') }}</div>
  37. </div>
  38. </li>
  39. <li>
  40. <div class="creator-picture">
  41. <a href="{{ userPageRoot(page.lastUpdateUser) }}">
  42. <img src="{{ page.lastUpdateUser|default(author)|picture }}" class="picture picture-rounded"><br>
  43. </a>
  44. </div>
  45. <div class="">
  46. <div>Updated by <a href="{{ userPageRoot(page.lastUpdateUser) }}">{{ page.lastUpdateUser.name|default(author.name) }}</a></div>
  47. <div class="text-muted">{{ page.updatedAt|datetz('Y/m/d H:i:s') }}</div>
  48. </div>
  49. </li>
  50. </ul>
  51. {% endif %}
  52. {% if not page and not isUserPageList(path) and !isTrashPage() %}
  53. <div class="portal-form-button">
  54. <button class="btn btn-primary" id="create-portal-button" {% if not user %}disabled{% endif %}>Create Portal</button>
  55. <p class="help-block"><a href="#" data-target="#help-portal" data-toggle="modal"><i class="fa fa-question-circle"></i> What is Portal?</a></p>
  56. </div>
  57. {% endif %}
  58. </div>
  59. </header>
  60. {% else %}
  61. {# trash/* #}
  62. <header id="page-header">
  63. <div class="flex-title-line">
  64. <h1 class="title flex-item-title"></h1>
  65. <div class="flex-item-action">
  66. <span id="bookmark-button">
  67. <p class="bookmark-link">
  68. <i class="fa fa-star-o"></i>
  69. </a>
  70. </span>
  71. </div>
  72. </div>
  73. </header>
  74. {% endif %}
  75. </div>