kaauh_ats/templates/recruitment/settings_list.html

138 lines
6.9 KiB
HTML

{% extends "base.html" %}
{% load widget_tweaks %}
{% load i18n %}
{% block title %}Settings{% endblock %}
{% block content %}
<div class="container-fluid">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{% url 'settings' %}" class="text-decoration-none text-secondary">{% trans "Settings" %}</a></li>
<li class="breadcrumb-item active" aria-current="page" style="
color: #F43B5E; /* Rosy Accent Color */
font-weight: 600;
">{% trans "Integration Settings" %}</li>
</ol>
</nav>
<div class="row">
<div class="col-12">
<div class="d-flex justify-content-between align-items-center mb-4">
<h1 class="h3 mb-0 text-primary-theme">
<i class="fas fa-cog me-2"></i>
{% trans "Integration Settings" %}
</h1>
<a href="{% url 'settings_create' %}" class="btn btn-main-action">
<i class="fas fa-plus me-2"></i>
Create New Setting
</a>
</div>
<!-- Search and Filters -->
<div class="card mb-4">
<div class="card-body">
<form method="get" class="row g-3">
<div class="col-md-8">
<div class="input-group">
<span class="input-group-text">
<i class="fas fa-search"></i>
</span>
<input type="text" class="form-control" name="q"
placeholder="Search settings..." value="{{ search_query }}">
</div>
</div>
<div class="col-md-4">
<button type="submit" class="btn btn-outline-primary">
<i class="fas fa-search"></i> Search
</button>
{% if search_query %}
<a href="{% url 'settings_list' %}" class="btn btn-outline-secondary">
<i class="fas fa-times"></i> Clear
</a>
{% endif %}
</div>
</form>
</div>
</div>
<!-- Results Summary -->
{% if search_query %}
<div class="alert alert-info">
Found {{ page_obj.paginator.count }} setting{{ page_obj.paginator.count|pluralize }} matching "{{ search_query }}"
</div>
{% endif %}
<!-- Settings Table -->
<div class="card">
<div class="card-body">
{% if page_obj %}
<div class="table-responsive">
<table class="table table-hover">
<thead class="table-light">
<tr>
<th style="width: 45%;">Key</th>
<th style="width: 45%;">Value</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for setting in page_obj %}
<tr>
<td>
<code class="text-primary-theme">{{ setting.key }}</code>
</td>
<td>{{ setting.value|truncatechars:50 }}</td>
<td>
<div class="btn-group" role="group">
<a href="{% url 'settings_detail' pk=setting.pk %}"
class="btn btn-sm btn-outline-primary" title="View Details">
<i class="fas fa-eye"></i>
</a>
<a href="{% url 'settings_update' pk=setting.pk %}"
class="btn btn-sm btn-outline-secondary" title="Edit Setting">
<i class="fas fa-edit"></i>
</a>
{% comment %} <form method="post" action="{% url 'settings_delete' pk=setting.pk %}"
onsubmit="return confirm('Are you sure you want to delete this setting?');"
style="display: inline;">
{% csrf_token %}
<button type="submit" class="btn btn-sm btn-outline-danger" title="Delete Setting">
<i class="fas fa-trash"></i>
</button>
</form> {% endcomment %}
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<!-- Pagination -->
{% include "includes/paginator.html" %}
{% else %}
<div class="text-center py-5">
<i class="fas fa-cog fa-3x text-muted mb-3"></i>
<h5 class="text-muted">No settings found</h5>
<p class="text-muted">
{% if search_query %}
No settings match your search criteria "{{ search_query }}".
{% else %}
Get started by creating your first setting.
{% endif %}
</p>
<a href="{% url 'settings_create' %}" class="btn btn-main-action">
<i class="fas fa-plus"></i> Create Setting
</a>
</div>
{% endif %}
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}