| | <!DOCTYPE html> |
| | <html lang="en"> |
| | <head> |
| | <meta charset="UTF-8"> |
| | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| | <title>Exam Schedule Viewer</title> |
| | <style> |
| | :root { |
| | --primary-color: #3498db; |
| | --secondary-color: #2980b9; |
| | --accent-color: #e74c3c; |
| | --text-color: #333; |
| | --bg-color: #f5f7fa; |
| | --card-bg: #ffffff; |
| | --border-radius: 8px; |
| | --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); |
| | } |
| | |
| | * { |
| | margin: 0; |
| | padding: 0; |
| | box-sizing: border-box; |
| | } |
| | |
| | body { |
| | font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; |
| | background-color: var(--bg-color); |
| | color: var(--text-color); |
| | line-height: 1.6; |
| | padding: 0; |
| | margin: 0; |
| | } |
| | |
| | .container { |
| | max-width: 1200px; |
| | margin: 0 auto; |
| | padding: 20px; |
| | } |
| | |
| | header { |
| | background-color: var(--primary-color); |
| | color: white; |
| | padding: 20px 0; |
| | margin-bottom: 30px; |
| | text-align: center; |
| | box-shadow: var(--box-shadow); |
| | } |
| | |
| | h1 { |
| | font-size: 2.2rem; |
| | margin-bottom: 10px; |
| | } |
| | |
| | .subtitle { |
| | font-size: 1rem; |
| | opacity: 0.9; |
| | } |
| | |
| | .card { |
| | background-color: var(--card-bg); |
| | border-radius: var(--border-radius); |
| | box-shadow: var(--box-shadow); |
| | padding: 25px; |
| | margin-bottom: 30px; |
| | } |
| | |
| | .form-group { |
| | margin-bottom: 20px; |
| | } |
| | |
| | label { |
| | display: block; |
| | margin-bottom: 8px; |
| | font-weight: 600; |
| | color: var(--text-color); |
| | } |
| | |
| | input[type="text"], |
| | input[type="date"] { |
| | width: 100%; |
| | padding: 12px; |
| | border: 1px solid #ddd; |
| | border-radius: var(--border-radius); |
| | font-size: 1rem; |
| | transition: border-color 0.3s; |
| | } |
| | |
| | input[type="text"]:focus, |
| | input[type="date"]:focus { |
| | border-color: var(--primary-color); |
| | outline: none; |
| | box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2); |
| | } |
| | |
| | .btn { |
| | background-color: var(--primary-color); |
| | color: white; |
| | border: none; |
| | padding: 12px 24px; |
| | border-radius: var(--border-radius); |
| | cursor: pointer; |
| | font-size: 1rem; |
| | font-weight: 600; |
| | transition: background-color 0.3s; |
| | display: inline-block; |
| | } |
| | |
| | .btn:hover { |
| | background-color: var(--secondary-color); |
| | } |
| | |
| | .search-form { |
| | display: flex; |
| | flex-direction: column; |
| | max-width: 500px; |
| | margin: 0 auto; |
| | } |
| | |
| | .form-row { |
| | display: flex; |
| | justify-content: space-between; |
| | gap: 20px; |
| | margin-bottom: 20px; |
| | } |
| | |
| | .form-col { |
| | flex: 1; |
| | } |
| | |
| | .btn-container { |
| | text-align: center; |
| | } |
| | |
| | table { |
| | width: 100%; |
| | border-collapse: collapse; |
| | margin-top: 20px; |
| | box-shadow: var(--box-shadow); |
| | border-radius: var(--border-radius); |
| | overflow: hidden; |
| | } |
| | |
| | th, td { |
| | padding: 15px; |
| | text-align: left; |
| | border-bottom: 1px solid #ddd; |
| | } |
| | |
| | th { |
| | background-color: var(--primary-color); |
| | color: white; |
| | font-weight: 600; |
| | } |
| | |
| | tr:nth-child(even) { |
| | background-color: rgba(0, 0, 0, 0.02); |
| | } |
| | |
| | tr:hover { |
| | background-color: rgba(52, 152, 219, 0.05); |
| | } |
| | |
| | .message { |
| | padding: 15px; |
| | background-color: #f8d7da; |
| | color: #721c24; |
| | border-radius: var(--border-radius); |
| | margin-top: 20px; |
| | text-align: center; |
| | } |
| | |
| | .no-results { |
| | text-align: center; |
| | margin-top: 30px; |
| | color: #777; |
| | } |
| | |
| | footer { |
| | text-align: center; |
| | margin-top: 40px; |
| | padding: 20px; |
| | color: #777; |
| | font-size: 0.9rem; |
| | } |
| | |
| | @media screen and (max-width: 768px) { |
| | .form-row { |
| | flex-direction: column; |
| | gap: 10px; |
| | } |
| | |
| | th, td { |
| | padding: 10px; |
| | font-size: 0.9rem; |
| | } |
| | |
| | table { |
| | display: block; |
| | overflow-x: auto; |
| | white-space: nowrap; |
| | } |
| | } |
| | </style> |
| | </head> |
| | <body> |
| | <header> |
| | <div class="container"> |
| | <h1>Seating Plan Viewer</h1> |
| | <p class="subtitle">Search and view your examination details</p> |
| | </div> |
| | </header> |
| | |
| | <div class="container"> |
| | <div class="card"> |
| | <form class="search-form" action="{% url 'view_schedule' %}" method="post"> |
| | {% csrf_token %} |
| | <div class="form-row"> |
| | <div class="form-col"> |
| | <div class="form-group"> |
| | <label for="student_id">Student ID:</label> |
| | <input type="text" name="student_id" id="student_id" placeholder="Enter your student ID" required> |
| | </div> |
| | </div> |
| | <div class="form-col"> |
| | <div class="form-group"> |
| | <label for="exam_date">Exam Date:</label> |
| | <input type="date" name="exam_date" id="exam_date" required> |
| | </div> |
| | </div> |
| | </div> |
| | <div class="btn-container"> |
| | <button type="submit" class="btn">Search Schedule</button> |
| | </div> |
| | </form> |
| | </div> |
| | |
| | {% if schedules %} |
| | <div class="card"> |
| | <table> |
| | <thead> |
| | <tr> |
| | <th>Student Name</th> |
| | <th>Student ID</th> |
| | <th>Exam Date</th> |
| | <th>Room Number</th> |
| | <th>Subject Name</th> |
| | <th>Subject Code</th> |
| | <th>Seat Number</th> |
| | </tr> |
| | </thead> |
| | <tbody> |
| | {% for schedule in schedules %} |
| | <tr> |
| | <td>{{schedule.student_name}}</td> |
| | <td>{{schedule.student_id}}</td> |
| | <td>{{schedule.exam_date}}</td> |
| | <td>{{schedule.room_number}}</td> |
| | <td>{{schedule.subject_name}}</td> |
| | <td>{{schedule.subject_code}}</td> |
| | <td>{{schedule.seat_Number}}</td> |
| | </tr> |
| | {% endfor %} |
| | </tbody> |
| | </table> |
| | </div> |
| | {% endif %} |
| | |
| | {% if message %} |
| | <div class="message"> |
| | {{ message }} |
| | </div> |
| | {% endif %} |
| | |
| | {% if not schedules and not message %} |
| | <div class="no-results card"> |
| | <p>Enter your information above to view your exam schedule.</p> |
| | </div> |
| | {% endif %} |
| | </div> |
| | |
| | <footer> |
| | <div class="container"> |
| | <p>Exam Scheduling System © 2025</p> |
| | </div> |
| | </footer> |
| | </body> |
| | </html> |