mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-07 01:06:48 +02:00
[ticket/17010] Add first webpush controller and start ucp integration
PHPBB3-17010
This commit is contained in:
@@ -12,38 +12,6 @@
|
||||
<div class="inner">
|
||||
|
||||
<p class="cp-desc">{TITLE_EXPLAIN}</p>
|
||||
|
||||
<!-- IF MODE == 'notification_options' -->
|
||||
<table class="table1">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{L_NOTIFICATION_TYPE}</th>
|
||||
<!-- BEGIN notification_methods -->
|
||||
<th class="mark">{notification_methods.NAME}</th>
|
||||
<!-- END notification_methods -->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- BEGIN notification_types -->
|
||||
<!-- IF notification_types.GROUP_NAME -->
|
||||
<tr class="bg3">
|
||||
<td colspan="{NOTIFICATION_TYPES_COLS}">{notification_types.GROUP_NAME}</td>
|
||||
</tr>
|
||||
<!-- ELSE -->
|
||||
<tr class="<!-- IF notification_types.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
|
||||
<td>
|
||||
{notification_types.NAME}
|
||||
<!-- IF notification_types.EXPLAIN --><br /> {notification_types.EXPLAIN}<!-- ENDIF -->
|
||||
</td>
|
||||
<!-- BEGIN notification_methods -->
|
||||
<td class="mark"><input type="checkbox" name="{notification_types.TYPE}_{notification_types.notification_methods.METHOD}"<!-- IF notification_types.notification_methods.SUBSCRIBED --> checked="checked"<!-- ENDIF --><!-- IF not notification_types.notification_methods.AVAILABLE --> disabled="disabled"<!-- ENDIF --> /></td>
|
||||
<!-- END notification_methods -->
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
<!-- END notification_types -->
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- ELSE -->
|
||||
<!-- IF .notification_list -->
|
||||
<div class="action-bar bar-top">
|
||||
<div class="pagination">
|
||||
@@ -105,8 +73,6 @@
|
||||
<!-- ELSE -->
|
||||
<p><strong>{L_NO_NOTIFICATIONS}</strong></p>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- ENDIF -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@@ -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> {{ 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> • <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') %}
|
Reference in New Issue
Block a user