base.html 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. {% load static %}
  2. <!DOCTYPE html>
  3. <html lang="en">
  4. <head>
  5. <meta charset="utf-8">
  6. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  7. <title>ShariX Open Tickets</title>
  8. <link rel="icon" href="{% static 'tickets/favicon.ico' %}">
  9. <link rel="stylesheet" href="{% static 'tickets/css/style.css' %}">
  10. <link rel="stylesheet" href="{% static 'tickets/css/bootstrap.min.css' %}">
  11. <link rel="stylesheet" href="{% static 'tickets/assets/fontawesome/css/fontawesome.css' %}">
  12. <link rel="stylesheet" href="{% static 'tickets/assets/fontawesome/css/solid.css' %}">
  13. {% block extrahead %}{% endblock extrahead %}
  14. </head>
  15. <body>
  16. <header>
  17. <nav class="navbar bg-body-tertiary navbar-expand-lg fixed-top">
  18. <div class="container">
  19. <a class="navbar-brand" href="{% url 'tickets:ticket_list_list' %}">
  20. <img src="{% static 'tickets/favicon.ico' %}" width="30" height="30" class="d-inline-block align-top">
  21. ShariX Open Tickets
  22. </a>
  23. {% if user.is_authenticated %}
  24. <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse">
  25. <span class="navbar-toggler-icon"></span>
  26. </button>
  27. <div class="collapse navbar-collapse" id="navbarCollapse">
  28. <ul class="navbar-nav">
  29. <li class="nav-item"><a href="{% url 'tickets:my_tickets' %}" class="nav-link">My Tickets</a></li>
  30. <li class="nav-item"><a href="{% url 'tickets:assignments' %}" class="nav-link">Assignments</a></li>
  31. </ul>
  32. <!--Search input-->
  33. <form class="form-inline ms-auto" action="{% url 'tickets:search' %}" method="get">
  34. {% csrf_token %}
  35. <div class="input-group input-group">
  36. <input type="text" name="search" id="search-input" placeholder="Any ticket details" class="form-control">
  37. <button class="btn btn-primary" id="search-button" disabled type="submit">
  38. <i class="fa-solid fa-magnifying-glass"></i>
  39. </button>
  40. </div>
  41. </form>
  42. </div>
  43. {% endif %}
  44. </div>
  45. </nav>
  46. </header>
  47. <main role="main" class="container">
  48. {% if messages %}
  49. {% for message in messages %}
  50. <div class="alert {% if message.tags %}alert-{{ message.tags }}{% endif %}">{{ message }}</div>
  51. {% endfor %}
  52. {% endif %}
  53. {% block content %}{% endblock %}
  54. </main>
  55. <script src="{% static "tickets/js/jquery-3.7.0.min.js" %}"></script>
  56. <script src="{% static "tickets/js/jquery.cookie.js" %}"></script>
  57. <script src="{% static "tickets/js/bootstrap.bundle.min.js" %}"></script>
  58. {% if user.is_authenticated %}
  59. <script src="{% static "tickets/js/search.js" %}"></script>
  60. {% endif %}
  61. {% block extra_js %}{% endblock extra_js %}
  62. </body>
  63. </html>