engelsystem/resources/views/pages/faq/overview.twig

63 lines
2.3 KiB
Twig
Raw Normal View History

2020-12-06 00:16:15 +01:00
{% extends 'layouts/app.twig' %}
{% import 'macros/base.twig' as m %}
{% block title %}
{{ __('faq.faq') }}
{% endblock %}
{% block content %}
<div class="container">
<h1>
{{ block('title') }}
{%- if has_permission_to('faq.edit') -%}
{{ m.button(m.icon('plus-lg'), url('admin/faq'), 'secondary') }}
2020-12-06 00:16:15 +01:00
{%- endif %}
</h1>
{% include 'layouts/parts/messages.twig' %}
<div class="row">
{% block text %}
{% if text|default(null) %}
<div class="col-md-12">
{{ text|markdown }}
</div>
{% endif %}
{% endblock %}
{% block row %}
{% for item in items %}
2020-12-27 17:55:41 +01:00
<div class="col-md-12 faq">
<span id="faq-{{ item.id }}" class="ref-id"></span>
2021-07-24 12:38:23 +02:00
<div class="card {% if theme.type =='light' %}bg-light{% else %}bg-secondary{% endif %} mb-4">
<div class="card-header">
{{ item.question }}
<small class="text-muted">
<a class="ref-link" href="#faq-{{ item.id }}">{{ m.icon('link') }}</a>
</small>
2020-12-06 00:16:15 +01:00
</div>
2021-07-24 12:38:23 +02:00
<div class="card-body {{ m.type_bg_class() }}">
2020-12-06 00:16:15 +01:00
{{ item.text|markdown }}
</div>
2021-07-24 12:38:23 +02:00
<div class="card-footer d-flex align-items-center">
<div class="me-3">
{{ m.icon('clock') }} {{ item.updated_at.format(__('Y-m-d H:i')) }}
</div>
2020-12-06 00:16:15 +01:00
{% if has_permission_to('faq.edit') %}
2021-07-24 12:38:23 +02:00
<span class="ms-auto">
{{ m.button(m.icon('pencil-square'), url('admin/faq/' ~ item.id), 'secondary', 'sm') }}
2020-12-06 00:16:15 +01:00
</span>
{% endif %}
</div>
</div>
</div>
{% endfor %}
{% endblock %}
</div>
</div>
{% endblock %}