Ajout d'une extension
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
{% extends '@phpbbstudio_aps/aps_main.html' %}
|
||||
|
||||
{% block nav %}
|
||||
{% for page in aps_navbar %}
|
||||
<li>
|
||||
<a class="aps-list-item{{ page.S_ACTIVE ? ' aps-list-active' }}" href="{{ page.U_VIEW }}">
|
||||
{{ page.TITLE }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
||||
{% block nav_right %}
|
||||
{% if S_REGISTERED_USER %}
|
||||
<li class="aps-list-item aps-panel-add dropdown-container dropdown-container-left">
|
||||
<span class="dropdown-trigger dropdown-select{{ aps_blocks|length ? '' : ' aps-panel-add-pulse' }}">
|
||||
<i class="icon fa-th-large fa-fw" aria-hidden="true"></i>
|
||||
</span>
|
||||
<div class="dropdown hidden">
|
||||
<div class="pointer"><div class="pointer-inner"></div></div>
|
||||
<ul class="dropdown-contents">
|
||||
{% for block in aps_blocks_add %}
|
||||
{{ block.item }}
|
||||
{% endfor %}
|
||||
<li class="aps-panel-empty"><span class="aps-button-red">{{ lang('APS_POINTS_BLOCK_NO') }}</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block main %}
|
||||
<div class="aps-row" data-aps-sort="{{ U_APS_ACTION_SORT }}">
|
||||
{% for block in aps_blocks %}
|
||||
{{ include('@phpbbstudio_aps/blocks/base.html', {'block': block}) }}
|
||||
{% endfor %}
|
||||
<div class="aps-panel-empty aps-col s12" data-aps-empty-panel="true">
|
||||
<div class="aps-panel">
|
||||
<div class="aps-panel-content aps-center">
|
||||
<p class="error aps-no-mar-bot">{{ lang('APS_POINTS_BLOCK_NONE') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% INCLUDEJS '@phpbbstudio_aps/js/chart.bundle.min.js' %}
|
||||
{% INCLUDEJS '@phpbbstudio_aps/js/jquery-ui-sortable.min.js' %}
|
||||
{% INCLUDEJS '@phpbbstudio_aps/js/palette.js' %}
|
||||
{% INCLUDEJS '@phpbbstudio_aps/js/aps_display.js' %}
|
||||
@@ -0,0 +1,36 @@
|
||||
<div class="dropdown-container dropdown-container-left dropdown-button-control sort-tools">
|
||||
<span title="{{ lang('SEARCH') }}" class="aps-button-blue dropdown-trigger dropdown-select">
|
||||
<i class="icon fa-search fa-fw" aria-hidden="true"></i>
|
||||
<span class="caret"><i class="icon fa-sort-down fa-fw" aria-hidden="true"></i></span>
|
||||
</span>
|
||||
<div class="dropdown hidden">
|
||||
<div class="pointer"><div class="pointer-inner"></div></div>
|
||||
<div class="dropdown-contents">
|
||||
<fieldset class="display-options">
|
||||
<label>
|
||||
{{ lang('FORUM') ~ lang('COLON') }}
|
||||
<select name="f">
|
||||
<option value="0">{{ lang('SELECT_FORUM') }}</option>
|
||||
{{ S_SELECT_FORUM }}
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
{{ lang('TOPIC_TITLE') ~ lang('COLON') }}
|
||||
<input class="inputbox autowidth" name="t" type="text" value="{{ S_SEARCH_TOPIC }}">
|
||||
</label>
|
||||
{% if S_AUTH_USER %}
|
||||
<label>
|
||||
{{ lang('SORT_USERNAME') ~ lang('COLON') }}
|
||||
<input class="inputbox autowidth" name="u" type="text" value="{{ S_SEARCH_USER }}">
|
||||
</label>
|
||||
{% endif %}
|
||||
{% if S_AUTH_FROM %}
|
||||
<label>
|
||||
{{ lang('FROM')|capitalize ~ lang('COLON') }}
|
||||
<input class="inputbox autowidth" name="r" type="text" value="{{ S_SEARCH_FROM }}">
|
||||
</label>
|
||||
{% endif %}
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,16 @@
|
||||
<div class="dropdown-container dropdown-container-left dropdown-button-control sort-tools">
|
||||
<span title="{{ lang('SORT_OPTIONS') }}" class="aps-button-blue dropdown-trigger dropdown-select">
|
||||
<i class="icon fa-sort-amount-asc fa-fw" aria-hidden="true"></i>
|
||||
<span class="caret"><i class="icon fa-sort-down fa-fw" aria-hidden="true"></i></span>
|
||||
</span>
|
||||
<div class="dropdown hidden">
|
||||
<div class="pointer"><div class="pointer-inner"></div></div>
|
||||
<div class="dropdown-contents">
|
||||
<fieldset class="display-options">
|
||||
<label>{{ lang('DISPLAY') ~ lang('COLON') }} {{ S_SELECT_SORT_DAYS }}</label>
|
||||
<label>{{ lang('SORT_BY') ~ lang('COLON') }} {{ S_SELECT_SORT_KEY }}</label>
|
||||
<label>{{ lang('SORT_DIRECTION') ~ lang('COLON') }} {{ S_SELECT_SORT_DIR }}</label>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
79
ext/phpbbstudio/aps/styles/prosilver/template/aps_main.html
Normal file
79
ext/phpbbstudio/aps/styles/prosilver/template/aps_main.html
Normal file
@@ -0,0 +1,79 @@
|
||||
{% include 'overall_header.html' %}
|
||||
|
||||
{% if not definition.INCLUDED_APS_DISPLAYCSS %}
|
||||
{% INCLUDECSS '@phpbbstudio_aps/aps_display.css' %}
|
||||
{% DEFINE INCLUDED_APS_DISPLAYCSS = true %}
|
||||
{% endif %}
|
||||
|
||||
{% if not definition.INCLUDED_APS_FORMCSS %}
|
||||
{% INCLUDECSS '@phpbbstudio_aps/aps_form.css' %}
|
||||
{% DEFINE INCLUDED_APS_FORMCSS = true %}
|
||||
{% endif %}
|
||||
|
||||
{% block includes %}{% endblock %}
|
||||
|
||||
<main class="aps-main">
|
||||
<header>
|
||||
<div class="aps-menu aps-lists-container">
|
||||
<div class="aps-menu-before">
|
||||
{# Reserved: Please do not use this event #}
|
||||
{% EVENT phpbbstudio_aps_menu_before %}
|
||||
</div>
|
||||
<div class="aps-menu-icon">
|
||||
<div>
|
||||
<i class="headerbar icon {{ aps_config('aps_points_icon') }} fa-fw"></i>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="aps-list">
|
||||
<li>
|
||||
<a class="aps-list-item{{ S_APS_OVERVIEW ? ' aps-list-active' }}" href="{{ path('phpbbstudio_aps_display') }}" title="{{ lang('APS_OVERVIEW') }}">
|
||||
<i class="icon fa-newspaper-o fa-fw"></i>
|
||||
<span>{{ lang('APS_OVERVIEW') }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% EVENT phpbbstudio_aps_menu_append %}
|
||||
</ul>
|
||||
<ul class="aps-list aps-list-right">
|
||||
{% EVENT phpbbstudio_aps_menu_right_prepend %}
|
||||
<li>
|
||||
<span class="aps-list-item aps-menu-points">
|
||||
{{ aps_display(user.data.user_points, false) }}
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{% set nav = block('nav') is defined ? block('nav')|trim : '' %}
|
||||
{% set nav_right = block('nav_right') is defined ? block('nav_right')|trim : '' %}
|
||||
|
||||
{% if nav != '' or nav_right != '' %}
|
||||
<div class="aps-nav aps-lists-container headerbar">
|
||||
{% if nav != '' %}
|
||||
<ul class="aps-list">
|
||||
{{ nav }}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% if nav_right != '' %}
|
||||
<ul class="aps-list aps-list-right">
|
||||
{{ nav_right }}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</header>
|
||||
|
||||
<div class="aps-body">
|
||||
{% block main %}{% endblock %}
|
||||
</div>
|
||||
|
||||
<footer class="aps-footer">
|
||||
<a href="https://phpbbstudio.com/extensions/advanced-points-system" target="_blank" rel="noopener">Advanced Points System</a> <i class="icon fa-copyright fa-fw" aria-hidden="true"></i> <a href="https://phpbbstudio.com" target="_blank" rel="noopener">phpBB Studio</a>
|
||||
</footer>
|
||||
</main>
|
||||
|
||||
{% if not definition.INCLUDED_SWEETALERT2ALLMINJS %}
|
||||
{% INCLUDEJS '@phpbbstudio_aps/js/sweetalert2.all.min.js' %}
|
||||
{% DEFINE INCLUDED_SWEETALERT2ALLMINJS = true %}
|
||||
{% endif %}
|
||||
|
||||
{% include 'overall_footer.html' %}
|
||||
@@ -0,0 +1,28 @@
|
||||
{% set width = block('width', block.TEMPLATE) is defined ? block('width', block.TEMPLATE) : 's12' %}
|
||||
<div class="aps-col {{ width }}" id="aps_{{ block.ID }}" data-aps-id="{{ block.ID }}">
|
||||
<div class="aps-panel">
|
||||
<div class="aps-panel-header">
|
||||
<h3>{{ block.TITLE }}</h3>
|
||||
{% if S_USER_LOGGED_IN and not S_IS_BOT %}
|
||||
{% if not block.S_REQUIRED %}
|
||||
<a class="aps-panel-action aps-panel-delete" href="{{ block.U_DELETE }}" data-ajax="aps_remove">
|
||||
<i class="icon fa-times fa-fw"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
<span class="aps-panel-action aps-panel-move aps-js"><i class="icon fa-ellipsis-h fa-fw"></i></span>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="aps-panel-content">
|
||||
{% if block('content', block.TEMPLATE) is defined %}
|
||||
{{ block('content', block.TEMPLATE) }}
|
||||
{% else %}
|
||||
<p class="error">{{ lang('APS_POINTS_BLOCK_NO_CONTENT') }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if block('footer', block.TEMPLATE) is defined %}
|
||||
<div class="aps-panel-footer">
|
||||
{{ block('footer', block.TEMPLATE) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,104 @@
|
||||
{% block width %}s12{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if aps_actions %}
|
||||
<div class="aps-collection">
|
||||
{% for action in aps_actions %}
|
||||
<div class="aps-collection-item aps-avatar">
|
||||
{{ APS_ACTIONS_AVATARS[action.USER_ID] is not empty ? APS_ACTIONS_AVATARS[action.USER_ID] : (S_APS_DAE_ENABLED ? '' : APS_ACTIONS_NO_AVATAR) }}
|
||||
<div class="aps-row">
|
||||
<div class="aps-col s12 m{{ action.S_AUTH_BUILD ? 4 : 6 }} l2 aps-no-mar-bot">
|
||||
{{ action.USER }}
|
||||
</div>
|
||||
<div class="aps-col {{ action.S_AUTH_BUILD ? 's9 m6 l2' : 's12 m6 l3' }} aps-no-mar-bot aps-no-padding">
|
||||
<strong>{{ lang(action.ACTION) }}</strong>
|
||||
{% if not action.S_SELF %}
|
||||
<br>{{ lang('POST_BY_AUTHOR') }}
|
||||
{% if action.S_MOD and not action.S_AUTH_MOD %}
|
||||
{{ lang('MODERATOR') }}
|
||||
{% else %}
|
||||
{{ action.REPORTEE }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if action.S_AUTH_BUILD %}
|
||||
<div class="aps-col s1 m1 l1 aps-no-mar-bot">
|
||||
{% if action.S_AUTH_BUILD_OTHER %}
|
||||
<div class="aps-button-blue aps-inline aps-js" data-aps-augmentation="true">
|
||||
<i class="icon fa-list fa-fw"></i>
|
||||
</div>
|
||||
<div class="hidden">
|
||||
<dl class="details">
|
||||
{% for key, value in action.ACTIONS %}
|
||||
<dt>{{ aps_display(value, false) }}</dt>
|
||||
<dd>{{ lang(key, aps_name()) }}</dd>
|
||||
{% endfor %}
|
||||
</dl>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="aps-row aps-col s12 l3 aps-no-mar-bot">
|
||||
<div class="aps-col s4 aps-no-mar-bot aps-no-padding">
|
||||
{{ aps_display(action.POINTS_OLD, false) }}
|
||||
</div>
|
||||
<div class="aps-col s4 aps-no-mar-bot aps-no-padding {{ action.POINTS_SUM < 0 ? 'aps-negative' : 'aps-positive' }}">
|
||||
{{ aps_display(action.POINTS_SUM, false) }}
|
||||
</div>
|
||||
<div class="aps-col s4 aps-no-mar-bot aps-no-padding">
|
||||
{{ aps_display(action.POINTS_NEW, false) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="aps-col s6 l2 aps-no-mar-bot aps-hide-s">
|
||||
{{ user.format_date(action.TIME) }}
|
||||
</div>
|
||||
<div class="aps-col s6 l2 aps-no-mar-bot aps-ellipsis aps-hide-s">
|
||||
{% if action.FORUM_NAME or action.TOPIC_TITLE or action.POST_SUBJECT %}
|
||||
<ul class="fa-ul aps-no-mar">
|
||||
{% if action.FORUM_NAME %}
|
||||
<li><a href="{{ action.U_FORUM }}" title="{{ action.FORUM_NAME }}">{{ action.FORUM_NAME }}</a></li>
|
||||
{% endif %}
|
||||
{% if action.TOPIC_TITLE %}
|
||||
<li><a href="{{ action.U_TOPIC }}" title="{{ action.TOPIC_TITLE }}">{{ action.TOPIC_TITLE }}</a></li>
|
||||
{% endif %}
|
||||
{% if action.POST_SUBJECT %}
|
||||
<li><a href="{{ action.U_POST }}" title="{{ action.POST_SUBJECT }}">{{ action.POST_SUBJECT }}</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<div class="aps-center">{{ lang('NA') }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="error">{{ lang('APS_POINTS_ACTIONS_NONE', aps_name()) }}</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block footer %}
|
||||
{# Pagination #}
|
||||
<div class="pagination top-pagination">
|
||||
{{ TOTAL_LOGS }}
|
||||
{% if pagination %}
|
||||
{% include 'pagination.html' %}
|
||||
{% else %}
|
||||
• {{ PAGE_NUMBER }}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{# Search and sort #}
|
||||
<form class="aps-form" method="post" action="{{ U_APS_ACTION_LOGS }}" data-ajax="aps_replace">
|
||||
{# Sort options #}
|
||||
{% include '@phpbbstudio_aps/aps_display_sort.html' %}
|
||||
|
||||
{# Search options #}
|
||||
{% include '@phpbbstudio_aps/aps_display_search.html' %}
|
||||
|
||||
{# Search keywords #}
|
||||
<input id="keywords" name="keywords" type="search" size="20" placeholder="{{ lang('APS_POINTS_ACTION_SEARCH', aps_name()) }}" />
|
||||
<input id="submit" name="submit" type="submit" value="{{ lang('SEARCH') }}">
|
||||
</form>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,79 @@
|
||||
{% block width %}s12{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if aps_adjustments %}
|
||||
<div class="aps-collection">
|
||||
{% for action in aps_adjustments %}
|
||||
<div class="aps-collection-item aps-avatar">
|
||||
{{ APS_ADJUSTMENTS_AVATARS[action.USER_ID] is not empty ? APS_ADJUSTMENTS_AVATARS[action.USER_ID] : (S_APS_DAE_ENABLED ? '' : APS_ADJUSTMENTS_NO_AVATAR) }}
|
||||
<div class="aps-row">
|
||||
<div class="aps-col s12 m{{ action.S_AUTH_BUILD ? 4 : 6 }} l2 aps-no-mar-bot">
|
||||
{{ action.USER }}
|
||||
</div>
|
||||
<div class="aps-col {{ action.S_AUTH_BUILD ? 's9 m6 l2' : 's12 m6 l3' }} aps-no-mar-bot">
|
||||
<strong>{{ lang(action.ACTION) }}</strong>
|
||||
</div>
|
||||
{% if action.S_AUTH_BUILD %}
|
||||
<div class="aps-col s1 m1 l1 aps-no-mar-bot">
|
||||
{% if action.S_AUTH_BUILD_OTHER %}
|
||||
<div class="aps-button-blue aps-inline aps-js" data-aps-augmentation="true">
|
||||
<i class="icon fa-list fa-fw"></i>
|
||||
</div>
|
||||
<div class="hidden">
|
||||
<dl class="details">
|
||||
{% for key, value in action.ACTIONS %}
|
||||
<dt>{{ aps_display(value, false) }}</dt>
|
||||
<dd>{{ lang(key, aps_name()) }}</dd>
|
||||
{% endfor %}
|
||||
</dl>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="aps-row aps-col s12 l3 aps-no-mar-bot">
|
||||
<div class="aps-col s4 aps-no-mar-bot">
|
||||
{{ aps_display(action.POINTS_OLD, false) }}
|
||||
</div>
|
||||
<div class="aps-col s4 aps-no-mar-bot">
|
||||
{{ aps_display(action.POINTS_SUM, false) }}
|
||||
</div>
|
||||
<div class="aps-col s4 aps-no-mar-bot">
|
||||
{{ aps_display(action.POINTS_NEW, false) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="aps-col s6 l2 aps-no-mar-bot aps-hide-s">
|
||||
{{ user.format_date(action.TIME) }}
|
||||
{% if not action.S_SELF %}
|
||||
{{ lang('POST_BY_AUTHOR') }}
|
||||
{% if action.S_MOD and not action.S_AUTH_MOD %}
|
||||
{{ lang('MODERATOR') }}
|
||||
{% else %}
|
||||
{{ action.REPORTEE }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="aps-col s6 l2 aps-no-mar-bot aps-ellipsis aps-hide-s">
|
||||
{% if action.FORUM_NAME or action.TOPIC_TITLE or action.POST_SUBJECT %}
|
||||
<ul class="fa-ul aps-no-mar">
|
||||
{% if action.FORUM_NAME %}
|
||||
<li><a href="{{ action.U_FORUM }}" title="{{ action.FORUM_NAME }}">{{ action.FORUM_NAME }}</a></li>
|
||||
{% endif %}
|
||||
{% if action.TOPIC_TITLE %}
|
||||
<li><a href="{{ action.U_TOPIC }}" title="{{ action.TOPIC_TITLE }}">{{ action.TOPIC_TITLE }}</a></li>
|
||||
{% endif %}
|
||||
{% if action.POST_SUBJECT %}
|
||||
<li><a href="{{ action.U_POST }}" title="{{ action.POST_SUBJECT }}">{{ action.POST_SUBJECT }}</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<div class="aps-center">{{ lang('NA') }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="error">{{ lang('APS_POINTS_ACTIONS_NONE', aps_name()) }}</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,18 @@
|
||||
{% block width %}s12 m6 aps-js{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<canvas data-aps-chart="pie"
|
||||
data-aps-time="{{ aps_config('aps_display_graph_time') }}"
|
||||
data-aps-empty="{{ lang('APS_POINTS_DATA_EMPTY', aps_name()) }}"
|
||||
aria-label="{{ lang('APS_POINTS_PER_FORUM', aps_name()) }}"
|
||||
role="img">
|
||||
<p>{{ lang('APS_POINTS_PER_FORUM', aps_name()) }}</p>
|
||||
</canvas>
|
||||
<div class="hidden">
|
||||
{% for forum in aps_forums %}
|
||||
<div data-aps-labels="{{ forum.NAME|e }}"
|
||||
data-aps-value="{{ aps_format(forum.POINTS) }}">
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,16 @@
|
||||
{% block width %}s12 m6 aps-js{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<canvas data-aps-chart="polarArea"
|
||||
data-aps-time="{{ aps_config('aps_display_graph_time') }}"
|
||||
data-aps-empty="{{ lang('APS_POINTS_DATA_EMPTY', aps_name()) }}"
|
||||
aria-label="{{ lang('APS_POINTS_PER_GROUP', aps_name()) }}"
|
||||
role="img">
|
||||
<p>{{ lang('APS_POINTS_PER_GROUP', aps_name()) }}</p>
|
||||
</canvas>
|
||||
<div class="hidden">
|
||||
{% for group in aps_groups %}
|
||||
<div data-aps-labels="{{ group.NAME|e }}" data-aps-colour="#{{ group.COLOUR }}" data-aps-value="{{ aps_format(group.POINTS) }}"></div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,22 @@
|
||||
{% block width %}s12 m6 aps-js{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<canvas data-aps-chart="line"
|
||||
data-aps-time="{{ aps_config('aps_display_graph_time') }}"
|
||||
data-aps-empty="{{ lang('APS_POINTS_DATA_EMPTY', aps_name()) }}"
|
||||
aria-label="{{ lang('APS_POINTS_GROWTH', aps_name()) }}"
|
||||
role="img">
|
||||
<p>{{ lang('APS_POINTS_GROWTH', aps_name()) }}</p>
|
||||
</canvas>
|
||||
<div class="hidden">
|
||||
{% for growth in aps_period %}
|
||||
<div data-aps-labels="{{ growth.DATE|e }}"
|
||||
data-aps-label="{{ aps_name()|e }}"
|
||||
data-aps-colour="transparent"
|
||||
data-aps-colour-border="#12a3eb"
|
||||
data-aps-colour-point="#0076b1"
|
||||
data-aps-value="{{ aps_format(growth.TOTAL) }}">
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,13 @@
|
||||
{% block width %}s12 m6{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="aps-row">
|
||||
<div class="aps-col s6 aps-center">
|
||||
{{ APS_RANDOM_USER_AVATAR ? APS_RANDOM_USER_AVATAR : (S_APS_DAE_ENABLED ? '' : APS_RANDOM_NO_AVATAR) }}
|
||||
</div>
|
||||
<div class="aps-col s6">
|
||||
{{ APS_RANDOM_USER_FULL }}<br />
|
||||
{{ aps_display(APS_RANDOM_USER_POINTS) }}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,29 @@
|
||||
{% block width %}s12 m6{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="aps-row">
|
||||
<div class="aps-col s6 aps-center">
|
||||
{{ APS_SEARCH_USER_AVATAR ? APS_SEARCH_USER_AVATAR : (S_APS_DAE_ENABLED ? '' : APS_NO_AVATAR) }}
|
||||
</div>
|
||||
<div class="aps-col s6">
|
||||
{{ APS_SEARCH_USER_FULL }}<br />
|
||||
{{ aps_display(APS_SEARCH_USER_POINTS) }}<br />
|
||||
{% set podium = APS_SEARCH_USER_RANK in 1..3 ? APS_SEARCH_USER_RANK : 0 %}
|
||||
<span title="{{ lang('RANK') }}"><i class="icon fa-trophy fa-fw aps-podium-{{ podium }}" aria-hidden="true"></i> {{ APS_SEARCH_USER_RANK }}</span>
|
||||
{% if S_APS_USER_ADJUST and U_APS_SEARCH_USER_ADJUST %}
|
||||
<br />
|
||||
<a class="aps-secondary-content" href="{{ U_APS_SEARCH_USER_ADJUST }}" title="{{ lang('APS_ADJUST_USER_POINTS', aps_name()) }}">
|
||||
<i class="icon fa-pencil fa-fw"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block footer %}
|
||||
<form class="aps-form" method="post" action="{{ U_APS_ACTION_SEARCH }}" data-ajax="aps_replace">
|
||||
<label for="aps_user_search">{{ lang('FIND_USERNAME') ~ lang('COLON') }}</label>
|
||||
<input id="aps_user_search" name="aps_user_search" type="text" value="{{ APS_SEARCH_USERNAME }}" />
|
||||
<input name="submit" type="submit" value="{{ lang('SEARCH') }}" />
|
||||
</form>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,18 @@
|
||||
{% block width %}s12 m6{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% set min = aps_config('aps_points_min') %}
|
||||
{% set max = aps_config('aps_points_max') %}
|
||||
{% set def = aps_config('default_lang') %}
|
||||
{% set name = aps_config('aps_points_name_' ~ def) %}
|
||||
{% set name = user.lang_name != def and name != aps_name() ? name : '' %}
|
||||
|
||||
<dl class="details">
|
||||
<dt>{{ lang('APS_POINTS_NAME') ~ lang('COLON') }}</dt><dd>{{ aps_name() }}{% if name %} <em>({{ name }})</em>{% endif %}</dd>
|
||||
<dt>{{ lang('APS_POINTS_FORMAT', aps_name()) ~ lang('COLON') }}</dt><dd>{{ aps_display(12345.00) }}</dd>
|
||||
<dt>{{ lang('APS_POINTS_MIN', aps_name()) ~ lang('COLON') }}</dt><dd>{{ min ? min : lang('NA') }}</dd>
|
||||
<dt>{{ lang('APS_POINTS_MAX', aps_name()) ~ lang('COLON') }}</dt><dd>{{ max ? max : lang('NA') }}</dd>
|
||||
<dt>{{ lang('APS_POINTS_ACTIONS_PAGE') ~ lang('COLON') }}</dt><dd>{{ aps_config('aps_actions_per_page') }}</dd>
|
||||
{% EVENT phpbbstudio_aps_display_settings_append %}
|
||||
</dl>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,36 @@
|
||||
{% block width %}s12 m6{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="aps-collection">
|
||||
{% set last_place = 0 %}
|
||||
{% set last_points = 0 %}
|
||||
{% for user in top_users %}
|
||||
{% set same_points = last_points == user.POINTS %}
|
||||
{% set last_place = same_points ? last_place : loop.index %}
|
||||
{% set last_points = same_points ? last_points : user.POINTS %}
|
||||
<div class="aps-collection-item aps-avatar">
|
||||
{{ user.AVATAR ? user.AVATAR : (S_APS_DAE_ENABLED ? '' : APS_NO_AVATAR) }}
|
||||
<span class="title">{{ user.NAME }}</span>
|
||||
<p>{{ aps_display(user.POINTS) }}</p>
|
||||
{% if S_APS_USER_ADJUST %}
|
||||
<a class="aps-secondary-content" href="{{ user.U_ADJUST }}" title="{{ lang('APS_ADJUST_USER_POINTS', aps_name()) }}">
|
||||
<i class="icon fa-pencil fa-fw"></i>
|
||||
</a>
|
||||
{% elseif last_place < 4 %}
|
||||
<i class="aps-secondary-content icon fa-trophy fa-fw aps-podium-{{ last_place }}" aria-hidden="true"></i>
|
||||
{% else %}
|
||||
<span class="aps-secondary-content fa-fw">{{ last_place }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block footer %}
|
||||
<form class="aps-form" method="post" action="{{ U_APS_ACTION_TOP }}" data-ajax="aps_replace">
|
||||
<label for="aps_user_top_count">{{ lang('USERS') ~ lang('COLON') }}</label>
|
||||
<input id="aps_user_top_count" name="aps_user_top_count" type="number" min="{{ aps_config('aps_display_top_count') }}" max="50" value="{{ APS_TOP_USERS_COUNT }}"{% if not aps_config('aps_display_top_change') %} disabled{% endif %} />
|
||||
{% if aps_config('aps_display_top_change') %}<input name="submit" type="submit" value="{{ lang('GO') }}" />{% endif %}
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
{% block width %}s12 m6 aps-js{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<canvas data-aps-chart="bar"
|
||||
data-aps-time="{{ aps_config('aps_display_graph_time') }}"
|
||||
data-aps-empty="{{ lang('APS_POINTS_DATA_EMPTY', aps_name()) }}"
|
||||
aria-label="{{ lang('APS_POINTS_TRADE_OFF', aps_name()) }}"
|
||||
role="img">
|
||||
<p>{{ lang('APS_POINTS_TRADE_OFF', aps_name()) }}</p>
|
||||
</canvas>
|
||||
<div class="hidden">
|
||||
{% for trade in aps_period %}
|
||||
<div data-aps-labels="{{ trade.DATE|e }}"
|
||||
data-aps-label="{{ lang('APS_POINTS_LOST', aps_name())|e }}"
|
||||
data-aps-colour="#d31141"
|
||||
data-aps-value="{{ aps_format(trade.NEGATIVE) }}">
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="hidden">
|
||||
{% for trade in aps_period %}
|
||||
<div data-aps-label="{{ lang('APS_POINTS_GAINED', aps_name())|e }}"
|
||||
data-aps-colour="#28a745"
|
||||
data-aps-value="{{ aps_format(trade.POSITIVE) }}">
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,2 @@
|
||||
{% if aps_config('aps_points_display_profile') %}<dt>{{ aps_name() ~ lang('COLON') }}</dt> <dd>{{ aps_display(USER_POINTS) }}</dd>{% endif %}
|
||||
{% EVENT phpbbstudio_aps_profile_append %}
|
||||
@@ -0,0 +1,7 @@
|
||||
{% if S_APS_NAVBAR_HEADER_PROFILE_LIST_AFTER %}
|
||||
<li>
|
||||
<a href="{{ path('phpbbstudio_aps_display') }}" title="{{ aps_name() }}" role="menuitem">
|
||||
{{ aps_icon() }}<span>{{ aps_display(user.data.user_points, false) }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,7 @@
|
||||
{% if S_APS_NAVBAR_HEADER_PROFILE_LIST_BEFORE %}
|
||||
<li>
|
||||
<a href="{{ path('phpbbstudio_aps_display') }}" title="{{ aps_name() }}" role="menuitem">
|
||||
{{ aps_icon() }}<span>{{ aps_display(user.data.user_points, false) }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,7 @@
|
||||
{% if S_APS_NAVBAR_HEADER_QUICK_LINKS_AFTER %}
|
||||
<li>
|
||||
<a href="{{ path('phpbbstudio_aps_display') }}" title="{{ aps_name() }}" role="menuitem">
|
||||
{{ aps_icon() }}<span>{{ aps_display(user.data.user_points, false) }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,7 @@
|
||||
{% if S_APS_NAVBAR_HEADER_QUICK_LINKS_BEFORE %}
|
||||
<li>
|
||||
<a href="{{ path('phpbbstudio_aps_display') }}" title="{{ aps_name() }}" role="menuitem">
|
||||
{{ aps_icon() }}<span>{{ aps_display(user.data.user_points, false) }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,7 @@
|
||||
{% if S_APS_NAVBAR_HEADER_USER_PROFILE_APPEND %}
|
||||
<li class="rightside">
|
||||
<a href="{{ path('phpbbstudio_aps_display') }}" title="{{ aps_name() }}" role="menuitem">
|
||||
{{ aps_icon() }}<span>{{ aps_display(user.data.user_points, false) }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,7 @@
|
||||
{% if S_APS_NAVBAR_HEADER_USER_PROFILE_PREPEND %}
|
||||
<li class="rightside">
|
||||
<a href="{{ path('phpbbstudio_aps_display') }}" title="{{ aps_name() }}" role="menuitem">
|
||||
{{ aps_icon() }}<span>{{ aps_display(user.data.user_points, false) }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,7 @@
|
||||
{% if S_APS_OVERALL_FOOTER_BREADCRUMB_APPEND %}
|
||||
<li>
|
||||
<a href="{{ path('phpbbstudio_aps_display') }}" title="{{ aps_name() }}">
|
||||
{{ aps_icon() }}<span>{{ aps_display(user.data.user_points, false) }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,7 @@
|
||||
{% if S_APS_OVERALL_FOOTER_TEAMLINK_AFTER %}
|
||||
<li class="rightside">
|
||||
<a href="{{ path('phpbbstudio_aps_display') }}" title="{{ aps_name() }}" role="menuitem">
|
||||
{{ aps_icon() }}<span>{{ aps_display(user.data.user_points, false) }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,7 @@
|
||||
{% if S_APS_OVERALL_FOOTER_TEAMLINK_BEFORE %}
|
||||
<li class="rightside">
|
||||
<a href="{{ path('phpbbstudio_aps_display') }}" title="{{ aps_name() }}" role="menuitem">
|
||||
{{ aps_icon() }}<span>{{ aps_display(user.data.user_points, false) }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,7 @@
|
||||
{% if S_APS_OVERALL_FOOTER_TIMEZONE_AFTER %}
|
||||
<li class="rightside">
|
||||
<a href="{{ path('phpbbstudio_aps_display') }}" title="{{ aps_name() }}" role="menuitem">
|
||||
{{ aps_icon() }}<span>{{ aps_display(user.data.user_points, false) }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,7 @@
|
||||
{% if S_APS_OVERALL_FOOTER_TIMEZONE_BEFORE %}
|
||||
<li class="rightside">
|
||||
<a href="{{ path('phpbbstudio_aps_display') }}" title="{{ aps_name() }}" role="menuitem">
|
||||
{{ aps_icon() }}<span>{{ aps_display(user.data.user_points, false) }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,7 @@
|
||||
{% if S_APS_OVERALL_HEADER_NAVIGATION_APPEND %}
|
||||
<li>
|
||||
<a href="{{ path('phpbbstudio_aps_display') }}" title="{{ aps_name() }}" role="menuitem">
|
||||
{{ aps_icon() }}<span>{{ aps_display(user.data.user_points, false) }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,7 @@
|
||||
{% if S_APS_OVERALL_HEADER_NAVIGATION_PREPEND %}
|
||||
<li>
|
||||
<a href="{{ path('phpbbstudio_aps_display') }}" title="{{ aps_name() }}" role="menuitem">
|
||||
{{ aps_icon() }}<span>{{ aps_display(user.data.user_points, false) }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,2 @@
|
||||
{% if aps_config('aps_points_display_pm') %}<dd><strong>{{ aps_name() ~ lang('COLON') }}</strong> {{ aps_display(AUTHOR_POINTS) }}</dd>{% endif %}
|
||||
{% EVENT phpbbstudio_aps_pm_append %}
|
||||
@@ -0,0 +1,2 @@
|
||||
{% if aps_config('aps_points_display_post') %}<dd><strong>{{ aps_name() ~ lang('COLON') }}</strong> {{ aps_display(postrow.POSTER_POINTS) }}</dd>{% endif %}
|
||||
{% EVENT phpbbstudio_aps_post_append %}
|
||||
255
ext/phpbbstudio/aps/styles/prosilver/template/js/aps_display.js
Normal file
255
ext/phpbbstudio/aps/styles/prosilver/template/js/aps_display.js
Normal file
@@ -0,0 +1,255 @@
|
||||
/** @function jQuery */
|
||||
jQuery(function($) {
|
||||
let aps = {
|
||||
body: $('.aps-body'),
|
||||
empty: $('[data-aps-empty-panel]'),
|
||||
darken: $('#darkenwrapper'),
|
||||
classes: {
|
||||
column: '.aps-col',
|
||||
content: '.aps-panel-content',
|
||||
panel: '.aps-panel',
|
||||
pagination: '.aps-panel-footer .pagination'
|
||||
},
|
||||
add: {
|
||||
el: $('.aps-panel-add'),
|
||||
class: 'aps-panel-add-pulse',
|
||||
content: '.dropdown-contents',
|
||||
trigger: '.dropdown-trigger'
|
||||
},
|
||||
sortable: {
|
||||
el: $('[data-aps-sort]'),
|
||||
url: 'aps-sort',
|
||||
attr: 'data-aps-id',
|
||||
data: {
|
||||
delay: 150,
|
||||
cursor: 'grabbing',
|
||||
tolerance: 'pointer',
|
||||
handle: '.aps-panel-move',
|
||||
placeholder: 'aps-panel-placeholder',
|
||||
forcePlaceholderSize: true
|
||||
}
|
||||
},
|
||||
augmentation: {
|
||||
selector: '[data-aps-augmentation]'
|
||||
},
|
||||
charts: {
|
||||
selector: '[data-aps-chart]',
|
||||
data: {
|
||||
chart: 'aps-chart',
|
||||
colour: 'aps-colour',
|
||||
border: 'aps-colour-border',
|
||||
point: 'aps-colour-point',
|
||||
label: 'aps-label',
|
||||
labels: 'aps-labels',
|
||||
time: 'aps-time',
|
||||
value: 'aps-value'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
aps.add.pulse = function() {
|
||||
this.el.children(this.trigger).toggleClass(this.class, !aps.empty.is(':hidden'));
|
||||
};
|
||||
|
||||
aps.ajaxify = function(context) {
|
||||
$('[data-ajax]', context).each(function() {
|
||||
let $this = $(this),
|
||||
ajax = $this.data('ajax'),
|
||||
filter = $this.data('filter');
|
||||
|
||||
if (ajax !== 'false') {
|
||||
phpbb.ajaxify({
|
||||
selector: this,
|
||||
callback: ajax !== 'true' ? ajax : null,
|
||||
refresh: aps.defined($this.data('refresh')),
|
||||
filter: aps.defined(filter) ? phpbb.getFunctionByName(filter) : null
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
aps.defined = function(operand) {
|
||||
return typeof operand !== 'undefined';
|
||||
};
|
||||
|
||||
aps.message = function(title, text, type, time) {
|
||||
swal({
|
||||
title: title,
|
||||
text: text,
|
||||
type: type || 'success',
|
||||
timer: aps.defined(time) ? time : 1500,
|
||||
showConfirmButton: false
|
||||
});
|
||||
};
|
||||
|
||||
aps.sortable.el.each(function() {
|
||||
$(this).sortable($.extend(aps.sortable.data, {
|
||||
containment: $(this),
|
||||
update: function() {
|
||||
$.ajax({
|
||||
url: $(this).data(aps.sortable.url),
|
||||
type: 'POST',
|
||||
data: {
|
||||
order: $(this).sortable('toArray', { attribute: aps.sortable.attr }),
|
||||
},
|
||||
error: function() {
|
||||
aps.message(aps.darken.data('ajax-error-title'), aps.darken.data('ajax-error-text'), 'error', null);
|
||||
},
|
||||
success: function(r) {
|
||||
aps.message(r.APS_TITLE, r.APS_TEXT);
|
||||
}
|
||||
});
|
||||
}
|
||||
}));
|
||||
});
|
||||
|
||||
aps.augmentation.register = function(context) {
|
||||
$(aps.augmentation.selector, context).each(function() {
|
||||
$(this).on('click', function() {
|
||||
let $parent = $(this).parent(),
|
||||
$avatar = $parent.parent().siblings('img');
|
||||
|
||||
swal({
|
||||
title: $parent.siblings().first().html(),
|
||||
html: $(this).next('.hidden').html(),
|
||||
imageUrl: $avatar.attr('src'),
|
||||
imageAlt: $avatar.attr('alt'),
|
||||
imageWidth: $avatar.attr('width'),
|
||||
imageHeight: $avatar.attr('height')
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
aps.augmentation.register(null);
|
||||
|
||||
aps.charts.draw = function() {
|
||||
$(aps.charts.selector).each(function() {
|
||||
let data = {
|
||||
datasets: [],
|
||||
labels: []
|
||||
};
|
||||
|
||||
$(this).siblings('.hidden').each(function(i) {
|
||||
data.datasets[i] = {
|
||||
backgroundColor: [],
|
||||
data: []
|
||||
};
|
||||
|
||||
$(this).children().each(function() {
|
||||
data.datasets[i].data.push($(this).data(aps.charts.data.value));
|
||||
|
||||
let colour = $(this).data(aps.charts.data.colour),
|
||||
border = $(this).data(aps.charts.data.border),
|
||||
point = $(this).data(aps.charts.data.point),
|
||||
label = $(this).data(aps.charts.data.label),
|
||||
labels = $(this).data(aps.charts.data.labels);
|
||||
|
||||
if (aps.defined(colour)) {
|
||||
data.datasets[i].backgroundColor.push(colour);
|
||||
data.datasets[i].fill = colour;
|
||||
}
|
||||
|
||||
if (aps.defined(border)) {
|
||||
data.datasets[i].borderColor = colour;
|
||||
data.datasets[i].pointBorderColor = colour;
|
||||
}
|
||||
|
||||
if (aps.defined(point)) {
|
||||
data.datasets[i].pointBackgroundColor = point;
|
||||
}
|
||||
|
||||
if (aps.defined(label)) {
|
||||
data.datasets[i].label = label;
|
||||
}
|
||||
|
||||
if (aps.defined(labels)) {
|
||||
data.labels.push(labels);
|
||||
}
|
||||
});
|
||||
|
||||
if (!data.datasets[i].backgroundColor.length) {
|
||||
data.datasets[i].backgroundColor = palette('tol', data.datasets[i].data.length).map(function(hex) {
|
||||
return '#' + hex;
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
new Chart($(this), {
|
||||
type: $(this).data(aps.charts.data.chart),
|
||||
data: data,
|
||||
responsive: true,
|
||||
maintainAspectRatio: false,
|
||||
options: {
|
||||
animation: { duration: $(this).data(aps.charts.data.time) },
|
||||
legend: { position: 'bottom' }
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Register a chart plugin.
|
||||
* This plugin checks for empty charts.
|
||||
* If the chart is empty, the canvas' data-aps-empty is displayed instead.
|
||||
*/
|
||||
Chart.plugins.register({
|
||||
afterDraw: function(chart) {
|
||||
if (!chart.config.data.datasets[0].data.length) {
|
||||
let ctx = chart.chart.ctx,
|
||||
width = chart.chart.width,
|
||||
height = chart.chart.height;
|
||||
|
||||
chart.clear();
|
||||
|
||||
ctx.save();
|
||||
ctx.textAlign = 'center';
|
||||
ctx.textBaseline = 'middle';
|
||||
ctx.fillText(chart.canvas.dataset.apsEmpty, width / 2, height / 2);
|
||||
ctx.restore();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Add a "fake" timeout to the Chart drawing animation,
|
||||
* otherwise the animation does not show up.
|
||||
*/
|
||||
setTimeout(aps.charts.draw, 0);
|
||||
|
||||
phpbb.addAjaxCallback('aps_add', function(r) {
|
||||
if (r.success) {
|
||||
$(this).parent('li').remove();
|
||||
|
||||
let panel = $(r.success).insertBefore(aps.empty, null);
|
||||
|
||||
aps.ajaxify(panel);
|
||||
aps.add.pulse();
|
||||
aps.charts.draw();
|
||||
aps.body.trigger('click');
|
||||
aps.message(r.APS_TITLE, r.APS_TEXT);
|
||||
}
|
||||
});
|
||||
|
||||
phpbb.addAjaxCallback('aps_remove', function(r) {
|
||||
if (r.success) {
|
||||
$(this).parents(aps.classes.column).remove();
|
||||
|
||||
let item = aps.add.el.find(aps.add.content).append(r.success);
|
||||
|
||||
aps.ajaxify(item);
|
||||
aps.add.pulse();
|
||||
aps.message(r.APS_TITLE, r.APS_TEXT);
|
||||
}
|
||||
});
|
||||
|
||||
phpbb.addAjaxCallback('aps_replace', function(r) {
|
||||
let $old = $(this).parents(aps.classes.panel),
|
||||
$new = $(r.body);
|
||||
|
||||
$old.find(aps.classes.content).html($new.find(aps.classes.content));
|
||||
$old.find(aps.classes.pagination).html($new.find(aps.classes.pagination));
|
||||
|
||||
aps.augmentation.register($old);
|
||||
});
|
||||
});
|
||||
23
ext/phpbbstudio/aps/styles/prosilver/template/js/aps_mcp.js
Normal file
23
ext/phpbbstudio/aps/styles/prosilver/template/js/aps_mcp.js
Normal file
@@ -0,0 +1,23 @@
|
||||
jQuery(function($) {
|
||||
let $action = $('#action'),
|
||||
$points = $('#points'),
|
||||
$reason = $('#reason');
|
||||
|
||||
let apsChangeAction = function() {
|
||||
let $selected = $(this).find(':selected'),
|
||||
points = $selected.data('points'),
|
||||
reason = $selected.data('reason');
|
||||
|
||||
if (points || $selected.context === undefined) {
|
||||
$points.prop('disabled', 'disabled').val(points);
|
||||
$reason.prop('disabled', 'disabled').val(reason);
|
||||
} else {
|
||||
$points.prop('disabled', false).val('');
|
||||
$reason.prop('disabled', false).val('');
|
||||
}
|
||||
};
|
||||
|
||||
apsChangeAction();
|
||||
|
||||
$action.on('change', apsChangeAction);
|
||||
});
|
||||
10
ext/phpbbstudio/aps/styles/prosilver/template/js/chart.bundle.min.js
vendored
Normal file
10
ext/phpbbstudio/aps/styles/prosilver/template/js/chart.bundle.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
7
ext/phpbbstudio/aps/styles/prosilver/template/js/jquery-ui-sortable.min.js
vendored
Normal file
7
ext/phpbbstudio/aps/styles/prosilver/template/js/jquery-ui-sortable.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1501
ext/phpbbstudio/aps/styles/prosilver/template/js/palette.js
Normal file
1501
ext/phpbbstudio/aps/styles/prosilver/template/js/palette.js
Normal file
File diff suppressed because it is too large
Load Diff
2
ext/phpbbstudio/aps/styles/prosilver/template/js/sweetalert2.all.min.js
vendored
Normal file
2
ext/phpbbstudio/aps/styles/prosilver/template/js/sweetalert2.all.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -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') }}" />
|
||||
|
||||
<input class="button2" id="reset" name="reset" type="reset" value="{{ lang('RESET') }}" />
|
||||
{{ S_FORM_TOKEN }}
|
||||
</fieldset>
|
||||
{% endif %}
|
||||
</form>
|
||||
|
||||
{% include 'mcp_footer.html' %}
|
||||
|
||||
@@ -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') }}" />
|
||||
|
||||
<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') }}" />
|
||||
|
||||
<input class="button2" id="reset_group" type="reset" value="{{ lang('RESET') }}" />
|
||||
</fieldset>
|
||||
|
||||
{{ S_FORM_TOKEN }}
|
||||
</div>
|
||||
</div>
|
||||
@@ -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' %}
|
||||
@@ -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 }}" />
|
||||
<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 }}
|
||||
{{ 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' %}
|
||||
@@ -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>» {{ 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 %}» <a href="{{ log.U_FORUM }}" title="{{ lang('FORUM') }}">{{ log.FORUM_NAME }}</a><br />{% endif %}
|
||||
{% if log.TOPIC_TITLE %}» <a href="{{ log.U_TOPIC }}" title="{{ lang('TOPIC') }}">{{ log.TOPIC_TITLE }}</a><br />{% endif %}
|
||||
{% if log.POST_SUBJECT %}» <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>
|
||||
Reference in New Issue
Block a user