2021-07-29 17:29:25 +01:00
|
|
|
{% extends '/stdgrid.html.twig' %}
|
2020-07-26 16:05:07 +01:00
|
|
|
|
2021-11-23 21:09:45 +00:00
|
|
|
{% block title %}{{ 'Settings' | trans }}{% endblock %}
|
2020-07-26 16:05:07 +01:00
|
|
|
|
2021-10-05 22:44:22 +01:00
|
|
|
{% block stylesheets %}
|
|
|
|
{{ parent() }}
|
|
|
|
<link rel="preload" href="{{ asset('assets/default_theme/css/pages/settings.css') }}" as="style" type="text/css">
|
|
|
|
<link rel="stylesheet" href="{{ asset('assets/default_theme/css/pages/settings.css') }}">
|
|
|
|
{% endblock stylesheets %}
|
|
|
|
|
2021-12-08 17:53:29 +00:00
|
|
|
{% macro settings_details_element(title, summary, id, details_content, context, details_ids) %}
|
|
|
|
{% if details_ids is null %}
|
|
|
|
{% set details_ids = [id] %}
|
|
|
|
{% endif %}
|
|
|
|
<details class="section-title-settings" {{ open_details(context.open_details_query, details_ids) }} id={{ id }}>
|
2021-11-23 21:09:45 +00:00
|
|
|
<summary>
|
|
|
|
<h3>
|
|
|
|
{{ title | trans }}
|
|
|
|
{{ icon('arrow-down', 'icon icon-details-open') | raw }}
|
|
|
|
</h3>
|
|
|
|
<em>
|
|
|
|
{{ summary | trans }}
|
|
|
|
</em>
|
|
|
|
</summary>
|
|
|
|
|
2021-12-08 17:53:29 +00:00
|
|
|
{% if details_content is instanceof('Twig\\Markup') %}
|
|
|
|
{{ details_content }}
|
|
|
|
{% else %}
|
|
|
|
{{ form(details_content) }}
|
|
|
|
{% endif %}
|
2021-11-23 21:09:45 +00:00
|
|
|
</details>
|
|
|
|
{% endmacro settings_details_element %}
|
|
|
|
|
2021-12-08 17:53:29 +00:00
|
|
|
{% macro settings_details_container(title, summary, container_id, tabs, context) %}
|
|
|
|
{% set children_ids = [container_id] %}
|
|
|
|
{% set details_content %}
|
|
|
|
<nav class='section-settings-nav'>
|
|
|
|
<ul>
|
|
|
|
{% for tab in tabs %}
|
|
|
|
<hr>
|
|
|
|
<li>
|
|
|
|
{% set content %}
|
|
|
|
{% if tab['controller'] is defined %}
|
|
|
|
{% include tab['controller']['_template'] with tab['controller'] only %}
|
|
|
|
{% else %}
|
|
|
|
{{ form(tab['form']) }}
|
|
|
|
{% endif %}
|
|
|
|
{% endset %}
|
|
|
|
{{ _self.settings_details_element(tab['title'], tab['desc'], tab['id'] ~ '-details', content, context) }}
|
|
|
|
{% set children_ids = children_ids|merge([tab['id'] ~ '-details']) %}
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
{% endset %}
|
|
|
|
{{ _self.settings_details_element(title, summary, container_id, details_content, context, children_ids) }}
|
2021-11-23 21:09:45 +00:00
|
|
|
{% endmacro settings_details_container %}
|
2021-08-09 13:25:08 +01:00
|
|
|
|
2021-11-23 21:09:45 +00:00
|
|
|
{% block body %}
|
|
|
|
<nav class='section-settings'>
|
|
|
|
<h2>Settings</h2>
|
|
|
|
<ul>
|
|
|
|
<li>
|
2021-12-08 17:53:29 +00:00
|
|
|
{% set profile_tabs = [{'title': 'Personal Info', 'desc': 'Nickname, Homepage, Bio, Self Tags and more.', 'id': 'settings-personal-info', 'form': personal_info_form}] %}
|
|
|
|
{% set profile_tabs = profile_tabs|merge(handle_event('PopulateSettingsTabs', app.request, 'profile')) %}
|
|
|
|
{{ _self.settings_details_container('Profile', 'Personal Information, Avatar and Profile', 'settings-profile-details', profile_tabs, _context) }}
|
2021-11-23 21:09:45 +00:00
|
|
|
</li>
|
2021-08-09 13:25:08 +01:00
|
|
|
<hr>
|
2021-12-08 18:47:28 +00:00
|
|
|
<li>
|
|
|
|
{% set muting_tabs = handle_event('PopulateSettingsTabs', app.request, 'muting') %}
|
|
|
|
{{ _self.settings_details_container('Muting', 'Blocked tags and actors', 'settings-muting-details', muting_tabs, _context) }}
|
|
|
|
</li>
|
|
|
|
<hr>
|
2021-08-09 13:25:08 +01:00
|
|
|
<li>
|
2021-12-08 17:53:29 +00:00
|
|
|
{{ _self.settings_details_element('Email', 'Set incoming and outgoing email settings', 'settings-email-details', email_form, _context) }}
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
{{ _self.settings_details_element('Password', 'Change current password', 'settings-password-details', password_form, _context) }}
|
2021-12-03 02:51:41 +00:00
|
|
|
</li>
|
|
|
|
<li>
|
2021-12-08 17:53:29 +00:00
|
|
|
{{ _self.settings_details_element('Language', 'Select and set language preferences', 'settings-language-details', language_form, _context) }}
|
2021-12-03 02:51:41 +00:00
|
|
|
</li>
|
2021-12-08 17:53:29 +00:00
|
|
|
<hr>
|
2021-12-03 02:51:41 +00:00
|
|
|
<li>
|
2021-12-08 17:53:29 +00:00
|
|
|
{% set colour_tabs = handle_event('PopulateSettingsTabs', app.request, 'colours') %}
|
|
|
|
{{ _self.settings_details_container('Colours', 'Customize your interface colours', 'settings-colour-details', colour_tabs, _context) }}
|
2021-08-09 13:25:08 +01:00
|
|
|
</li>
|
|
|
|
<hr>
|
|
|
|
<li>
|
2021-12-08 17:53:29 +00:00
|
|
|
{{ _self.settings_details_container('Notifications', 'Enable/disable notifications (Email, XMPP, Replies...)', 'notifications', tabbed_forms_notify, _context) }}
|
2021-08-09 13:25:08 +01:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
2020-07-26 16:05:07 +01:00
|
|
|
{% endblock body %}
|
|
|
|
|
2021-11-15 13:34:34 +00:00
|
|
|
{% block javascripts %}{% endblock %}
|