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,81 @@
{% include 'mcp_header.html' %}
<h2>{{ lang('MCP_APS_POINTS_CHANGE', aps_name()) }}</h2>
<form id="mcp_aps_change" name="mcp_aps_change" method="post" action="{{ U_APS_ACTION }}">
{% if S_APS_SEARCH %}
{% include '@phpbbstudio_aps/mcp/mcp_aps_find_username.html' %}
{% else %}
{% INCLUDEJS '@phpbbstudio_aps/js/aps_mcp.js' %}
{% if S_APS_LOGS %}
<div class="panel">
<div class="inner">
{% include '@phpbbstudio_aps/mcp/mcp_aps_logs_list.html' with {'logs_array': logs} %}
</div>
</div>
{% endif %}
<div class="panel">
<div class="inner">
<fieldset>
{% if APS_USERNAME %}
<dl>
<dt><strong>{{ lang('USERNAME') ~ lang('COLON') }}</strong></dt>
<dd>{{ APS_USERNAME }}</dd>
</dl>
<dl>
<dt><strong>{{ aps_name() ~ lang('COLON') }}</strong></dt>
<dd>{{ APS_POINTS }}</dd>
</dl>
{% else %}
<dl>
<dt><strong>{{ lang('GROUP') ~ lang('COLON') }}</strong></dt>
<dd>{{ APS_GROUP }}</dd>
</dl>
{% endif %}
<dl>
<dt>
<label for="action">
{{ lang('MCP_APS_POINTS_CHANGE', aps_name()) ~ lang('COLON') }}
</label>
</dt>
<dd>
<select id="action" name="action">
<option value="" data-points="true">{{ lang('SELECT_OPTION') }}</option>
{% if S_APS_REASON %}
{% for reason in APS_REASONS %}
{% if loop.first and S_APS_CUSTOM %}<optgroup label="{{ lang('REASON') }}">{% endif %}
<option value="{{ reason.reason_id }}" data-points="{{ aps_format(reason.reason_points) }}" data-reason="{{ reason.reason_desc|e }}">
{{ reason.reason_title }}
</option>
{% if loop.last and S_APS_CUSTOM %}</optgroup>{% endif %}
{% endfor %}
{% endif %}
{% if S_APS_CUSTOM %}
{% if S_APS_REASON %}<optgroup label="{{ lang('ACTION') }}">{% endif %}
{% for action, title in APS_ACTIONS %}
<option value="{{ action }}" data-points="false">{{ title }}</option>
{% endfor %}
{% if S_APS_REASON %}</optgroup>{% endif %}
{% endif %}
</select>
<input id="points" name="points" type="number" step="{{ aps_step() }}" class="tiny" placeholder="{{ aps_format(0.00) }}"><br>
<input id="reason" name="reason" type="text" class="full" placeholder="{{ lang('REASON') }}">
</dd>
</dl>
</fieldset>
</div>
</div>
<fieldset 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 }}
</fieldset>
{% endif %}
</form>
{% include 'mcp_footer.html' %}

View File

@@ -0,0 +1,42 @@
{% INCLUDECSS '@phpbbstudio_aps/aps_display.css' %}
<div class="panel">
<div class="inner">
{% if S_ERROR %}
<fieldset>
<p class="error">{{ ERROR_MSG }}</p>
</fieldset>
{% endif %}
<fieldset>
<dl>
<dt><label for="username">{{ lang('SELECT_USER') ~ lang('COLON') }}</label></dt>
<dd><input class="inputbox" id="username" name="username" type="text" value="{{ APS_USERNAME }}" /></dd>
<dd>[ <a href="{{ U_APS_SEARCH }}" onclick="find_username(this.href); return false;">{{ lang('FIND_USERNAME') }}</a> ]</dd>
</dl>
</fieldset>
<fieldset class="submit-buttons">
<input class="button1" id="submit_user" name="submit_user" type="submit" value="{{ lang('SUBMIT') }}" />
&nbsp;
<input class="button2" id="reset_user" type="reset" value="{{ lang('RESET') }}" />
</fieldset>
<hr class="aps-mar-top aps-mar-bot">
<fieldset>
<dl>
<dt><label for="group_id">{{ lang('SELECT_GROUP') ~ lang('COLON') }}</label></dt>
<dd><select class="inputbox" id="group_id" name="group_id">{{ APS_GROUPS }}</select></dd>
</dl>
</fieldset>
<fieldset class="submit-buttons">
<input class="button1" id="submit_group" name="submit_group" type="submit" value="{{ lang('SUBMIT') }}" />
&nbsp;
<input class="button2" id="reset_group" type="reset" value="{{ lang('RESET') }}" />
</fieldset>
{{ S_FORM_TOKEN }}
</div>
</div>

