From 06da5bdf2f82101f1dd330113a85bcb181083fd8 Mon Sep 17 00:00:00 2001 From: ijuanes Date: Wed, 24 Jun 2026 15:53:55 +0100 Subject: [PATCH] Phase 1: Responsive tables and Tailwind CSS standardization - Added responsive table styles with mobile card layouts to base.html - Converted all templates from Bootstrap/plain CSS to Tailwind CSS - Implemented responsive tables with horizontal scroll on desktop - Added mobile card layouts for better readability on small screens - Standardized form layouts with Tailwind responsive grid - Updated all 15 templates for consistent styling: * base.html (responsive table CSS) * index.html (responsive tables + mobile cards) * students.html (Bootstrap -> Tailwind) * student_detail.html (Bootstrap -> Tailwind) * add_student.html (Bootstrap -> Tailwind) * edit_student.html (Bootstrap -> Tailwind) * import_students.html (Bootstrap -> Tailwind) * loan_tablet.html (Bootstrap -> Tailwind) * history.html (plain CSS -> Tailwind) * non_loanable_devices.html (plain CSS -> Tailwind) * add_non_loanable_device.html (plain CSS -> Tailwind) * edit_non_loanable_device.html (plain CSS -> Tailwind) * add_tablet.html (plain CSS -> Tailwind) * add_user.html (plain CSS -> Tailwind) * project_management.html (plain CSS -> Tailwind) --- templates/add_non_loanable_device.html | 141 ++++++---- templates/add_student.html | 260 +++++++++--------- templates/add_tablet.html | 77 ++++-- templates/add_user.html | 79 ++++-- templates/base.html | 88 ++++++ templates/edit_non_loanable_device.html | 157 +++++++---- templates/edit_student.html | 293 +++++++++++--------- templates/history.html | 166 ++++++++--- templates/import_students.html | 233 ++++++++++------ templates/index.html | 168 ++++++++---- templates/loan_tablet.html | 177 ++++++------ templates/non_loanable_devices.html | 184 ++++++++++--- templates/project_management.html | 293 +++++++------------- templates/student_detail.html | 328 +++++++++++----------- templates/students.html | 351 +++++++++++++----------- 15 files changed, 1766 insertions(+), 1229 deletions(-) diff --git a/templates/add_non_loanable_device.html b/templates/add_non_loanable_device.html index 52ec344..62eaafd 100644 --- a/templates/add_non_loanable_device.html +++ b/templates/add_non_loanable_device.html @@ -1,63 +1,106 @@ {% extends "base.html" %} {% block content %} -

{{ _('Add Non-Loanable Device') }}

-

{{ _('Add a device that will be tracked in inventory but cannot be loaned to users (e.g., projectors, monitors, etc.)') }}

