﻿{% load static %}
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}Marthoma School Kalolsavam{% endblock %}</title>
<link rel="stylesheet" href="{% static 'css/style.css' %}">
</head>
<body>
<header class="topbar">
  <div class="brand">
    <a href="{% url 'home' %}">Marthoma School Kalolsavam</a>
  </div>
  <nav class="mainnav">
    <a href="{% url 'home' %}">Home</a>

    {% if user.is_authenticated %}
      {% if user.is_superuser %}
      <div class="dropdown">
        <span>Pre-Kalolsavam </span>
        <div class="dropdown-menu">
          <a href="{% url 'schools' %}">Schools</a>
          <a href="{% url 'participants' %}">Participants</a>
          <a href="{% url 'participant_items' %}">Participant Items</a>
          <a href="{% url 'captains' %}">Select Group Item Captain</a>
          <a href="{% url 'confirmation_status' %}">Confirmation Status</a>
          <a href="{% url 'distribute_chest' %}">Distribute Chest No</a>
          <a href="{% url 'point_distribution' %}">Point Distribution</a>
          <a href="{% url 'academic_year' %}">Academic Year</a>
          <a href="{% url 'maximum_participation' %}">Maximum Participation</a>
          <a href="{% url 'items' %}">Items</a>
          <a href="{% url 'user_management' %}">User Management</a>
        </div>
      </div>
      {% elif user.groups.all.0.name == "School User" %}
      <div class="dropdown">
        <span>Pre-Kalotsavam </span>
        <div class="dropdown-menu">
          <a href="{% url 'profile' %}">Profile</a>
          <a href="{% url 'participants' %}">Participants</a>
          <a href="{% url 'participant_items' %}">Participant Items</a>
          <a href="{% url 'captains' %}">Select Group Item Captain</a>
          <a href="{% url 'confirmation' %}">Confirmation</a>
        </div>
      </div>
      {% endif %}

      <div class="dropdown">
        <span>Reports </span>
        <div class="dropdown-menu">
          <a href="{% url 'report_participants' %}">Participants</a>
          <a href="{% url 'report_captains' %}">Captains</a>
          <a href="{% url 'report_participant_items' %}">Participant Item</a>
          <a href="{% url 'report_items' %}">Items</a>
          <a href="{% url 'confirmation_status' %}">Confirmation Status</a>
          {% if user.is_superuser or user.groups.all.0.name == "Result Entry User" %}
          <a href="{% url 'stage_report' %}">Stage Report</a>
          {% endif %}
        </div>
      </div>

      <div class="dropdown">
        <span>Results </span>
        <div class="dropdown-menu">
          <a href="{% url 'full_result' %}">Full Result</a>
          <a href="{% url 'school_championship' %}">School Championship</a>
          <a href="{% url 'championship' %}">Championship</a>
          <a href="{% url 'published_results' %}">Published Results</a>
          {% if user.is_superuser or user.groups.all.0.name == "Result Entry User" %}
          <a href="{% url 'result_entry' %}">Result Entry</a>
          <a href="{% url 'result_reset' %}">Result Reset</a>
          {% endif %}
        </div>
      </div>

      <a href="{% url 'change_password' %}">Change Password</a>
      <a href="{% url 'logout' %}">Logout</a>
    {% else %}
      <a class="login-link" href="{% url 'login' %}">Login</a>
    {% endif %}
  </nav>
</header>

{% if messages %}
<div class="message-area">
  {% for message in messages %}
  <div class="message {{ message.tags }}">{{ message }}</div>
  {% endfor %}
</div>
{% endif %}

<main class="page-wrap">
{% block content %}{% endblock %}
</main>

<footer>
  <div>Marthoma School Kalolsavam</div>
  <small>Controlled administrative application  ISO-style document presentation</small>
</footer>
</body>
</html>