View File

@@ -0,0 +1,56 @@
{% include 'mcp_header.html' %}
<h2>{{ lang('MAIN') }}</h2>
{% EVENT phpbbstudio_aps_mcp_front_before %}
{% if S_APS_LOGS %}
<div class="panel">
<div class="inner">
<h3>{{ lang('LATEST_LOGS') }}</h3>
{% include '@phpbbstudio_aps/mcp/mcp_aps_logs_list.html' with {'logs_array': logs} %}
</div>
</div>
{% EVENT phpbbstudio_aps_mcp_front_between_logs %}
<div class="panel">
<div class="inner">
<h3>{{ lang('MCP_APS_LATEST_ADJUSTED', 5) }}</h3>
{% include '@phpbbstudio_aps/mcp/mcp_aps_logs_list.html' with {'logs_array': moderated} %}
</div>
</div>
{% endif %}
{% EVENT phpbbstudio_aps_mcp_front_between %}
<div class="panel">
<div class="inner">
<div class="column1">
<h3>{{ lang('MCP_APS_USERS_TOP', 5) }}</h3>
<ul class="fa-ul">
{% for user in aps_users_top %}
<li><em class="small">{{ loop.index }}.</em> {{ aps_display(user.POINTS) }} {{ user.NAME }}</li>
{% else %}
<li><strong>{{ lang('NO_ONLINE_USERS') }}</strong></li>
{% endfor %}
</ul>
</div>
<div class="column2">
<h3>{{ lang('MCP_APS_USERS_BOTTOM', 5) }}</h3>
<ul class="fa-ul">
{% for user in aps_users_bottom %}
<li><em class="small">{{ loop.index }}.</em> {{ aps_display(user.POINTS) }} {{ user.NAME }}</li>
{% else %}
<li><strong>{{ lang('NO_ONLINE_USERS') }}</strong></li>
{% endfor %}
</ul>
</div>
</div>
</div>
{% EVENT phpbbstudio_aps_mcp_front_after %}
{% include 'mcp_footer.html' %}

View File

@@ -0,0 +1,40 @@
{% include 'mcp_header.html' %}
<h2>{{ lang('MCP_APS_LOGS') }}</h2>
<div class="panel">
<div class="inner">
<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/mcp/mcp_aps_logs_list.html' with {'logs_array': logs} %}
{% 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>
</form>
</div>
</div>
{% include 'mcp_footer.html' %}

View File

@@ -0,0 +1,38 @@
<table class="table1">
<thead>
<tr>
<th class="name"><i class="icon fa-user fa-fw"></i></th>
<th class="name">{{ lang('REASON') }}</th>
<th class="name"><i class="icon fa-clock-o fa-fw"></i></th>
<th class="name"><i class="icon fa-sign-out fa-fw"></i></th>
<th class="name"><i class="icon fa-arrow-right fa-fw"></i></th>
<th class="name"><i class="icon fa-sign-in fa-fw"></i></th>
<th class="name"><i class="icon fa-comments fa-fw"></i></th>
</tr>
</thead>
<tbody>
{% for log in logs_array %}
<tr class="bg{{ loop.index is odd ? 1 : 2 }}">
<td>{{ log.USER }}</td>
<td>
<strong>{{ lang(log.ACTION, aps_name()) }}</strong>
{% if not log.S_SELF and log.REPORTEE %}<br>&raquo; {{ lang('FROM') ~ ' ' ~ log.REPORTEE }}{% endif %}
</td>
<td>{{ user.format_date(log.TIME) }}</td>
<td>{{ aps_display(log.POINTS_OLD, false) }}</td>
<td>{{ aps_display(log.POINTS_SUM, false) }}</td>
<td>{{ aps_display(log.POINTS_NEW, false) }}</td>
<td>
{% if log.FORUM_NAME %}&raquo; <a href="{{ log.U_FORUM }}" title="{{ lang('FORUM') }}">{{ log.FORUM_NAME }}</a><br />{% endif %}
{% if log.TOPIC_TITLE %}&raquo; <a href="{{ log.U_TOPIC }}" title="{{ lang('TOPIC') }}">{{ log.TOPIC_TITLE }}</a><br />{% endif %}
{% if log.POST_SUBJECT %}&raquo; <a href="{{ log.U_POST }}" title="{{ lang('POST') }}">{{ log.POST_SUBJECT }}</a><br />{% endif %}
{% if not log.FORUM_NAME and not log.TOPIC_TITLE and not log.POST_SUBJECT %}{{ lang('NA') }}{% endif %}
</td>
</tr>
{% else %}
<tr>
<td class="center" colspan="7"><span class="error">{{ lang('NO_ENTRIES') }}</span></td>
</tr>
{% endfor %}
</tbody>
</table>