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)
This commit is contained in:
parent
1b28021134
commit
06da5bdf2f
15 changed files with 1766 additions and 1229 deletions
|
|
@ -1,63 +1,106 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<h2>{{ _('Add Non-Loanable Device') }}</h2>
|
||||
<p>{{ _('Add a device that will be tracked in inventory but cannot be loaned to users (e.g., projectors, monitors, etc.)') }}</p>
|
||||
|
||||
<form method="POST" action="/add_non_loanable_device">
|
||||
<div class="form-group">
|
||||
<label for="device_type">{{ _('Device Type') }}:</label>
|
||||
<select id="device_type" name="device_type" required>
|
||||
<option value="">{{ _('Select device type...') }}</option>
|
||||
<option value="projector">{{ _('Projector') }}</option>
|
||||
<option value="monitor">{{ _('Monitor') }}</option>
|
||||
<option value="laptop">{{ _('Laptop (non-loanable)') }}</option>
|
||||
<option value="printer">{{ _('Printer') }}</option>
|
||||
<option value="camera">{{ _('Camera') }}</option>
|
||||
<option value="audio">{{ _('Audio Equipment') }}</option>
|
||||
<option value="network">{{ _('Network Equipment') }}</option>
|
||||
<option value="other">{{ _('Other') }}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="max-w-2xl mx-auto space-y-6">
|
||||
{# Page Header #}
|
||||
<div>
|
||||
<h1 class="text-2xl font-bold text-gray-900">{{ _('Add Non-Loanable Device') }}</h1>
|
||||
<p class="text-gray-600 mt-1">{{ _('Add a device that will be tracked in inventory but cannot be loaned to users (e.g., projectors, monitors, etc.)') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="brand">{{ _('Brand') }}:</label>
|
||||
<input type="text" id="brand" name="brand" required>
|
||||
{# Device Form #}
|
||||
<div class="bg-white rounded-lg shadow overflow-hidden">
|
||||
<div class="bg-cobalt-600 px-6 py-4">
|
||||
<h2 class="text-lg font-semibold text-white">{{ _('Device Information') }}</h2>
|
||||
</div>
|
||||
<div class="p-6">
|
||||
<form method="POST" action="/add_non_loanable_device" class="space-y-6">
|
||||
<div>
|
||||
<label for="device_type" class="block text-sm font-medium text-gray-700 mb-1">{{ _('Device Type') }} *</label>
|
||||
<select id="device_type" name="device_type" required
|
||||
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-cobalt-500 focus:border-cobalt-500">
|
||||
<option value="">{{ _('Select device type...') }}</option>
|
||||
<option value="projector">{{ _('Projector') }}</option>
|
||||
<option value="monitor">{{ _('Monitor') }}</option>
|
||||
<option value="laptop">{{ _('Laptop (non-loanable)') }}</option>
|
||||
<option value="printer">{{ _('Printer') }}</option>
|
||||
<option value="camera">{{ _('Camera') }}</option>
|
||||
<option value="audio">{{ _('Audio Equipment') }}</option>
|
||||
<option value="network">{{ _('Network Equipment') }}</option>
|
||||
<option value="other">{{ _('Other') }}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="model">{{ _('Model') }}:</label>
|
||||
<input type="text" id="model" name="model" required>
|
||||
</div>
|
||||
<div>
|
||||
<label for="brand" class="block text-sm font-medium text-gray-700 mb-1">{{ _('Brand') }} *</label>
|
||||
<input type="text" id="brand" name="brand" required
|
||||
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-cobalt-500 focus:border-cobalt-500"
|
||||
placeholder="{{ _('e.g., Epson, Samsung, Dell') }}">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="serial_number">{{ _('Serial Number') }}:</label>
|
||||
<input type="text" id="serial_number" name="serial_number" required>
|
||||
</div>
|
||||
<div>
|
||||
<label for="model" class="block text-sm font-medium text-gray-700 mb-1">{{ _('Model') }} *</label>
|
||||
<input type="text" id="model" name="model" required
|
||||
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-cobalt-500 focus:border-cobalt-500"
|
||||
placeholder="{{ _('e.g., PowerLite 2250U, UltraSharp U2723QE') }}">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="location">{{ _('Location') }}:</label>
|
||||
<input type="text" id="location" name="location">
|
||||
</div>
|
||||
<div>
|
||||
<label for="serial_number" class="block text-sm font-medium text-gray-700 mb-1">{{ _('Serial Number') }} *</label>
|
||||
<input type="text" id="serial_number" name="serial_number" required
|
||||
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-cobalt-500 focus:border-cobalt-500"
|
||||
placeholder="{{ _('Unique serial number') }}">
|
||||
<p class="mt-1 text-sm text-gray-500">{{ _('Each device must have a unique serial number') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="purchase_date">{{ _('Purchase Date') }}:</label>
|
||||
<input type="date" id="purchase_date" name="purchase_date">
|
||||
</div>
|
||||
<div>
|
||||
<label for="location" class="block text-sm font-medium text-gray-700 mb-1">{{ _('Location') }}</label>
|
||||
<input type="text" id="location" name="location"
|
||||
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-cobalt-500 focus:border-cobalt-500"
|
||||
placeholder="{{ _('e.g., Room 101, Lab A, Storage') }}">
|
||||
<p class="mt-1 text-sm text-gray-500">{{ _('Optional location where the device is stored') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="purchase_cost">{{ _('Purchase Cost') }}:</label>
|
||||
<input type="number" id="purchase_cost" name="purchase_cost" step="0.01">
|
||||
</div>
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
||||
<div>
|
||||
<label for="purchase_date" class="block text-sm font-medium text-gray-700 mb-1">{{ _('Purchase Date') }}</label>
|
||||
<input type="date" id="purchase_date" name="purchase_date"
|
||||
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-cobalt-500 focus:border-cobalt-500">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="notes">{{ _('Notes') }}:</label>
|
||||
<textarea id="notes" name="notes"></textarea>
|
||||
</div>
|
||||
<div>
|
||||
<label for="purchase_cost" class="block text-sm font-medium text-gray-700 mb-1">{{ _('Purchase Cost') }}</label>
|
||||
<input type="number" id="purchase_cost" name="purchase_cost" step="0.01"
|
||||
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-cobalt-500 focus:border-cobalt-500"
|
||||
placeholder="{{ _('0.00') }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn">{{ _('Add Device') }}</button>
|
||||
<a href="/non_loanable_devices" class="btn">{{ _('Cancel') }}</a>
|
||||
<div>
|
||||
<label for="notes" class="block text-sm font-medium text-gray-700 mb-1">{{ _('Notes') }}</label>
|
||||
<textarea id="notes" name="notes" rows="3"
|
||||
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-cobalt-500 focus:border-cobalt-500"
|
||||
placeholder="{{ _('Optional notes about the device (condition, accessories, etc.)') }}"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-end gap-3 pt-4 border-t border-gray-200">
|
||||
<a href="/non_loanable_devices"
|
||||
class="inline-flex items-center gap-2 px-4 py-2 bg-gray-200 text-gray-700 rounded-lg hover:bg-gray-300 transition-colors">
|
||||
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
|
||||
</svg>
|
||||
{{ _('Cancel') }}
|
||||
</a>
|
||||
<button type="submit"
|
||||
class="inline-flex items-center gap-2 px-4 py-2 bg-cobalt-600 text-white rounded-lg hover:bg-cobalt-700 transition-colors">
|
||||
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6"></path>
|
||||
</svg>
|
||||
{{ _('Add Device') }}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue