Added reviews. Added pricing.
Build and Publish / Build and Publish Docker Image (push) Successful in 6m27s
Build and Publish / Build and Publish Docker Image (push) Successful in 6m27s
This commit is contained in:
@@ -98,6 +98,7 @@
|
||||
<a href="/admin/clients?lang={{ lang.code() }}" {% if active_page == "clients" %}class="is-active"{% endif %}>{{ t.nav_clients }}</a>
|
||||
<a href="/admin/schedule?lang={{ lang.code() }}" {% if active_page == "schedule" %}class="is-active"{% endif %}>{{ t.nav_schedule }}</a>
|
||||
<a href="/admin/media?lang={{ lang.code() }}" {% if active_page == "media" %}class="is-active"{% endif %}>{{ t.nav_media }}</a>
|
||||
<a href="/admin/testimonials?lang={{ lang.code() }}" {% if active_page == "testimonials" %}class="is-active"{% endif %}>{{ t.nav_testimonials }}</a>
|
||||
<a href="/admin/users?lang={{ lang.code() }}" {% if active_page == "users" %}class="is-active"{% endif %}>{{ t.nav_users }}</a>
|
||||
<a href="/admin/settings?lang={{ lang.code() }}" {% if active_page == "settings" %}class="is-active"{% endif %}>{{ t.nav_settings }}</a>
|
||||
</nav>
|
||||
@@ -130,6 +131,9 @@
|
||||
<a href="/admin/media?lang={{ lang.code() }}" {% if active_page == "media" %}class="is-active"{% endif %}>
|
||||
<span class="tab-icon">📷</span>{{ t.nav_media }}
|
||||
</a>
|
||||
<a href="/admin/testimonials?lang={{ lang.code() }}" {% if active_page == "testimonials" %}class="is-active"{% endif %}>
|
||||
<span class="tab-icon">💬</span>{{ t.nav_testimonials }}
|
||||
</a>
|
||||
<a href="/admin/users?lang={{ lang.code() }}" {% if active_page == "users" %}class="is-active"{% endif %}>
|
||||
<span class="tab-icon">🔑</span>{{ t.nav_users }}
|
||||
</a>
|
||||
|
||||
@@ -32,6 +32,12 @@
|
||||
<input class="input" type="text" name="contact_info" placeholder="+7 999 123-45-67 / info@example.com" value="{% for s in &settings %}{% if s.key == "contact_info" %}{{ s.value }}{% endif %}{% endfor %}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="label">{{ t.settings_pricing_info }}</label>
|
||||
<div class="control">
|
||||
<textarea class="input" name="pricing_info" rows="3" style="min-height:70px;resize:vertical;" placeholder="от 600 рублей за визит">{% for s in &settings %}{% if s.key == "pricing_info" %}{{ s.value }}{% endif %}{% endfor %}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="button is-primary">{{ t.settings_save }}</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
{% extends "admin/layout.html" %}
|
||||
{% let active_page = "testimonials" %}
|
||||
|
||||
{% block title %}{{ t.testimonials_title }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="page-head">
|
||||
<h1>{{ t.testimonials_title }}</h1>
|
||||
</div>
|
||||
|
||||
<!-- Add form -->
|
||||
<div class="form-card" style="margin-bottom:1.5rem;">
|
||||
<h2 style="font-size:1.1rem;font-weight:700;margin-bottom:0.75rem;">{{ t.testimonials_add_title }}</h2>
|
||||
<form method="post" action="/admin/testimonials/add" enctype="multipart/form-data">
|
||||
<div class="field">
|
||||
<label class="label">{{ t.testimonials_text }} *</label>
|
||||
<div class="control">
|
||||
<textarea class="input" name="text" rows="3" required style="min-height:80px;resize:vertical;"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="label">{{ t.testimonials_author_note }}</label>
|
||||
<div class="control">
|
||||
<input class="input" type="text" name="author_note">
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="label">{{ t.testimonials_image }}</label>
|
||||
<div class="control">
|
||||
<input class="input" type="file" name="image" accept="image/*">
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="button is-primary">{{ t.testimonials_add_button }}</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- List -->
|
||||
{% if testimonials.is_empty() %}
|
||||
<p style="color:#888;">{{ t.testimonials_empty }}</p>
|
||||
{% else %}
|
||||
{% for item in &testimonials %}
|
||||
<div class="item-card">
|
||||
<div class="item-card-header">
|
||||
<div style="display:flex;align-items:center;gap:0.75rem;">
|
||||
{% if item.image_path.is_some() %}
|
||||
<img src="/admin/testimonials/{{ item.id.unwrap() }}/image" alt="" style="width:48px;height:48px;border-radius:50%;object-fit:cover;">
|
||||
{% endif %}
|
||||
<div>
|
||||
<div style="font-size:0.95rem;line-height:1.5;">{{ item.text }}</div>
|
||||
{% if let Some(note) = item.author_note.as_deref() %}
|
||||
<div style="font-size:0.8rem;color:#888;margin-top:0.2rem;">{{ note }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<span class="badge {% if item.status == "active" %}badge-active{% else %}badge-archived{% endif %}">
|
||||
{% if item.status == "active" %}{{ t.testimonials_status_active }}{% else %}{{ t.testimonials_status_hidden }}{% endif %}
|
||||
</span>
|
||||
</div>
|
||||
<div class="item-card-actions">
|
||||
<form method="post" action="/admin/testimonials/{{ item.id.unwrap() }}/toggle">
|
||||
{% if item.status == "active" %}
|
||||
<button type="submit" class="button btn-sm is-warning is-light">{{ t.action_archive }}</button>
|
||||
{% else %}
|
||||
<button type="submit" class="button btn-sm is-success is-light">{{ t.action_activate }}</button>
|
||||
{% endif %}
|
||||
</form>
|
||||
<form method="post" action="/admin/testimonials/{{ item.id.unwrap() }}/delete" onsubmit="return confirm('Delete?')">
|
||||
<button type="submit" class="button btn-sm is-danger is-light">{{ t.media_delete }}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user