91 lines
4.5 KiB
HTML
91 lines
4.5 KiB
HTML
{% extends "layouts/base.html" %}
|
|
{% load i18n %}
|
|
|
|
{% block title %}{% trans "Manage Onboarding Content" %}{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="p-6 md:p-8">
|
|
<!-- Header -->
|
|
<div class="flex flex-col md:flex-row md:items-center md:justify-between gap-4 mb-8">
|
|
<div>
|
|
<a href="{% url 'accounts:onboarding_dashboard' %}" class="inline-flex items-center text-navy hover:text-navy mb-2 font-medium">
|
|
<i data-lucide="arrow-left" class="w-4 h-4 mr-2"></i>
|
|
{% trans "Back to Dashboard" %}
|
|
</a>
|
|
<h1 class="text-3xl font-bold text-gray-800">
|
|
{% trans "Onboarding Content" %}
|
|
</h1>
|
|
<p class="text-gray-500">
|
|
{% trans "Manage the content shown during staff onboarding" %}
|
|
</p>
|
|
</div>
|
|
<a href="{% url 'accounts:onboarding_content_create' %}" class="inline-flex items-center justify-center bg-gradient-to-r from-navy to-orange-500 text-white px-6 py-3 rounded-xl font-bold hover:from-navy hover:to-orange-600 transition shadow-lg shadow-blue-200">
|
|
<i data-lucide="plus" class="w-5 h-5 mr-2"></i>
|
|
{% trans "Add Content" %}
|
|
</a>
|
|
</div>
|
|
|
|
<!-- Content List -->
|
|
<div class="bg-white rounded-2xl shadow-sm border border-gray-100 overflow-hidden">
|
|
{% if content_items %}
|
|
<div class="divide-y divide-gray-100">
|
|
{% for item in content_items %}
|
|
<div class="p-6 hover:bg-gray-50 transition">
|
|
<div class="flex items-start gap-4">
|
|
<div class="flex-1">
|
|
<div class="flex items-center gap-3 mb-2">
|
|
<h3 class="text-xl font-bold text-gray-800">{{ item.title }}</h3>
|
|
{% if item.is_active %}
|
|
<span class="bg-green-100 text-green-600 text-xs font-bold px-2 py-1 rounded-full">Active</span>
|
|
{% else %}
|
|
<span class="bg-gray-100 text-gray-500 text-xs font-bold px-2 py-1 rounded-full">Inactive</span>
|
|
{% endif %}
|
|
</div>
|
|
<p class="text-gray-500 text-sm mb-3">
|
|
{{ item.description|truncatewords:20 }}
|
|
</p>
|
|
<div class="flex items-center gap-4 text-sm text-gray-400">
|
|
<span class="flex items-center gap-1">
|
|
<i data-lucide="list" class="w-4 h-4"></i>
|
|
{{ item.content_type }}
|
|
</span>
|
|
<span class="flex items-center gap-1">
|
|
<i data-lucide="hash" class="w-4 h-4"></i>
|
|
Step {{ item.step }}
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<div class="flex items-center gap-2">
|
|
<a href="{% url 'accounts:onboarding_content_edit' item.pk %}" class="p-2 text-gray-400 hover:bg-blue-50 hover:text-blue-500 rounded-lg transition">
|
|
<i data-lucide="edit" class="w-5 h-5"></i>
|
|
</a>
|
|
<a href="{% url 'accounts:onboarding_content_delete' item.pk %}" class="p-2 text-gray-400 hover:bg-red-50 hover:text-red-500 rounded-lg transition">
|
|
<i data-lucide="trash-2" class="w-5 h-5"></i>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% else %}
|
|
<div class="p-12 text-center">
|
|
<div class="inline-flex items-center justify-center w-16 h-16 bg-gray-100 rounded-full mb-4">
|
|
<i data-lucide="file-text" class="w-8 h-8 text-gray-400"></i>
|
|
</div>
|
|
<h3 class="text-lg font-bold text-gray-700 mb-2">{% trans "No Content Yet" %}</h3>
|
|
<p class="text-gray-500 mb-4">{% trans "Start by adding your first onboarding content item" %}</p>
|
|
<a href="{% url 'accounts:onboarding_content_create' %}" class="inline-flex items-center bg-light0 text-white px-6 py-3 rounded-xl font-bold hover:bg-navy transition">
|
|
<i data-lucide="plus" class="w-5 h-5 mr-2"></i>
|
|
{% trans "Add Content" %}
|
|
</a>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
lucide.createIcons();
|
|
});
|
|
</script>
|
|
{% endblock %} |