Ajout d'une extension

This commit is contained in:
Gauvain Boiché
2020-04-04 18:27:27 +02:00
parent c3ed8cc1c1
commit 3a964fe237
387 changed files with 58921 additions and 0 deletions

View File

@@ -0,0 +1,117 @@
{% include 'overall_header.html' %}
{% INCLUDECSS '@phpbbstudio_aps/css/aps_form.css' %}
<h1>{{ PAGE_TITLE }}</h1>
<p>{{ lang('ACP_APS_DISPLAY_EXPLAIN', aps_name()) }}</p>
{% if S_ERROR %}
<div class="errorbox">
<h3>{{ lang('WARNING') }}</h3>
<p>{{ ERROR_MSG }}</p>
</div>
{% endif %}
<form class="aps-form" id="aps_display" name="aps_display" action="{{ U_ACTION }}" method="post">
{% EVENT phpbbstudio_aps_acp_display_before %}
<fieldset>
<legend>{{ lang('GENERAL_SETTINGS') }}</legend>
{% EVENT phpbbstudio_aps_acp_display_prepend %}
<dl>
<dt>
<label for="aps_display_top_change_yes">{{ lang('ACP_APS_DISPLAY_TOP_CHANGE') }}</label><br />
<span class="explain">{{ lang('ACP_APS_DISPLAY_TOP_CHANGE_DESC') }}</span>
</dt>
<dd>
<label>
<input class="radio aps-bool" id="aps_display_top_change_yes" name="aps_display_top_change" value="1" type="radio"{{ APS_DISPLAY_TOP_CHANGE ? ' checked' : '' }} />
<span class="aps-button-green">{{ lang('YES') }}</span>
</label>
<label>
<input class="radio aps-bool" id="aps_display_top_change_no" name="aps_display_top_change" value="0" type="radio"{{ APS_DISPLAY_TOP_CHANGE ? '' : ' checked' }} />
<span class="aps-button-red">{{ lang('NO') }}</span>
</label>
</dd>
</dl>
<dl>
<dt>
<label for="aps_display_top_count">{{ lang('ACP_APS_DISPLAY_TOP_COUNT') }}</label><br />
<span class="explain">{{ lang('ACP_APS_DISPLAY_TOP_COUNT_DESC') }}</span>
</dt>
<dd><input class="autowidth" id="aps_display_top_count" name="aps_display_top_count" type="number" value="{{ APS_DISPLAY_TOP_COUNT }}" min="1" required /></dd>
</dl>
<dl>
<dt>
<label for="aps_display_adjustments">{{ lang('ACP_APS_DISPLAY_ADJUSTMENTS') }}</label><br />
<span class="explain">{{ lang('ACP_APS_DISPLAY_ADJUSTMENTS_DESC') }}</span>
</dt>
<dd><input class="autowidth" id="aps_display_adjustments" name="aps_display_adjustments" type="number" value="{{ APS_DISPLAY_ADJUSTMENTS }}" min="1" required /></dd>
</dl>
<dl>
<dt>
<label for="aps_display_graph_time">{{ lang('ACP_APS_DISPLAY_GRAPH_TIME') }}</label><br />
<span class="explain">{{ lang('ACP_APS_DISPLAY_GRAPH_TIME_DESC') }}</span>
</dt>
<dd><input class="autowidth" id="aps_display_graph_time" name="aps_display_graph_time" type="number" min="0" value="{{ APS_DISPLAY_GRAPH_TIME }}" required /></dd>
</dl>
{% EVENT phpbbstudio_aps_acp_display_append %}
</fieldset>
{% EVENT phpbbstudio_aps_acp_display_after %}
<fieldset class="aps-pages notice" data-aps-sortable="true">
{% for page in aps_pages %}
<fieldset>
<dl>
<dt><strong>{{ page.TITLE }}</strong></dt>
<dd>
<label>
<span class="aps-button-blue"><i class="icon fa-arrows-v fa-fw"></i></span>
</label>
</dd>
</dl>
<fieldset data-aps-sortable="true">
{% for block in page.blocks %}
<dl>
<dt><strong>{{ block.TITLE }}</strong></dt>
<dd>
<label>
<input class="radio aps-bool" name="aps_blocks[{{ page.ID }}][{{ loop.index }}]" value="{{ block.ID }}" type="radio"{{ block.S_ACTIVE ? ' checked' : '' }} />
<span class="aps-button-green">{{ lang('ENABLED') }}</span>
</label>
<label>
<input class="radio aps-bool" name="aps_blocks[{{ page.ID }}][{{ loop.index }}]" value="" type="radio"{{ block.S_ACTIVE ? '' : ' checked' }} />
<span class="aps-button-red">{{ lang('DISABLED') }}</span>
</label>
<label>
<span class="aps-button-blue"><i class="icon fa-arrows-v fa-fw"></i></span>
</label>
</dd>
</dl>
{% endfor %}
</fieldset>
</fieldset>
{% endfor %}
</fieldset>
<fieldset>
<legend>{{ lang('ACP_SUBMIT_CHANGES') }}</legend>
<p class="submit-buttons">
<input class="button1" id="submit" name="submit" type="submit" value="{{ lang('SUBMIT') }}">&nbsp;
<input class="button2" id="reset" name="reset" type="reset" value="{{ lang('RESET') }}">
{{ S_FORM_TOKEN }}
</p>
</fieldset>
</form>
{% INCLUDEJS '@phpbbstudio_aps/js/jquery-ui-sortable.min.js' %}
{% INCLUDEJS '@phpbbstudio_aps/js/aps_display.js' %}
{% include 'overall_footer.html' %}

