1
0

base_admin.html 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. {% extends 'sharix_admin/base.html' %}
  2. {% load i18n %}
  3. {% load static %}
  4. {% block content %}
  5. <div id="loader-wrapper">
  6. <div id="loader"></div>
  7. </div>
  8. <div class="content p-4 mx-auto d-flex flex-column justify-content-between">
  9. <nav id="menu-bar">
  10. <button class="bg-white border box-shadow rounded mb-2 px-4 py-1" onclick="menuBarSwitch()">
  11. <img id="menu-bar-img-arrow" src="{% static 'sharix_admin/img/menu/arrow-right.svg' %}">
  12. </button>
  13. <ul class="d-flex flex-column nav nav-pills rounded box-shadow border p-2 bg-white">
  14. <li class="nav-item">
  15. <a href="{% url "sharix_admin:main" %}" class="nav-link {% if current_page == "main" %}active rounded{% endif %}">
  16. <div class="link d-flex align-items-center">
  17. <img
  18. class="nav-img"
  19. src="
  20. {% if current_page == "main" %}
  21. {% static 'sharix_admin/img/menu/house_w.svg' %}
  22. {% else %}
  23. {% static 'sharix_admin/img/menu/house.svg' %}
  24. {% endif %}">
  25. <span class="menu-bar-label">Главная</span>
  26. </div>
  27. </a>
  28. </li>
  29. <li class="nav-item">
  30. <a href="{% url 'tickets:ticket_list_list' %}" class="nav-link {% if current_page == "tickets" %}active rounded{% endif %}">
  31. <div class="link d-flex align-items-center">
  32. <img
  33. class="nav-img"
  34. src="
  35. {% if current_page == "tickets" %}
  36. {% static 'sharix_admin/img/menu/tickets_w.svg' %}
  37. {% else %}
  38. {% static 'sharix_admin/img/menu/tickets.svg' %}
  39. {% endif %}">
  40. <span class="menu-bar-label">Заявки</span>
  41. </div>
  42. </a>
  43. </li>
  44. <li class="nav-item">
  45. <a href="http://study.reversea.net/" class="nav-link {% if current_page == "education" %}active rounded{% endif %}">
  46. <div class="link d-flex align-items-center">
  47. <img
  48. class="nav-img"
  49. src="
  50. {% if current_page == "education" %}
  51. {% static 'sharix_admin/img/menu/education_w.svg' %}
  52. {% else %}
  53. {% static 'sharix_admin/img/menu/education.svg' %}
  54. {% endif %}">
  55. <span class="menu-bar-label">Курсы</span>
  56. </div>
  57. </a>
  58. </li>
  59. {% comment %} <li class="nav-item">
  60. <a href="{% url "sharix_admin:partners" %}" class="nav-link {% if current_page == "partners" %}active rounded{% endif %}">
  61. <div class="link d-flex align-items-center">
  62. <img
  63. class="nav-img"
  64. src="
  65. {% if current_page == "partners" %}
  66. {% static 'sharix_admin/img/menu/people_w.svg' %}
  67. {% else %}
  68. {% static 'sharix_admin/img/menu/people.svg' %}
  69. {% endif %}">
  70. <span class="menu-bar-label">Партнеры</span>
  71. </div>
  72. </a>
  73. </li> {% endcomment %}
  74. {% if not "PARTNER-ADMIN" in user_groups %}
  75. <li class="nav-item">
  76. <a href="{% url "sharix_admin:cooperate" %}" class="nav-link {% if current_page == "cooperate" %}active rounded{% endif %}">
  77. <div class="link d-flex align-items-center">
  78. <img
  79. class="nav-img"
  80. src="
  81. {% if current_page == "cooperate" %}
  82. {% static 'sharix_admin/img/menu/handshake_w.svg' %}
  83. {% else %}
  84. {% static 'sharix_admin/img/menu/handshake.svg' %}
  85. {% endif %}">
  86. <span class="menu-bar-label">Сотрудничество</span>
  87. </div>
  88. </a>
  89. </li>
  90. {% endif %}
  91. {% comment %} <li class="nav-item">
  92. <a href="{% url 'sharix_admin:user_information' %}" class="nav-link {% if current_page == "none" %}active rounded{% endif %}">
  93. <div class="link d-flex align-items-center">
  94. <img
  95. class="nav-img"
  96. src="
  97. {% if current_page == "none" %}
  98. {% static 'sharix_admin/img/menu/hdd-network_w.svg' %}
  99. {% else %}
  100. {% static 'sharix_admin/img/menu/hdd-network.svg' %}
  101. {% endif %}">
  102. <span class="menu-bar-label">Управление правами</span>
  103. </div>
  104. </a>
  105. </li> {% endcomment %}
  106. {% comment %} <li class="nav-item">
  107. <a href="{% url 'sharix_admin:service_type' %}" class="nav-link {% if current_page == "service_type" %}active rounded{% endif %}">
  108. <div class="link d-flex align-items-center">
  109. <img
  110. class="nav-img"
  111. src="
  112. {% if current_page == "service_type" %}
  113. {% static 'sharix_admin/img/menu/briefcase_w.svg' %}
  114. {% else %}
  115. {% static 'sharix_admin/img/menu/briefcase.svg' %}
  116. {% endif %}">
  117. <span class="menu-bar-label">Услуги сервиса</span>
  118. </div>
  119. </a>
  120. </li> {% endcomment %}
  121. {% comment %} <li class="nav-item">
  122. <a href="{% url 'sharix_admin:transactions' %}" class="nav-link {% if current_page == "transactions" %}active rounded{% endif %}">
  123. <div class="link d-flex align-items-center">
  124. <img
  125. class="nav-img"
  126. src="
  127. {% if current_page == "transactions" %}
  128. {% static 'sharix_admin/img/menu/clock-history_w.svg' %}
  129. {% else %}
  130. {% static 'sharix_admin/img/menu/clock-history.svg' %}
  131. {% endif %}">
  132. <span class="menu-bar-label">История заказов</span>
  133. </div>
  134. </a>
  135. </li> {% endcomment %}
  136. {% if "PARTNER-ADMIN" in user_groups %}
  137. <li class="nav-item">
  138. <a href="{% url 'sharix_admin:partner_detail' %}" class="nav-link {% if current_page == 'partner' %}active rounded{% endif %}">
  139. <div class="link d-flex align-items-center">
  140. <img
  141. class="nav-img"
  142. src="
  143. {% if current_page == 'partner' %}
  144. {% static 'sharix_admin/img/menu/person_w.svg' %}
  145. {% else %}
  146. {% static 'sharix_admin/img/menu/person.svg' %}
  147. {% endif %}">
  148. <span class="menu-bar-label">О партнере</span>
  149. </div>
  150. </a>
  151. </li>
  152. {% endif %}
  153. {% comment %} <li class="nav-item">
  154. <a href="{% url 'sharix_admin:service_information-add' %}" class="nav-link {% if current_page == "service_info" %}active rounded{% endif %}">
  155. <div class="link d-flex align-items-center">
  156. <img
  157. class="nav-img"
  158. src="
  159. {% if current_page == "service_info" %}
  160. {% static 'sharix_admin/img/menu/person_w.svg' %}
  161. {% else %}
  162. {% static 'sharix_admin/img/menu/person.svg' %}
  163. {% endif %}">
  164. <span class="menu-bar-label">Информация о сервисе</span>
  165. </div>
  166. </a>
  167. </li> {% endcomment %}
  168. {% comment %} <li class="nav-item">
  169. <a href="{% url 'sharix_admin:payment' %}" class="nav-link {% if current_page == "payment" %}active rounded{% endif %}">
  170. <div class="link d-flex align-items-center">
  171. <img
  172. class="nav-img"
  173. src="
  174. {% if current_page == "payment" %}
  175. {% static 'sharix_admin/img/menu/credit-card_w.svg' %}
  176. {% else %}
  177. {% static 'sharix_admin/img/menu/credit-card.svg' %}
  178. {% endif %}">
  179. <span class="menu-bar-label">Реквизиты</span>
  180. </div>
  181. </a>
  182. </li> {% endcomment %}
  183. </ul>
  184. </nav>
  185. <div id="user-workspace" class="p-5 border rounded box-shadow">
  186. <h1>{{ title }}</h1>
  187. {% if messages %}
  188. {% for message in messages %}
  189. <div class="alert {% if message.tags %}alert-{{ message.tags }}{% endif %}">{{ message }}</div>
  190. {% endfor %}
  191. {% endif %}
  192. {% block view %}{% endblock view %}
  193. </div>
  194. <footer class="d-flex justify-content-between mt-3 p-2 align-items-center border rounded box-shadow">
  195. <div class="d-flex align-items-center">
  196. <div class="d-flex justify-content-center align-items-center rounded-circle bg-secondary-subtle p-3">
  197. <i class="fa-solid fa-user"></i>
  198. </div>
  199. <span class="mx-2 text-nowrap text-muted">{{ user }}</span>
  200. </div>
  201. <div class="d-flex gap-3 mx-2">
  202. <a href="{% url 'contact' %}">{% trans 'Contacts' %}</a>
  203. <a href="https://wiki.sharix-app.org/doku.php/sharix/legal/soglashenie_s_servisom_na_ispolzovanie_platformy_sharix">{% trans 'Terms of use' %}</a>
  204. <a href="https://wiki.sharix-app.org/doku.php/sharix/legal/politika_konfidencialnosti_platformy_sharix">{% trans 'Privacy policy' %}</a>
  205. <a href="https://wiki.sharix-app.org/doku.php">Помощь</a>
  206. </div>
  207. <form method="post" action="{% url "sharix_admin:auth_logout" %}">
  208. {% csrf_token %}
  209. <button class="btn btn-sm btn-outline-secondary text-nowrap" type="submit">
  210. Выйти
  211. <i class="fa-solid fa-right-from-bracket ms-1"></i>
  212. </button>
  213. </form>
  214. </footer>
  215. </div>
  216. <script src="{% static 'sharix_admin/js/menu-bar.js' %}"></script>
  217. <script>
  218. // Запуск некоторых функций после загрузки страницы
  219. document.addEventListener('DOMContentLoaded', function() {
  220. menuBarControll();
  221. });
  222. // Функция для скрытия экрана загрузки
  223. function hideLoader() { document.getElementById("loader-wrapper").style.display = "none"; }
  224. // Скрыть экран загрузки через 4 секунды
  225. setTimeout(hideLoader, 400);
  226. </script>
  227. {% endblock %}