- -
-
- - -
+
+ {# Page Header #} +
+

{{ _('Add Non-Loanable Device') }}

+

{{ _('Add a device that will be tracked in inventory but cannot be loaned to users (e.g., projectors, monitors, etc.)') }}

+
-
- - + {# Device Form #} +
+
+

{{ _('Device Information') }}

+
+ +
+ + +
-
- - -
+
+ + +
-
- - -
+
+ + +
-
- - -
+
+ + +

{{ _('Each device must have a unique serial number') }}

+
-
- - -
+
+ + +

{{ _('Optional location where the device is stored') }}

+
-
- - -
+
+
+ + +
-
- - -
+
+ + +
+
-
- - {{ _('Cancel') }} +
+ + +
+ +
+ + + + + {{ _('Cancel') }} + + +
+
- +
+
{% endblock %} diff --git a/templates/add_student.html b/templates/add_student.html index c74b276..a6bd959 100644 --- a/templates/add_student.html +++ b/templates/add_student.html @@ -3,136 +3,140 @@ {% block title %}{{ gettext('Add Student') }}{% endblock %} {% block content %} -
-
-
-

{{ gettext('Add Student') }}

- -
-
-
{{ gettext('Student Information') }}
+
+ {# Page Header #} +
+

{{ gettext('Add Student') }}

+

{{ gettext('Register a new student in the system') }}

+
+ + {# Student Form #} +
+
+

{{ gettext('Student Information') }}

+
+
+
+ {# Identification Section #} +
+

{{ gettext('Identification') }}

+ +
+ + +

{{ gettext('Unique internal identification code') }}

+
+ +
+ + +

{{ gettext('National ID, Foreign ID, or Passport number') }}

+
+ +
+ + +
+ +
+ + +
+ +
+ + +
-
- - - -
- {{ gettext('Identification') }} - -
- -
- -
{{ gettext('Unique internal identification code') }}
-
-
- -
- -
- -
{{ gettext('National ID, Foreign ID, or Passport number') }}
-
-
- -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
-
- - -
- {{ gettext('Personal Information') }} - -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
{{ gettext('Format: YYYY-MM-DD') }}
-
-
- -
- -
- -
-
-
- - -
- {{ gettext('Study Information') }} - -
- -
- -
{{ gettext('E.g., 1º FPB BÁSICA') }}
-
-
-
- - -
- - {{ gettext('Cancel') }} - - -
- + + {# Personal Information Section #} +
+

{{ gettext('Personal Information') }}

+ +
+ + +
+ +
+ + +
+ +
+ + +

{{ gettext('Full name for display purposes') }}

+
+ +
+ + +
+ +
+ + +
+ +
+ + +

{{ gettext('Class or study group') }}

+
-
+ +
+ + + + + {{ gettext('Cancel') }} + + +
+
diff --git a/templates/add_tablet.html b/templates/add_tablet.html index bc1fa4b..5362d02 100644 --- a/templates/add_tablet.html +++ b/templates/add_tablet.html @@ -1,30 +1,67 @@ {% extends "base.html" %} {% block content %} -

{{ _('Add New Tablet') }}

-
-
- - -
+
+ {# Page Header #} +
+

{{ _('Add New Tablet') }}

+

{{ _('Register a new tablet in the system') }}

+
-
- - + {# Tablet Form #} +
+
+

{{ _('Tablet Information') }}

+
+ +
+ + +
-
- - -
+
+ + +
-
- - -
+
+ + +

{{ _('Each tablet must have a unique serial number') }}

+
-
- +
+ + +
+ +
+ + + + + {{ _('Cancel') }} + + +
+
- +
+
{% endblock %} diff --git a/templates/add_user.html b/templates/add_user.html index 78439d9..708066b 100644 --- a/templates/add_user.html +++ b/templates/add_user.html @@ -1,30 +1,69 @@ {% extends "base.html" %} {% block content %} -

{{ _('Add New User') }}

-
-
- - -
+
+ {# Page Header #} +
+

{{ _('Add New User') }}

+

{{ _('Register a new staff user in the system') }}

+
-
- - + {# User Form #} +
+
+

{{ _('User Information') }}

+
+ +
+ + +
-
- - -
+
+ + +

{{ _('Optional email address') }}

+
-
- - -
+
+ + +

{{ _('Optional phone number') }}

+
-
- +
+ + +

{{ _('Unique identification for the staff member') }}

+
+ +
+ + + + + {{ _('Cancel') }} + + +
+
- +
+
{% endblock %} diff --git a/templates/base.html b/templates/base.html index b748570..fcf9189 100644 --- a/templates/base.html +++ b/templates/base.html @@ -125,6 +125,94 @@ background-color: #374151; color: #e0e0e0; } + + /* Responsive Table Styles */ + .table-container { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + border-radius: 0.5rem; + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1); + } + + .table-responsive { + width: 100%; + border-collapse: collapse; + background-color: white; + } + + .table-responsive thead { + background-color: #f9fafb; + } + + .table-responsive th { + padding: 0.75rem 1rem; + text-align: left; + font-size: 0.75rem; + font-weight: 600; + color: #6b7280; + text-transform: uppercase; + letter-spacing: 0.05em; + white-space: nowrap; + border-bottom: 2px solid #e5e7eb; + } + + .table-responsive td { + padding: 0.75rem 1rem; + font-size: 0.875rem; + color: #374151; + border-bottom: 1px solid #e5e7eb; + white-space: nowrap; + } + + .table-responsive tbody tr:hover { + background-color: #f9fafb; + } + + /* Mobile Card Layout */ + @media (max-width: 640px) { + .table-card-mobile { + display: none; + } + + .mobile-cards { + display: flex; + flex-direction: column; + gap: 0.75rem; + } + + .mobile-card { + background-color: white; + border-radius: 0.5rem; + padding: 1rem; + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1); + } + + .mobile-card .card-row { + display: flex; + justify-content: space-between; + align-items: center; + padding: 0.25rem 0; + border-bottom: 1px solid #f3f4f6; + } + + .mobile-card .card-row:last-child { + border-bottom: none; + } + + .mobile-card .card-label { + font-size: 0.75rem; + font-weight: 600; + color: #6b7280; + text-transform: uppercase; + letter-spacing: 0.05em; + } + + .mobile-card .card-value { + font-size: 0.875rem; + color: #374151; + text-align: right; + } + } diff --git a/templates/edit_non_loanable_device.html b/templates/edit_non_loanable_device.html index 339a252..68d8625 100644 --- a/templates/edit_non_loanable_device.html +++ b/templates/edit_non_loanable_device.html @@ -1,71 +1,116 @@ {% extends "base.html" %} {% block content %} -

{{ _('Edit Non-Loanable Device') }}

- -
-
- - -
+
+ {# Page Header #} +
+

{{ _('Edit Non-Loanable Device') }}

+

{{ _('Update device information') }}

+
-
- - + {# Device Form #} +
+
+

{{ _('Device Information') }}

+
+ +
+ + +
-
- - -
+
+ + +
-
- - -
+
+ + +
-
- - -
+
+ + +

{{ _('Each device must have a unique serial number') }}

+
-
- - -
+
+ + +

{{ _('Optional location where the device is stored') }}

+
-
- - -
+
+ + +
-
- - -
+
+
+ + +
-
- - -
+
+ + +
+
-
- - {{ _('Cancel') }} +
+ + +
+ +
+ + + + + {{ _('Cancel') }} + + +
+
- +
+
{% endblock %} diff --git a/templates/edit_student.html b/templates/edit_student.html index c6856f2..7e92575 100644 --- a/templates/edit_student.html +++ b/templates/edit_student.html @@ -3,144 +3,165 @@ {% block title %}{{ gettext('Edit Student') }} - {{ student.full_name }}{% endblock %} {% block content %} -
-
-
- - -

{{ gettext('Edit Student') }}: {{ student.full_name }}

- -
-
-
{{ gettext('Student Information') }}
+
+ {# Breadcrumb #} + + + {# Page Header #} +
+

{{ gettext('Edit Student') }}: {{ student.full_name }}

+

{{ gettext('Update student information') }}

+
+ + {# Student Form #} +
+
+

{{ gettext('Student Information') }}

+
+
+
+ {# Identification Section #} +
+

{{ gettext('Identification') }}

+ +
+ + +

{{ gettext('Unique internal identification code') }}

+
+ +
+ + +

{{ gettext('National ID, Foreign ID, or Passport number') }}

+
+ +
+ + +
+ +
+ + +
+ +
+ + +
-
- - - -
- {{ gettext('Identification') }} - -
- -
- -
{{ gettext('Unique internal identification code') }}
-
-
- -
- -
- -
{{ gettext('National ID, Foreign ID, or Passport number') }}
-
-
- -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
-
- - -
- {{ gettext('Personal Information') }} - -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
{{ gettext('Format: YYYY-MM-DD') }}
-
-
- -
- -
- -
-
-
- - -
- {{ gettext('Study Information') }} - -
- -
- -
{{ gettext('E.g., 1º FPB BÁSICA') }}
-
-
-
- - -
- - {{ gettext('Cancel') }} - - -
- + + {# Personal Information Section #} +
+

{{ gettext('Personal Information') }}

+ +
+ + +
+ +
+ + +
+ +
+ + +

{{ gettext('Full name for display purposes') }}

+
+ +
+ + +
+ +
+ + +
+ +
+ + +

{{ gettext('Class or study group') }}

+
-
+ +
+ + + + + {{ gettext('Cancel') }} + + +
+
diff --git a/templates/history.html b/templates/history.html index b5018e9..bcb98ff 100644 --- a/templates/history.html +++ b/templates/history.html @@ -1,37 +1,139 @@ {% extends "base.html" %} {% block content %} -
-

{{ _('Loan History') }}

- {% if loans %} -
- - - - - - - - - - - - - {% for loan in loans %} - - - - - - - - - {% endfor %} - -
{{ _('Tablet') }}{{ _('Serial Number') }}{{ _('Borrower') }}{{ _('Loan Date') }}{{ _('Return Date') }}{{ _('Status') }}
{{ loan.brand }} {{ loan.model }}{{ loan.serial_number }}{{ loan.name }}{{ loan.loan_date }}{{ loan.return_date or '-' }}{{ loan.status }}
-
- {% else %} -

{{ _('No loan history available.') }}

- {% endif %} +
+ {# Page Header #} +
+
+

{{ _('Loan History') }}

+

{{ _('View all past and current tablet loans') }}

+
+ + + + + {{ _('Back to Dashboard') }} +
+ + {% if loans %} + {# Desktop Table (hidden on mobile) #} +
+ + + + + + + + + + + + + {% for loan in loans %} + + + + + + + + + {% endfor %} + +
{{ _('Tablet') }}{{ _('Serial Number') }}{{ _('Borrower') }}{{ _('Loan Date') }}{{ _('Return Date') }}{{ _('Status') }}
+
{{ loan.brand }} {{ loan.model }}
+
+ {{ loan.serial_number }} + +
{{ loan.name }}
+
{{ loan.identification }}
+
+ {{ loan.loan_date[:10] if loan.loan_date else _('N/A') }} +
+ {{ loan.loan_date[11:16] if loan.loan_date else '' }} +
+ {% if loan.return_date %} + {{ loan.return_date[:10] }} +
+ {{ loan.return_date[11:16] }} + {% else %} + - + {% endif %} +
+ + {{ loan.status }} + +
+
+ + {# Mobile Cards (hidden on desktop) #} + + {% else %} +
+ + + +

{{ _('No loan history available.') }}

+ + {{ _('Create a Loan') }} + +
+ {% endif %} +
+ + {% endblock %} diff --git a/templates/import_students.html b/templates/import_students.html index 5d712a5..c343c90 100644 --- a/templates/import_students.html +++ b/templates/import_students.html @@ -3,99 +3,154 @@ {% block title %}{{ gettext('Import Students from CSV') }}{% endblock %} {% block content %} -
-
-
-

{{ gettext('Import Students from CSV') }}

- -
-
-
{{ gettext('Instructions') }}
-
-
-
    -
  • {{ gettext('Upload a CSV file with student data') }}
  • -
  • {{ gettext('The file should be encoded in ISO-8859-1 (Latin-1)') }}
  • -
  • {{ gettext('Required columns: Apellidos, Nombre (will be split), C.I.A.L., Fecha Nac.') }}
  • -
  • {{ gettext('Optional columns: NIF/NIE/Pas., Registro, Expediente, Sexo, Grupo') }}
  • -
  • {{ gettext('The "Estudio" column will be discarded') }}
  • -
  • {{ gettext('Duplicate students (by CIAL code or NIF/NIE) will be skipped') }}
  • -
-

- {{ gettext('Example CSV format:') }}
- Nº Or.,"Apellidos, Nombre",Fecha Nac.,C.I.A.L.,NIF/NIE/Pas.,Registro,Expediente,Sexo,Grupo,Estudio -

-
+
+ {# Page Header #} +
+

{{ gettext('Import Students from CSV') }}

+

{{ gettext('Bulk import student data from a CSV file') }}

+
+ + {# Instructions Card #} +
+
+

{{ gettext('Instructions') }}

+
+
+
    +
  • + + + + {{ gettext('Upload a CSV file with student data') }} +
  • +
  • + + + + {{ gettext('The file should be encoded in ISO-8859-1 (Latin-1)') }} +
  • +
  • + + + + {{ gettext('Required columns: Apellidos, Nombre (will be split), C.I.A.L., Fecha Nac.') }} +
  • +
  • + + + + {{ gettext('Optional columns: NIF/NIE/Pas., Registro, Expediente, Sexo, Grupo') }} +
  • +
  • + + + + {{ gettext('The "Estudio" column will be discarded') }} +
  • +
  • + + + + {{ gettext('Duplicate students (by CIAL code or NIF/NIE) will be skipped') }} +
  • +
+
+

+ {{ gettext('Example CSV format:') }}
+ Nº Or.,"Apellidos, Nombre",Fecha Nac.,C.I.A.L.,NIF/NIE/Pas.,Registro,Expediente,Sexo,Grupo,Estudio +

- -
-
-
{{ gettext('Upload CSV File') }}
+
+
+ + {# Upload Form #} +
+
+

{{ gettext('Upload CSV File') }}

+
+
+
+
+ + +

{{ gettext('Select a CSV file to upload') }}

-
- -
- - -
{{ gettext('Select a CSV file to upload') }}
-
- -
- - {{ gettext('Cancel') }} - - -
- -
-
- - -
-
-
{{ gettext('Sample Data Format') }}
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{{ gettext('Nº Or.') }}{{ gettext('Apellidos, Nombre') }}{{ gettext('Fecha Nac.') }}{{ gettext('C.I.A.L.') }}{{ gettext('NIF/NIE/Pas.') }}{{ gettext('Registro') }}{{ gettext('Expediente') }}{{ gettext('Sexo') }}{{ gettext('Grupo') }}{{ gettext('Estudio') }}
1PERIQUITA DE LOS PALOTES, JUANITA24/08/2009B19L64119K24587243H4847M1º FPB BÁSICA1º CFGB Servicios Socioculturales...
-
-
- {{ gettext('Note: The "Estudio" field will be discarded during import.') }} -
+ +
+ + + + + {{ gettext('Cancel') }} + +
+ +
+
+ + {# Sample Data Preview #} +
+
+

{{ gettext('Sample Data Format') }}

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{ gettext('Nº Or.') }}{{ gettext('Apellidos, Nombre') }}{{ gettext('Fecha Nac.') }}{{ gettext('C.I.A.L.') }}{{ gettext('NIF/NIE/Pas.') }}{{ gettext('Registro') }}{{ gettext('Expediente') }}{{ gettext('Sexo') }}{{ gettext('Grupo') }}{{ gettext('Estudio') }}
1García López, María15/03/200512345678A12345678AREG001EXP001F2º ESO AESO
2Martínez Ruiz, Carlos22/07/200487654321B87654321BREG002EXP002M3º ESO BESO
+

+ {{ gettext('Estudio') }} + {{ gettext('column will be discarded during import') }} +

diff --git a/templates/index.html b/templates/index.html index 5f0cc43..226b535 100644 --- a/templates/index.html +++ b/templates/index.html @@ -18,43 +18,34 @@
{% if available_tablets %} -
- - + {# Desktop Table (hidden on mobile) #} +
+
+ - - - - - + + + + + - + {% for tablet in available_tablets %} - - + - - - -
- {{ _('Brand') }} - - {{ _('Model') }} - - {{ _('Serial Number') }} - - {{ _('Notes') }} - - {{ _('Actions') }} - {{ _('Brand') }}{{ _('Model') }}{{ _('Serial Number') }}{{ _('Notes') }}{{ _('Actions') }}
+
{{ tablet.brand }}
+ {{ tablet.model }} + {{ tablet.serial_number }} + {{ tablet.notes or '-' }} + @@ -69,6 +60,41 @@
+ + {# Mobile Cards (hidden on desktop) #} + {% else %}
@@ -100,45 +126,37 @@
{% if active_loans %} -
- - + {# Desktop Table (hidden on mobile) #} +
+
+ - - - - - + + + + + - + {% for loan in active_loans %} - - + - - - -
- {{ _('Tablet') }} - - {{ _('Serial Number') }} - - {{ _('Borrower') }} - - {{ _('Loan Date') }} - - {{ _('Actions') }} - {{ _('Tablet') }}{{ _('Serial Number') }}{{ _('Borrower') }}{{ _('Loan Date') }}{{ _('Actions') }}
+
{{ loan.brand }} {{ loan.model }}
+ {{ loan.serial_number }} +
{{ loan.name }}
{{ loan.identification }}
+ {{ loan.loan_date[:10] if loan.loan_date else _('N/A') }} - {{ loan.loan_date[11:16] if loan.loan_date else '' }} +
+ {{ loan.loan_date[11:16] if loan.loan_date else '' }}
+ @@ -153,6 +171,46 @@
+ + {# Mobile Cards (hidden on desktop) #} + {% else %}
@@ -164,4 +222,12 @@ {% endif %}
+ + {% endblock %} diff --git a/templates/loan_tablet.html b/templates/loan_tablet.html index 11b9f82..7302524 100644 --- a/templates/loan_tablet.html +++ b/templates/loan_tablet.html @@ -3,84 +3,101 @@ {% block title %}{{ gettext('Loan Tablet') }}{% endblock %} {% block content %} -
-
-
-

{{ gettext('Loan Tablet') }}

- -
-
-
{{ gettext('Loan Information') }}
+
+ {# Page Header #} +
+

{{ gettext('Loan Tablet') }}

+

{{ gettext('Loan a tablet to a user or student') }}

+
+ + {# Loan Form #} +
+
+

{{ gettext('Loan Information') }}

+
+
+
+ {# Tablet Selection #} +
+ + + +

{{ gettext('Select which tablet to loan') }}

-
- - - -
- - - -
{{ gettext('Select which tablet to loan') }}
-
- - -
- - - -
{{ gettext('Select the staff member processing the loan') }}
-
- - -
- - - -
{{ gettext('Optionally associate this loan with a student') }}
-
- - -
- - {{ gettext('Cancel') }} - - -
- + + {# User Selection (Staff) #} +
+ + + +

{{ gettext('Select the staff member processing the loan') }}

-
+ + {# Student Selection (Optional) #} +
+ + + +

{{ gettext('Optionally associate this loan with a student') }}

+
+ + {# Form Actions #} +
+ + + + + {{ gettext('Cancel') }} + + +
+
@@ -102,12 +119,4 @@ } } - - {% endblock %} diff --git a/templates/non_loanable_devices.html b/templates/non_loanable_devices.html index 489cc4d..463f245 100644 --- a/templates/non_loanable_devices.html +++ b/templates/non_loanable_devices.html @@ -1,45 +1,149 @@ {% extends "base.html" %} {% block content %} -
-

{{ _('Non-Loanable Devices Inventory') }}

-

{{ _('These devices are tracked in inventory but cannot be loaned to users.') }}

- {{ _('Add Non-Loanable Device') }} - - {% if devices %} -
- - - - - - - - - - - - - - {% for device in devices %} - - - - - - - - - - {% endfor %} - -
{{ _('Type') }}{{ _('Brand') }}{{ _('Model') }}{{ _('Serial Number') }}{{ _('Location') }}{{ _('Status') }}{{ _('Actions') }}
{{ device.device_type }}{{ device.brand }}{{ device.model }}{{ device.serial_number }}{{ device.location or '-' }}{{ device.status }} - {{ _('Edit') }} - {{ _('Delete') }} -
-
- {% else %} -

{{ _('No non-loanable devices registered.') }}

- {% endif %} +
+ {# Page Header #} +
+
+

{{ _('Non-Loanable Devices Inventory') }}

+

{{ _('These devices are tracked in inventory but cannot be loaned to users.') }}

+
+ + + + + {{ _('Add Non-Loanable Device') }} +
+ + {% if devices %} + {# Desktop Table (hidden on mobile) #} +
+ + + + + + + + + + + + + + {% for device in devices %} + + + + + + + + + + {% endfor %} + +
{{ _('Type') }}{{ _('Brand') }}{{ _('Model') }}{{ _('Serial Number') }}{{ _('Location') }}{{ _('Status') }}{{ _('Actions') }}
{{ device.device_type }}{{ device.brand }}{{ device.model }} + {{ device.serial_number }} + {{ device.location or '-' }} + + {{ device.status }} + + + +
+
+ + {# Mobile Cards (hidden on desktop) #} + + {% else %} +
+ + + +

{{ _('No non-loanable devices registered.') }}

+ + {{ _('Add Device') }} + +
+ {% endif %} +
+ + {% endblock %} diff --git a/templates/project_management.html b/templates/project_management.html index 606b1da..38a0d16 100644 --- a/templates/project_management.html +++ b/templates/project_management.html @@ -1,213 +1,122 @@ {% extends "base.html" %} {% block content %} -

{{ _('Project Management - Development Notes') }}

- -
-
-
- - - +
+ {# Page Header #} +
+

{{ _('Project Management - Development Notes') }}

+

{{ _('Internal development notes and project documentation') }}

+
+ + {# Editor Section #} +
+
+

{{ _('Editor') }}

+
+ +
- -
-
-

{{ _('Editor') }}

-
- -
-

{{ _('Preview') }}

-
+
+

{{ _('Preview') }}

+
+
- - + - - + // Clear status after 3 seconds + setTimeout(() => { + status.textContent = ''; + status.className = 'text-sm text-gray-500 italic'; + }, 3000); + } + {% endblock %} diff --git a/templates/student_detail.html b/templates/student_detail.html index f7b6706..f29e0c1 100644 --- a/templates/student_detail.html +++ b/templates/student_detail.html @@ -3,179 +3,175 @@ {% block title %}{{ gettext('Student Details') }} - {{ student.full_name }}{% endblock %} {% block content %} -
-
-
- - -
-

{{ student.full_name }}

- +
+ {# Breadcrumb #} + + + {# Student Header #} +
+
+

{{ student.full_name }}

+

{{ gettext('Student Details') }}

+
+ +
+ + {# Student Information and Assigned Devices #} +
+ {# Student Information Card #} +
+
+

{{ gettext('Student Information') }}

- -
- -
-
-
-
{{ gettext('Student Information') }}
-
-
-
-
{{ gettext('ID') }}:
-
{{ student.id }}
- -
{{ gettext('CIAL Code') }}:
-
{{ student.cial_code }}
- -
{{ gettext('NIF/NIE/Passport') }}:
-
{{ student.nif_nie_passport or '-' }}
- -
{{ gettext('Registration Number') }}:
-
{{ student.registration_number or '-' }}
- -
{{ gettext('File Number') }}:
-
{{ student.file_number or '-' }}
- -
{{ gettext('Order Number') }}:
-
{{ student.order_number or '-' }}
- -
{{ gettext('Full Name') }}:
-
{{ student.full_name }}
- -
{{ gettext('First Name') }}:
-
{{ student.first_name }}
- -
{{ gettext('Last Name') }}:
-
{{ student.last_name }}
- -
{{ gettext('Birth Date') }}:
-
{{ student.birth_date or '-' }}
- -
{{ gettext('Gender') }}:
-
{{ student.gender or '-' }}
- -
{{ gettext('Study Group') }}:
-
{{ student.study_group or '-' }}
- -
{{ gettext('Created') }}:
-
{{ student.created_at }}
- -
{{ gettext('Updated') }}:
-
{{ student.updated_at }}
-
-
+
+
+
+
{{ gettext('ID') }}:
+
{{ student.id }}
-
- - -
-
-
-
{{ gettext('Assigned Devices') }}
-
-
- - -
{{ gettext('Tablets') }}
- {% if assigned_tablets %} -
    - {% for tablet in assigned_tablets %} -
  • - {{ tablet.brand }} {{ tablet.model }}
    - {{ gettext('Serial:') }} {{ tablet.serial_number }}
    - {{ gettext('Status:') }} {{ tablet.status }} -
  • - {% endfor %} -
- {% else %} -

{{ gettext('No tablets assigned') }}

- {% endif %} - - -
{{ gettext('Other Devices') }}
- {% if assigned_devices %} -
    - {% for device in assigned_devices %} -
  • - {{ device.brand }} {{ device.model }}
    - {{ gettext('Type:') }} {{ device.device_type }}
    - {{ gettext('Serial:') }} {{ device.serial_number }} -
  • - {% endfor %} -
- {% else %} -

{{ gettext('No other devices assigned') }}

- {% endif %} -
+
+
{{ gettext('CIAL Code') }}:
+
+ {{ student.cial_code }} +
-
+
+
{{ gettext('NIF/NIE/Passport') }}:
+
{{ student.nif_nie_passport or '-' }}
+
+
+
{{ gettext('Registration Number') }}:
+
{{ student.registration_number or '-' }}
+
+
+
{{ gettext('File Number') }}:
+
{{ student.file_number or '-' }}
+
+
+
{{ gettext('Order Number') }}:
+
{{ student.order_number or '-' }}
+
+
+
{{ gettext('Full Name') }}:
+
{{ student.full_name }}
+
+
+
{{ gettext('First Name') }}:
+
{{ student.first_name }}
+
+
+
{{ gettext('Last Name') }}:
+
{{ student.last_name }}
+
+
+
{{ gettext('Birth Date') }}:
+
{{ student.birth_date or '-' }}
+
+
+
{{ gettext('Gender') }}:
+
{{ student.gender or '-' }}
+
+
+
{{ gettext('Study Group') }}:
+
{{ student.study_group or '-' }}
+
+
+
{{ gettext('Created') }}:
+
{{ student.created_at }}
+
+
+
{{ gettext('Updated') }}:
+
{{ student.updated_at }}
+
+
- - -
-
-
-
{{ gettext('Loan History') }}
-
-
-
- - - - - - - - - - - - {% if loans %} - {% for loan in loans %} - - - - - - - - {% endfor %} - {% else %} - - - - {% endif %} - -
{{ gettext('ID') }}{{ gettext('Tablet') }}{{ gettext('Loan Date') }}{{ gettext('Return Date') }}{{ gettext('Status') }}
{{ loan.id }}{{ loan.brand }} {{ loan.model }} ({{ loan.serial_number }}){{ loan.loan_date }}{{ loan.return_date or '-' }} - - {{ loan.status }} - -
- {{ gettext('No loan history') }} -
+
+ + {# Assigned Devices Card #} +
+
+

{{ gettext('Assigned Devices') }}

+
+
+ {# Assigned Tablets #} +

{{ gettext('Tablets') }}

+ {% if assigned_tablets %} +
+ {% for tablet in assigned_tablets %} +
+
+
{{ tablet.brand }} {{ tablet.model }}
+
+ {{ gettext('Serial:') }} {{ tablet.serial_number }} +
+
+ {{ gettext('Status:') }} + + {{ tablet.status }} + +
+ {% endfor %}
-
- -
- - {{ gettext('Back to Students') }} - + {% else %} +

{{ gettext('No tablets assigned.') }}

+ {% endif %} + + {# Assigned Non-Loanable Devices #} +

{{ gettext('Non-Loanable Devices') }}

+ {% if assigned_devices %} +
+ {% for device in assigned_devices %} +
+
+
{{ device.brand }} {{ device.model }}
+
+ {{ gettext('Serial:') }} {{ device.serial_number }} +
+
+ {{ gettext('Type:') }} {{ device.device_type }} +
+
+
+ {% endfor %} +
+ {% else %} +

{{ gettext('No non-loanable devices assigned.') }}

+ {% endif %}
diff --git a/templates/students.html b/templates/students.html index 1fc4a0a..2e9e670 100644 --- a/templates/students.html +++ b/templates/students.html @@ -3,180 +3,199 @@ {% block title %}{{ gettext('Students') }}{% endblock %} {% block content %} -
-
-
-

{{ gettext('Students') }}

- -
-
-
-

{{ gettext('Total students:') }} {{ total_students }}

-
- -
+
+ {# Page Header #} +
+
+

{{ gettext('Students') }}

+

{{ gettext('Total students:') }} {{ total_students }}

+
+ +
+ + {# Search and Filter Form #} +
+

{{ gettext('Search & Filter') }}

+
+
+ +
- - -
-
-
{{ gettext('Search & Filter') }}
-
-
- -
- - -
-
- - -
-
- - -
-
- -
- + + {% if students %} + {# Desktop Table (hidden on mobile) #} +
+ + + + + + + + + + + + + + + {% for student in students %} + + + + + + + + + + + {% endfor %} + +
{{ gettext('ID') }}{{ gettext('Name') }}{{ gettext('CIAL Code') }}{{ gettext('NIF/NIE') }}{{ gettext('Gender') }}{{ gettext('Study Group') }}{{ gettext('Birth Date') }}{{ gettext('Actions') }}
{{ student.id }} + + {{ student.last_name }}, {{ student.first_name }} - - - - - - -
-
-
{{ gettext('Student List') }}
-
-
-
- - - - - - - - - - - - - - - {% if students %} - {% for student in students %} - - - - - - - - - - - {% endfor %} - {% else %} - - - - {% endif %} - -
{{ gettext('ID') }}{{ gettext('Name') }}{{ gettext('CIAL Code') }}{{ gettext('NIF/NIE') }}{{ gettext('Gender') }}{{ gettext('Study Group') }}{{ gettext('Birth Date') }}{{ gettext('Actions') }}
{{ student.id }} - - {{ student.last_name }}, {{ student.first_name }} - - {{ student.cial_code }}{{ student.nif_nie_passport or '-' }}{{ student.gender or '-' }}{{ student.study_group or '-' }}{{ student.birth_date or '-' }} - -
- {{ gettext('No students found') }} -
+
+ {{ student.cial_code }} + {{ student.nif_nie_passport }}{{ student.gender }}{{ student.study_group }}{{ student.birth_date }} + +
+
+ + {# Mobile Cards (hidden on desktop) #} + + + {% endblock %}