View File

@@ -0,0 +1,81 @@
{% macro location(name, status) %}
<label class="aps-location"><input id="{{ name }}" name="{{ name }}" value="1" type="checkbox"{% if status %} checked{% endif %}><span class="aps-button-green">{{ lang('YES') }}</span><span class="aps-button-red">{{ lang('NO') }}</span></label>
{% endmacro %}
{% from _self import location as location %}
{% INCLUDECSS '@phpbbstudio_aps/css/aps_locations.css' %}
<fieldset class="quick"><a href="{{ U_ACTION }}"><i class="icon fa-reply fa-fw" aria-hidden="true"></i> <span>{{ lang('BACK_TO_PREV') }}</span></a></fieldset>
<form class="aps-form" id="aps_settings" name="aps_settings" action="{{ U_ACTION }}" method="post">
<div class="aps-locations">
<div class="navbar">
<ul>
<li class="has-dropdown">
<i class="icon fa-bars fa-fw" aria-hidden="true"></i> <span>{{ lang('QUICK_LINKS') }}</span>
<div class="dropdown quick-links">
<div class="pointer"></div>
<div class="dropdown-contents">
<div>{{ location('navbar_header_quick_links_before', navbar_header_quick_links_before) }}</div>
<div>{{ lang('QUICK_LINKS') }}</div>
<div>{{ location('navbar_header_quick_links_after', navbar_header_quick_links_after) }}</div>
</div>
</div>
</li>
<li>{{ location('overall_header_navigation_prepend', overall_header_navigation_prepend) }}</li>
<li><i class="icon fa-info-circle fa-fw" aria-hidden="true"></i> <span>{{ lang('FAQ') }}</span></li>
<li>{{ location('overall_header_navigation_append', overall_header_navigation_append) }}</li>
<li><i class="icon fa-cogs fa-fw" aria-hidden="true"></i> <span>{{ lang('ACP_SHORT') }}</span></li>
<li class="right-side">{{ location('navbar_header_user_profile_prepend', navbar_header_user_profile_prepend) }}</li>
<li class="right-side has-dropdown">
<i class="icon fa-user-circle-o fa-fw" aria-hidden="true"></i> <span>{{ USERNAME }}</span>
<div class="dropdown user">
<div class="pointer"></div>
<div class="dropdown-contents">
<div>{{ location('navbar_header_profile_list_before', navbar_header_profile_list_before) }}</div>
<div>{{ lang('UCP') }}</div>
<div>{{ lang('READ_PROFILE') }}</div>
<div>{{ location('navbar_header_profile_list_after', navbar_header_profile_list_after) }}</div>
<div>{{ lang('LOGOUT') }}</div>
</div>
</div>
</li>
<li class="right-side"><i class="icon fa-inbox fa-fw" aria-hidden="true"></i> <span>{{ lang('PRIVATE_MESSAGES') }}</span></li>
<li class="right-side"><i class="icon fa-bell fa-fw" aria-hidden="true"></i> <span>{{ lang('NOTIFICATIONS') }}</span></li>
<li class="right-side">{{ location('navbar_header_user_profile_append', navbar_header_user_profile_append) }}</li>
</ul>
</div>
<p>{{ lang('ACP_APS_LOCATIONS_EXPLAIN') }}</p>
<div class="navbar clearfix">
<ul>
<li><i class="icon fa-home fa-fw" aria-hidden="true"></i> <span>{{ lang('FORUM_INDEX') }}</span></li>
<li>{{ location('overall_footer_breadcrumb_append', overall_footer_breadcrumb_append) }}</li>
<li class="right-side">{{ location('overall_footer_timezone_before', overall_footer_timezone_before) }}</li>
<li class="right-side"><span>{{ lang('ALL_TIMES', "now"|date('TO'), "now"|date('e')) }}</span></li>
<li class="right-side">{{ location('overall_footer_timezone_after', overall_footer_timezone_after) }}</li>
<li class="right-side"><i class="icon fa-trash fa-fw" aria-hidden="true"></i> <span>{{ lang('DELETE_COOKIES') }}</span></li>
<li class="right-side"><i class="icon fa-users fa-fw" aria-hidden="true"></i> <span>{{ lang('MEMBERLIST') }}</span></li>
<li class="right-side">{{ location('overall_footer_teamlink_before', overall_footer_teamlink_before) }}</li>
<li class="right-side"><i class="icon fa-shield fa-fw" aria-hidden="true"></i> <span>{{ lang('THE_TEAM') }}</span></li>
<li class="right-side">{{ location('overall_footer_teamlink_after', overall_footer_teamlink_after) }}</li>
<li class="right-side"><i class="icon fa-envelope fa-fw" aria-hidden="true"></i> <span>{{ lang('CONTACT_US') }}</span></li>
</ul>
</div>
</div>
<fieldset>
<legend>{{ lang('ACP_SUBMIT_CHANGES') }}</legend>
<p class="submit-buttons">
<input type="hidden" name="action" value="locations">
<button class="aps-button-green" type="submit" name="submit_locations"><i class="icon fa-paper-plane fa-fw" aria-hidden="true"></i> <span>{{ lang('SUBMIT') }}</span></button>
<button class="aps-button-red" type="reset" name="reset"><i class="icon fa-refresh fa-fw" aria-hidden="true"></i> <span>{{ lang('RESET') }}</span></button>
</p>
</fieldset>
<fieldset class="quick">
<a href="{{ U_ACTION }}"><i class="icon fa-reply fa-fw" aria-hidden="true"></i> <span>{{ lang('BACK_TO_PREV') }}</span></a>
</fieldset>
</form>

