header.html 2.8 KB

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