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-11-23 21:09:45 +00:00
|
|
|
{% macro settings_details_element(title, summary, form_name, context) %}
|
|
|
|
<details class="section-title-settings" {{ open_details(context.open_details_query, [ form_name ]) }} id={{ form_name ~ '-details' }}>
|
|
|
|
<summary>
|
|
|
|
<h3>
|
|
|
|
{{ title | trans }}
|
|
|
|
{{ icon('arrow-down', 'icon icon-details-open') | raw }}
|
|
|
|
</h3>
|
|
|
|
<em>
|
|
|
|
{{ summary | trans }}
|
|
|
|
</em>
|
|
|
|
</summary>
|
|
|
|
|
|
|
|
|
|
|
|
{{ form(attribute(context, form_name) | default) }}
|
|
|
|
</details>
|
|
|
|
{% endmacro settings_details_element %}
|
|
|
|
|
|
|
|
{% macro settings_details_container(title, summary, tabs, context) %}
|
|
|
|
<details class="section-title-settings" {{ open_details(context.open_details_query, tabs) }} id={{ tabs[0] ~ '-details' }}>
|
|
|
|
<summary>
|
|
|
|
<h3>
|
|
|
|
{{ title | trans }}
|
|
|
|
{{ icon('arrow-down', 'icon icon-details-open') | raw }}
|
|
|
|
</h3>
|
|
|
|
<em>
|
|
|
|
{{ summary | trans }}
|
|
|
|
</em>
|
|
|
|
</summary>
|
|
|
|
|
|
|
|
|
|
|
|
{% if title == 'Profile' %}
|
2021-08-09 13:25:08 +01:00
|
|
|
<li>
|
2021-11-23 21:09:45 +00:00
|
|
|
<nav class='section-settings-nav'>
|
|
|
|
<ul>
|
|
|
|
<li>
|
|
|
|
{{ _self.settings_details_element('Personal Info', 'Nickname, Homepage, Bio, Self Tags and more.', 'profile', context) }}
|
|
|
|
</li>
|
2021-09-17 01:08:24 +01:00
|
|
|
|
2021-11-23 21:09:45 +00:00
|
|
|
<hr>
|
2021-09-17 01:08:24 +01:00
|
|
|
|
2021-11-23 21:09:45 +00:00
|
|
|
{% for tab in context.profile_tabs %}
|
2021-09-17 01:08:24 +01:00
|
|
|
<li>
|
2021-11-23 21:09:45 +00:00
|
|
|
<details class="section-title-settings"> {# TODO: add ID and open_details and to parent #}
|
2021-09-17 01:08:24 +01:00
|
|
|
<summary>
|
|
|
|
<h3>{{ tab['title'] }}{{ icon('arrow-down', 'icon icon-details-open') | raw }}</h3>
|
|
|
|
<em>{{ tab['desc'] }}</em>
|
|
|
|
</summary>
|
|
|
|
|
|
|
|
{% include tab['controller']['_template'] with tab['controller'] only %}
|
|
|
|
</details>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<hr>
|
|
|
|
{% endfor %}
|
2021-11-23 21:09:45 +00:00
|
|
|
</ul>
|
|
|
|
</nav>
|
2021-08-09 13:25:08 +01:00
|
|
|
</li>
|
2021-12-03 02:51:41 +00:00
|
|
|
{% elseif title == 'Email' %}
|
2021-11-23 21:09:45 +00:00
|
|
|
<li>
|
2021-12-03 02:51:41 +00:00
|
|
|
{{ form(context.email) }}
|
|
|
|
</li>
|
|
|
|
{% elseif title == 'Password' %}
|
|
|
|
<li>
|
|
|
|
{{ form(context.password) }}
|
|
|
|
</li>
|
|
|
|
{% elseif title == 'Language' %}
|
|
|
|
<li>
|
|
|
|
{{ form(context.language) }}
|
2021-11-23 21:09:45 +00:00
|
|
|
</li>
|
|
|
|
{% elseif title == 'Notifications' %}
|
|
|
|
<li>
|
|
|
|
<nav class='section-settings-nav'>
|
|
|
|
<ul>
|
|
|
|
{% for transport, form_transport in context.tabbed_forms_notify %}
|
|
|
|
<li>
|
|
|
|
<details class="section-title-settings">
|
|
|
|
<summary>
|
|
|
|
<h3>{{ transport }}{{ icon('arrow-down', 'icon icon-details-open') | raw }}</h3>
|
|
|
|
<em>{{ transport }}'s notification options.</em>
|
|
|
|
</summary>
|
|
|
|
|
|
|
|
<div id="form_{{ transport }}" class='form'>
|
|
|
|
{{ form(form_transport) }}
|
|
|
|
</div>
|
|
|
|
</details>
|
|
|
|
</li>
|
|
|
|
<hr>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
{% endif %}
|
|
|
|
</details>
|
|
|
|
{% 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>
|
|
|
|
{% set profile_tabs = handle_event('PopulateProfileSettingsTabs', app.request) %}
|
|
|
|
{{ _self.settings_details_container('Profile', 'Personal Information, Avatar and Profile', ['profile', 'personal-info'], _context) }}
|
|
|
|
</li>
|
2021-08-09 13:25:08 +01:00
|
|
|
<hr>
|
|
|
|
<li>
|
2021-12-03 02:51:41 +00:00
|
|
|
{{ _self.settings_details_container('Email', 'Set incoming and outgoing email settings', ['email'], _context) }}
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
{{ _self.settings_details_container('Password', 'Change current password', ['password'], _context) }}
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
{{ _self.settings_details_container('Language', 'Select and set language preferences', ['language'], _context) }}
|
2021-08-09 13:25:08 +01:00
|
|
|
</li>
|
|
|
|
<hr>
|
|
|
|
<li>
|
2021-11-23 21:09:45 +00:00
|
|
|
{{ _self.settings_details_container('Notifications', 'Enable/disable notifications (Email, XMPP, Replies...)', ['notifications'], _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 %}
|