View File

@@ -0,0 +1,42 @@
{% include 'overall_header.html' %}
{% INCLUDECSS '@phpbbstudio_aps/css/aps_common.css' %}
<h1>{{ PAGE_TITLE }}</h1>
<p>{{ lang('ACP_APS_LOGS_EXPLAIN', aps_name()) }}</p>
<form id="aps_logs" name="aps_logs" action="{{ U_ACTION }}" method="post">
<fieldset class="display-options search-box">
<label for="keywords">{{ lang('SEARCH_KEYWORDS') ~ lang('COLON') }}</label> <input type="text" id="keywords" name="keywords" value="{{ S_KEYWORDS }}" />&nbsp;<input type="submit" class="button2" name="filter" value="{{ lang('SEARCH') }}" />
</fieldset>
{% if pagination %}
<div class="pagination top-pagination">
{% include 'pagination.html' %}
</div>
{% endif %}
{% include '@phpbbstudio_aps/aps_logs_list.html' with {'s_include_mark': true} %}
{% if pagination %}
<div class="pagination">
{% include 'pagination.html' %}
</div>
{% endif %}
<fieldset class="display-options">
{{ lang('DISPLAY_LOG') ~ lang('COLON') }} {{ S_LIMIT_DAYS }} &nbsp;
{{ lang('SORT_BY') ~ lang('COLON') }} {{ S_SORT_KEY }} {{ S_SORT_DIR }}
<input class="button2" type="submit" value="{{ lang('GO') }}" name="sort" />
{{ S_FORM_TOKEN }}
</fieldset>
<hr>
<fieldset class="quick">
<input class="button2" type="submit" name="del_all" value="{{ lang('DELETE_ALL') }}" />&nbsp;
<input class="button2" type="submit" name="del_marked" value="{{ lang('DELETE_MARKED') }}" /><br />
<p class="small"><a href="#" onclick="marklist('aps_logs', 'mark', true); return false;">{{ lang('MARK_ALL') }}</a> &bull; <a href="#" onclick="marklist('aps_logs', 'mark', false); return false;">{{ lang('UNMARK_ALL') }}</a></p>
</fieldset>
</form>
{% include 'overall_footer.html' %}

View File

@@ -0,0 +1,50 @@
<table class="table1 zebra-table fixed-width-table">
<thead>
<tr>
<th class="aps-logs-user">{{ lang('USERNAME') }}</th>
<th class="aps-logs-time">{{ lang('TIME') }}</th>
<th class="aps-logs-points centered-text">{{ lang('APS_POINTS_OLD', aps_name()) }}</th>
<th class="aps-logs-points centered-text">{{ lang('APS_POINTS_DIFF', aps_name()) }}</th>
<th class="aps-logs-points centered-text">{{ lang('APS_POINTS_NEW', aps_name()) }}</th>
<th>{{ lang('ACTION') }}</th>
{% if s_include_mark %}
<th class="aps-logs-mark actions">{{ lang('MARK') }}</th>
{% endif %}
</tr>
</thead>
<tbody>
{% for log in logs %}
<tr>
<td>{{ log.USER }}{% if not log.S_SELF and log.REPORTEE %}<br>&raquo; {{ lang('FROM') ~ ' ' ~ log.REPORTEE }}{% endif %}</td>
<td>{{ user.format_date(log.TIME) }}</td>
<td class="centered-text">{{ aps_display(log.POINTS_OLD, false) }}</td>
<td class="centered-text {{ log.POINTS_SUM > 0 ? 'yes' : 'never' }}">{{ aps_display(log.POINTS_SUM, false) }}</td>
<td class="centered-text">{{ aps_display(log.POINTS_NEW, false) }}<br></td>
<td>
<span class="aps-logs-edit" onclick="phpbb.toggleDisplay('aps-logs-info-{{ loop.index }}', 0)"><i class="icon fa-info-circle fa-fw" aria-hidden="true"></i></span>
<strong class="aps-logs-action">{{ lang(log.ACTION, aps_name()) }}</strong>
<div id="aps-logs-info-{{ loop.index }}" class="hidden">
{% for action, points in log.ACTIONS %}
&raquo; {{ lang(action, aps_name()) }}: {{ aps_display(points, false) }}<br>
{% endfor %}
{% if log.U_POINTS %}<a class="button2 aps-logs-edit" href="{{ log.U_POINTS }}">{{ aps_icon() }} {{ lang('EDIT') }}</a>{% endif %}
</div>
{% if log.FORUM_NAME %}&raquo; <a href="{{ log.U_FORUM }}" title="{{ lang('FORUM') }}">{{ log.FORUM_NAME }}</a>{% endif %}
{% if log.TOPIC_TITLE %}&raquo; <a href="{{ log.U_TOPIC }}" title="{{ lang('TOPIC') }}">{{ log.TOPIC_TITLE }}</a>{% endif %}
{% if log.POST_SUBJECT %}&raquo; <a href="{{ log.U_POST }}" title="{{ lang('POST') }}">{{ log.POST_SUBJECT }}</a>{% endif %}
</td>
{% if s_include_mark %}
<td class="aps-logs-mark actions"><label for="mark_{{ log.ID }}"><input class="checkbox" id="mark_{{ log.ID }}" name="mark[]" type="checkbox" title="{{ lang('MARK') }}" value="{{ log.ID }}" /></label></td>
{% endif %}
</tr>
{% else %}
<tr>
<td colspan="{{ s_include_mark ? 7 : 6 }}">
<div class="errorbox">
<p>{{ lang('NO_ENTRIES') }}</p>
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>

