1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-11 11:13:59 +02:00

[ticket/17010] Add first webpush controller and start ucp integration

PHPBB3-17010
This commit is contained in:
Marc Alexander
2022-09-25 20:23:21 +02:00
parent 9bd9962aea
commit 199bc8f964
8 changed files with 145 additions and 35 deletions

View File

@@ -0,0 +1,71 @@
{% include('ucp_header.html') %}
<form id="ucp" method="post" action="{{ S_UCP_ACTION }}"{{ S_FORM_ENCTYPE }}>
<h2 class="cp-title">{{ TITLE }}</h2>
{% if NOTIFICATIONS_WEBPUSH_ENABLE %}
<div class="panel">
<div class="inner">
<fieldset>
<dl>
<dt><label for="activate_webpush">{{ lang('NOTIFY_WEBPUSH_ENABLE') ~ lang('COLON') }}</label><br><span>{{ lang('NOTIFY_WEBPUSH_ENABLE_EXPLAIN') }}</span></dt>
<dd>
<a href="{{ U_WEBPUSH_SUBSCRIBE }}" data-ajax-action="activate_webpush" id="activate_webpush" title="{{ lang('NOTIFY_WEBPUSH_ACTIVATE') }}">{{ lang('NOTIFY_WEBPUSH_ACTIVATE') }}</a>
</dd>
</dl>
</fieldset>
</div>
</div>
{% endif %}
<div class="panel">
<div class="inner">
<p class="cp-desc">{{ TITLE_EXPLAIN }}</p>
<table class="table1">
<thead>
<tr>
<th>{{ lang('NOTIFICATION_TYPE') }}</th>
{% for method in notification_methods %}
<th class="mark">{{ method.NAME }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for notification_type in notification_types %}
{% if notification_type.GROUP_NAME %}
<tr class="bg3">
<td colspan="{{ NOTIFICATION_TYPES_COLS }}">{{ notification_type.GROUP_NAME }}</td>
</tr>
{% else %}
<tr class="{% if loop.index is even %}bg1{% else %}bg2{% endif %}">
<td>
{{ notification_type.NAME }}
{% if notification_type.EXPLAIN %}<br>&nbsp; &nbsp;{{ notification_type.EXPLAIN }}{% endif %}
</td>
{% for notification_method in notification_type.notification_methods %}
{% apply spaceless %}
<td class="mark">
<input type="checkbox" name="{{ notification_type.TYPE }}_{{ notification_method.METHOD }}"{% if notification_method.SUBSCRIBED %} checked="checked"{% endif %}{% if not notification_method.AVAILABLE %} disabled="disabled"{% endif %}/></td>
{% endapply %}
{% endfor %}
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
</div>
</div>
{% if notification_types or notification_list %}
<fieldset class="display-actions">
<input type="hidden" name="form_time" value="{{ FORM_TIME }}" />
{{ S_HIDDEN_FIELDS }}
<input type="submit" name="submit" value="{% if MODE == 'notification_options' %}{{ lang('SUBMIT') }}{% else %}{{ lang('MARK_READ') }}{% endif %}" class="button1 button button-form" />
<div><a href="#" onclick="$('#ucp input:checkbox').prop('checked', true); return false;">{{ lang('MARK_ALL') }}</a> &bull; <a href="#" onclick="$('#ucp input:checkbox').prop('checked', false); return false;">{{ lang('UNMARK_ALL') }}</a></div>
{{ S_FORM_TOKEN }}
</fieldset>
{% endif %}
</form>
{% include('ucp_footer.html') %}