View File

@@ -0,0 +1,99 @@
{% include 'overall_header.html' %}
{% INCLUDECSS '@phpbbstudio_aps/css/aps_common.css' %}
{% INCLUDECSS '@phpbbstudio_aps/css/aps_form.css' %}
<h1>{{ APS_TITLE }}</h1>
<p>{{ lang('ACP_APS_POINTS_EXPLAIN', aps_name()) }}</p>
<form class="aps-form" id="acp_aps_points" name="acp_aps_points" method="post" action="{{ U_APS_ACTION }}">
<fieldset{% if S_APS_ACTION not in ['add', 'edit'] %} class="panel"{% endif %}>
{% if S_ERRORS %}
<div class="errorbox"><p class="error">{{ ERROR_MSG }}</p></div>
{% endif %}
{% if S_APS_ACTION in ['add', 'edit'] %}
{% if S_APS_REASONS %}
<dl>
<dt><label for="title">{{ lang('SUBJECT') }}</label></dt>
<dd><input class="medium" id="title" name="title" type="text" value="{{ REASON_TITLE }}" required></dd>
</dl>
<dl>
<dt><label for="description">{{ lang('REASON') }}</label></dt>
<dd>
<textarea class="inputbox" id="description" name="description">{{ REASON_DESC }}</textarea>
</dd>
</dl>
<dl>
<dt><label for="points">{{ aps_name() }}</label></dt>
<dd><input class="tiny" id="points" name="points" type="number" value="{{ REASON_POINTS }}" step="0.01" required></dd>
</dl>
{% endif %}
{% else %}
{% if S_APS_REASONS %}
<table class="table1 forums responsive">
<thead>
<tr>
<th class="centered-text">{{ aps_name() }}</th>
<th>{{ lang('REASON') }}</th>
<th class="centered-text">{{ lang('ACTIONS') }}</th>
</tr>
</thead>
<tbody>
{% for reason in aps_reasons %}
<tr>
<td class="actions {{ reason.POINTS > 0 ? 'yes' : 'never' }}">
{{ aps_format(reason.POINTS) }}
</td>
<td>
<strong>{{ reason.TITLE }}</strong><br />
{{ reason.DESC }}
</td>
<td class="actions">
<span class="up-disabled hidden">{{ ICON_MOVE_UP_DISABLED }}</span>
<span class="up"><a href="{{ reason.U_MOVE_UP }}" data-ajax="row_up">{{ ICON_MOVE_UP }}</a></span>
<span class="down-disabled hidden">{{ ICON_MOVE_DOWN_DISABLED }}</span>
<span class="down"><a href="{{ reason.U_MOVE_DOWN }}" data-ajax="row_down">{{ ICON_MOVE_DOWN }}</a></span>
<a href="{{ reason.U_EDIT }}">{{ ICON_EDIT }}</a>
<a href="{{ reason.U_DELETE }}" data-ajax="row_delete">{{ ICON_DELETE }}</a>
</td>
</tr>
{% else %}
<tr>
<td class="centered-text" colspan="3">{{ lang('ACP_NO_ITEMS') }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<hr />
<fieldset class="quick">
<a class="aps-button-green" href="{{ U_APS_REASON_ADD }}">{{ lang('ADD') }}</a>
</fieldset>
</fieldset>
<fieldset>
{% endif %}
{% if S_APS_POINTS %}
<legend>{{ aps_name() }}</legend>
{% include '@phpbbstudio_aps/aps_points_list.html' %}
{% endif %}
{% endif %}
</fieldset>
<fieldset>
<legend>{{ lang('ACP_SUBMIT_CHANGES') }}</legend>
<p class="submit-buttons">
<input class="button1" id="submit" name="submit" type="submit" value="{{ lang('SUBMIT') }}">&nbsp;
<input class="button2" id="reset" name="reset" type="reset" value="{{ lang('RESET') }}">
{{ S_FORM_TOKEN }}
</p>
</fieldset>
</form>
{% include 'overall_footer.html' %}

View File

@@ -0,0 +1,37 @@
<form class="aps-form" id="aps_points_copy" name="aps_points_copy" method="post" action="{{ U_APS_ACTION_COPY }}" data-ajax="true">
<div class="centered-text clearfix">
<div class="column1">
<h5>{{ lang('ACP_APS_POINTS_COPY', aps_name()) }}</h5>
<hr />
<label>
<select id="aps_forums_from" name="aps_forums_from">
{{ S_APS_FORUMS }}
</select>
</label>
</div>
<div class="column2">
<h5>{{ lang('ACP_APS_POINTS_COPY_TO', aps_name()) }}</h5>
<hr />
<label>
<select id="aps_forums_to" name="aps_forums_to[]" multiple>
{{ S_APS_FORUMS }}
</select>
</label>
<p><em>{{ lang('LOOK_UP_FORUMS_EXPLAIN') }}</em></p>
</div>
</div>
<fieldset class="submit-buttons">
<hr />
{{ S_FORM_TOKEN }}
<input class="button1" id="submit_copy" name="submit_copy" type="submit" value="{{ lang('SUBMIT') }}">&nbsp;
<input class="button2" id="reset" name="reset" type="reset" value="{{ lang('RESET') }}">
</fieldset>
</form>
<script>
phpbb.ajaxify({
selector: '#aps_points_copy',
refresh: false,
callback: null,
});
</script>

View File

@@ -0,0 +1,17 @@
<div id="aps_points" class="aps-tabs aps-form">
{% for category in aps_categories %}
<input class="aps-tab-input" id="aps-tab-{{ loop.index }}" name="aps-tabs" type="radio"{% if loop.first %} checked{% endif %}>
<label class="aps-tab-label" for="aps-tab-{{ loop.index }}">{{ lang(category.title) }}</label>
<fieldset class="aps-tab-panel">
{% for fields in category.blocks %}
{% for field, title in fields %}
<dl>
<dt><label for="{{ field }}">{{ lang(title, aps_name()) ~ lang('COLON') }}</label>{% if lang(title ~ '_DESC') != title ~ '_DESC' %}<br><span class="explain">{{ lang(title ~ '_DESC', aps_name()) }}</span>{% endif %}</dt>
<dd><input class="autowidth" id="{{ field }}" name="aps_values[{{ field }}]" type="number" value="{{ aps_format(APS_VALUES[field]) }}" step="{{ aps_step() }}"></dd>
</dl>
{% endfor %}
{% if not loop.last %}<hr>{% endif %}
{% endfor %}
</fieldset>
{% endfor %}
</div>

View File

@@ -0,0 +1,54 @@
{% include 'overall_header.html' %}
{% INCLUDECSS '@phpbbstudio_aps/css/fontawesome-iconpicker.min.css' %}
{% INCLUDECSS '@phpbbstudio_aps/css/aps_common.css' %}
{% INCLUDECSS '@phpbbstudio_aps/css/aps_form.css' %}
{% INCLUDECSS '@phpbbstudio_aps/css/aps_iconpicker.css' %}
<h1>{{ PAGE_TITLE }}</h1>
<p>{{ lang('ACP_APS_SETTINGS_EXPLAIN', aps_name()) }}</p>
{% if S_ERROR %}
<div class="errorbox">
<h3>{{ lang('WARNING') }}</h3>
<p>{{ ERROR_MSG }}</p>
</div>
{% endif %}
{% if S_APS_COPY %}
{% include '@phpbbstudio_aps/aps_points_copy.html' %}
{% elseif S_APS_LOCATIONS %}
{% include '@phpbbstudio_aps/aps_locations.html' %}
{% else %}
<form class="aps-form" id="aps_settings" name="aps_settings" action="{{ U_ACTION }}" method="post">
{% for setting in settings %}
{% if setting.S_LEGEND %}
{% if not loop.first %}</fieldset>{% endif %}
<fieldset class="{{ setting.CLASS }}">
<legend>{{ lang(setting.LEGEND, aps_name()) }}</legend>
{% else %}
<dl>
<dt><label for="{{ setting.KEY }}">{{ lang(setting.TITLE, aps_name()) }}</label>{% if setting.S_EXPLAIN %}<br><span class="explain">{{ lang(setting.TITLE ~ '_DESC', aps_name()) }}</span>{% endif %}</dt>
<dd>{{ setting.CONTENT }}</dd>
</dl>
{% endif %}
{% if loop.last %}</fieldset>{% endif %}
{% endfor %}
<fieldset>
<legend>{{ lang('ACP_SUBMIT_CHANGES') }}</legend>
<p class="submit-buttons">
<input class="button1" id="submit" name="submit" type="submit" value="{{ lang('SUBMIT') }}">&nbsp;
<input class="button2" id="reset" name="reset" type="reset" value="{{ lang('RESET') }}">
{{ S_FORM_TOKEN }}
</p>
</fieldset>
</form>
{% endif %}
{% INCLUDEJS '@phpbbstudio_aps/js/fontawesome-iconpicker.min.js' %}
{% INCLUDEJS '@phpbbstudio_aps/js/aps_common.js' %}
{% include 'overall_footer.html' %}

View File

@@ -0,0 +1,115 @@
.nojs .aps-ajax {
display: none;
}
.aps-tabs {
background: #e5e5e5;
border-top: 1px solid #d7d7d7;
border-right: 1px solid #cccccc;
border-bottom: 1px solid #cccccc;
border-left: 1px solid #d7d7d7;
border-radius: 3px;
display: flex;
flex-wrap: wrap;
}
.aps-tab-input {
opacity: 0;
position: absolute;
}
.aps-tab-label {
font-size: 1.2em;
font-weight: bold;
background: #e5e5e5;
border-right: 1px solid transparent;
border-left: 1px solid transparent;
color: #7f7f7f;
width: 100%;
padding: 10px 20px;
cursor: pointer;
transition: all 0.2s ease-in;
}
.aps-tab-label:first-of-type { border-top-left-radius: 3px; }
.aps-tab-label:last-of-type { border-top-right-radius: 3px; }
.aps-tab-label:hover { background: #d8d8d8; }
.aps-tab-label:active { background: #cccccc; }
.aps-tab-input:checked + .aps-tab-label {
background: #ffffff;
border-color: #cccccc;
color: #000000;
}
.aps-tab-input:checked:first-of-type + .aps-tab-label {
border-left-color: transparent;
}
@media (min-width: 600px) {
.aps-tab-label {
width: auto;
}
}
.aps-tab-panel {
background: #ffffff;
border: none;
border-top-left-radius: 0;
border-top-right-radius: 0;
display: none;
width: 100%;
margin: 0;
}
@media (min-width: 600px) {
.aps-tab-panel {
order: 99;
}
}
.aps-tab-input:checked + .aps-tab-label + .aps-tab-panel {
display: block;
}
.aps-tabs h3 {
font-size: 1.2em;
color: #115098;
margin: 5px 0 10px;
}
.aps-tabs small {
font-size: 90%;
}
/* aps logs */
table th.aps-logs-mark,
table td.aps-logs-mark { width: 50px; }
.aps-logs-user { width: 15%; }
.aps-logs-time { width: 20%; }
.aps-logs-points { width: 10%; }
.aps-logs-action {
display: block;
}
.aps-logs-edit {
font-size: 120%;
text-decoration: none;
float: right;
margin-right: 5px;
}
.aps-logs-mark label {
display: block;
padding: 0;
}
@media all and (max-width: 700px) {
.aps-logs-edit {
margin-right: 0;
}
.aps-logs-mark label {
display: inline-block;
}
}

View File

@@ -0,0 +1,211 @@
.aps-form *,
.aps-form *:before,
.aps-form *:after {
box-sizing: border-box;
}
.aps-bool {
display: none;
}
.aps-radio { display: none; }
.aps-radio:checked + .aps-button-blue {
background: #12a3eb;
border-color: #12a3eb;
color: #ffffff;
}
/* Fix for double borders due to border-box */
.aps-form dt {
border-right: none;
}
.aps-form dd,
.aps-form dd label {
font-size: 14px;
line-height: 1.42857143;
}
.aps-form dd label {
display: inline-block;
height: 34px;
padding: 6px 6px 6px 0;
}
.aps-form dd label input[type="radio"] {
height: initial;
margin-right: 3px;
}
.aps-button-red,
.aps-button-blue,
.aps-button-green,
.aps-form input:not(.iconpicker-search),
.aps-form select,
.aps-form textarea {
font-size: 14px;
line-height: 1.42857143;
color: #555555;
height: 34px;
padding: 6px 12px;
}
.aps-button-red,
.aps-button-blue,
.aps-button-green,
.aps-form input[type="text"],
.aps-form input[type="number"],
.aps-form input[type="submit"],
.aps-form input[type="reset"],
.aps-form select,
.aps-form textarea {
background-color: #ffffff;
background-image: none;
border: 1px solid #cccccc;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-webkit-transition: border-color ease-in-out 0.15s, -webkit-box-shadow ease-in-out 0.15s;
-o-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
}
.aps-form input:not([type="checkbox"]):not([type="radio"]):focus,
.aps-form select:focus,
.aps-form textarea:focus {
border-color: #66afe9;
outline: 0;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
}
.aps-form select:focus {
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
.aps-form select[multiple] {
height: auto;
min-height: 170px;
}
.has-js select[multiple] {
max-height: 340px;
}
.aps-form textarea {
height: auto;
resize: vertical;
}
/* Buttons */
.aps-button-green,
a.aps-button-green,
.aps-form input[type="submit"] {
border-color: #28a745;
color: #28a745;
}
.aps-bool:checked + .aps-button-green,
.aps-button-green:hover,
a.aps-button-green:hover,
.aps-form input[type="submit"]:hover {
background-color: #28a745;
color: #ffffff;
}
.aps-button-red,
a.aps-button-red,
.aps-form input[type="reset"] {
border-color: #d31141;
color: #d31141;
}
.aps-bool:checked + .aps-button-red,
.aps-button-red:hover,
a.aps-button-red:hover,
.aps-form input[type="reset"]:hover {
background-color: #d31141;
color: #ffffff;
}
.aps-button-blue {
border-color: #12a3eb;
color: #12a3eb;
}
.aps-button-blue:hover {
background-color: #12a3eb;
color: #ffffff;
}
.aps-button-red,
.aps-button-blue,
.aps-button-green {
text-decoration: none !important;
cursor: pointer;
}
/* Point names height toggle */
.aps-points-names {
overflow: hidden;
max-height: 100px;
padding-bottom: 20px;
}
.aps-points-names dl:not(:first-of-type) {
opacity: 0;
}
.aps-points-full {
max-height: 100%;
padding-bottom: 30px;
}
.aps-points-full dl:not(:first-of-type) {
opacity: 1;
}
@media all and (max-width: 700px) {
fieldset.aps-points-names:not(.aps-points-full) dl:first-of-type {
border-bottom: none;
}
}
.aps-names-toggle {
font-weight: bold;
text-decoration: none !important;
border: 1px solid #cccccc;
border-bottom: none;
border-radius: 4px 4px 0 0;
opacity: 1;
position: absolute;
z-index: 1;
bottom: 0;
left: 45%;
padding: 5px 10px;
cursor: pointer;
user-select: none;
transform: translateX(-50%);
}
/* Multiple select scrollbar */
.aps-form select[multiple] {
scrollbar-color: #666666 #cccccc;
scrollbar-width: 10px;
}
.aps-form select[multiple]::-webkit-scrollbar {
width: 10px;
}
.aps-form select[multiple]::-webkit-scrollbar-thumb {
background: #666666;
border-radius: 0 4px 4px 0;
}
.aps-form select[multiple]::-webkit-scrollbar-track {
background: #cccccc;
border-radius: 0 4px 4px 0;
}

View File

@@ -0,0 +1,78 @@
.aps-icon-picker,
#aps_points_icon {
border-top-right-radius: 0 !important;
border-bottom-right-radius: 0 !important;
}
.aps-icon-picker + i,
#aps_points_icon + i {
font-size: 14px;
line-height: 1.42857143;
vertical-align: -1px;
background-color: #f3f3f3;
border: 1px solid #cccccc;
border-left: none;
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
color: #555555;
display: inline-block;
width: auto;
height: 34px;
padding: 6px 12px;
cursor: pointer;
}
.aps-icon-picker:focus,
#aps_points_icon:focus {
border-right-color: #cccccc;
}
.aps-icon-picker:focus + i,
#aps_points_icon:focus + i {
border-color: #66afe9;
outline: 0;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
}
.iconpicker-popover.popover {
border: 1px solid #cccccc;
border-radius: 4px;
}
.iconpicker-popover .arrow:after {
border-bottom-color: #f7f7f7 !important;
}
.iconpicker-popover .iconpicker-item {
margin: 0 11px 11px 0;
}
.iconpicker-search,
.iconpicker-search:hover,
.iconpicker-search:focus {
background-color: #ffffff;
border-radius: 4px;
max-width: calc(100% - 16px);
padding: 5px 8px;
}
.iconpicker-popover ::-webkit-scrollbar {
background: transparent;
width: 5px;
height: 5px;
}
.iconpicker-popover ::-webkit-scrollbar-corner {
background: transparent;
}
.iconpicker-popover ::-webkit-scrollbar-thumb {
background: #333333;
border-radius: 10px;
}
.iconpicker-popover ::-webkit-scrollbar-track {
background: #f3f3f3;
border-radius: 10px;
}

View File

@@ -0,0 +1,94 @@
.aps-locations {
background-color: #ffffff;
border: 1px solid #e6e9ed;
border-radius: 8px;
padding: 15px;
}
.aps-locations > p {
text-align: center;
margin: 5rem 160px;
}
.aps-location input {
display: none;
}
.aps-location input ~ span {
line-height: 16px;
text-align: center;
color: #ffffff;
display: none;
min-width: 50px;
height: 30px;
}
.aps-location input:not(:checked) ~ .aps-button-red,
.aps-location input:checked ~ .aps-button-green { display: inline-block; }
.aps-location .aps-button-green { background-color: #28a745; }
.aps-location .aps-button-red { background-color: #d31141; }
.navbar {
background-color: #cadceb;
border-radius: 7px;
overflow: visible;
height: 40px;
padding: 3px 10px;
}
.navbar > ul {
display: block;
margin: 0;
padding: 2px 0;
list-style-type: none;
}
.navbar > ul > li {
font-size: 1.1em;
line-height: 2.2em;
float: left;
width: auto;
margin-right: 7px;
padding-top: 1px;
list-style-type: none;
}
.navbar > ul > .right-side {
text-align: right;
float: right;
margin-right: 0;
margin-left: 7px;
}
.has-dropdown {
position: relative;
}
.dropdown {
text-align: left;
z-index: 10;
top: 25px;
min-width: 150px;
}
.dropdown.quick-links {
left: -15px;
}
.dropdown.user {
right: -10px;
left: unset;
}
.dropdown .pointer {
border-color: #ffffff transparent;
}
.dropdown.user .pointer {
right: 10px;
left: unset;
}
.dropdown .dropdown-contents {
padding: 10px 5px;
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,47 @@
{% if S_APS_POINTS %}
<fieldset class="aps-form">
<legend>{{ aps_name() }}</legend>
{# We can only AJAX copy and reset if the forum already exists #}
{% if not S_ADD_ACTION %}
{# Include the JS file #}
{% INCLUDEJS '@phpbbstudio_aps/js/aps_forum.js' %}
<dl>
<dt><label for="aps_points_reset">{{ lang('ACP_APS_POINTS_RESET', aps_name()) }}</label><br><span>{{ lang('ACP_APS_POINTS_RESET_EXPLAIN', aps_name()) }}</span></dt>
<dd>
<noscript>
<label>
<input class="radio aps-bool" id="aps_points_reset" name="aps_points_reset" type="checkbox" value="1">
<span class="aps-button-red">{{ lang('RESET') }}</span>
</label>
</noscript>
<label class="aps-ajax">
<a class="aps-button-red" id="aps_points_reset_ajax" type="button" href="{{ U_APS_RESET }}" data-ajax="aps_points_reset">
{{ lang('RESET') }}
</a>
</label>
</dd>
</dl>
{% endif %}
<dl>
<dt><label for="aps_points_copy">{{ lang('ACP_APS_POINTS_COPY', aps_name()) }}</label><br><span>{{ lang('ACP_APS_POINTS_COPY_EXPLAIN', aps_name()) }}</span></dt>
<dd>
<select id="aps_points_copy" name="aps_points_copy">
<option value="0">{{ lang('ACP_APS_POINTS_COPY_NOT', aps_name()) }}</option>
{{ S_FORUM_OPTIONS }}
</select>
{% if not S_ADD_ACTION %}
<button class="aps-button-green aps-ajax" id="aps_points_copy_ajax" type="button">{{ lang('ACP_APS_POINTS_COPY_TITLE', aps_name()) }}</button>
{% endif %}
</dd>
</dl>
{% INCLUDECSS '@phpbbstudio_aps/css/aps_common.css' %}
{% INCLUDECSS '@phpbbstudio_aps/css/aps_form.css' %}
{% include '@phpbbstudio_aps/aps_points_list.html' %}
</fieldset>
{% endif %}

View File

@@ -0,0 +1,4 @@
<dl>
<dt><label>{{ aps_name() ~ lang('COLON') }}</label></dt>
<dd>{{ aps_display(APS_POINTS) }}</dd>
</dl>

View File

@@ -0,0 +1,13 @@
jQuery(function($) {
$('.aps-names-toggle').on('click', function() {
$(this).parents('fieldset').toggleClass('aps-points-full');
let altText = $(this).data('text');
$(this).data('text', $(this).text()).text(altText);
});
$('#aps_points_icon').iconpicker({
collision: true,
placement: 'bottomRight',
component: '#aps_points_icon + i',
});
});

View File

@@ -0,0 +1,12 @@
jQuery(function($) {
$('[data-aps-sortable]').sortable({
axis: 'y',
containment: $(this).selector,
cursor: 'move',
delay: 150,
handle: '.aps-button-blue',
forcePlaceholderSize: true,
placeholder: 'panel',
tolerance: 'pointer',
});
});

View File

@@ -0,0 +1,83 @@
jQuery(function($) {
let $button = $('#aps_points_copy_ajax'),
$select = $('#aps_points_copy'),
$form = $button.parents('form'),
action = $form.attr('action').replace('&amp;', '&');
let callback = 'aps_points_copy',
$dark = $('#darkenwrapper');
$button.on('click', function(e) {
/**
* Handler for AJAX errors
*/
function errorHandler(jqXHR, textStatus, errorThrown) {
if (typeof console !== 'undefined' && console.log) {
console.log('AJAX error. status: ' + textStatus + ', message: ' + errorThrown);
}
phpbb.clearLoadingTimeout();
let responseText, errorText = false;
try {
responseText = JSON.parse(jqXHR.responseText);
responseText = responseText.message;
} catch (e) {}
if (typeof responseText === 'string' && responseText.length > 0) {
errorText = responseText;
} else if (typeof errorThrown === 'string' && errorThrown.length > 0) {
errorText = errorThrown;
} else {
errorText = $dark.attr('data-ajax-error-text-' + textStatus);
if (typeof errorText !== 'string' || !errorText.length) {
errorText = $dark.attr('data-ajax-error-text');
}
}
phpbb.alert($dark.attr('data-ajax-error-title'), errorText);
}
let request = $.ajax({
url: action,
type: 'post',
data: {'aps_action': 'copy', 'aps_points_copy': $select.val()},
success: function(response) {
/**
* @param {string} response.MESSAGE_TITLE
* @param {string} response.MESSAGE_TEXT
*/
phpbb.alert(response.MESSAGE_TITLE, response.MESSAGE_TEXT);
if (typeof phpbb.ajaxCallbacks[callback] === 'function') {
phpbb.ajaxCallbacks[callback].call(this, response);
}
},
error: errorHandler,
cache: false
});
request.always(function() {
let $loadingIndicator = phpbb.loadingIndicator();
if ($loadingIndicator && $loadingIndicator.is(':visible')) {
$loadingIndicator.fadeOut(phpbb.alertTime);
}
});
e.preventDefault();
});
phpbb.addAjaxCallback('aps_points_copy', function(response) {
$select.val(0);
/**
* @param {array} response.APS_VALUES
*/
$.each(response.APS_VALUES, function(name, value) {
$('#' + name).val(value);
});
});
phpbb.addAjaxCallback('aps_points_reset', function() {
$('[name*="aps_values"]').each(function() {
$(this).val(0);
});
});
});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long