Ajout d'une extension
This commit is contained in:
57
ext/phpbbstudio/ass/acp/main_info.php
Normal file
57
ext/phpbbstudio/ass/acp/main_info.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* phpBB Studio - Advanced Shop System. An extension for the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) 2019, phpBB Studio, https://www.phpbbstudio.com
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbbstudio\ass\acp;
|
||||
|
||||
/**
|
||||
* phpBB Studio - Advanced Shop System: ACP info
|
||||
*/
|
||||
class main_info
|
||||
{
|
||||
public function module()
|
||||
{
|
||||
return [
|
||||
'filename' => '\phpbbstudio\ass\acp\main_module',
|
||||
'title' => 'ACP_ASS_SYSTEM',
|
||||
'modes' => [
|
||||
'overview' => [
|
||||
'title' => 'ACP_ASS_OVERVIEW',
|
||||
'auth' => 'ext_phpbbstudio/ass && acl_a_ass_overview',
|
||||
'cat' => ['ACP_ASS_SYSTEM'],
|
||||
],
|
||||
'settings' => [
|
||||
'title' => 'ACP_ASS_SETTINGS',
|
||||
'auth' => 'ext_phpbbstudio/ass && acl_a_ass_settings',
|
||||
'cat' => ['ACP_ASS_SYSTEM'],
|
||||
],
|
||||
'items' => [
|
||||
'title' => 'ACP_ASS_ITEMS',
|
||||
'auth' => 'ext_phpbbstudio/ass && acl_a_ass_items',
|
||||
'cat' => ['ACP_ASS_SYSTEM'],
|
||||
],
|
||||
'files' => [
|
||||
'title' => 'ACP_ASS_FILES',
|
||||
'auth' => 'ext_phpbbstudio/ass && acl_a_ass_files',
|
||||
'cat' => ['ACP_ASS_SYSTEM'],
|
||||
],
|
||||
'logs' => [
|
||||
'title' => 'ACP_ASS_LOGS',
|
||||
'auth' => 'ext_phpbbstudio/ass && acl_a_ass_logs',
|
||||
'cat' => ['ACP_ASS_SYSTEM'],
|
||||
],
|
||||
'inventory' => [
|
||||
'title' => 'ACP_ASS_INVENTORY',
|
||||
'auth' => 'ext_phpbbstudio/ass && acl_a_ass_inventory',
|
||||
'cat' => ['ACP_ASS_SYSTEM'],
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
51
ext/phpbbstudio/ass/acp/main_module.php
Normal file
51
ext/phpbbstudio/ass/acp/main_module.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* phpBB Studio - Advanced Shop System. An extension for the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) 2019, phpBB Studio, https://www.phpbbstudio.com
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbbstudio\ass\acp;
|
||||
|
||||
/**
|
||||
* phpBB Studio - Advanced Shop System: ACP module
|
||||
*/
|
||||
class main_module
|
||||
{
|
||||
/** @var string ACP Page title */
|
||||
public $page_title;
|
||||
|
||||
/** @var string ACP Page template */
|
||||
public $tpl_name;
|
||||
|
||||
/** @var string Custom form action */
|
||||
public $u_action;
|
||||
|
||||
public function main($id, $mode)
|
||||
{
|
||||
/** @var \Symfony\Component\DependencyInjection\ContainerInterface $phpbb_container */
|
||||
global $phpbb_container;
|
||||
|
||||
$language = $phpbb_container->get('language');
|
||||
|
||||
$request = $phpbb_container->get('request');
|
||||
|
||||
if ($request->variable('action', '', true) === 'select_file')
|
||||
{
|
||||
$mode = 'files';
|
||||
}
|
||||
|
||||
/** @var \phpbbstudio\ass\controller\acp_settings_controller $controller */
|
||||
$controller = $phpbb_container->get("phpbbstudio.ass.controller.acp.{$mode}");
|
||||
|
||||
// Set the page title and template
|
||||
$this->tpl_name = 'ass_' . $mode;
|
||||
$this->page_title = $language->lang('ACP_ASS_SYSTEM') . ' • ' . $language->lang('ACP_ASS_' . utf8_strtoupper($mode));
|
||||
|
||||
// Make the custom form action available in the controller and handle the mode
|
||||
$controller->set_page_url($this->u_action)->{$mode}();
|
||||
}
|
||||
}
|
||||
14
ext/phpbbstudio/ass/adm/style/ass_errors.html
Normal file
14
ext/phpbbstudio/ass/adm/style/ass_errors.html
Normal file
@@ -0,0 +1,14 @@
|
||||
{% if ERRORS %}
|
||||
<div class="errorbox">
|
||||
<h3>{{ lang('ERROR') }}</h3>
|
||||
<p class="error">
|
||||
{% if ERRORS is iterable %}
|
||||
{% for error in ERRORS %}
|
||||
{{ lang(error) }}{% if not loop.last %}<br />{% endif %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{{ lang(ERRORS) }}
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
199
ext/phpbbstudio/ass/adm/style/ass_files.html
Normal file
199
ext/phpbbstudio/ass/adm/style/ass_files.html
Normal file
@@ -0,0 +1,199 @@
|
||||
{% if S_FILE_SELECT %}
|
||||
{{ include('simple_header.html') }}
|
||||
|
||||
<link href="{T_FONT_AWESOME_LINK}" rel="stylesheet">
|
||||
|
||||
<script>
|
||||
function shop_select_file() {
|
||||
let image = document.querySelector('input[name="select_image"]:checked');
|
||||
|
||||
opener.document.getElementById('{{ S_FILE_SELECT }}').value = (image instanceof HTMLElement ? image.value : '');
|
||||
|
||||
window.close();
|
||||
}
|
||||
</script>
|
||||
{% else %}
|
||||
{{ include('overall_header.html') }}
|
||||
|
||||
<h1>{{ PAGE_TITLE }}</h1>
|
||||
<p>{{ lang('ACP_ASS_FILES_' ~ (S_FILE_MODE ? S_FILE_MODE|upper ~ '_') ~ 'EXPLAIN') }}</p>
|
||||
{% endif %}
|
||||
|
||||
{% INCLUDECSS '@phpbbstudio_aps/css/aps_form.css' %}
|
||||
{% INCLUDECSS '@phpbbstudio_ass/css/ass_common.css' %}
|
||||
|
||||
{% if S_FILE_INDEX %}
|
||||
<div>
|
||||
<a class="column1 centered-text" href="{{ U_FILE_FILES }}">
|
||||
<fieldset>
|
||||
<h2 class="centered-text ass-mar">Files</h2>
|
||||
<i class="fa fa-files-o fa-5x ass-mar"></i>
|
||||
</fieldset>
|
||||
</a>
|
||||
<a class="column2 centered-text" href="{{ U_FILE_IMAGES }}">
|
||||
<fieldset>
|
||||
<h2 class="centered-text ass-mar">Images</h2>
|
||||
<i class="fa fa-file-image-o fa-5x ass-mar"></i>
|
||||
</fieldset>
|
||||
</a>
|
||||
</div>
|
||||
{% else %}
|
||||
<fieldset>
|
||||
<legend>{{ lang('ACP_ASS_FILES') }}</legend>
|
||||
|
||||
<fieldset>
|
||||
{% if not S_FILE_SELECT %}
|
||||
<div class="pull-right">
|
||||
<a class="aps-button-red" href="{{ U_BACK }}" title="{{ lang('BACK') }}"><i class="icon fa-arrow-left fa-fw"></i></a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<a class="aps-button-blue" href="{{ U_ACTION }}"><i class="icon fa-home fa-fw"></i></a>
|
||||
{%- for crumb in DIRECTORIES -%}
|
||||
<i class="icon fa-angle-right fa-fw ass-mar-side"></i>
|
||||
<a href="{{ U_ACTION ~ '&dir=' ~ DIRECTORIES|slice(0, loop.index)|join('/')|url_encode }}">
|
||||
{% if loop.last %}
|
||||
<strong>{{ crumb }}</strong>
|
||||
{% else %}
|
||||
{{ crumb }}
|
||||
{%- endif -%}
|
||||
</a>
|
||||
{% endfor %}
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="ass-no-mar ass-no-radius-bottom">
|
||||
{% spaceless %}
|
||||
{% if DIRECTORIES|length %}
|
||||
<a class="aps-button-blue ass-mar-right" href="{{ U_ACTION ~ '&dir=' ~ DIRECTORIES|slice(0, -1)|join('/')|url_encode }}" title="{{ lang('LEVEL_UP') }}">
|
||||
<i class="fa fa-level-up fa-fw fa-flip-horizontal"></i>
|
||||
</a>
|
||||
{% else %}
|
||||
<span class="aps-button-red ass-mar-right">
|
||||
<i class="fa fa-level-up fa-fw fa-flip-horizontal"></i>
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if not S_FILE_SELECT %}
|
||||
<form class="aps-form ass-inline ass-mar-side" name="ass_files" method="post" action="{{ U_ACTION_FORM }}" data-ajax="true" data-refresh="true">
|
||||
<label class="ass-label-fix">
|
||||
<input class="autowidth ass-no-radius-right" id="folder" name="folder" type="text">
|
||||
</label>
|
||||
<button class="aps-button-green ass-no-radius-left" type="submit">
|
||||
<i class="fa fa-plus fa-fw"></i>
|
||||
</button>
|
||||
<input type="hidden" name="action" value="add_dir">
|
||||
{{ S_FORM_TOKEN }}
|
||||
</form>
|
||||
<form class="aps-form ass-inline ass-mar-side" name="ass_files" method="post" action="{{ U_ACTION_FORM }}" enctype="multipart/form-data">
|
||||
<label class="ass-label-fix">
|
||||
<input class="autowidth ass-no-radius-right" id="file" name="file" type="file"{% if ALLOWED_EXTS %} accept="{{ ALLOWED_EXSTS }}"{% endif %}>
|
||||
</label>
|
||||
<button class="aps-button-green ass-no-radius-left" type="submit">
|
||||
<i class="fa fa-upload fa-fw"></i>
|
||||
</button>
|
||||
<input type="hidden" name="action" value="add_file">
|
||||
{{ S_FORM_TOKEN }}
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endspaceless %}
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="ass-no-mar ass-no-radius-top">
|
||||
<table class="table1 responsive">
|
||||
<thead>
|
||||
<tr>
|
||||
{% if not S_FILE_SELECT %}<th class="centered-text">{{ lang('ACTIONS') }}</th>{% endif %}
|
||||
<th>{{ lang('ASS_FILENAME') }}</th>
|
||||
<th class="centered-text">{{ lang('ASS_FILETIME') }}</th>
|
||||
<th class="centered-text">{{ lang('ASS_FILESIZE') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for folder in ass_folders %}
|
||||
{% if loop.first %}
|
||||
<tr>
|
||||
<td class="row3" colspan="{{ S_FILE_SELECT ? 3 : 4 }}"><strong>{{ lang('ASS_FOLDERS') }}</strong></td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr>
|
||||
{% if not S_FILE_SELECT %}
|
||||
<td class="actions ass-actions">
|
||||
<a class="aps-button-red" href="{{ folder.U_DELETE }}" data-ajax="row_delete">
|
||||
<i class="icon fa-trash fa-fw"></i>
|
||||
</a>
|
||||
</td>
|
||||
{% endif %}
|
||||
<td class="name">
|
||||
<i class="icon fa-folder fa-fw ass-mar-side"></i>
|
||||
<a href="{{ folder.U_VIEW }}">{{ folder.NAME }}</a>
|
||||
</td>
|
||||
<td class="row2 centered-text ass-width-200">{{ folder.TIME }}</td>
|
||||
<td class="row2 centered-text ass-width-200"></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
{% for file in ass_files %}
|
||||
{% if loop.first %}
|
||||
<tr>
|
||||
<td class="row3" colspan="{{ S_FILE_SELECT ? 3 : 4 }}"><strong>{{ lang('ASS_FILES') }}</strong></td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
{% if S_FILE_SELECT %}
|
||||
{% if loop.first %}
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<div class="ass-file-select-container">
|
||||
{% endif %}
|
||||
|
||||
<div class="ass-file-select centered-text">
|
||||
<label>
|
||||
<input name="select_image" type="radio" value="{{ file.VALUE }}"{{ file.S_SELECTED ? ' checked' }}>
|
||||
{% if S_FILE_SELECT != 'file' %}
|
||||
<img src="{{ file.IMG }}" alt="{{ file.NAME }}">
|
||||
{% else %}
|
||||
<div class="ass-actions">
|
||||
<i class="fa fa-{{ file.ICON }} fa-3x" aria-hidden="true"></i>
|
||||
<div class="ass-actions">{{ file.NAME }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
{% if loop.last %}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<tr class="row-highlight">
|
||||
<td class="actions ass-actions">
|
||||
<a class="aps-button-red" href="{{ file.U_DELETE }}" data-ajax="row_delete">
|
||||
<i class="icon fa-trash fa-fw"></i>
|
||||
</a>
|
||||
</td>
|
||||
<td class="name">
|
||||
<i class="icon fa-{{ file.ICON }} fa-fw ass-mar-side"></i>
|
||||
<span>{{ file.NAME }}</span>
|
||||
</td>
|
||||
<td class="row2 centered-text ass-width-200">{{ file.TIME }}</td>
|
||||
<td class="row2 centered-text ass-width-200">{{ file.SIZE }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% if S_FILE_SELECT %}
|
||||
<p class="submit-buttons">
|
||||
<button class="aps-button-green" onclick="shop_select_file(); return false">{{ lang('SELECT') }}</button>
|
||||
</p>
|
||||
{% endif %}
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
{% endif %}
|
||||
|
||||
{% if S_FILE_SELECT %}
|
||||
{{ include('simple_footer.html') }}
|
||||
{% else %}
|
||||
{{ include('overall_footer.html') }}
|
||||
{% endif %}
|
||||
206
ext/phpbbstudio/ass/adm/style/ass_inventory.html
Normal file
206
ext/phpbbstudio/ass/adm/style/ass_inventory.html
Normal file
@@ -0,0 +1,206 @@
|
||||
{% include 'overall_header.html' %}
|
||||
|
||||
{% INCLUDECSS '@phpbbstudio_aps/css/aps_form.css' %}
|
||||
{% INCLUDECSS '@phpbbstudio_aps/css/aps_common.css' %}
|
||||
{% INCLUDECSS '@phpbbstudio_ass/css/ass_common.css' %}
|
||||
|
||||
<h1>{{ PAGE_TITLE }}</h1>
|
||||
<p>{{ lang('ACP_ASS_INVENTORY_EXPLAIN') }}</p>
|
||||
|
||||
{% if not S_TYPE %}
|
||||
|
||||
<fieldset class="nobg centered-text">
|
||||
<div class="clearfix">
|
||||
<div class="column1">
|
||||
<a class="aps-button-blue ass-button-inventory" href="{{ U_GLOBAL }}">
|
||||
<span>{{ lang('ACP_MANAGE_USERS') }}</span>
|
||||
<i class="fa fa-users fa-4x"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="column2">
|
||||
<a class="aps-button-blue ass-button-inventory" href="{{ U_MANAGE }}">
|
||||
<span>{{ lang('ACP_ASS_USER_INVENTORY') }}</span>
|
||||
<i class="fa fa-user fa-4x"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
{% else %}
|
||||
|
||||
<fieldset class="quick">
|
||||
<a class="aps-button-blue" href="{{ U_BACK }}" title="{{ lang('BACK') }}">
|
||||
<i class="icon fa-angle-left fa-fw"></i>
|
||||
<span>{{ lang('BACK') }}</span>
|
||||
</a>
|
||||
</fieldset>
|
||||
|
||||
<form class="aps-form" id="ass_inventory" name="ass_inventory" method="post" action="{{ U_ACTION }}">
|
||||
{{ include('@phpbbstudio_ass/ass_errors.html') }}
|
||||
|
||||
{% if S_TYPE == 'global' %}
|
||||
{% INCLUDECSS '@phpbbstudio_ass/css/select2.min.css' %}
|
||||
{% INCLUDEJS '@phpbbstudio_ass/js/select2.min.js' %}
|
||||
{% INCLUDEJS '@phpbbstudio_ass/js/ass_common.js' %}
|
||||
|
||||
<fieldset>
|
||||
<dl>
|
||||
<dt><label for="action">{{ lang('ACTION') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<label>
|
||||
<input class="radio aps-bool" id="action" name="action" type="radio" value="add"{{ S_ADD ? ' checked' }}>
|
||||
<span class="aps-button-green">{{ lang('ADD') }}</span>
|
||||
</label>
|
||||
<label>
|
||||
<input class="radio aps-bool" name="action" type="radio" value="delete"{{ not S_ADD ? ' checked' }}>
|
||||
<span class="aps-button-red">{{ lang('DELETE') }}</span>
|
||||
</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="usernames">{{ lang('USERNAMES') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<textarea id="usernames" name="usernames" rows="5">{{ USERNAMES }}</textarea>
|
||||
<div class="centered-text">
|
||||
<label>
|
||||
<a class="aps-button-blue ass-no-radius-top" href="{{ U_FIND_USER }}" onclick="find_username(this.href); return false;">
|
||||
{{ lang('FIND_USERNAME') }}
|
||||
</a>
|
||||
</label>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="groups">{{ lang('GROUPS') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<select class="ass-width-90p ass-vertical-resize" id="groups" name="groups[]" multiple data-studio-select="true" data-language="{{ user.data.user_lang }}">
|
||||
{% for group in groups %}
|
||||
<option{% if group.S_SPECIAL %} class="sep"{% endif %} value="{{ group.ID }}"{{ group.S_SELECTED ? ' selected' }}>
|
||||
{{ group.NAME }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="items">{{ lang('ACP_ASS_ITEMS') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<select class="ass-width-90p ass-vertical-resize" id="items" name="items[]" multiple data-studio-select="true" data-language="{{ user.data.user_lang }}">
|
||||
{% for category in categories %}
|
||||
<optgroup label="{{ category.TITLE }}" {% if category.S_INACTIVE %} class="icon-red" title="{{ lang('ASS_CATEGORY_INACTIVE') }}"{% endif %}>
|
||||
{% for item in category.items %}
|
||||
<option value="{{ item.ID }}"{{ item.S_SELECTED ? ' selected' }}{% if item.S_INACTIVE %} class="sep icon-red" title="{{ lang('ASS_ITEM_INACTIVE') }}"{% endif %}>{{ item.TITLE }}</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
{% else %}
|
||||
|
||||
{% if U_FIND_USER %}
|
||||
<fieldset>
|
||||
<dl>
|
||||
<dt><label for="username">{{ lang('USERNAME') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<input class="inputbox autowidth" id="username" name="username" type="text" required>
|
||||
<label>
|
||||
<a class="aps-button-blue" href="{{ U_FIND_USER }}" onclick="find_username(this.href); return false;">
|
||||
{{ lang('FIND_USERNAME') }}
|
||||
</a>
|
||||
</label>
|
||||
</dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
{% else %}
|
||||
{% INCLUDECSS '@phpbbstudio_ass/css/select2.min.css' %}
|
||||
{% INCLUDEJS '@phpbbstudio_ass/js/select2.min.js' %}
|
||||
{% INCLUDEJS '@phpbbstudio_ass/js/ass_common.js' %}
|
||||
|
||||
<fieldset>
|
||||
<table class="table1 forums zebra-table responsive">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="centered-text">{{ lang('ENABLED') }}</th>
|
||||
<th class="centered-text">{{ lang('ACP_ASS_CONFLICT') }}</th>
|
||||
<th class="name">{{ lang('ASS_ITEM') }}</th>
|
||||
<th class="centered-text">{{ lang('ASS_PURCHASE_TIME') }}</th>
|
||||
<th class="centered-text">{{ lang('ASS_USED_LAST') }}</th>
|
||||
<th class="centered-text">{{ lang('ASS_USAGES') }}</th>
|
||||
<th class="centered-text">{{ lang('ASS_GIFT') }}</th>
|
||||
<th class="centered-text">{{ lang('ACTIONS') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for category in categories if category.S_INVENTORY %}
|
||||
{% for item in category.items if item.S_INVENTORY %}
|
||||
<tr>
|
||||
<td class="actions {{ item.S_ACTIVE and category.S_ACTIVE ? 'yes' : 'never' }}"{% if not item.S_ACTIVE or not category.S_ACTIVE %} title="{{ lang(item.S_ACTIVE ? 'ASS_CATEGORY_INACTIVE' : 'ASS_ITEM_INACTIVE') }}"{% endif %}>
|
||||
<i class="icon fa-fw {{ item.S_ACTIVE and category.S_ACTIVE ? 'fa-check icon-green' : 'fa-times icon-red' }}" aria-hidden="true"></i>
|
||||
</td>
|
||||
<td class="actions {{ item.CONFLICT ? 'never' : 'yes' }}">
|
||||
<i class="icon fa-fw {{ item.CONFLICT ? 'fa-exclamation icon-red' : 'fa-check icon-green' }}" aria-hidden="true"></i>
|
||||
</td>
|
||||
<td>
|
||||
<span>{{ category.TITLE }}</span>
|
||||
<i class="icon fa-angle-double-right fa-fw icon-orange" aria-hidden="true"></i>
|
||||
<strong class="icon-black">{{ item.TITLE }}</strong>
|
||||
</td>
|
||||
<td>{{ item.PURCHASE_TIME }}</td>
|
||||
<td>{{ item.USE_TIME }}</td>
|
||||
<td class="actions">{{ item.USE_COUNT }}</td>
|
||||
<td>{{ item.GIFTER }}</td>
|
||||
<td class="actions ass-actions">
|
||||
<a class="aps-button-red" href="{{ U_DELETE ~ item.ID }}" title="{{ lang('DELETE') }}" data-ajax="row_delete">
|
||||
<i class="icon fa-trash fa-fw" aria-hidden="true"></i>
|
||||
<span class="sr-only">{{ lang('DELETE') }}</span>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan=""></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{{ lang('ADD') }}</legend>
|
||||
<dl>
|
||||
<dt><label for="items">{{ lang('ACP_ASS_ITEMS') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<select class="ass-width-90p ass-vertical-resize" id="items" name="items[]" multiple data-studio-select="true" data-language="{{ user.data.user_lang }}">
|
||||
{% for category in categories %}
|
||||
<optgroup label="{{ category.TITLE }}" {% if category.S_INACTIVE %} class="icon-red" title="{{ lang('ASS_CATEGORY_INACTIVE') }}"{% endif %}>
|
||||
{% for item in category.items if not item.S_INVENTORY %}
|
||||
<option value="{{ item.ID }}"{{ item.S_SELECTED ? ' selected' }}{% if item.S_INACTIVE %} class="sep icon-red" title="{{ lang('ASS_ITEM_INACTIVE') }}"{% endif %}>{{ item.TITLE }}</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<input type="hidden" name="username" value="{{ ASS_USERNAME }}">
|
||||
</fieldset>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
<fieldset>
|
||||
<p class="submit-buttons">
|
||||
{{ S_FORM_TOKEN }}
|
||||
<input class="aps-button-green" id="submit" name="{{ S_TYPE == 'manage' and U_FIND_USER ? 'submit_user' : 'submit' }}" type="submit" value="{{ lang('SUBMIT') }}">
|
||||
|
||||
<input class="aps-button-red" id="reset" name="reset" type="reset" value="{{ lang('RESET') }}">
|
||||
</p>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% include 'overall_footer.html' %}
|
||||
351
ext/phpbbstudio/ass/adm/style/ass_item_form.html
Normal file
351
ext/phpbbstudio/ass/adm/style/ass_item_form.html
Normal file
@@ -0,0 +1,351 @@
|
||||
{% INCLUDECSS '@phpbbstudio_ass/css/select2.min.css' %}
|
||||
{% INCLUDEJS '@phpbbstudio_ass/js/select2.min.js' %}
|
||||
{% INCLUDEJS '@phpbbstudio_ass/js/ass_help.js' %}
|
||||
|
||||
<div class="ass-help-toolbox hidden">
|
||||
<button class="aps-button-red ass-help-close" type="button" title="{{ lang('CANCEL') }}"><i class="icon fa-times fa-fw"></i></button>
|
||||
<button class="aps-button-blue ass-help-prev hidden" type="button" title="{{ lang('PREVIOUS') }}"><i class="icon fa-chevron-left fa-fw"></i></button>
|
||||
<button class="aps-button-blue ass-help-next" type="button" title="{{ lang('NEXT') }}"><i class="icon fa-chevron-right fa-fw"></i></button>
|
||||
<div class="ass-help-flexbox">
|
||||
{% for setting in ITEM_HELP_DATA %}
|
||||
<div data-id="{{ setting }}">
|
||||
{% set setting = setting|replace({'_start': ''}) %}
|
||||
<h3>{{ lang('ACP_ASS_ITEM_' ~ setting|upper) }}</h3>
|
||||
{# The "nl2br" filter makes any other HTML elements in the string unusable #}
|
||||
<div>{{ lang('ACP_ASS_HELP_' ~ setting|upper)|replace({"\n": '<br>'}) }}</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% macro desc(string, italic) %}
|
||||
<br><span{% if italic|default(false) %} class="explain"{% endif %}>{{ lang('ACP_ASS_ITEM_' ~ string ~ '_DESC') }}</span>
|
||||
{% endmacro %}
|
||||
|
||||
{% from _self import desc as desc %}
|
||||
|
||||
<fieldset>
|
||||
<legend>{{ lang('ACP_ASS_SETTINGS_TYPE') }}</legend>
|
||||
|
||||
<dl>
|
||||
<dt><label for="type">{{ lang('ACP_ASS_ITEM_TYPE') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<select id="type" name="type" required>
|
||||
<option disabled{{ not item.TYPE ? ' selected' }}>{{ lang('ACP_ASS_ITEM_TYPE_SELECT') ~ lang('ELLIPSIS') }}</option>
|
||||
{% for type in item_types %}
|
||||
<option value="{{ type.ID }}"{{ type.S_SELECTED ? ' selected' }}>{{ type.TITLE }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</dd>
|
||||
</dl>
|
||||
<div id="type_template" data-shop-url="{{ U_ITEM_TYPE }}">
|
||||
{% if T_ITEM_TEMPLATE %}
|
||||
{{ include(T_ITEM_TEMPLATE, ignore_missing = true) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{{ lang('ACP_ASS_SETTINGS_DEFAULT') }}</legend>
|
||||
|
||||
<dl>
|
||||
<dt><label for="price">{{ lang('ACP_ASS_ITEM_PRICE') ~ lang('COLON') }}</label></dt>
|
||||
<dd class="ass-input-icon">{{ aps_icon() }}<input class="autowidth" id="price" name="price" type="number" value="{{ aps_format(ITEM_PRICE) }}" min="0" max="999999999999.99" step="{{ aps_step() }}"></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="stock_unlimited">{{ lang('ACP_ASS_ITEM_STOCK_UNLIMITED') ~ lang('COLON') }}</label>{{ desc('STOCK_UNLIMITED') }}</dt>
|
||||
<dd>
|
||||
<label>
|
||||
<input class="radio aps-bool" id="stock_unlimited" name="stock_unlimited" type="radio" value="1"{{ ITEM_STOCK_UNLIMITED ? ' checked' }}>
|
||||
<span class="aps-button-green">{{ lang('YES') }}</span>
|
||||
</label>
|
||||
<label>
|
||||
<input class="radio aps-bool" name="stock_unlimited" type="radio" value="0"{{ not ITEM_STOCK_UNLIMITED ? ' checked' }}>
|
||||
<span class="aps-button-red">{{ lang('NO') }}</span>
|
||||
</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="stock">{{ lang('ACP_ASS_ITEM_STOCK') ~ lang('COLON') }}</label>{{ desc('STOCK') }}</dt>
|
||||
<dd><input class="autowidth" id="stock" name="stock" type="number" value="{{ ITEM_STOCK }}" min="0" max="4294967295" step="1"></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="stock_threshold">{{ lang('ACP_ASS_ITEM_STOCK_THRESHOLD') ~ lang('COLON') }}</label>{{ desc('STOCK_THRESHOLD') }}</dt>
|
||||
<dd><input class="autowidth" id="stock_threshold" name="stock_threshold" type="number" value="{{ ITEM_STOCK_THRESHOLD }}" min="0" max="4294967295" step="1"></dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{{ lang('ACP_ASS_SETTINGS_GIFT') }}</legend>
|
||||
|
||||
<dl>
|
||||
<dt><label for="gift">{{ lang('ACP_ASS_ITEM_GIFT') ~ lang('COLON') }}</label>{{ desc('GIFT') }}</dt>
|
||||
<dd>
|
||||
<label>
|
||||
<input class="radio aps-bool" id="gift" name="gift" type="radio" value="1"{{ ITEM_GIFT ? ' checked' }}>
|
||||
<span class="aps-button-green">{{ lang('YES') }}</span>
|
||||
</label>
|
||||
<label>
|
||||
<input class="radio aps-bool" name="gift" type="radio" value="0"{{ not ITEM_GIFT ? ' checked' }}>
|
||||
<span class="aps-button-red">{{ lang('NO') }}</span>
|
||||
</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="gift_only">{{ lang('ACP_ASS_ITEM_GIFT_ONLY') ~ lang('COLON') }}</label>{{ desc('GIFT_ONLY') }}</dt>
|
||||
<dd>
|
||||
<label>
|
||||
<input class="radio aps-bool" id="gift_only" name="gift_only" type="radio" value="1"{{ ITEM_GIFT_ONLY ? ' checked' }}>
|
||||
<span class="aps-button-green">{{ lang('YES') }}</span>
|
||||
</label>
|
||||
<label>
|
||||
<input class="radio aps-bool" name="gift_only" type="radio" value="0"{{ not ITEM_GIFT_ONLY ? ' checked' }}>
|
||||
<span class="aps-button-red">{{ lang('NO') }}</span>
|
||||
</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="gift_type">{{ lang('ACP_ASS_ITEM_GIFT_TYPE') ~ lang('COLON') }}</label>{{ desc('GIFT_TYPE') }}</dt>
|
||||
<dd>
|
||||
<label>
|
||||
<input class="radio ass-radio" id="gift_type" name="gift_type" type="radio" value="1"{{ ITEM_GIFT_TYPE ? ' checked' }}>
|
||||
<span class="aps-button-blue">{{ lang('ACP_ASS_GIFT_PERCENTAGE') }}</span>
|
||||
</label>
|
||||
<label>
|
||||
<input class="radio ass-radio" name="gift_type" type="radio" value="0"{{ not ITEM_GIFT_TYPE ? ' checked' }}>
|
||||
<span class="aps-button-blue">{{ lang('ACP_ASS_GIFT_PRICE') }}</span>
|
||||
</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="gift_percentage">{{ lang('ACP_ASS_ITEM_GIFT_PERCENTAGE') ~ lang('COLON') }}</label>{{ desc('GIFT_PERCENTAGE') }}</dt>
|
||||
<dd class="ass-input-icon"><i class="icon fa-percent fa-fw" aria-hidden="true"></i><input class="autowidth" id="gift_percentage" name="gift_percentage" type="number" value="{{ ITEM_GIFT_PERCENTAGE }}" min="-100" max="999" step="1"></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="gift_price">{{ lang('ACP_ASS_ITEM_GIFT_PRICE') ~ lang('COLON') }}</label>{{ desc('GIFT_PRICE') }}</dt>
|
||||
<dd class="ass-input-icon">{{ aps_icon() }}<input class="autowidth" id="gift_price" name="gift_price" type="number" value="{{ aps_format(ITEM_GIFT_PRICE) }}" min="0" max="999999999999.99" step="{{ aps_step() }}"></dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{{ lang('ACP_ASS_SETTINGS_SPECIAL') }}</legend>
|
||||
|
||||
<dl>
|
||||
<dt><label for="sale_price">{{ lang('ACP_ASS_ITEM_SALE_PRICE') ~ lang('COLON') }}</label>{{ desc('SALE_PRICE') }}</dt>
|
||||
<dd class="ass-input-icon">{{ aps_icon() }}<input class="autowidth" id="sale_price" name="sale_price" type="number" value="{{ aps_format(ITEM_SALE_PRICE) }}" min="0" max="999999999999.99" step="{{ aps_step() }}"></dd>
|
||||
</dl>
|
||||
{% set timezone =
|
||||
'<fieldset>' ~
|
||||
'<dl><dt>' ~ lang('ACP_ASS_ITEM_TIMEZONE_BOARD') ~ lang('COLON') ~ '</dt><dd>' ~ "now"|date(DATE_FORMAT, TIMEZONE) ~ '</dd></dl>' ~
|
||||
'<dl><dt>' ~ lang('ACP_ASS_ITEM_TIMEZONE_YOUR') ~ lang('COLON') ~ '</dt><dd>' ~ "now"|date(DATE_FORMAT) ~ '</dd></dl>' ~
|
||||
'</fieldset>'
|
||||
%}
|
||||
<dl>
|
||||
<dt><label for="sale_start">{{ lang('ACP_ASS_ITEM_SALE') ~ lang('COLON') }}</label>
|
||||
{{ desc('SALE') ~ desc('TIMEZONE', true) }}
|
||||
<i class="icon fa-info-circle fa-fw icon-pink ass-pointer" onclick="phpbb.alert('{{ lang('INFORMATION') }}', '{{ timezone|e('js') }}')"></i>
|
||||
</dt>
|
||||
<dd class="shop-date ass-input-icon">
|
||||
{% spaceless %}
|
||||
<div class="hidden"
|
||||
data-shop-date="true"
|
||||
data-apply="{{ lang('ACP_ASS_APPLY') }}"
|
||||
data-clear="{{ lang('ACP_ASS_CLEAR') }}"
|
||||
data-january="{{ lang(['datetime', 'January']) }}"
|
||||
data-february="{{ lang(['datetime', 'February']) }}"
|
||||
data-march="{{ lang(['datetime', 'March']) }}"
|
||||
data-april="{{ lang(['datetime', 'April']) }}"
|
||||
data-may="{{ lang(['datetime', 'May']) }}"
|
||||
data-june="{{ lang(['datetime', 'June']) }}"
|
||||
data-july="{{ lang(['datetime', 'July']) }}"
|
||||
data-august="{{ lang(['datetime', 'August']) }}"
|
||||
data-september="{{ lang(['datetime', 'September']) }}"
|
||||
data-october="{{ lang(['datetime', 'October']) }}"
|
||||
data-november="{{ lang(['datetime', 'November']) }}"
|
||||
data-december="{{ lang(['datetime', 'December']) }}"
|
||||
data-mon="{{ lang(['datetime', 'Mon']) }}"
|
||||
data-tue="{{ lang(['datetime', 'Tue']) }}"
|
||||
data-wed="{{ lang(['datetime', 'Wed']) }}"
|
||||
data-thu="{{ lang(['datetime', 'Thu']) }}"
|
||||
data-fri="{{ lang(['datetime', 'Fri']) }}"
|
||||
data-sat="{{ lang(['datetime', 'Sat']) }}"
|
||||
data-sun="{{ lang(['datetime', 'Sun']) }}"
|
||||
></div>
|
||||
|
||||
<i class="icon fa-calendar-plus-o fa-fw" aria-hidden="true"></i>
|
||||
<input class="autowidth" id="sale_start" name="sale_start" type="text" value="{{ ITEM_SALE_START_UNIX ? ITEM_SALE_START_UNIX|date(DATE_FORMAT, TIMEZONE) }}">
|
||||
<i class="icon fa-calendar-times-o fa-fw" aria-hidden="true"></i>
|
||||
{# <!--suppress HtmlFormInputWithoutLabel --> #}
|
||||
<input class="autowidth" id="sale_until" name="sale_until" type="text" value="{{ ITEM_SALE_UNTIL_UNIX ? ITEM_SALE_UNTIL_UNIX|date(DATE_FORMAT, TIMEZONE) }}" readonly>
|
||||
{% endspaceless %}
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="featured_start">{{ lang('ACP_ASS_ITEM_FEATURED') ~ lang('COLON') }}</label>
|
||||
{{ desc('FEATURED') ~ desc('TIMEZONE', true) }}
|
||||
<i class="icon fa-info-circle fa-fw icon-pink ass-pointer" onclick="phpbb.alert('{{ lang('INFORMATION') }}', '{{ timezone|e('js') }}')"></i>
|
||||
</dt>
|
||||
<dd class="shop-date ass-input-icon">
|
||||
{% spaceless %}
|
||||
<i class="icon fa-calendar-plus-o fa-fw" aria-hidden="true"></i>
|
||||
<input class="autowidth" id="featured_start" name="featured_start" type="text" value="{{ ITEM_FEATURED_START_UNIX ? ITEM_FEATURED_START_UNIX|date(DATE_FORMAT, TIMEZONE) }}">
|
||||
<i class="icon fa-calendar-times-o fa-fw" aria-hidden="true"></i>
|
||||
{# <!--suppress HtmlFormInputWithoutLabel --> #}
|
||||
<input class="autowidth" id="featured_until" name="featured_until" type="text" value="{{ ITEM_FEATURED_UNTIL_UNIX ? ITEM_FEATURED_UNTIL_UNIX|date(DATE_FORMAT, TIMEZONE) }}" readonly>
|
||||
{% endspaceless %}
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="available_start">{{ lang('ACP_ASS_ITEM_AVAILABLE') ~ lang('COLON') }}</label>
|
||||
{{ desc('AVAILABLE') ~ desc('TIMEZONE', true) }}
|
||||
<i class="icon fa-info-circle fa-fw icon-pink ass-pointer" onclick="phpbb.alert('{{ lang('INFORMATION') }}', '{{ timezone|e('js') }}')"></i>
|
||||
</dt>
|
||||
<dd class="shop-date ass-input-icon">
|
||||
{% spaceless %}
|
||||
<i class="icon fa-calendar-plus-o fa-fw" aria-hidden="true"></i>
|
||||
<input class="autowidth" id="available_start" name="available_start" type="text" value="{{ ITEM_AVAILABLE_START_UNIX ? ITEM_AVAILABLE_START_UNIX|date(DATE_FORMAT, TIMEZONE) }}">
|
||||
<i class="icon fa-calendar-times-o fa-fw" aria-hidden="true"></i>
|
||||
{# <!--suppress HtmlFormInputWithoutLabel --> #}
|
||||
<input class="autowidth" id="available_until" name="available_until" type="text" value="{{ ITEM_AVAILABLE_UNTIL_UNIX ? ITEM_AVAILABLE_UNTIL_UNIX|date(DATE_FORMAT, TIMEZONE) }}" readonly>
|
||||
{% endspaceless %}
|
||||
</dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{{ lang('ACP_ASS_SETTINGS_INVENTORY') }}</legend>
|
||||
|
||||
<dl>
|
||||
<dt><label for="count">{{ lang('ACP_ASS_ITEM_COUNT') ~ lang('COLON') }}</label>{{ desc('COUNT') ~ desc('COUNT_ZERO', true) }}</dt>
|
||||
<dd><input class="autowidth" id="count" name="count" type="number" value="{{ ITEM_COUNT }}" min="0" max="4294967295" step="1"></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="stack">{{ lang('ACP_ASS_ITEM_STACK') ~ lang('COLON') }}</label>{{ desc('STACK') }}</dt>
|
||||
<dd><input class="autowidth" id="stack" name="stack" type="number" value="{{ ITEM_STACK }}" min="1" max="4294967295" step="1" required></dd>
|
||||
</dl>
|
||||
|
||||
{# These strings should NOT be translated, as strtotime() only accept English. #}
|
||||
{% set str_to_time = ['1 year', '1 week', '5 days 12 hours', '3 weeks 6 days 23 hours 59 minutes 59 seconds'] %}
|
||||
{% set str_to_time = str_to_time|join('</code>”<br>“<code>') %}
|
||||
{% set str_to_time = '<br>“<code>' ~ str_to_time ~ '</code>”' %}
|
||||
|
||||
<dl>
|
||||
<dt><label for="refund_string">{{ lang('ACP_ASS_ITEM_REFUND_STRING') ~ lang('COLON') }}</label>
|
||||
{{ desc('REFUND') ~ desc('STR_TO_TIME', true) }}
|
||||
<i class="icon fa-info-circle fa-fw icon-pink ass-pointer" onclick="phpbb.alert('{{ lang('INFORMATION') }}', '{{ lang('ACP_ASS_ITEM_STR_TO_TIME') ~ lang('COLON') ~ str_to_time|e('js') }}')"></i>
|
||||
</dt>
|
||||
<dd><input class="autowidth" id="refund_string" name="refund_string" type="text" value="{{ ITEM_REFUND_STRING }}"></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="expire_string">{{ lang('ACP_ASS_ITEM_EXPIRE_STRING') ~ lang('COLON') }}</label>
|
||||
{{ desc('EXPIRE') ~ desc('STR_TO_TIME', true) }}
|
||||
<i class="icon fa-info-circle fa-fw icon-pink ass-pointer" onclick="phpbb.alert('{{ lang('INFORMATION') }}', '{{ lang('ACP_ASS_ITEM_STR_TO_TIME') ~ lang('COLON') ~ str_to_time|e('js') }}')"></i>
|
||||
</dt>
|
||||
<dd><input class="autowidth" id="expire_string" name="expire_string" type="text" value="{{ ITEM_EXPIRE_STRING }}"></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="delete_string">{{ lang('ACP_ASS_ITEM_DELETE_STRING') ~ lang('COLON') }}</label>
|
||||
{{ desc('DELETE') ~ desc('STR_TO_TIME', true) }}
|
||||
<i class="icon fa-info-circle fa-fw icon-pink ass-pointer" onclick="phpbb.alert('{{ lang('INFORMATION') }}', '{{ lang('ACP_ASS_ITEM_STR_TO_TIME') ~ lang('COLON') ~ str_to_time|e('js') }}')"></i>
|
||||
</dt>
|
||||
<dd><input class="autowidth" id="delete_string" name="delete_string" type="text" value="{{ ITEM_DELETE_STRING }}"></dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{{ lang('ACP_ASS_SETTINGS_DISPLAY') }}</legend>
|
||||
|
||||
<dl>
|
||||
<dt><label for="background">{{ lang('ACP_ASS_ITEM_BACKGROUND') ~ lang('COLON') }}</label>{{ desc('BACKGROUND') }}</dt>
|
||||
<dd class="ass-input-icon" data-shop-file="{{ U_ITEM_IMAGE }}">
|
||||
<i class="icon fa-trash-o fa-fw ass-pointer" aria-hidden="true" onclick="this.nextSibling.value=''"></i><input class="autowidth" id="background" name="background" type="text" value="{{ ITEM_BACKGROUND }}" readonly>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="images">{{ lang('ACP_ASS_ITEM_IMAGES') ~ lang('COLON') }}</label></dt>
|
||||
{% for image in ITEM_IMAGES %}
|
||||
<dd class="ass-input-icon" data-shop-file="{{ U_ITEM_IMAGE }}">
|
||||
{% spaceless %}
|
||||
<i class="icon fa-trash-o fa-fw ass-pointer" aria-hidden="true" onclick="this.nextSibling.value=''"></i>
|
||||
{# <!--suppress HtmlFormInputWithoutLabel --> #}
|
||||
<input class="autowidth" id="images_{{ loop.index0 }}" name="images[{{ loop.index0 }}]" type="text" value="{{ image }}" readonly>
|
||||
{% endspaceless %}
|
||||
</dd>
|
||||
{% endfor %}
|
||||
<dd class="ass-input-icon" data-shop-file="{{ U_ITEM_IMAGE }}">
|
||||
{% spaceless %}
|
||||
<i class="icon fa-trash-o fa-fw ass-pointer" aria-hidden="true" onclick="this.nextSibling.value=''"></i>
|
||||
{# <!--suppress HtmlFormInputWithoutLabel --> #}
|
||||
<input class="autowidth" id="images_{{ ITEM_IMAGES|length }}" name="images[{{ ITEM_IMAGES|length }}]" type="text" value="" readonly>
|
||||
{% endspaceless %}
|
||||
</dd>
|
||||
<dd class="aps-ajax">
|
||||
<button class="aps-button-blue" id="add_image_row" type="button">
|
||||
<i class="icon fa-plus fa-fw" aria-hidden="true"></i>
|
||||
<span class="sr-only">{{ lang('ADD') }}</span>
|
||||
</button>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="related_enabled">{{ lang('ACP_ASS_ITEM_RELATED_ENABLED') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<label>
|
||||
<input class="radio aps-bool" id="related_enabled" name="related_enabled" type="radio" value="1"{{ ITEM_RELATED_ENABLED ? ' checked' }}>
|
||||
<span class="aps-button-green">{{ lang('ENABLED') }}</span>
|
||||
</label>
|
||||
<label>
|
||||
<input class="radio aps-bool" name="related_enabled" type="radio" value="0"{{ not ITEM_RELATED_ENABLED ? ' checked' }}>
|
||||
<span class="aps-button-red">{{ lang('DISABLED') }}</span>
|
||||
</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="related_items">{{ lang('ACP_ASS_ITEM_RELATED_ITEMS') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<select class="ass-width-90p ass-vertical-resize" id="related_items" name="related_items[]" multiple data-studio-select="{{ ITEM_RELATED_ITEMS|join(',') }}" data-language="{{ user.data.user_lang }}" data-maximum-selection-length="8">
|
||||
{% for category in categories %}
|
||||
<optgroup label="{{ category.TITLE }}" {% if category.S_INACTIVE %} class="icon-red" title="{{ lang('ASS_CATEGORY_INACTIVE') }}"{% endif %}>
|
||||
{% for item in category.items if not item.S_INVENTORY %}
|
||||
<option value="{{ item.ID }}"{{ item.S_SELECTED ? ' selected' }}{% if item.S_INACTIVE %} class="sep icon-red" title="{{ lang('ASS_ITEM_INACTIVE') }}"{% endif %}>{{ item.TITLE }}</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
{% if S_ASS_EDIT %}
|
||||
<div class="clearfix">
|
||||
<fieldset class="column1">
|
||||
<dl>
|
||||
<dt><label for="dates">{{ lang('ASS_ITEM_CREATE_TIME') ~ lang('COLON') }}</label></dt><dd>{{ user.format_date(ITEM_CREATE_TIME) }}</dd>
|
||||
<dt><strong>{{ lang('ASS_ITEM_EDIT_TIME') ~ lang('COLON') }}</strong></dt><dd>{{ ITEM_EDIT_TIME ? user.format_date(ITEM_EDIT_TIME) : lang('NEVER') }}</dd>
|
||||
<dd> </dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
<fieldset class="column2">
|
||||
<dl>
|
||||
<dt><label for="states">{{ lang('ASS_ON_SALE') ~ lang('COLON') }}</label></dt><dd><i class="icon fa-{{ ITEM_SALE ? 'check icon-green' : 'times icon-red' }} fa-fw" aria-hidden="true"></i></dd>
|
||||
<dt><strong>{{ lang('ASS_FEATURED') ~ lang('COLON') }}</strong></dt><dd><i class="icon fa-{{ ITEM_FEATURED ? 'check icon-green' : 'times icon-red' }} fa-fw" aria-hidden="true"></i></dd>
|
||||
<dt><strong>{{ lang('ACP_ASS_AVAILABLE') ~ lang('COLON') }}</strong></dt><dd><i class="icon fa-{{ ITEM_AVAILABLE ? 'check icon-green' : 'times icon-red' }} fa-fw" aria-hidden="true"></i></dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="clearfix">
|
||||
<fieldset class="column1">
|
||||
<dl>
|
||||
<dt><label for="stock_info">{{ lang('ASS_STOCK_INITIAL') ~ lang('COLON') }}</label></dt><dd>{{ not ITEM_STOCK_UNLIMITED ? ITEM_STOCK_INITIAL : lang('ASS_UNLIMITED') }}</dd>
|
||||
<dt><strong>{{ lang('ASS_STOCK_CURRENT') ~ lang('COLON') }}</strong></dt><dd>{{ not ITEM_STOCK_UNLIMITED ? ITEM_STOCK : lang('ASS_UNLIMITED') }}</dd>
|
||||
<dt><strong>{{ lang('ASS_PURCHASES') ~ lang('COLON') }}</strong></dt><dd>{{ ITEM_PURCHASES }}</dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
<fieldset class="column2">
|
||||
<dl>
|
||||
<dt><label for="sale_info">{{ lang('ASS_SALE_PRICE') ~ lang('COLON') }}</label></dt><dd>{{ aps_display(ITEM_SALE_PRICE) }}</dd>
|
||||
<dt><strong>{{ lang('ASS_SALE_DISCOUNT') ~ lang('COLON') }}</strong></dt><dd>{{ aps_display(ITEM_SALE_DIFF) }}</dd>
|
||||
<dt><strong>{{ lang('ASS_SALE_PERCENTAGE') ~ lang('COLON') }}</strong></dt><dd>-{{ ITEM_SALE_PCT }}%</dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
</div>
|
||||
{% endif %}
|
||||
208
ext/phpbbstudio/ass/adm/style/ass_items.html
Normal file
208
ext/phpbbstudio/ass/adm/style/ass_items.html
Normal file
@@ -0,0 +1,208 @@
|
||||
{% include 'overall_header.html' %}
|
||||
|
||||
{% INCLUDECSS '@phpbbstudio_aps/css/aps_form.css' %}
|
||||
{% INCLUDECSS '@phpbbstudio_aps/css/aps_common.css' %}
|
||||
{% INCLUDECSS '@phpbbstudio_ass/css/ass_common.css' %}
|
||||
{% INCLUDEJS '@phpbbstudio_aps/js/jquery-ui-sortable.min.js' %}
|
||||
{% INCLUDEJS '@phpbbstudio_ass/js/ass_common.js' %}
|
||||
|
||||
{% set mode = S_ITEMS ? 'ITEMS' : 'CATEGORIES' %}
|
||||
{% set type = S_ITEMS ? 'ITEM' : 'CATEGORY' %}
|
||||
|
||||
<a class="pull-right" href="{{ U_BACK }}">
|
||||
<i class="icon fa-angle-double-left fa-fw" aria-hidden="true"></i>
|
||||
<span>{{ lang('BACK') }}</span>
|
||||
</a>
|
||||
|
||||
<h1>{{ lang('ACP_ASS_SYSTEM') }} • {{ lang('ACP_ASS_' ~ mode) }}</h1>
|
||||
<p>{{ lang('ACP_ASS_' ~ mode ~ '_EXPLAIN') }}</p>
|
||||
|
||||
{% if S_ASS_ADD or S_ASS_EDIT %}
|
||||
<form class="aps-form" id="add_edit_{{ mode|lower }}" name="add_edit_{{ mode|lower }}" method="post" action="{{ U_ACTION }}">
|
||||
{% INCLUDECSS '@phpbbstudio_aps/css/aps_iconpicker.css' %}
|
||||
{% INCLUDECSS '@phpbbstudio_aps/css/fontawesome-iconpicker.min.css' %}
|
||||
{% INCLUDECSS '@phpbbstudio_ass/css/daterangepicker.css' %}
|
||||
{% INCLUDEJS '@phpbbstudio_aps/js/fontawesome-iconpicker.min.js' %}
|
||||
{% INCLUDEJS '@phpbbstudio_ass/js/moment.min.js' %}
|
||||
{% INCLUDEJS '@phpbbstudio_ass/js/daterangepicker.js' %}
|
||||
|
||||
<script>
|
||||
{# Used by editor.js #}
|
||||
let form_name = 'add_edit_{{ mode|lower }}',
|
||||
text_name = 'desc';
|
||||
</script>
|
||||
|
||||
{{ include('@phpbbstudio_ass/ass_errors.html', {ERRORS: ASS_ERRORS}) }}
|
||||
|
||||
{% if ITEM_CONFLICT %}
|
||||
<fieldset>
|
||||
<div class="warningbox">
|
||||
<h3 class="ass-mar">{{ lang('ACP_ASS_CONFLICT') }}</h3>
|
||||
<p class="ass-no-mar">{{ lang('ACP_ASS_CONFLICT_DESC', U_ITEM_ERROR_LOG, lang('ACP_ASS_SETTINGS_TYPE')) }}</p>
|
||||
</div>
|
||||
<div class="centered-text ass-actions">
|
||||
<a class="aps-button-green" href="{{ U_ITEM_RESOLVE }}" data-ajax="shop_resolve">
|
||||
<i class="icon fa-check fa-fw" aria-hidden="true"></i>
|
||||
<strong>{{ lang('ACP_ASS_ITEM_RESOLVE') }}</strong>
|
||||
</a>
|
||||
</div>
|
||||
</fieldset>
|
||||
{% endif %}
|
||||
|
||||
<fieldset>
|
||||
<legend>{{ lang('GENERAL_SETTINGS') }}</legend>
|
||||
|
||||
{% if S_ITEMS %}
|
||||
<button class="aps-button-green ass-help-start aps-ajax{{ S_ASS_ADD ? ' ass-button-pulse' }}" type="button">
|
||||
<i class="icon fa-map-signs fa-fw" aria-hidden="true"></i>
|
||||
<span>{{ lang('ACP_ASS_HELP_TOUR') }}</span>
|
||||
</button>
|
||||
{% endif %}
|
||||
|
||||
<dl>
|
||||
<dt><label for="active">{{ lang('ACP_ASS_' ~ type ~ '_ACTIVE') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<label>
|
||||
<input class="radio aps-bool" id="active" name="active" type="radio" value="1"{{ attribute(_context, type ~ '_ACTIVE') ? ' checked' }}>
|
||||
<span class="aps-button-green">{{ lang('YES') }}</span>
|
||||
</label>
|
||||
<label>
|
||||
<input class="radio aps-bool" name="active" type="radio" value="0"{{ not attribute(_context, type ~ '_ACTIVE') ? ' checked' }}>
|
||||
<span class="aps-button-red">{{ lang('NO') }}</span>
|
||||
</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="title">{{ lang('ACP_ASS_' ~ type ~ '_TITLE') ~ lang('COLON') }}</label></dt>
|
||||
<dd><input class="medium" id="title" name="title" type="text" value="{{ attribute(_context, type ~ '_TITLE') }}" maxlength="255" required></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="slug">{{ lang('ACP_ASS_' ~ type ~ '_SLUG') ~ lang('COLON') }}</label></dt>
|
||||
<dd><input class="medium" id="slug" name="slug" type="text" value="{{ attribute(_context, type ~ '_SLUG') }}" maxlength="255" required></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="icon">{{ lang('ACP_ASS_' ~ type ~ '_ICON') ~ lang('COLON') }}</label></dt>
|
||||
<dd><input class="medium aps-icon-picker" id="icon" name="icon" type="text" value="{{ attribute(_context, type ~ '_ICON') }}"><i class="icon fa-fw"></i></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="desc">{{ lang('ACP_ASS_' ~ type ~ '_DESC') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
{% include 'acp_posting_buttons.html' %}
|
||||
|
||||
<div class="ass-color-palette" data-orientation="h" data-height="12" data-width="calc((100% - 48px) / 25); padding: 0" data-bbcode="true"></div>
|
||||
|
||||
<textarea class="inputbox" id="desc" name="desc" rows="5">{{ attribute(_context, type ~ '_DESC') }}</textarea>
|
||||
</dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
{% if S_ITEMS %}
|
||||
{{ include('@phpbbstudio_ass/ass_item_form.html') }}
|
||||
{% endif %}
|
||||
|
||||
<fieldset>
|
||||
<legend>{{ lang('ACP_SUBMIT_CHANGES') }}</legend>
|
||||
|
||||
<p 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 }}
|
||||
</p>
|
||||
</fieldset>
|
||||
</form>
|
||||
{% else %}
|
||||
|
||||
<form class="aps-form" action="{{ U_ACTION }}">
|
||||
<fieldset class="panel">
|
||||
{% set rowset = S_ITEMS ? ass_items : ass_categories %}
|
||||
|
||||
<table class="table1 forums zebra-table responsive">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="centered-text">{{ lang('ENABLED') }}</th>
|
||||
<th class="centered-text">{{ lang('ACP_ASS_CONFLICT' ~ (not S_ITEMS ? 'S')) }}</th>
|
||||
{% if S_ITEMS %}
|
||||
<th class="centered-text">{{ lang('ACP_ASS_AVAILABLE') }}</th>
|
||||
{% endif %}
|
||||
<th class="centered-text">{{ lang('ACP_ASS_' ~ type ~ '_ICON') }}</th>
|
||||
<th class="name">{{ lang('ACP_ASS_' ~ type ~ '_TITLE') }}</th>
|
||||
<th class="centered-text">{{ lang('ACP_ASS_' ~ type ~ '_SLUG') }}</th>
|
||||
<th class="centered-text">{{ lang('ACTIONS') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody data-studio-sortable="true">
|
||||
{% for row in rowset %}
|
||||
<tr data-id="{{ row.ID }}">
|
||||
<td class="actions {{ row.S_ACTIVE ? 'yes' : 'never' }}" title="{{ lang(row.S_ACTIVE ? 'ENABLED' : 'DISABLED') }}">
|
||||
<i class="icon fa-fw {{ row.S_ACTIVE ? 'fa-check icon-green' : 'fa-times icon-red' }}" aria-hidden="true"></i>
|
||||
</td>
|
||||
<td class="actions {{ row.CONFLICT ? 'never' : 'yes' }}">
|
||||
<i class="icon fa-fw {{ row.CONFLICT ? 'fa-exclamation icon-red' : 'fa-check icon-green' }}" aria-hidden="true"></i>
|
||||
</td>
|
||||
{% if S_ITEMS %}
|
||||
<td class="actions {{ row.S_AVAILABLE ? 'yes' : 'never' }}" title="{{ lang(row.S_AVAILABLE ? 'ENABLED' : 'DISABLED') }}">
|
||||
<i class="icon fa-fw {{ row.S_AVAILABLE ? 'fa-check icon-green' : 'fa-times icon-red' }}" aria-hidden="true"></i>
|
||||
</td>
|
||||
{% endif %}
|
||||
<td class="actions"{% if row.ICON %} title="{{ row.ICON }}"{% endif %}>
|
||||
{% if row.ICON %}
|
||||
<i class="icon {{ row.ICON }} fa-fw" aria-hidden="true"></i>
|
||||
{% else %}
|
||||
-
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ S_ITEMS ? row.U_EDIT : row.U_VIEW }}">
|
||||
<strong>{{ row.TITLE }}</strong>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ row.SLUG }}
|
||||
</td>
|
||||
<td class="actions{{ row.S_AUTH ? ' ass-actions' }}">
|
||||
{% spaceless %}
|
||||
{% if row.S_AUTH %}
|
||||
<a class="aps-button-green" href="{{ row.U_EDIT }}" title="{{ lang('EDIT') }}">
|
||||
<i class="icon fa-pencil fa-fw" aria-hidden="true"></i>
|
||||
<span class="sr-only">{{ lang('EDIT') }}</span>
|
||||
</a>
|
||||
|
||||
{% if S_ITEMS %}
|
||||
<a class="aps-button-blue" href="{{ row.U_COPY }}" title="{{ lang('ACP_ASS_COPY') }}">
|
||||
<i class="icon fa-clipboard fa-fw" aria-hidden="true"></i>
|
||||
<span class="sr-only">{{ lang('ACP_ASS_COPY') }}</span>
|
||||
</a>
|
||||
|
||||
{% endif %}
|
||||
<a class="aps-button-red" href="{{ row.U_DELETE }}" title="{{ lang('DELETE') }}" data-ajax="row_delete">
|
||||
<i class="icon fa-trash fa-fw" aria-hidden="true"></i>
|
||||
<span class="sr-only">{{ lang('DELETE') }}</span>
|
||||
</a>
|
||||
|
||||
{% endif %}
|
||||
<span class="aps-button-blue{{ not row.S_AUTH ? ' ass-mar-right-half pull-right' }}" title="{{ lang('MOVE') }}">
|
||||
<i class="icon fa-arrows-v fa-fw" aria-hidden="true"></i>
|
||||
<span class="sr-only">{{ lang('MOVE') }}</span>
|
||||
</span>
|
||||
{% endspaceless %}
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="centered-text" colspan="5">{{ lang('ASS_' ~ mode ~ '_NONE') }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<hr />
|
||||
|
||||
<fieldset class="quick">
|
||||
<a class="aps-button-green" href="{{ U_ASS_ADD }}">{{ lang('ADD') }}</a>
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% include 'overall_footer.html' %}
|
||||
113
ext/phpbbstudio/ass/adm/style/ass_logs.html
Normal file
113
ext/phpbbstudio/ass/adm/style/ass_logs.html
Normal file
@@ -0,0 +1,113 @@
|
||||
{% include 'overall_header.html' %}
|
||||
|
||||
{% INCLUDECSS '@phpbbstudio_aps/css/aps_form.css' %}
|
||||
{% INCLUDECSS '@phpbbstudio_aps/css/aps_common.css' %}
|
||||
{% INCLUDECSS '@phpbbstudio_ass/css/ass_common.css' %}
|
||||
|
||||
<h1>{{ PAGE_TITLE }}</h1>
|
||||
<p>{{ lang('ACP_ASS_LOGS_EXPLAIN') }}</p>
|
||||
|
||||
<form id="ass_logs" name="ass_logs" method="post" action="{{ U_ACTION }}">
|
||||
<div class="pagination top-pagination">
|
||||
{% if pagination %}
|
||||
{% include 'pagination.html' %}
|
||||
•
|
||||
{% endif %}
|
||||
{{ TOTAL_LOGS }}
|
||||
</div>
|
||||
|
||||
<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>{{ lang('ACTION') }}</th>
|
||||
<th>{{ lang('ASS_ITEM_TITLE') }}</th>
|
||||
<th class="aps-logs-points centered-text">{{ lang('ASS_ITEM_PRICE') }}</th>
|
||||
<th class="aps-logs-mark actions centered-text">{{ lang('MARK') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for log in ass_logs %}
|
||||
<tr>
|
||||
<td>{{ log.USER }}{% if not log.S_SELF and log.REPORTEE %}<br>» {{ lang('FROM') ~ ' ' ~ log.REPORTEE }}{% endif %}</td>
|
||||
<td>{{ log.LOG_TIME }}</td>
|
||||
<td>
|
||||
{% if log.S_PURCHASE %}
|
||||
{% if log.RECIPIENT %}
|
||||
<span>{{ lang('ASS_LOG_ITEM_GIFTED', log.RECIPIENT) }}</span>
|
||||
{% else %}
|
||||
<span>{{ lang('ASS_LOG_ITEM_PURCHASED') }}</span>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<span>{{ lang('ASS_LOG_ITEM_USED') ~ lang('COLON') }}</span> {{ log.LOG_ACTION }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<span>{{ log.CATEGORY_TITLE }}</span>
|
||||
<i class="icon fa-angle-right fa-fw icon-aps-blue" aria-hidden="true"></i>
|
||||
<strong>{{ log.ITEM_TITLE }}</strong>
|
||||
</td>
|
||||
<td class="aps-logs-points centered-text">{{ aps_display(log.POINTS_SUM, false) }}</td>
|
||||
<td class="aps-logs-mark actions"><label for="mark_{{ log.LOG_ID }}"><input class="checkbox" id="mark_{{ log.LOG_ID }}" name="mark[]" type="checkbox" title="{{ lang('MARK') }}" value="{{ log.LOG_ID }}" /></label></td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="7">
|
||||
<div class="errorbox">
|
||||
<p>{{ lang('NO_ENTRIES') }}</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="pagination">
|
||||
{% if pagination %}
|
||||
{% include 'pagination.html' %}
|
||||
•
|
||||
{% endif %}
|
||||
{{ TOTAL_LOGS }}
|
||||
</div>
|
||||
|
||||
|
||||
<fieldset class="display-options">
|
||||
<label>
|
||||
{{ lang('DISPLAY') ~ lang('COLON') }}
|
||||
<select name="display">
|
||||
{% for value, option in SORT_DISPLAY_ARRAY %}
|
||||
<option value="{{ value }}"{{ value == SORT_DISPLAY ? ' selected' }}>{{ lang(option.title) }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
{{ lang('SORT_BY') ~ lang('COLON') }}
|
||||
<select name="sort">
|
||||
{% for value, option in SORT_SORT_ARRAY %}
|
||||
<option value="{{ value }}"{{ value == SORT_SORT ? ' selected' }}>{{ lang(option.title) }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
{{ lang('SORT_DIRECTION') ~ lang('COLON') }}
|
||||
<select name="direction">
|
||||
{% for value, option in SORT_DIR_ARRAY %}
|
||||
<option value="{{ value }}"{{ value == SORT_DIR ? ' selected' }}>{{ lang(option.title) }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
|
||||
<input class="button2" type="submit" value="{{ lang('GO') }}">
|
||||
</fieldset>
|
||||
|
||||
<hr>
|
||||
|
||||
<fieldset class="quick">
|
||||
<input class="button2" type="submit" name="del_all" value="{{ lang('DELETE_ALL') }}" />
|
||||
<input class="button2" type="submit" name="del_marked" value="{{ lang('DELETE_MARKED') }}" /><br />
|
||||
<p class="small"><a href="#" onclick="marklist('ass_logs', 'mark', true); return false;">{{ lang('MARK_ALL') }}</a> • <a href="#" onclick="marklist('ass_logs', 'mark', false); return false;">{{ lang('UNMARK_ALL') }}</a></p>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
{% include 'overall_footer.html' %}
|
||||
440
ext/phpbbstudio/ass/adm/style/ass_overview.html
Normal file
440
ext/phpbbstudio/ass/adm/style/ass_overview.html
Normal file
@@ -0,0 +1,440 @@
|
||||
{% include 'overall_header.html' %}
|
||||
|
||||
{% INCLUDECSS '@phpbbstudio_aps/css/aps_form.css' %}
|
||||
{% INCLUDECSS '@phpbbstudio_aps/css/aps_common.css' %}
|
||||
{% INCLUDECSS '@phpbbstudio_ass/css/ass_common.css' %}
|
||||
|
||||
<h1>{{ PAGE_TITLE }}</h1>
|
||||
<p>{{ lang('ACP_ASS_OVERVIEW_EXPLAIN') }}</p>
|
||||
|
||||
<div class="ass-overview">
|
||||
<table class="table1 two-columns no-header responsive show-header ass-overview-50" data-no-responsive-header="true">
|
||||
<colgroup><col class="col1"><col class="col2"><col class="col1"><col class="col2">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ lang('STATISTIC') }}</th>
|
||||
<th>{{ lang('VALUE') }}</th>
|
||||
<th>{{ lang('STATISTIC') }}</th>
|
||||
<th>{{ lang('VALUE') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="col1">{{ lang('ACP_ASS_NUMBER_ITEMS') ~ lang('COLON') }}</td>
|
||||
<td class="col2"><strong>{{ COUNTS['items'] }}</strong></td>
|
||||
<td class="col1">{{ lang('ACP_ASS_NUMBER_CONFLICTS') ~ lang('COLON') }}</td>
|
||||
<td class="col2{{ COUNTS['errors'] ? ' never' }}"><strong>{{ COUNTS['errors'] }}</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col1">{{ lang('ACP_ASS_NUMBER_SALE') ~ lang('COLON') }}</td>
|
||||
<td class="col2"><strong>{{ COUNTS['sale'] }}</strong></td>
|
||||
<td class="col1">{{ lang('ACP_ASS_NUMBER_SPENT', aps_name()) ~ lang('COLON') }}</td>
|
||||
<td class="col2"><strong>{{ aps_display(COUNTS['spent'], false) }}</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col1">{{ lang('ACP_ASS_NUMBER_FEATURED') ~ lang('COLON') }}</td>
|
||||
<td class="col2"><strong>{{ COUNTS['featured'] }}</strong></td>
|
||||
<td class="col1">{{ lang('ACP_ASS_SHOP_ENABLED') ~ lang('COLON') }}</td>
|
||||
<td class="col2"><i class="icon {{ SHOP_ENABLED ? 'fa-check icon-green' : 'fa-times icon-red' }} fa-fw" aria-hidden="true"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col1">{{ lang('ACP_ASS_NUMBER_CATEGORIES') ~ lang('COLON') }}</td>
|
||||
<td class="col2"><strong>{{ COUNTS['categories'] }}</strong></td>
|
||||
<td class="col1">{{ lang('ACP_ASS_SHOP_ACTIVE') ~ lang('COLON') }}</td>
|
||||
<td class="col2"><i class="icon {{ SHOP_ACTIVE ? 'fa-check icon-green' : 'fa-times icon-red' }} fa-fw" aria-hidden="true"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col1">{{ lang('ACP_ASS_NUMBER_PURCHASES') ~ lang('COLON') }}</td>
|
||||
<td class="col2"><strong>{{ COUNTS['purchases'] }}</strong></td>
|
||||
<td class="col1">{{ lang('ACP_ASS_GIFTING_ENABLED') ~ lang('COLON') }}</td>
|
||||
<td class="col2"><i class="icon {{ GIFTING_ENABLED ? 'fa-check icon-green' : 'fa-times icon-red' }} fa-fw" aria-hidden="true"></i></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<fieldset class="ass-no-mar ass-overview-50">
|
||||
<legend>{{ lang('ACP_ASS_NOTES') }}</legend>
|
||||
|
||||
<form class="aps-form" method="post" action="{{ U_ACTION }}">
|
||||
{% if S_NOTES %}
|
||||
<textarea class="full" name="notes" placeholder="{{ lang('EDIT') }}">{{ NOTES_EDIT }}</textarea>
|
||||
{% else %}
|
||||
<div class="pull-right ass-mar">
|
||||
<a class="aps-button-green" href="{{ U_NOTES }}" title="{{ lang('EDIT') }}">{{ lang('EDIT') }}</a>
|
||||
</div>
|
||||
<div>
|
||||
{% if NOTES %}
|
||||
{{ NOTES }}
|
||||
{% else %}
|
||||
<em>{{ lang('ACP_ASS_NOTES_NO') ~ lang('ELLIPSIS') }}</em>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if S_NOTES %}
|
||||
<fieldset class="submit-buttons">
|
||||
<input name="action" type="hidden" value="notes">
|
||||
<input name="submit" type="submit" value="{{ lang('SUBMIT') }}">
|
||||
<a class="aps-button-red" href="{{ U_ACTION }}" title="{{ lang('CANCEL') }}">{{ lang('CANCEL') }}</a>
|
||||
</fieldset>
|
||||
{% endif %}
|
||||
</form>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{{ lang('ACP_ASS_PANEL_FEATURED') }}</legend>
|
||||
|
||||
<ul class="ass-overview-list ass-no-mar">
|
||||
{% for item in featured %}
|
||||
<li class="ass-overview-flex">
|
||||
<div class="ass-overview-flex-small">
|
||||
{% if item.BACKGROUND_SRC %}
|
||||
<img src="{{ item.BACKGROUND_SRC }}" alt="{{ item.TITLE }}" />
|
||||
{% else %}
|
||||
<i class="icon {{ item.ICON ?: NO_IMAGE_ICON }} fa-3x icon-gray" aria-hidden="true"></i>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="ass-overview-flex-auto">
|
||||
<div>
|
||||
<strong class="icon-black">{{ item.TITLE }}</strong><br />
|
||||
<em>
|
||||
<i class="icon fa-calendar-times-o fa-fw" aria-hidden="true"></i>
|
||||
{{ user.format_date(item.FEATURED_UNTIL_UNIX) }}
|
||||
</em>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="overview-flex">
|
||||
<div class="ass-overview-flex-auto centered-text ass-overview-flex-full-height">
|
||||
<strong class="error">{{ lang('ACP_ASS_OVERVIEW_FEATURED_NO') }}</strong>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{{ lang('ACP_ASS_OVERVIEW_FEATURED_UPCOMING') }}</legend>
|
||||
|
||||
<ul class="ass-overview-list ass-no-mar">
|
||||
{% for item in featured_coming %}
|
||||
<li class="ass-overview-flex">
|
||||
<div class="ass-overview-flex-small">
|
||||
{% if item.BACKGROUND_SRC %}
|
||||
<img src="{{ item.BACKGROUND_SRC }}" alt="{{ item.TITLE }}" />
|
||||
{% else %}
|
||||
<i class="icon {{ item.ICON ?: NO_IMAGE_ICON }} fa-3x icon-gray" aria-hidden="true"></i>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="ass-overview-flex-auto">
|
||||
<div>
|
||||
<strong class="icon-black">{{ item.TITLE }}</strong><br />
|
||||
<em>
|
||||
<i class="icon fa-calendar-check-o fa-fw" aria-hidden="true"></i>
|
||||
{{ user.format_date(item.FEATURED_START_UNIX) }}
|
||||
</em>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="overview-flex">
|
||||
<div class="ass-overview-flex-auto centered-text ass-overview-flex-full-height">
|
||||
<strong class="error">{{ lang('ACP_ASS_OVERVIEW_FEATURED_UPCOMING_NO') }}</strong>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{{ lang('ACP_ASS_PANEL_SALE') }}</legend>
|
||||
|
||||
<ul class="ass-overview-list ass-no-mar">
|
||||
{% for item in sale %}
|
||||
<li class="ass-overview-flex">
|
||||
<div class="ass-overview-flex-small">
|
||||
{% if item.BACKGROUND_SRC %}
|
||||
<img src="{{ item.BACKGROUND_SRC }}" alt="{{ item.TITLE }}" />
|
||||
{% else %}
|
||||
<i class="icon {{ item.ICON ?: NO_IMAGE_ICON }} fa-3x icon-gray" aria-hidden="true"></i>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="ass-overview-flex-auto">
|
||||
<div>
|
||||
<strong class="icon-black">{{ item.TITLE }}</strong><br />
|
||||
<em>
|
||||
<i class="icon fa-calendar-times-o fa-fw" aria-hidden="true"></i>
|
||||
{{ user.format_date(item.SALE_UNTIL_UNIX) }}
|
||||
</em>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="overview-flex">
|
||||
<div class="ass-overview-flex-auto centered-text ass-overview-flex-full-height">
|
||||
<strong class="error">{{ lang('ACP_ASS_OVERVIEW_SALE_NO') }}</strong>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{{ lang('ACP_ASS_OVERVIEW_SALE_UPCOMING') }}</legend>
|
||||
|
||||
<ul class="ass-overview-list ass-no-mar">
|
||||
{% for item in sale_coming %}
|
||||
<li class="ass-overview-flex">
|
||||
<div class="ass-overview-flex-small">
|
||||
{% if item.BACKGROUND_SRC %}
|
||||
<img src="{{ item.BACKGROUND_SRC }}" alt="{{ item.TITLE }}" />
|
||||
{% else %}
|
||||
<i class="icon {{ item.ICON ?: NO_IMAGE_ICON }} fa-3x icon-gray" aria-hidden="true"></i>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="ass-overview-flex-auto">
|
||||
<div>
|
||||
<strong class="icon-black">{{ item.TITLE }}</strong><br />
|
||||
<em>
|
||||
<i class="icon fa-calendar-check-o fa-fw" aria-hidden="true"></i>
|
||||
{{ user.format_date(item.SALE_START_UNIX) }}
|
||||
</em>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="overview-flex">
|
||||
<div class="ass-overview-flex-auto centered-text ass-overview-flex-full-height">
|
||||
<strong class="error">{{ lang('ACP_ASS_OVERVIEW_SALE_UPCOMING_NO') }}</strong>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{{ lang('ACP_ASS_OVERVIEW_LOW_STOCK') }}</legend>
|
||||
|
||||
<ul class="ass-overview-list ass-no-mar">
|
||||
{% for item in low_stock %}
|
||||
<li class="ass-overview-flex">
|
||||
<div class="ass-overview-flex-small">
|
||||
{% if item.BACKGROUND_SRC %}
|
||||
<img src="{{ item.BACKGROUND_SRC }}" alt="{{ item.TITLE }}" />
|
||||
{% else %}
|
||||
<i class="icon {{ item.ICON ?: NO_IMAGE_ICON }} fa-3x icon-gray" aria-hidden="true"></i>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="ass-overview-flex-auto"><strong class="icon-black">{{ item.TITLE }}</strong></div>
|
||||
<div class="ass-overview-flex-small"><span>{{ item.STOCK }}</span></div>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="overview-flex">
|
||||
<div class="ass-overview-flex-auto centered-text ass-overview-flex-full-height">
|
||||
<strong class="error">{{ lang('ACP_ASS_OVERVIEW_LOW_STOCK_NO') }}</strong>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{{ lang('ACP_ASS_OVERVIEW_BIGGEST_GIFTERS') }}</legend>
|
||||
|
||||
<ul class="ass-overview-list ass-no-mar">
|
||||
{% for user in gifters %}
|
||||
<li class="ass-overview-flex">
|
||||
<div class="ass-overview-flex-small">
|
||||
{% if user.AVATAR %}
|
||||
{{ user.AVATAR }}
|
||||
{% else %}
|
||||
<i class="icon fa-user-circle-o fa-4x icon-gray" aria-hidden="true"></i>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="ass-overview-flex-auto">{{ user.NAME }}</div>
|
||||
<div class="ass-overview-flex-small"><span>{{ user.COUNT }}</span></div>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="overview-flex">
|
||||
<div class="ass-overview-flex-auto centered-text ass-overview-flex-full-height">
|
||||
<strong class="error">{{ lang('ACP_ASS_OVERVIEW_BIGGEST_GIFTERS_NO') }}</strong>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{{ lang('ACP_ASS_OVERVIEW_BIGGEST_BUYERS') }}</legend>
|
||||
|
||||
<ul class="ass-overview-list ass-no-mar">
|
||||
{% for user in buyers %}
|
||||
<li class="ass-overview-flex">
|
||||
<div class="ass-overview-flex-small">
|
||||
{% if user.AVATAR %}
|
||||
{{ user.AVATAR }}
|
||||
{% else %}
|
||||
<i class="icon fa-user-circle-o fa-4x icon-gray" aria-hidden="true"></i>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="ass-overview-flex-auto">{{ user.NAME }}</div>
|
||||
<div class="ass-overview-flex-small"><span>{{ user.COUNT }}</span></div>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="overview-flex">
|
||||
<div class="ass-overview-flex-auto centered-text ass-overview-flex-full-height">
|
||||
<strong class="error">{{ lang('ACP_ASS_OVERVIEW_BIGGEST_BUYERS_NO') }}</strong>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{{ lang('ACP_ASS_OVERVIEW_BIGGEST_SPENDERS') }}</legend>
|
||||
|
||||
<ul class="ass-overview-list ass-no-mar">
|
||||
{% for user in spenders %}
|
||||
<li class="ass-overview-flex">
|
||||
<div class="ass-overview-flex-small">
|
||||
{% if user.AVATAR %}
|
||||
{{ user.AVATAR }}
|
||||
{% else %}
|
||||
<i class="icon fa-user-circle-o fa-4x icon-gray" aria-hidden="true"></i>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="ass-overview-flex-auto">{{ user.NAME }}</div>
|
||||
<div class="ass-overview-flex-small"><span>{{ aps_display(user.COUNT, false) }}</span></div>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="overview-flex">
|
||||
<div class="ass-overview-flex-auto centered-text ass-overview-flex-full-height">
|
||||
<strong class="error">{{ lang('ACP_ASS_OVERVIEW_BIGGEST_SPENDERS_NO') }}</strong>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{{ lang('ACP_ASS_OVERVIEW_SELLERS_LOW') }}</legend>
|
||||
|
||||
<ul class="ass-overview-list ass-no-mar">
|
||||
{% for item in low_sellers %}
|
||||
<li class="ass-overview-flex">
|
||||
<div class="ass-overview-flex-small">
|
||||
{% if item.BACKGROUND_SRC %}
|
||||
<img src="{{ item.BACKGROUND_SRC }}" alt="{{ item.TITLE }}" />
|
||||
{% else %}
|
||||
<i class="icon {{ item.ICON ?: NO_IMAGE_ICON }} fa-3x icon-gray" aria-hidden="true"></i>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="ass-overview-flex-auto"><strong class="icon-black">{{ item.TITLE }}</strong></div>
|
||||
<div class="ass-overview-flex-small"><span>{{ item.PURCHASES }}</span></div>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="overview-flex">
|
||||
<div class="ass-overview-flex-auto centered-text ass-overview-flex-full-height">
|
||||
<strong class="error">{{ lang('ACP_ASS_OVERVIEW_SELLERS_LOW_NO') }}</strong>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{{ lang('ACP_ASS_OVERVIEW_SELLERS_TOP') }}</legend>
|
||||
|
||||
<ul class="ass-overview-list ass-no-mar">
|
||||
{% for item in top_sellers %}
|
||||
<li class="ass-overview-flex">
|
||||
<div class="ass-overview-flex-small">
|
||||
{% if item.BACKGROUND_SRC %}
|
||||
<img src="{{ item.BACKGROUND_SRC }}" alt="{{ item.TITLE }}" />
|
||||
{% else %}
|
||||
<i class="icon {{ item.ICON ?: NO_IMAGE_ICON }} fa-3x icon-gray" aria-hidden="true"></i>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="ass-overview-flex-auto"><strong class="icon-black">{{ item.TITLE }}</strong></div>
|
||||
<div class="ass-overview-flex-small"><span>{{ item.PURCHASES }}</span></div>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="overview-flex">
|
||||
<div class="ass-overview-flex-auto centered-text ass-overview-flex-full-height">
|
||||
<strong class="error">{{ lang('ACP_ASS_OVERVIEW_SELLERS_TOP_NO') }}</strong>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{{ lang('ACP_ASS_OVERVIEW_RECENT_ITEMS') }}</legend>
|
||||
|
||||
<ul class="ass-overview-list ass-no-mar">
|
||||
{% for item in recent %}
|
||||
<li class="ass-overview-flex">
|
||||
<div class="ass-overview-flex-small">
|
||||
{% if item.BACKGROUND_SRC %}
|
||||
<img src="{{ item.BACKGROUND_SRC }}" alt="{{ item.TITLE }}" />
|
||||
{% else %}
|
||||
<i class="icon {{ item.ICON ?: NO_IMAGE_ICON }} fa-3x icon-gray" aria-hidden="true"></i>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="ass-overview-flex-auto">
|
||||
<div>
|
||||
<strong class="icon-black">{{ item.TITLE }}</strong><br />
|
||||
<em>
|
||||
<i class="icon fa-pencil-square-o fa-fw" aria-hidden="true"></i>
|
||||
{{ user.format_date(item.CREATE_TIME) }}
|
||||
</em>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="overview-flex">
|
||||
<div class="ass-overview-flex-auto centered-text ass-overview-flex-full-height">
|
||||
<strong class="error">{{ lang('ACP_ASS_OVERVIEW_RECENT_ITEMS_NO') }}</strong>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{{ lang('ACP_ASS_OVERVIEW_RECENT_PURCHASES') }}</legend>
|
||||
|
||||
<ul class="ass-overview-list ass-no-mar">
|
||||
{% for item in purchases %}
|
||||
<li class="ass-overview-flex">
|
||||
<div class="ass-overview-flex-small">
|
||||
{% if item.BACKGROUND_SRC %}
|
||||
<img src="{{ item.BACKGROUND_SRC }}" alt="{{ item.TITLE }}" />
|
||||
{% else %}
|
||||
<i class="icon {{ item.ICON ?: NO_IMAGE_ICON }} fa-3x icon-gray" aria-hidden="true"></i>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="ass-overview-flex-auto">
|
||||
<div>
|
||||
<strong class="icon-black">{{ item.TITLE }}</strong><br />
|
||||
<em>
|
||||
<i class="icon {{ aps_config('ass_shop_icon') }} fa-fw" aria-hidden="true"></i>
|
||||
{{ user.format_date(item.PURCHASE_TIME) }}
|
||||
</em>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="overview-flex">
|
||||
<div class="ass-overview-flex-auto centered-text ass-overview-flex-full-height">
|
||||
<strong class="error">{{ lang('ACP_ASS_OVERVIEW_RECENT_PURCHASES_NO') }}</strong>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
{% include 'overall_footer.html' %}
|
||||
350
ext/phpbbstudio/ass/adm/style/ass_settings.html
Normal file
350
ext/phpbbstudio/ass/adm/style/ass_settings.html
Normal file
@@ -0,0 +1,350 @@
|
||||
{% include 'overall_header.html' %}
|
||||
|
||||
{% INCLUDECSS '@phpbbstudio_aps/css/aps_form.css' %}
|
||||
{% INCLUDECSS '@phpbbstudio_aps/css/aps_common.css' %}
|
||||
{% INCLUDECSS '@phpbbstudio_ass/css/ass_common.css' %}
|
||||
{% INCLUDECSS '@phpbbstudio_aps/css/aps_iconpicker.css' %}
|
||||
{% INCLUDECSS '@phpbbstudio_aps/css/fontawesome-iconpicker.min.css' %}
|
||||
{% INCLUDEJS '@phpbbstudio_aps/js/fontawesome-iconpicker.min.js' %}
|
||||
{% INCLUDEJS '@phpbbstudio_ass/js/ass_common.js' %}
|
||||
|
||||
{% if S_ASS_LOCATIONS %}
|
||||
{% include '@phpbbstudio_aps/aps_locations.html' %}
|
||||
{% else %}
|
||||
|
||||
<h1>{{ PAGE_TITLE }}</h1>
|
||||
<p>{{ lang('ACP_ASS_SETTINGS_EXPLAIN') }}</p>
|
||||
|
||||
<form class="aps-form" id="shop_settings" name="shop_settings" method="post" action="{{ U_ACTION }}">
|
||||
{{ include('@phpbbstudio_ass/ass_errors.html') }}
|
||||
|
||||
<fieldset>
|
||||
<legend>{{ lang('GENERAL_SETTINGS') }}</legend>
|
||||
|
||||
<dl>
|
||||
<dt>
|
||||
<label for="enabled">{{ lang('ACP_ASS_SHOP_ENABLED') ~ lang('COLON') }}</label>
|
||||
<br><span>{{ lang('ACP_ASS_SHOP_ENABLED_DESC') }}</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<label>
|
||||
<input class="radio aps-bool" id="enabled" name="enabled" type="radio" value="1"{{ ENABLED ? ' checked' }}>
|
||||
<span class="aps-button-green">{{ lang('YES') }}</span>
|
||||
</label>
|
||||
<label>
|
||||
<input class="radio aps-bool" name="enabled" type="radio" value="0"{{ not ENABLED ? ' checked' }}>
|
||||
<span class="aps-button-red">{{ lang('NO') }}</span>
|
||||
</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>
|
||||
<label for="active">{{ lang('ACP_ASS_SHOP_ACTIVE') ~ lang('COLON') }}</label>
|
||||
<br><span>{{ lang('ACP_ASS_SHOP_ACTIVE_DESC') }}</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<label>
|
||||
<input class="radio aps-bool" id="active" name="active" type="radio" value="1"{{ ACTIVE ? ' checked' }}>
|
||||
<span class="aps-button-green">{{ lang('YES') }}</span>
|
||||
</label>
|
||||
<label>
|
||||
<input class="radio aps-bool" name="active" type="radio" value="0"{{ not ACTIVE ? ' checked' }}>
|
||||
<span class="aps-button-red">{{ lang('NO') }}</span>
|
||||
</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>
|
||||
<label for="inactive_desc">{{ lang('ACP_ASS_SHOP_INACTIVE_DESC') ~ lang('COLON') }}</label>
|
||||
<br><span>{{ lang('ACP_ASS_SHOP_INACTIVE_DESC_DESC') }}</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<script>
|
||||
{# Used by editor.js #}
|
||||
let form_name = 'shop_settings',
|
||||
text_name = 'inactive_desc';
|
||||
</script>
|
||||
{% include 'acp_posting_buttons.html' %}
|
||||
<textarea class="inputbox" id="inactive_desc" name="inactive_desc" rows="5">{{ INACTIVE_DESC }}</textarea></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>
|
||||
<strong>{{ lang('ACP_ASS_LOCATIONS') }}</strong>
|
||||
<br><span>{{ lang('ACP_ASS_LOCATIONS_DESC') }}</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<label>
|
||||
<a class="aps-button-green" href="{{ U_LOCATIONS }}">
|
||||
{{ lang('RUN') }}
|
||||
</a>
|
||||
</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="shop_icon">{{ lang('ACP_ASS_SHOP_ICON') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<input class="aps-icon-picker" id="shop_icon" name="shop_icon" type="text" value="{{ SHOP_ICON }}" required><i class="icon fa-fw"></i>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="inventory_icon">{{ lang('ACP_ASS_INVENTORY_ICON') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<input class="aps-icon-picker" id="inventory_icon" name="inventory_icon" type="text" value="{{ INVENTORY_ICON }}" required><i class="icon fa-fw"></i>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="no_image_icon">{{ lang('ACP_ASS_NO_IMAGE_ICON') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<input class="aps-icon-picker" id="no_image_icon" name="no_image_icon" type="text" value="{{ NO_IMAGE_ICON }}" required><i class="icon fa-fw"></i>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="gift_icon">{{ lang('ACP_ASS_GIFT_ICON') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<input class="aps-icon-picker" id="gift_icon" name="gift_icon" type="text" value="{{ GIFT_ICON }}" required><i class="icon fa-fw"></i>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="gift_enabled">{{ lang('ACP_ASS_GIFT_ITEMS') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<label>
|
||||
<input class="radio aps-bool" id="gift_enabled" name="gift_enabled" type="radio" value="1"{{ GIFT_ENABLED ? ' checked' }}>
|
||||
<span class="aps-button-green">{{ lang('ENABLED') }}</span>
|
||||
</label>
|
||||
<label>
|
||||
<input class="radio aps-bool" name="gift_enabled" type="radio" value="0"{{ not GIFT_ENABLED ? ' checked' }}>
|
||||
<span class="aps-button-red">{{ lang('DISABLED') }}</span>
|
||||
</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="deactivate_conflicts">{{ lang('ACP_ASS_CONFLICTS_DEACTIVATE') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<label>
|
||||
<input class="radio aps-bool" id="deactivate_conflicts" name="deactivate_conflicts" type="radio" value="1"{{ DEACTIVATE_CONFLICTS ? ' checked' }}>
|
||||
<span class="aps-button-green">{{ lang('ENABLED') }}</span>
|
||||
</label>
|
||||
<label>
|
||||
<input class="radio aps-bool" name="deactivate_conflicts" type="radio" value="0"{{ not DEACTIVATE_CONFLICTS ? ' checked' }}>
|
||||
<span class="aps-button-red">{{ lang('DISABLED') }}</span>
|
||||
</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>
|
||||
<label for="purge_cache">{{ lang('ACP_ASS_PURGE_CACHE') ~ lang('COLON') }}</label>
|
||||
<br><span>{{ lang('ACP_ASS_PURGE_CACHE_DESC') }}</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<label>
|
||||
<input class="radio aps-bool" id="purge_cache" name="purge_cache" type="radio" value="1"{{ PURGE_CACHE ? ' checked' }}>
|
||||
<span class="aps-button-green">{{ lang('ENABLED') }}</span>
|
||||
</label>
|
||||
<label>
|
||||
<input class="radio aps-bool" name="purge_cache" type="radio" value="0"{{ not PURGE_CACHE ? ' checked' }}>
|
||||
<span class="aps-button-red">{{ lang('DISABLED') }}</span>
|
||||
</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="items_per_page">{{ lang('ACP_ASS_ITEMS_PER_PAGE') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<input class="shop-slider" id="items_per_page" name="items_per_page" type="range" value="{{ ITEMS_PER_PAGE }}" min="2" max="60" step="2" required>
|
||||
<output>{{ ITEMS_PER_PAGE }}</output>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="logs_per_page">{{ lang('ACP_ASS_LOGS_PER_PAGE') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<input class="shop-slider" id="logs_per_page" name="logs_per_page" type="range" value="{{ LOGS_PER_PAGE }}" min="2" max="60" step="1" required>
|
||||
<output>{{ LOGS_PER_PAGE }}</output>
|
||||
</dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{{ lang('ACP_ASS_SETTINGS_SHOP') }}</legend>
|
||||
|
||||
{% for row in SHOP_BLOCKS|batch(2) %}
|
||||
{% for type, data in row %}
|
||||
<fieldset class="column{{ loop.index }}" data-studio-panel="true">
|
||||
<h5>{{ lang('ACP_ASS_PANEL_' ~ type|upper) }}</h5>
|
||||
<hr />
|
||||
<i class="icon {{ ICON[type] }} icon-{{ ICON_COLOUR[type] }} shop-panel-icon shop-panel-icon-{{ BANNER_COLOUR[type] }}{{ BANNER_SIZE[type] ? ' shop-panel-icon-' ~ BANNER_SIZE[type] }}{{ not ICON[type] ? ' hidden' }}"></i>
|
||||
|
||||
<dl>
|
||||
<dt><label for="{{ type }}_banner_size">{{ lang('ACP_ASS_PANEL_BANNER_SIZE') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<select id="{{ type }}_banner_size" name="{{ type }}_banner_size">
|
||||
<option value=""{{ not BANNER_SIZE[type] ? ' selected' }}>{{ lang('ACP_ASS_PANEL_BANNER_SIZE_NORMAL') }}</option>
|
||||
{% for size in SHOP_BANNER_SIZES %}
|
||||
<option value="{{ size }}"{{ size == BANNER_SIZE[type] ? ' selected' }}>{{ lang('ACP_ASS_PANEL_BANNER_SIZE_' ~ size|upper) }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="{{ type }}_banner_colour">{{ lang('ACP_ASS_PANEL_BANNER_COLOUR') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<select id="{{ type }}_banner_colour" name="{{ type }}_banner_colour">
|
||||
{% for colour in SHOP_BANNER_COLOURS %}
|
||||
<option value="{{ colour }}"{{ colour == BANNER_COLOUR[type] ? ' selected' }}>{{ colour|capitalize }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="{{ type }}_icon_colour">{{ lang('ACP_ASS_PANEL_ICON_COLOUR') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<select id="{{ type }}_icon_colour" name="{{ type }}_icon_colour">
|
||||
{% for colour in SHOP_ICON_COLOURS %}
|
||||
<option value="{{ colour }}"{{ colour == ICON_COLOUR[type] ? ' selected' }}>{{ colour|capitalize }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="{{ type }}_icon">{{ lang('ACP_ASS_PANEL_ICON') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<input class="aps-icon-picker" id="{{ type }}_icon" name="{{ type }}_icon" type="text" value="{{ ICON[type] }}"><i class="icon fa-fw"></i>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="{{ type }}_order">{{ lang('ACP_ASS_PANEL_ORDER') ~ lang('COLON') }}</label></dt>
|
||||
<dd><input id="{{ type }}_order" name="{{ type }}_order" type="number" value="{{ ORDER[type] }}" min="{{ data.order.min }}" max="{{ data.order.max }}" step="1"></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="{{ type }}_width">{{ lang('ACP_ASS_PANEL_WIDTH') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
{% if type == 'random' %}
|
||||
<label>
|
||||
<input class="radio ass-radio" name="{{ type }}_width" type="radio" value="3"{{ WIDTH[type] == 3 ? ' checked' }}>
|
||||
<span class="aps-button-blue">25 %</span>
|
||||
</label>
|
||||
{% endif %}
|
||||
<label>
|
||||
<input class="radio ass-radio" id="{{ type }}_width" name="{{ type }}_width" type="radio" value="4"{{ WIDTH[type] == 4 ? ' checked' }}>
|
||||
<span class="aps-button-blue">33 %</span>
|
||||
</label>
|
||||
{% if type != 'random' %}
|
||||
<label>
|
||||
<input class="radio ass-radio" name="{{ type }}_width" type="radio" value="6"{{ WIDTH[type] == 6 ? ' checked' }}>
|
||||
<span class="aps-button-blue">50 %</span>
|
||||
</label>
|
||||
{% endif %}
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="{{ type }}_limit">{{ lang('ACP_ASS_PANEL_LIMIT') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<input class="shop-slider" id="{{ type }}_limit" name="{{ type }}_limit" type="range" value="{{ LIMIT[type] }}" min="{{ data.limit.min }}" max="{{ data.limit.max }}" step="1" required>
|
||||
<output>{{ LIMIT[type] }}</output>
|
||||
</dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{{ lang('ACP_ASS_SETTINGS_CAROUSEL') }}</legend>
|
||||
|
||||
<dl>
|
||||
<dt>
|
||||
<label for="carousel_arrows">{{ lang('ACP_ASS_CAROUSEL_ARROWS') ~ lang('COLON') }}</label>
|
||||
<br><span>{{ lang('ACP_ASS_CAROUSEL_ARROWS_DESC') }}</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<label>
|
||||
<input class="radio aps-bool" id="carousel_arrows" name="carousel_arrows" type="radio" value="1"{{ CAROUSEL_ARROWS ? ' checked' }}>
|
||||
<span class="aps-button-green">{{ lang('YES') }}</span>
|
||||
</label>
|
||||
<label>
|
||||
<input class="radio aps-bool" name="carousel_arrows" type="radio" value="0"{{ not CAROUSEL_ARROWS ? ' checked' }}>
|
||||
<span class="aps-button-red">{{ lang('NO') }}</span>
|
||||
</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>
|
||||
<label for="carousel_dots">{{ lang('ACP_ASS_CAROUSEL_DOTS') ~ lang('COLON') }}</label>
|
||||
<br><span>{{ lang('ACP_ASS_CAROUSEL_DOTS_DESC') }}</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<label>
|
||||
<input class="radio aps-bool" id="carousel_dots" name="carousel_dots" type="radio" value="1"{{ CAROUSEL_DOTS ? ' checked' }}>
|
||||
<span class="aps-button-green">{{ lang('YES') }}</span>
|
||||
</label>
|
||||
<label>
|
||||
<input class="radio aps-bool" name="carousel_dots" type="radio" value="0"{{ not CAROUSEL_DOTS ? ' checked' }}>
|
||||
<span class="aps-button-red">{{ lang('NO') }}</span>
|
||||
</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>
|
||||
<label for="carousel_fade">{{ lang('ACP_ASS_CAROUSEL_FADE') ~ lang('COLON') }}</label>
|
||||
<br><span>{{ lang('ACP_ASS_CAROUSEL_FADE_DESC') }}</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<label>
|
||||
<input class="radio aps-bool" id="carousel_fade" name="carousel_fade" type="radio" value="1"{{ CAROUSEL_FADE ? ' checked' }}>
|
||||
<span class="aps-button-green">{{ lang('YES') }}</span>
|
||||
</label>
|
||||
<label>
|
||||
<input class="radio aps-bool" name="carousel_fade" type="radio" value="0"{{ not CAROUSEL_FADE ? ' checked' }}>
|
||||
<span class="aps-button-red">{{ lang('NO') }}</span>
|
||||
</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>
|
||||
<label for="carousel_play">{{ lang('ACP_ASS_CAROUSEL_PLAY') ~ lang('COLON') }}</label>
|
||||
<br><span>{{ lang('ACP_ASS_CAROUSEL_PLAY_DESC') }}</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<label>
|
||||
<input class="radio aps-bool" id="carousel_play" name="carousel_play" type="radio" value="1"{{ CAROUSEL_PLAY ? ' checked' }}>
|
||||
<span class="aps-button-green">{{ lang('YES') }}</span>
|
||||
</label>
|
||||
<label>
|
||||
<input class="radio aps-bool" name="carousel_play" type="radio" value="0"{{ not CAROUSEL_PLAY ? ' checked' }}>
|
||||
<span class="aps-button-red">{{ lang('NO') }}</span>
|
||||
</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="carousel_play_speed">{{ lang('ACP_ASS_CAROUSEL_PLAY_SPEED') ~ lang('COLON') }}</label>
|
||||
<br><span>{{ lang('ACP_ASS_CAROUSEL_PLAY_SPEED_DESC') }}</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<input class="shop-slider" id="carousel_play_speed" name="carousel_play_speed" type="range" min="1000" max="5000" step="1000" value="{{ CAROUSEL_PLAY_SPEED }}" required>
|
||||
<output>{{ CAROUSEL_PLAY_SPEED }}</output>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>
|
||||
<label for="carousel_speed">{{ lang('ACP_ASS_CAROUSEL_SPEED') ~ lang('COLON') }}</label>
|
||||
<br><span>{{ lang('ACP_ASS_CAROUSEL_SPEED_DESC') }}</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<input class="shop-slider" id="carousel_speed" name="carousel_speed" type="range" min="100" max="2000" step="100" value="{{ CAROUSEL_SPEED }}" required>
|
||||
<output>{{ CAROUSEL_SPEED }}</output>
|
||||
</dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{{ lang('ACP_SUBMIT_CHANGES') }}</legend>
|
||||
|
||||
<p 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 }}
|
||||
</p>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% include 'overall_footer.html' %}
|
||||
590
ext/phpbbstudio/ass/adm/style/css/ass_common.css
Normal file
590
ext/phpbbstudio/ass/adm/style/css/ass_common.css
Normal file
@@ -0,0 +1,590 @@
|
||||
/**
|
||||
*
|
||||
* phpBB Studio - Advanced Shop System. An extension for the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) 2019, phpBB Studio, https://www.phpbbstudio.com
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
*/
|
||||
.name i { font-size: 14px; }
|
||||
|
||||
.ass-pointer {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.ass-width-200 {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.ass-width-90p {
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
.ass-vertical-resize {
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
.ass-inline {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.ass-label-fix {
|
||||
vertical-align: 2px;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.ass-actions {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.ass-no-mar {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.ass-mar {
|
||||
margin: 8px;
|
||||
}
|
||||
|
||||
.ass-mar-left {
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.ass-mar-right {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.ass-mar-right-half {
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.ass-mar-side {
|
||||
margin-right: 8px;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.ass-no-radius-top {
|
||||
border-top-left-radius: 0 !important;
|
||||
border-top-right-radius: 0 !important;
|
||||
}
|
||||
|
||||
.ass-no-radius-right {
|
||||
border-top-right-radius: 0 !important;
|
||||
border-bottom-right-radius: 0 !important;
|
||||
}
|
||||
|
||||
.ass-no-radius-bottom {
|
||||
border-bottom-right-radius: 0 !important;
|
||||
border-bottom-left-radius: 0 !important;
|
||||
}
|
||||
|
||||
.ass-no-radius-left {
|
||||
border-top-left-radius: 0 !important;
|
||||
border-bottom-left-radius: 0 !important;
|
||||
}
|
||||
|
||||
.ass-color-palette table {
|
||||
border-color: #12a3eb;
|
||||
border-radius: 4px;
|
||||
min-width: 90%;
|
||||
max-width: 90%;
|
||||
margin: 0 0 4px;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.ass-color-palette a {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.ass-radio { display: none; }
|
||||
|
||||
.ass-radio:checked + .aps-button-blue,
|
||||
input[type="button"]:hover {
|
||||
background: #12a3eb;
|
||||
border-color: #12a3eb;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
input[type="button"] {
|
||||
background-color: #ffffff;
|
||||
background-image: none;
|
||||
border: 1px solid #12a3eb;
|
||||
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;
|
||||
}
|
||||
|
||||
.ass-input-icon i {
|
||||
font-size: 14px;
|
||||
line-height: 1.42857143;
|
||||
text-align: center;
|
||||
vertical-align: -1px;
|
||||
background-color: #f3f3f3;
|
||||
border: 1px solid #cccccc;
|
||||
border-right: none;
|
||||
border-top-left-radius: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
color: #555555;
|
||||
display: inline-block;
|
||||
width: auto;
|
||||
min-width: 40px;
|
||||
height: 34px;
|
||||
padding: 6px 12px;
|
||||
}
|
||||
|
||||
.ass-input-icon i + input[type="text"],
|
||||
.ass-input-icon i + input[type="number"] {
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
||||
.ass-file-select-container {
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
}
|
||||
|
||||
.ass-file-select {
|
||||
flex: 1 0 210px;
|
||||
}
|
||||
|
||||
.ass-file-select input {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.ass-file-select input + * {
|
||||
border: 2px solid transparent;
|
||||
display: inline-block;
|
||||
width: 200px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.ass-file-select input:checked + * {
|
||||
border-color: #12a3eb;
|
||||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.ass-button-pulse:not(:hover) {
|
||||
animation: bgPulse 3s linear 3;
|
||||
}
|
||||
|
||||
@keyframes bgPulse {
|
||||
0% { background-color: #ffffff; }
|
||||
50% { background-color: #8dcc8d; }
|
||||
100% { background-color: #ffffff; }
|
||||
}
|
||||
|
||||
/* Panel icons */
|
||||
.icon-blue { color: #196db5; }
|
||||
.icon-green { color: #1b9a1b; }
|
||||
.icon-red { color: #bc2a4d; }
|
||||
.icon-orange { color: #ff6600; }
|
||||
.icon-bluegray { color: #536482; }
|
||||
.icon-gray { color: #777777; }
|
||||
.icon-lightgray { color: #999999; }
|
||||
.icon-black { color: #333333; }
|
||||
.icon-white { color: #ffffff; }
|
||||
.icon-lighten { color: rgba(255, 255, 255, 0.75); }
|
||||
.icon-darken { color: rgba(0, 0, 0, 0.5); }
|
||||
.icon-aqua { color: #18a39b; }
|
||||
.icon-yellow { color: #f8b739; }
|
||||
.icon-pink { color: #ed2861; }
|
||||
.icon-violet { color: #c12680; }
|
||||
.icon-purple { color: #5d3191; }
|
||||
.icon-gold { color: #d6af36; }
|
||||
.icon-silver { color: #a7a7ad; }
|
||||
.icon-bronze { color: #824a02; }
|
||||
|
||||
.shop-panel-icon {
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 16px;
|
||||
width: 36px;
|
||||
}
|
||||
|
||||
.shop-panel-icon:before {
|
||||
font-size: 20px;
|
||||
line-height: 30px;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.shop-panel-icon-small:before {
|
||||
font-size: 16px;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
.shop-panel-icon-tiny:before {
|
||||
font-size: 13px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.shop-panel-icon:after {
|
||||
font-family: FontAwesome, sans-serif;
|
||||
font-size: 48px;
|
||||
text-shadow: -2px 1px 4px rgba(0, 0, 0, 0.4);
|
||||
color: #12a3eb;
|
||||
position: absolute;
|
||||
top: -4px;
|
||||
left: 0;
|
||||
content: "\f02e";
|
||||
}
|
||||
|
||||
.shop-panel-icon-small:after,
|
||||
.shop-panel-icon-tiny:after {
|
||||
text-shadow: -1px 1px 3px rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
.shop-panel-icon-small { width: 30px; }
|
||||
.shop-panel-icon-tiny { width: 25px; }
|
||||
|
||||
.shop-panel-icon-small:after { font-size: 40px; }
|
||||
.shop-panel-icon-tiny:after { font-size: 32px; }
|
||||
|
||||
.shop-panel-icon-blue:after { color: #12a3eb; }
|
||||
.shop-panel-icon-red:after { color: #d31141; }
|
||||
.shop-panel-icon-green:after { color: #28a745; }
|
||||
.shop-panel-icon-orange:after { color: #f06045; }
|
||||
.shop-panel-icon-aqua:after { color: #18a39b; }
|
||||
.shop-panel-icon-yellow:after { color: #f8b739; }
|
||||
.shop-panel-icon-pink:after { color: #ed2861; }
|
||||
.shop-panel-icon-violet:after { color: #c12680; }
|
||||
.shop-panel-icon-purple:after { color: #5d3191; }
|
||||
.shop-panel-icon-gold:after { color: #d6af36; }
|
||||
.shop-panel-icon-silver:after { color: #a7a7ad; }
|
||||
.shop-panel-icon-bronze:after { color: #824a02; }
|
||||
|
||||
/* Date picker */
|
||||
.daterangepicker .calendar-table th {
|
||||
text-transform: none;
|
||||
background: #12a3eb;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.daterangepicker .drp-calendar.left .calendar-table th:empty { display: none; }
|
||||
.daterangepicker .drp-calendar.right .calendar-table th:empty { background: none; }
|
||||
.daterangepicker .calendar-table td { padding: 0; }
|
||||
.daterangepicker .calendar-table .active { background: #0076b1; }
|
||||
|
||||
/* Slider */
|
||||
output {
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.shop-slider {
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
.aps-form [type="range"].shop-slider {
|
||||
border: none;
|
||||
margin-top: 4px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.shop-slider:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.shop-slider::-webkit-slider-runnable-track {
|
||||
background: #ffffff;
|
||||
border: 1px solid #cccccc;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 0 0 #000000, 0 0 0 #0d0d0d;
|
||||
width: 100%;
|
||||
height: 34px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.shop-slider::-webkit-slider-thumb {
|
||||
background: #12a3eb;
|
||||
border: 1px solid rgba(0, 118, 177, 0.57);
|
||||
border-radius: 4px;
|
||||
box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5), 0 0 1px rgba(13, 13, 13, 0.5);
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
margin-top: 4px;
|
||||
cursor: pointer;
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
.shop-slider:focus::-webkit-slider-runnable-track {
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.shop-slider::-moz-range-track {
|
||||
background: #ffffff;
|
||||
border: 1px solid #cccccc;
|
||||
border-radius: 4px;
|
||||
width: 100%;
|
||||
height: 34px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.shop-slider::-moz-range-thumb {
|
||||
background: #12a3eb;
|
||||
border: 1px solid rgba(0, 118, 177, 0.57);
|
||||
border-radius: 4px;
|
||||
box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5), 0 0 1px rgba(13, 13, 13, 0.5);
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.shop-slider::-ms-track {
|
||||
background: transparent;
|
||||
border-color: transparent;
|
||||
color: transparent;
|
||||
width: 100%;
|
||||
height: 34px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.shop-slider::-ms-fill-lower {
|
||||
background: #f2f2f2;
|
||||
border: 1px solid #cccccc;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.shop-slider::-ms-fill-upper {
|
||||
background: #ffffff;
|
||||
border: 1px solid #cccccc;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.shop-slider::-ms-thumb {
|
||||
background: #12a3eb;
|
||||
border: 1px solid rgba(0, 118, 177, 0.57);
|
||||
border-radius: 4px;
|
||||
box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5), 0 0 1px rgba(13, 13, 13, 0.5);
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.shop-slider:focus::-ms-fill-lower { background: #ffffff; }
|
||||
.shop-slider:focus::-ms-fill-upper { background: #ffffff; }
|
||||
|
||||
/* Overview page */
|
||||
.ass-overview,
|
||||
.ass-overview * {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.ass-overview {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: stretch;
|
||||
flex-flow: row wrap;
|
||||
}
|
||||
|
||||
.ass-overview > * {
|
||||
flex: 0 0 24%;
|
||||
}
|
||||
|
||||
.ass-overview > .ass-overview-50 { flex-basis: calc(50% - (4% / 6)); }
|
||||
|
||||
@media all and (max-width: 1200px) {
|
||||
.ass-overview > * { flex-basis: calc(50% - (4% / 6)); }
|
||||
}
|
||||
|
||||
@media all and (max-width: 700px) {
|
||||
.ass-overview > .ass-overview-50,
|
||||
.ass-overview > * { flex-basis: 100%; }
|
||||
}
|
||||
|
||||
.ass-overview-list {
|
||||
min-height: 305px;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.ass-overview-list > :not(:last-child) {
|
||||
border-bottom: 1px solid #d7d7d7;
|
||||
margin-bottom: 5px;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
.ass-overview-flex {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.ass-overview-flex-auto {
|
||||
flex: 1 1 auto;
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
.ass-overview-flex-small {
|
||||
text-align: center;
|
||||
flex: 0 0 52px;
|
||||
}
|
||||
|
||||
.ass-overview-flex-small img {
|
||||
width: 50px;
|
||||
height: auto;
|
||||
max-height: 52px;
|
||||
}
|
||||
|
||||
.ass-overview-flex-auto,
|
||||
.ass-overview-flex-small {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 52px;
|
||||
}
|
||||
|
||||
.ass-overview-flex-auto > *,
|
||||
.ass-overview-flex-small > * {
|
||||
flex: 1 0 100%;
|
||||
}
|
||||
|
||||
.ass-overview-flex-full-height {
|
||||
height: 305px;
|
||||
}
|
||||
|
||||
/* Item help */
|
||||
.ass-help-body { margin-bottom: 400px; }
|
||||
|
||||
.ass-help-toolbox,
|
||||
.ass-help-toolbox * {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.ass-help-toolbox {
|
||||
background: #fafafa;
|
||||
border-top: 2px solid #12a3eb;
|
||||
-webkit-box-shadow: 0 24px 38px 3px rgba(0, 0, 0, 0.14), 0 9px 46px 8px rgba(0, 0, 0, 0.12), 0 11px 15px -7px rgba(0, 0, 0, 0.2);
|
||||
box-shadow: 0 24px 38px 3px rgba(0, 0, 0, 0.14), 0 9px 46px 8px rgba(0, 0, 0, 0.12), 0 11px 15px -7px rgba(0, 0, 0, 0.2);
|
||||
position: fixed;
|
||||
z-index: 50;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
height: 400px;
|
||||
}
|
||||
|
||||
.ass-help-flexbox {
|
||||
position: relative;
|
||||
z-index: 51;
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
scroll-behavior: smooth;
|
||||
scroll-snap-type: x mandatory;
|
||||
}
|
||||
|
||||
.ass-help-flexbox > div {
|
||||
flex-shrink: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
scroll-snap-align: start;
|
||||
}
|
||||
|
||||
.ass-help-flexbox > div > h3 {
|
||||
font-size: 24px;
|
||||
text-align: center;
|
||||
border-bottom: 1px solid #12a3eb;
|
||||
color: #12a3eb;
|
||||
width: 75%;
|
||||
margin: 0 auto;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.ass-help-flexbox > div > div {
|
||||
font-size: 16px;
|
||||
background: #ffffff;
|
||||
color: #313131;
|
||||
height: 100%;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.ass-help-flexbox > div > div > a {
|
||||
font-weight: bold;
|
||||
letter-spacing: 0.05em;
|
||||
color: #12a3eb;
|
||||
}
|
||||
|
||||
.ass-help-flexbox > div > div > i {
|
||||
font-family: monospace;
|
||||
color: #000000;
|
||||
quotes: "“" "”" "‘" "’";
|
||||
}
|
||||
|
||||
.ass-help-flexbox > div > div > i:before,
|
||||
.ass-help-flexbox > div > div > i:after { color: #12a3eb; }
|
||||
|
||||
.ass-help-flexbox > div > div > i:before { content: open-quote; }
|
||||
.ass-help-flexbox > div > div > i:after { content: close-quote; }
|
||||
|
||||
.ass-help-active {
|
||||
background: #ffffff;
|
||||
border: 1px solid #12a3eb;
|
||||
border-radius: 4px;
|
||||
-webkit-box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
|
||||
box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
|
||||
position: relative;
|
||||
z-index: 45;
|
||||
margin-right: 32px;
|
||||
padding: 16px 8px;
|
||||
transition: all 0.75s ease-in-out;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.ass-help-start {
|
||||
border-color: #cccccc;
|
||||
border-bottom: none;
|
||||
border-bottom-right-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
outline: none;
|
||||
position: absolute;
|
||||
top: -26px;
|
||||
right: 8px;
|
||||
}
|
||||
|
||||
@media all and (max-width: 1024px) {
|
||||
.ass-help-start,
|
||||
.ass-help-toolbox {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.ass-help-start:hover { border-color: #28a745; }
|
||||
|
||||
.ass-help-next,
|
||||
.ass-help-prev,
|
||||
.ass-help-close {
|
||||
position: fixed;
|
||||
z-index: 52;
|
||||
top: 16px;
|
||||
right: 16px;
|
||||
}
|
||||
|
||||
.ass-help-next,
|
||||
.ass-help-prev {
|
||||
top: unset;
|
||||
bottom: 350px;
|
||||
}
|
||||
|
||||
.ass-help-prev {
|
||||
right: unset;
|
||||
left: 16px;
|
||||
}
|
||||
|
||||
/* Inventory */
|
||||
.ass-button-inventory {
|
||||
display: block;
|
||||
height: auto;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.ass-button-inventory > span {
|
||||
font-size: 24px;
|
||||
display: block;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
410
ext/phpbbstudio/ass/adm/style/css/daterangepicker.css
Normal file
410
ext/phpbbstudio/ass/adm/style/css/daterangepicker.css
Normal file
@@ -0,0 +1,410 @@
|
||||
.daterangepicker {
|
||||
position: absolute;
|
||||
color: inherit;
|
||||
background-color: #fff;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #ddd;
|
||||
width: 278px;
|
||||
max-width: none;
|
||||
padding: 0;
|
||||
margin-top: 7px;
|
||||
top: 100px;
|
||||
left: 20px;
|
||||
z-index: 3001;
|
||||
display: none;
|
||||
font-family: arial;
|
||||
font-size: 15px;
|
||||
line-height: 1em;
|
||||
}
|
||||
|
||||
.daterangepicker:before, .daterangepicker:after {
|
||||
position: absolute;
|
||||
display: inline-block;
|
||||
border-bottom-color: rgba(0, 0, 0, 0.2);
|
||||
content: '';
|
||||
}
|
||||
|
||||
.daterangepicker:before {
|
||||
top: -7px;
|
||||
border-right: 7px solid transparent;
|
||||
border-left: 7px solid transparent;
|
||||
border-bottom: 7px solid #ccc;
|
||||
}
|
||||
|
||||
.daterangepicker:after {
|
||||
top: -6px;
|
||||
border-right: 6px solid transparent;
|
||||
border-bottom: 6px solid #fff;
|
||||
border-left: 6px solid transparent;
|
||||
}
|
||||
|
||||
.daterangepicker.opensleft:before {
|
||||
right: 9px;
|
||||
}
|
||||
|
||||
.daterangepicker.opensleft:after {
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
.daterangepicker.openscenter:before {
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 0;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.daterangepicker.openscenter:after {
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 0;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.daterangepicker.opensright:before {
|
||||
left: 9px;
|
||||
}
|
||||
|
||||
.daterangepicker.opensright:after {
|
||||
left: 10px;
|
||||
}
|
||||
|
||||
.daterangepicker.drop-up {
|
||||
margin-top: -7px;
|
||||
}
|
||||
|
||||
.daterangepicker.drop-up:before {
|
||||
top: initial;
|
||||
bottom: -7px;
|
||||
border-bottom: initial;
|
||||
border-top: 7px solid #ccc;
|
||||
}
|
||||
|
||||
.daterangepicker.drop-up:after {
|
||||
top: initial;
|
||||
bottom: -6px;
|
||||
border-bottom: initial;
|
||||
border-top: 6px solid #fff;
|
||||
}
|
||||
|
||||
.daterangepicker.single .daterangepicker .ranges, .daterangepicker.single .drp-calendar {
|
||||
float: none;
|
||||
}
|
||||
|
||||
.daterangepicker.single .drp-selected {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.daterangepicker.show-calendar .drp-calendar {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.daterangepicker.show-calendar .drp-buttons {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.daterangepicker.auto-apply .drp-buttons {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.daterangepicker .drp-calendar {
|
||||
display: none;
|
||||
max-width: 270px;
|
||||
}
|
||||
|
||||
.daterangepicker .drp-calendar.left {
|
||||
padding: 8px 0 8px 8px;
|
||||
}
|
||||
|
||||
.daterangepicker .drp-calendar.right {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.daterangepicker .drp-calendar.single .calendar-table {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.daterangepicker .calendar-table .next span, .daterangepicker .calendar-table .prev span {
|
||||
color: #fff;
|
||||
border: solid black;
|
||||
border-width: 0 2px 2px 0;
|
||||
border-radius: 0;
|
||||
display: inline-block;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
.daterangepicker .calendar-table .next span {
|
||||
transform: rotate(-45deg);
|
||||
-webkit-transform: rotate(-45deg);
|
||||
}
|
||||
|
||||
.daterangepicker .calendar-table .prev span {
|
||||
transform: rotate(135deg);
|
||||
-webkit-transform: rotate(135deg);
|
||||
}
|
||||
|
||||
.daterangepicker .calendar-table th, .daterangepicker .calendar-table td {
|
||||
white-space: nowrap;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
min-width: 32px;
|
||||
width: 32px;
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
font-size: 12px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid transparent;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.daterangepicker .calendar-table {
|
||||
border: 1px solid #fff;
|
||||
border-radius: 4px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.daterangepicker .calendar-table table {
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
border-spacing: 0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.daterangepicker td.available:hover, .daterangepicker th.available:hover {
|
||||
background-color: #eee;
|
||||
border-color: transparent;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.daterangepicker td.week, .daterangepicker th.week {
|
||||
font-size: 80%;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.daterangepicker td.off, .daterangepicker td.off.in-range, .daterangepicker td.off.start-date, .daterangepicker td.off.end-date {
|
||||
background-color: #fff;
|
||||
border-color: transparent;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.daterangepicker td.in-range {
|
||||
background-color: #ebf4f8;
|
||||
border-color: transparent;
|
||||
color: #000;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.daterangepicker td.start-date {
|
||||
border-radius: 4px 0 0 4px;
|
||||
}
|
||||
|
||||
.daterangepicker td.end-date {
|
||||
border-radius: 0 4px 4px 0;
|
||||
}
|
||||
|
||||
.daterangepicker td.start-date.end-date {
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.daterangepicker td.active, .daterangepicker td.active:hover {
|
||||
background-color: #357ebd;
|
||||
border-color: transparent;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.daterangepicker th.month {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.daterangepicker td.disabled, .daterangepicker option.disabled {
|
||||
color: #999;
|
||||
cursor: not-allowed;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.daterangepicker select.monthselect, .daterangepicker select.yearselect {
|
||||
font-size: 12px;
|
||||
padding: 1px;
|
||||
height: auto;
|
||||
margin: 0;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.daterangepicker select.monthselect {
|
||||
margin-right: 2%;
|
||||
width: 56%;
|
||||
}
|
||||
|
||||
.daterangepicker select.yearselect {
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
.daterangepicker select.hourselect, .daterangepicker select.minuteselect, .daterangepicker select.secondselect, .daterangepicker select.ampmselect {
|
||||
width: 50px;
|
||||
margin: 0 auto;
|
||||
background: #eee;
|
||||
border: 1px solid #eee;
|
||||
padding: 2px;
|
||||
outline: 0;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.daterangepicker .calendar-time {
|
||||
text-align: center;
|
||||
margin: 4px auto 0 auto;
|
||||
line-height: 30px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.daterangepicker .calendar-time select.disabled {
|
||||
color: #ccc;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.daterangepicker .drp-buttons {
|
||||
clear: both;
|
||||
text-align: right;
|
||||
padding: 8px;
|
||||
border-top: 1px solid #ddd;
|
||||
display: none;
|
||||
line-height: 12px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.daterangepicker .drp-selected {
|
||||
display: inline-block;
|
||||
font-size: 12px;
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
.daterangepicker .drp-buttons .btn {
|
||||
margin-left: 8px;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
padding: 4px 8px;
|
||||
}
|
||||
|
||||
.daterangepicker.show-ranges.single.rtl .drp-calendar.left {
|
||||
border-right: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.daterangepicker.show-ranges.single.ltr .drp-calendar.left {
|
||||
border-left: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.daterangepicker.show-ranges.rtl .drp-calendar.right {
|
||||
border-right: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.daterangepicker.show-ranges.ltr .drp-calendar.left {
|
||||
border-left: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.daterangepicker .ranges {
|
||||
float: none;
|
||||
text-align: left;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.daterangepicker.show-calendar .ranges {
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.daterangepicker .ranges ul {
|
||||
list-style: none;
|
||||
margin: 0 auto;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.daterangepicker .ranges li {
|
||||
font-size: 12px;
|
||||
padding: 8px 12px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.daterangepicker .ranges li:hover {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
.daterangepicker .ranges li.active {
|
||||
background-color: #08c;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* Larger Screen Styling */
|
||||
@media (min-width: 564px) {
|
||||
.daterangepicker {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.daterangepicker .ranges ul {
|
||||
width: 140px;
|
||||
}
|
||||
|
||||
.daterangepicker.single .ranges ul {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.daterangepicker.single .drp-calendar.left {
|
||||
clear: none;
|
||||
}
|
||||
|
||||
.daterangepicker.single .ranges, .daterangepicker.single .drp-calendar {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.daterangepicker {
|
||||
direction: ltr;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.daterangepicker .drp-calendar.left {
|
||||
clear: left;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.daterangepicker .drp-calendar.left .calendar-table {
|
||||
border-right: none;
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
|
||||
.daterangepicker .drp-calendar.right {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.daterangepicker .drp-calendar.right .calendar-table {
|
||||
border-left: none;
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
||||
.daterangepicker .drp-calendar.left .calendar-table {
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
.daterangepicker .ranges, .daterangepicker .drp-calendar {
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 730px) {
|
||||
.daterangepicker .ranges {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.daterangepicker .ranges {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.daterangepicker.rtl .ranges {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.daterangepicker .drp-calendar.left {
|
||||
clear: none !important;
|
||||
}
|
||||
}
|
||||
481
ext/phpbbstudio/ass/adm/style/css/select2.css
Normal file
481
ext/phpbbstudio/ass/adm/style/css/select2.css
Normal file
@@ -0,0 +1,481 @@
|
||||
.select2-container {
|
||||
box-sizing: border-box;
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
position: relative;
|
||||
vertical-align: middle; }
|
||||
.select2-container .select2-selection--single {
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
height: 28px;
|
||||
user-select: none;
|
||||
-webkit-user-select: none; }
|
||||
.select2-container .select2-selection--single .select2-selection__rendered {
|
||||
display: block;
|
||||
padding-left: 8px;
|
||||
padding-right: 20px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap; }
|
||||
.select2-container .select2-selection--single .select2-selection__clear {
|
||||
position: relative; }
|
||||
.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered {
|
||||
padding-right: 8px;
|
||||
padding-left: 20px; }
|
||||
.select2-container .select2-selection--multiple {
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
min-height: 32px;
|
||||
user-select: none;
|
||||
-webkit-user-select: none; }
|
||||
.select2-container .select2-selection--multiple .select2-selection__rendered {
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
padding-left: 8px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap; }
|
||||
.select2-container .select2-search--inline {
|
||||
float: left; }
|
||||
.select2-container .select2-search--inline .select2-search__field {
|
||||
box-sizing: border-box;
|
||||
border: none;
|
||||
font-size: 100%;
|
||||
margin-top: 5px;
|
||||
padding: 0; }
|
||||
.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button {
|
||||
-webkit-appearance: none; }
|
||||
|
||||
.select2-dropdown {
|
||||
background-color: white;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: -100000px;
|
||||
width: 100%;
|
||||
z-index: 1051; }
|
||||
|
||||
.select2-results {
|
||||
display: block; }
|
||||
|
||||
.select2-results__options {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0; }
|
||||
|
||||
.select2-results__option {
|
||||
padding: 6px;
|
||||
user-select: none;
|
||||
-webkit-user-select: none; }
|
||||
.select2-results__option[aria-selected] {
|
||||
cursor: pointer; }
|
||||
|
||||
.select2-container--open .select2-dropdown {
|
||||
left: 0; }
|
||||
|
||||
.select2-container--open .select2-dropdown--above {
|
||||
border-bottom: none;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0; }
|
||||
|
||||
.select2-container--open .select2-dropdown--below {
|
||||
border-top: none;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0; }
|
||||
|
||||
.select2-search--dropdown {
|
||||
display: block;
|
||||
padding: 4px; }
|
||||
.select2-search--dropdown .select2-search__field {
|
||||
padding: 4px;
|
||||
width: 100%;
|
||||
box-sizing: border-box; }
|
||||
.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button {
|
||||
-webkit-appearance: none; }
|
||||
.select2-search--dropdown.select2-search--hide {
|
||||
display: none; }
|
||||
|
||||
.select2-close-mask {
|
||||
border: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: block;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
min-height: 100%;
|
||||
min-width: 100%;
|
||||
height: auto;
|
||||
width: auto;
|
||||
opacity: 0;
|
||||
z-index: 99;
|
||||
background-color: #fff;
|
||||
filter: alpha(opacity=0); }
|
||||
|
||||
.select2-hidden-accessible {
|
||||
border: 0 !important;
|
||||
clip: rect(0 0 0 0) !important;
|
||||
-webkit-clip-path: inset(50%) !important;
|
||||
clip-path: inset(50%) !important;
|
||||
height: 1px !important;
|
||||
overflow: hidden !important;
|
||||
padding: 0 !important;
|
||||
position: absolute !important;
|
||||
width: 1px !important;
|
||||
white-space: nowrap !important; }
|
||||
|
||||
.select2-container--default .select2-selection--single {
|
||||
background-color: #fff;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px; }
|
||||
.select2-container--default .select2-selection--single .select2-selection__rendered {
|
||||
color: #444;
|
||||
line-height: 28px; }
|
||||
.select2-container--default .select2-selection--single .select2-selection__clear {
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
font-weight: bold; }
|
||||
.select2-container--default .select2-selection--single .select2-selection__placeholder {
|
||||
color: #999; }
|
||||
.select2-container--default .select2-selection--single .select2-selection__arrow {
|
||||
height: 26px;
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
right: 1px;
|
||||
width: 20px; }
|
||||
.select2-container--default .select2-selection--single .select2-selection__arrow b {
|
||||
border-color: #888 transparent transparent transparent;
|
||||
border-style: solid;
|
||||
border-width: 5px 4px 0 4px;
|
||||
height: 0;
|
||||
left: 50%;
|
||||
margin-left: -4px;
|
||||
margin-top: -2px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 0; }
|
||||
|
||||
.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear {
|
||||
float: left; }
|
||||
|
||||
.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow {
|
||||
left: 1px;
|
||||
right: auto; }
|
||||
|
||||
.select2-container--default.select2-container--disabled .select2-selection--single {
|
||||
background-color: #eee;
|
||||
cursor: default; }
|
||||
.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear {
|
||||
display: none; }
|
||||
|
||||
.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
|
||||
border-color: transparent transparent #888 transparent;
|
||||
border-width: 0 4px 5px 4px; }
|
||||
|
||||
.select2-container--default .select2-selection--multiple {
|
||||
background-color: white;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
cursor: text; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
|
||||
box-sizing: border-box;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0 5px;
|
||||
width: 100%; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__rendered li {
|
||||
list-style: none; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__clear {
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
font-weight: bold;
|
||||
margin-top: 5px;
|
||||
margin-right: 10px;
|
||||
padding: 1px; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
||||
background-color: #e4e4e4;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
cursor: default;
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
margin-top: 5px;
|
||||
padding: 0 5px; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
|
||||
color: #999;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
font-weight: bold;
|
||||
margin-right: 2px; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
|
||||
color: #333; }
|
||||
|
||||
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline {
|
||||
float: right; }
|
||||
|
||||
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
||||
margin-left: 5px;
|
||||
margin-right: auto; }
|
||||
|
||||
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
|
||||
margin-left: 2px;
|
||||
margin-right: auto; }
|
||||
|
||||
.select2-container--default.select2-container--focus .select2-selection--multiple {
|
||||
border: solid black 1px;
|
||||
outline: 0; }
|
||||
|
||||
.select2-container--default.select2-container--disabled .select2-selection--multiple {
|
||||
background-color: #eee;
|
||||
cursor: default; }
|
||||
|
||||
.select2-container--default.select2-container--disabled .select2-selection__choice__remove {
|
||||
display: none; }
|
||||
|
||||
.select2-container--default.select2-container--open.select2-container--above .select2-selection--single, .select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple {
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0; }
|
||||
|
||||
.select2-container--default.select2-container--open.select2-container--below .select2-selection--single, .select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple {
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0; }
|
||||
|
||||
.select2-container--default .select2-search--dropdown .select2-search__field {
|
||||
border: 1px solid #aaa; }
|
||||
|
||||
.select2-container--default .select2-search--inline .select2-search__field {
|
||||
background: transparent;
|
||||
border: none;
|
||||
outline: 0;
|
||||
box-shadow: none;
|
||||
-webkit-appearance: textfield; }
|
||||
|
||||
.select2-container--default .select2-results > .select2-results__options {
|
||||
max-height: 200px;
|
||||
overflow-y: auto; }
|
||||
|
||||
.select2-container--default .select2-results__option[role=group] {
|
||||
padding: 0; }
|
||||
|
||||
.select2-container--default .select2-results__option[aria-disabled=true] {
|
||||
color: #999; }
|
||||
|
||||
.select2-container--default .select2-results__option[aria-selected=true] {
|
||||
background-color: #ddd; }
|
||||
|
||||
.select2-container--default .select2-results__option .select2-results__option {
|
||||
padding-left: 1em; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__group {
|
||||
padding-left: 0; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -1em;
|
||||
padding-left: 2em; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -2em;
|
||||
padding-left: 3em; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -3em;
|
||||
padding-left: 4em; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -4em;
|
||||
padding-left: 5em; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -5em;
|
||||
padding-left: 6em; }
|
||||
|
||||
.select2-container--default .select2-results__option--highlighted[aria-selected] {
|
||||
background-color: #5897fb;
|
||||
color: white; }
|
||||
|
||||
.select2-container--default .select2-results__group {
|
||||
cursor: default;
|
||||
display: block;
|
||||
padding: 6px; }
|
||||
|
||||
.select2-container--classic .select2-selection--single {
|
||||
background-color: #f7f7f7;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
outline: 0;
|
||||
background-image: -webkit-linear-gradient(top, white 50%, #eeeeee 100%);
|
||||
background-image: -o-linear-gradient(top, white 50%, #eeeeee 100%);
|
||||
background-image: linear-gradient(to bottom, white 50%, #eeeeee 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
|
||||
.select2-container--classic .select2-selection--single:focus {
|
||||
border: 1px solid #5897fb; }
|
||||
.select2-container--classic .select2-selection--single .select2-selection__rendered {
|
||||
color: #444;
|
||||
line-height: 28px; }
|
||||
.select2-container--classic .select2-selection--single .select2-selection__clear {
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
font-weight: bold;
|
||||
margin-right: 10px; }
|
||||
.select2-container--classic .select2-selection--single .select2-selection__placeholder {
|
||||
color: #999; }
|
||||
.select2-container--classic .select2-selection--single .select2-selection__arrow {
|
||||
background-color: #ddd;
|
||||
border: none;
|
||||
border-left: 1px solid #aaa;
|
||||
border-top-right-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
height: 26px;
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
right: 1px;
|
||||
width: 20px;
|
||||
background-image: -webkit-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
|
||||
background-image: -o-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
|
||||
background-image: linear-gradient(to bottom, #eeeeee 50%, #cccccc 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0); }
|
||||
.select2-container--classic .select2-selection--single .select2-selection__arrow b {
|
||||
border-color: #888 transparent transparent transparent;
|
||||
border-style: solid;
|
||||
border-width: 5px 4px 0 4px;
|
||||
height: 0;
|
||||
left: 50%;
|
||||
margin-left: -4px;
|
||||
margin-top: -2px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 0; }
|
||||
|
||||
.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear {
|
||||
float: left; }
|
||||
|
||||
.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow {
|
||||
border: none;
|
||||
border-right: 1px solid #aaa;
|
||||
border-radius: 0;
|
||||
border-top-left-radius: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
left: 1px;
|
||||
right: auto; }
|
||||
|
||||
.select2-container--classic.select2-container--open .select2-selection--single {
|
||||
border: 1px solid #5897fb; }
|
||||
.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow {
|
||||
background: transparent;
|
||||
border: none; }
|
||||
.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b {
|
||||
border-color: transparent transparent #888 transparent;
|
||||
border-width: 0 4px 5px 4px; }
|
||||
|
||||
.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single {
|
||||
border-top: none;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
background-image: -webkit-linear-gradient(top, white 0%, #eeeeee 50%);
|
||||
background-image: -o-linear-gradient(top, white 0%, #eeeeee 50%);
|
||||
background-image: linear-gradient(to bottom, white 0%, #eeeeee 50%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
|
||||
|
||||
.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single {
|
||||
border-bottom: none;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
background-image: -webkit-linear-gradient(top, #eeeeee 50%, white 100%);
|
||||
background-image: -o-linear-gradient(top, #eeeeee 50%, white 100%);
|
||||
background-image: linear-gradient(to bottom, #eeeeee 50%, white 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0); }
|
||||
|
||||
.select2-container--classic .select2-selection--multiple {
|
||||
background-color: white;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
cursor: text;
|
||||
outline: 0; }
|
||||
.select2-container--classic .select2-selection--multiple:focus {
|
||||
border: 1px solid #5897fb; }
|
||||
.select2-container--classic .select2-selection--multiple .select2-selection__rendered {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0 5px; }
|
||||
.select2-container--classic .select2-selection--multiple .select2-selection__clear {
|
||||
display: none; }
|
||||
.select2-container--classic .select2-selection--multiple .select2-selection__choice {
|
||||
background-color: #e4e4e4;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
cursor: default;
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
margin-top: 5px;
|
||||
padding: 0 5px; }
|
||||
.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove {
|
||||
color: #888;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
font-weight: bold;
|
||||
margin-right: 2px; }
|
||||
.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover {
|
||||
color: #555; }
|
||||
|
||||
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
||||
float: right;
|
||||
margin-left: 5px;
|
||||
margin-right: auto; }
|
||||
|
||||
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
|
||||
margin-left: 2px;
|
||||
margin-right: auto; }
|
||||
|
||||
.select2-container--classic.select2-container--open .select2-selection--multiple {
|
||||
border: 1px solid #5897fb; }
|
||||
|
||||
.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple {
|
||||
border-top: none;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0; }
|
||||
|
||||
.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple {
|
||||
border-bottom: none;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0; }
|
||||
|
||||
.select2-container--classic .select2-search--dropdown .select2-search__field {
|
||||
border: 1px solid #aaa;
|
||||
outline: 0; }
|
||||
|
||||
.select2-container--classic .select2-search--inline .select2-search__field {
|
||||
outline: 0;
|
||||
box-shadow: none; }
|
||||
|
||||
.select2-container--classic .select2-dropdown {
|
||||
background-color: white;
|
||||
border: 1px solid transparent; }
|
||||
|
||||
.select2-container--classic .select2-dropdown--above {
|
||||
border-bottom: none; }
|
||||
|
||||
.select2-container--classic .select2-dropdown--below {
|
||||
border-top: none; }
|
||||
|
||||
.select2-container--classic .select2-results > .select2-results__options {
|
||||
max-height: 200px;
|
||||
overflow-y: auto; }
|
||||
|
||||
.select2-container--classic .select2-results__option[role=group] {
|
||||
padding: 0; }
|
||||
|
||||
.select2-container--classic .select2-results__option[aria-disabled=true] {
|
||||
color: grey; }
|
||||
|
||||
.select2-container--classic .select2-results__option--highlighted[aria-selected] {
|
||||
background-color: #3875d7;
|
||||
color: white; }
|
||||
|
||||
.select2-container--classic .select2-results__group {
|
||||
cursor: default;
|
||||
display: block;
|
||||
padding: 6px; }
|
||||
|
||||
.select2-container--classic.select2-container--open .select2-dropdown {
|
||||
border-color: #5897fb; }
|
||||
1
ext/phpbbstudio/ass/adm/style/css/select2.min.css
vendored
Normal file
1
ext/phpbbstudio/ass/adm/style/css/select2.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
6
ext/phpbbstudio/ass/adm/style/items/file.html
Normal file
6
ext/phpbbstudio/ass/adm/style/items/file.html
Normal file
@@ -0,0 +1,6 @@
|
||||
<dl>
|
||||
<dt><label for="file">{{ lang('ASS_TYPE_FILE_TITLE') ~ lang('COLON') }}</label></dt>
|
||||
<dd class="ass-input-icon" data-shop-file="{{ U_ACTION ~ U_FILE }}">
|
||||
<i class="icon fa-file-image-o fa-fw" aria-hidden="true"></i><input class="autowidth" id="file" name="data[file]" type="text" value="{{ TYPE_FILE }}" required readonly>
|
||||
</dd>
|
||||
</dl>
|
||||
6
ext/phpbbstudio/ass/adm/style/items/points.html
Normal file
6
ext/phpbbstudio/ass/adm/style/items/points.html
Normal file
@@ -0,0 +1,6 @@
|
||||
<dl>
|
||||
<dt><label for="points">{{ aps_name() ~ lang('COLON') }}</label></dt>
|
||||
<dd class="ass-input-icon">
|
||||
{{ aps_icon() }}<input class="autowidth" id="points" name="data[points]" type="number" value="{{ TYPE_POINTS }}" min="0" step="{{ aps_step() }}" required>
|
||||
</dd>
|
||||
</dl>
|
||||
326
ext/phpbbstudio/ass/adm/style/js/ass_common.js
Normal file
326
ext/phpbbstudio/ass/adm/style/js/ass_common.js
Normal file
@@ -0,0 +1,326 @@
|
||||
/**
|
||||
*
|
||||
* phpBB Studio - Advanced Shop System. An extension for the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) 2019, phpBB Studio, https://www.phpbbstudio.com
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
*/
|
||||
jQuery(function($) {
|
||||
let studio = {
|
||||
iconPicker: $('.aps-icon-picker'),
|
||||
imageAddRow: $('#add_image_row'),
|
||||
sortRows: $('[data-studio-sortable]'),
|
||||
selects: $('[data-studio-select]'),
|
||||
sliders: $('.shop-slider'),
|
||||
panels: $('[data-studio-panel]'),
|
||||
dates: {
|
||||
format: 'DD/MM/YYYY HH:mm',
|
||||
items: $('.shop-date'),
|
||||
data: $('[data-shop-date]').data()
|
||||
},
|
||||
types: {
|
||||
template: $('#type_template'),
|
||||
select: $('#type')
|
||||
},
|
||||
title: $('#title'),
|
||||
slug: $('#slug')
|
||||
};
|
||||
|
||||
if (studio.iconPicker.length) {
|
||||
studio.iconPicker.iconpicker({
|
||||
collision: true,
|
||||
placement: 'bottomRight',
|
||||
component: '.aps-icon-picker + i',
|
||||
locale: {
|
||||
cancelLabel: 'Clear',
|
||||
format: studio.dates.format
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (studio.selects.length) {
|
||||
studio.selects.select2({
|
||||
closeOnSelect: false,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Load the requested Item type template.
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
studio.types.select.on('change', function() {
|
||||
$.ajax({
|
||||
url: studio.types.template.data('shop-url'),
|
||||
type: 'POST',
|
||||
data: {
|
||||
type: $(this).val()
|
||||
},
|
||||
success: function(r) {
|
||||
if (r.success) {
|
||||
studio.ajaxifyFiles(studio.types.template.html(r.body));
|
||||
} else if (r.error) {
|
||||
phpbb.alert(r.MESSAGE_TITLE, r.MESSAGE_TEXT);
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
/**
|
||||
* Create date range pickers.
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
studio.dates.items.each(function() {
|
||||
let $input = $(this).find('input'),
|
||||
$start = $input.first(),
|
||||
$until = $input.last();
|
||||
|
||||
/**
|
||||
* Localised language strings.
|
||||
*
|
||||
* @param studio.dates.data.sun
|
||||
* @param studio.dates.data.mon
|
||||
* @param studio.dates.data.tue
|
||||
* @param studio.dates.data.wed
|
||||
* @param studio.dates.data.thu
|
||||
* @param studio.dates.data.fri
|
||||
* @param studio.dates.data.sat
|
||||
* @param studio.dates.data.january,
|
||||
* @param studio.dates.data.february,
|
||||
* @param studio.dates.data.march,
|
||||
* @param studio.dates.data.april,
|
||||
* @param studio.dates.data.may,
|
||||
* @param studio.dates.data.june,
|
||||
* @param studio.dates.data.july,
|
||||
* @param studio.dates.data.august,
|
||||
* @param studio.dates.data.september,
|
||||
* @param studio.dates.data.october,
|
||||
* @param studio.dates.data.november,
|
||||
* @param studio.dates.data.december
|
||||
*/
|
||||
$start.daterangepicker({
|
||||
startDate: $start.val() || false,
|
||||
endDate: $until.val() || false,
|
||||
timePicker: true,
|
||||
timePicker24Hour: true,
|
||||
autoUpdateInput: false,
|
||||
showWeekNumbers: true,
|
||||
applyButtonClasses: 'aps-button-green',
|
||||
cancelButtonClasses: 'aps-button-red',
|
||||
locale: {
|
||||
applyLabel: studio.dates.data.apply,
|
||||
cancelLabel: studio.dates.data.clear,
|
||||
format: studio.dates.format,
|
||||
firstDay: 1,
|
||||
daysOfWeek: [
|
||||
studio.dates.data.sun,
|
||||
studio.dates.data.mon,
|
||||
studio.dates.data.tue,
|
||||
studio.dates.data.wed,
|
||||
studio.dates.data.thu,
|
||||
studio.dates.data.fri,
|
||||
studio.dates.data.sat
|
||||
],
|
||||
monthNames: [
|
||||
studio.dates.data.january,
|
||||
studio.dates.data.february,
|
||||
studio.dates.data.march,
|
||||
studio.dates.data.april,
|
||||
studio.dates.data.may,
|
||||
studio.dates.data.june,
|
||||
studio.dates.data.july,
|
||||
studio.dates.data.august,
|
||||
studio.dates.data.september,
|
||||
studio.dates.data.october,
|
||||
studio.dates.data.november,
|
||||
studio.dates.data.december
|
||||
],
|
||||
}
|
||||
}).on('apply.daterangepicker', function(e, picker) {
|
||||
$start.val(picker.startDate.format(studio.dates.format));
|
||||
$until.val(picker.endDate.format(studio.dates.format));
|
||||
}).on('cancel.daterangepicker', function() {
|
||||
$start.val('');
|
||||
$until.val('');
|
||||
});
|
||||
|
||||
$until.on('click', function() { $start.data('daterangepicker').show(); });
|
||||
});
|
||||
|
||||
/**
|
||||
* Automatically create a slug from a title/
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
if (studio.title.length && studio.slug.length) {
|
||||
studio.title.on('blur', function() {
|
||||
let title = $(this).val();
|
||||
|
||||
studio.slug.val(function(event, slug) {
|
||||
return (slug) ? slug : title.toLowerCase().replace(/[^a-z0-9-_\s]/gi, '').trim().replace(/[\s]+/g, '-');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Make the category and item tables sortables.
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
if (studio.sortRows.length) {
|
||||
studio.sortRows.sortable({
|
||||
axis: 'y',
|
||||
containment: $(this).selector,
|
||||
cursor: 'move',
|
||||
delay: 150,
|
||||
handle: '.aps-button-blue',
|
||||
forcePlaceholderSize: true,
|
||||
placeholder: 'panel',
|
||||
tolerance: 'pointer',
|
||||
update: function(e, ui) {
|
||||
// On update (when rows changes position), save the order
|
||||
$.ajax({
|
||||
url: $(this).parents('form').attr('action') + '&action=move',
|
||||
type: 'POST',
|
||||
data: {
|
||||
id: ui.item.data('id'),
|
||||
order: ui.item.index(),
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajaxify the different panels in the Settings page.
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
studio.panels.each(function() {
|
||||
let $banner = $(this).find('i.shop-panel-icon'),
|
||||
$bannerSize = $(this).find('select[name$="banner_size"]'),
|
||||
$bannerColour = $(this).find('select[name$="banner_colour"]'),
|
||||
$iconColour = $(this).find('select[name$="icon_colour"]'),
|
||||
$icon = $(this).find('.aps-icon-picker');
|
||||
|
||||
let updateBanner = function() {
|
||||
let bg = $bannerColour.val(),
|
||||
size = $bannerSize.val(),
|
||||
color = $iconColour.val(),
|
||||
icon = $icon.val();
|
||||
|
||||
size = size ? `shop-panel-icon-${size}` : '';
|
||||
bg = bg ? `shop-panel-icon-${bg}` : '';
|
||||
|
||||
if ($.inArray(icon, ['', 'fa-li', 'fa-2x', 'fa-3x', 'fa-4x', 'fa-5x']) !== -1) {
|
||||
$banner.hide();
|
||||
} else {
|
||||
$banner.attr('class', `icon ${icon} icon-${color} shop-panel-icon ${size} ${bg}`).show();
|
||||
}
|
||||
};
|
||||
|
||||
$bannerSize.add($bannerColour).add($iconColour).on('change', updateBanner);
|
||||
$icon.on('iconpickerSelected keyup', updateBanner);
|
||||
});
|
||||
|
||||
/**
|
||||
* Show the slider value in the output element after it.
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
studio.sliders.on('mouseup input', function(e) {
|
||||
if (e.type === 'mouseup') {
|
||||
$(this).attr('value', this.value);
|
||||
$(this).blur();
|
||||
} else {
|
||||
$(this).next('output').text(this.value);
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Add an additional item image input row.
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
studio.imageAddRow.on('click', function() {
|
||||
let $parent = $(this).parent(),
|
||||
$prev = $parent.prev(),
|
||||
$row = $prev.clone(),
|
||||
$input = $row.find('input');
|
||||
|
||||
/**
|
||||
* Increment a number by one.
|
||||
*
|
||||
* @param {?} value
|
||||
* @return {number}
|
||||
*/
|
||||
function increment(value) {
|
||||
return parseInt(value) + 1;
|
||||
}
|
||||
|
||||
// Increment the id="" and name="" attributes
|
||||
$input.attr('id', $input.attr('id').replace(/\d+$/, increment));
|
||||
$input.attr('name', $input.attr('name').replace(/\d+(?=]$)/, increment));
|
||||
$input.val('');
|
||||
|
||||
// Ajaxify the file links
|
||||
studio.ajaxifyLinks(0, $row);
|
||||
|
||||
// And insert the row
|
||||
$row.insertBefore($parent)
|
||||
});
|
||||
|
||||
/**
|
||||
* Register shop file links as pop up requests.
|
||||
*
|
||||
* @param {jQuery=} context
|
||||
* @return {void}
|
||||
*/
|
||||
studio.ajaxifyFiles = function(context) {
|
||||
$('[data-shop-file]', context).each(studio.ajaxifyLinks);
|
||||
};
|
||||
|
||||
/**
|
||||
* Open a new pop up window for the shop file links.
|
||||
*
|
||||
* @param {number} i
|
||||
* @param {HTMLElement} element
|
||||
* @return {void}
|
||||
*/
|
||||
studio.ajaxifyLinks = function(i, element) {
|
||||
let $this = $(element),
|
||||
$input = $this.find('input');
|
||||
|
||||
$this.find('input').on('click', function() {
|
||||
let url = $this.data('shop-file') + encodeURIComponent($input.val()) + '&input=' + encodeURIComponent($input.attr('id'));
|
||||
|
||||
window.open(url.replace(/&/g, '&'), 'file', 'height=570,resizable=yes,scrollbars=yes, width=760');
|
||||
});
|
||||
};
|
||||
|
||||
studio.ajaxifyFiles();
|
||||
|
||||
/**
|
||||
* Add AJAX callback for resolving items.
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
phpbb.addAjaxCallback('shop_resolve', function() {
|
||||
$(this).parents('fieldset').hide();
|
||||
|
||||
let $active = $('#active');
|
||||
|
||||
// If the item is not active, highlight the activate button.
|
||||
if ($active.is(':checked') === false) {
|
||||
let $span = $active.next('span');
|
||||
|
||||
$span.addClass('ass-button-pulse');
|
||||
|
||||
$active.on('change', function() {
|
||||
$span.removeClass('ass-button-pulse');
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
91
ext/phpbbstudio/ass/adm/style/js/ass_help.js
Normal file
91
ext/phpbbstudio/ass/adm/style/js/ass_help.js
Normal file
@@ -0,0 +1,91 @@
|
||||
/**
|
||||
*
|
||||
* phpBB Studio - Advanced Shop System. An extension for the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) 2019, phpBB Studio, https://www.phpbbstudio.com
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
*/
|
||||
jQuery(function($) {
|
||||
let studio = {
|
||||
buttons: {
|
||||
close: $('.ass-help-close'),
|
||||
start: $('.ass-help-start'),
|
||||
next: $('.ass-help-next'),
|
||||
prev: $('.ass-help-prev')
|
||||
},
|
||||
classes: {
|
||||
active: 'ass-help-active',
|
||||
body: 'ass-help-body'
|
||||
},
|
||||
flexbox: $('.ass-help-flexbox'),
|
||||
toolbox: $('.ass-help-toolbox'),
|
||||
wrapper: $('#darkenwrapper'),
|
||||
index: 0
|
||||
};
|
||||
|
||||
studio.init = function() {
|
||||
this.wrapper.append(this.toolbox);
|
||||
|
||||
this.items = this.flexbox.children();
|
||||
|
||||
this.buttons.start.on('click', function() { studio.toggle(true); });
|
||||
this.buttons.close.on('click', function() { studio.toggle(false); });
|
||||
this.buttons.next.on('click', function() { studio.navigate(1); });
|
||||
this.buttons.prev.on('click', function() { studio.navigate(-1); });
|
||||
};
|
||||
|
||||
studio.init();
|
||||
|
||||
studio.toggle = function(show) {
|
||||
$('body').toggleClass(studio.classes.body);
|
||||
|
||||
studio.toolbox.toggle(show);
|
||||
studio.wrapper.toggle(show);
|
||||
|
||||
show ? studio.select() : studio.deselect();
|
||||
};
|
||||
|
||||
studio.navigate = function(direction) {
|
||||
let length = studio.items.length,
|
||||
index = studio.index + direction;
|
||||
|
||||
if (index >= 0 && index < length) {
|
||||
studio.index = index;
|
||||
|
||||
studio.select();
|
||||
|
||||
studio.scrollToSlide();
|
||||
}
|
||||
|
||||
studio.buttons.prev.toggle(studio.index !== 0);
|
||||
studio.buttons.next.toggle(studio.index !== (length - 1));
|
||||
};
|
||||
|
||||
studio.select = function() {
|
||||
let $item = $(studio.items.get(studio.index)),
|
||||
$option = $(`label[for="${$item.data('id')}"]`).parents('dl');
|
||||
|
||||
studio.deselect();
|
||||
|
||||
$option.addClass(studio.classes.active).css('max-height', $(window).outerHeight() - (400 + 64 + 64));
|
||||
|
||||
studio.scrollToTop($option);
|
||||
};
|
||||
|
||||
studio.deselect = function() {
|
||||
$(`.${studio.classes.active}`).removeClass(studio.classes.active).css('max-height', '');
|
||||
};
|
||||
|
||||
studio.scrollToSlide = function() {
|
||||
studio.flexbox.animate({
|
||||
scrollLeft: studio.index * $(window).outerWidth()
|
||||
});
|
||||
};
|
||||
|
||||
studio.scrollToTop = function($element) {
|
||||
$('html, body').stop(true).animate({
|
||||
scrollTop: $element.offset().top - 64
|
||||
}, 1000);
|
||||
};
|
||||
});
|
||||
1565
ext/phpbbstudio/ass/adm/style/js/daterangepicker.js
Normal file
1565
ext/phpbbstudio/ass/adm/style/js/daterangepicker.js
Normal file
File diff suppressed because it is too large
Load Diff
3
ext/phpbbstudio/ass/adm/style/js/i18n/af.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/af.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/af",[],function(){return{errorLoading:function(){return"Die resultate kon nie gelaai word nie."},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Verwyders asseblief "+n+" character";return 1!=n&&(r+="s"),r},inputTooShort:function(e){return"Voer asseblief "+(e.minimum-e.input.length)+" of meer karakters"},loadingMore:function(){return"Meer resultate word gelaai…"},maximumSelected:function(e){var n="Kies asseblief net "+e.maximum+" item";return 1!=e.maximum&&(n+="s"),n},noResults:function(){return"Geen resultate gevind"},searching:function(){return"Besig…"},removeAllItems:function(){return"Verwyder alle items"}}}),e.define,e.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/ar.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/ar.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ar",[],function(){return{errorLoading:function(){return"لا يمكن تحميل النتائج"},inputTooLong:function(n){return"الرجاء حذف "+(n.input.length-n.maximum)+" عناصر"},inputTooShort:function(n){return"الرجاء إضافة "+(n.minimum-n.input.length)+" عناصر"},loadingMore:function(){return"جاري تحميل نتائج إضافية..."},maximumSelected:function(n){return"تستطيع إختيار "+n.maximum+" بنود فقط"},noResults:function(){return"لم يتم العثور على أي نتائج"},searching:function(){return"جاري البحث…"},removeAllItems:function(){return"قم بإزالة كل العناصر"}}}),n.define,n.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/az.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/az.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/az",[],function(){return{inputTooLong:function(n){return n.input.length-n.maximum+" simvol silin"},inputTooShort:function(n){return n.minimum-n.input.length+" simvol daxil edin"},loadingMore:function(){return"Daha çox nəticə yüklənir…"},maximumSelected:function(n){return"Sadəcə "+n.maximum+" element seçə bilərsiniz"},noResults:function(){return"Nəticə tapılmadı"},searching:function(){return"Axtarılır…"},removeAllItems:function(){return"Bütün elementləri sil"}}}),n.define,n.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/bg.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/bg.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/bg",[],function(){return{inputTooLong:function(n){var e=n.input.length-n.maximum,u="Моля въведете с "+e+" по-малко символ";return e>1&&(u+="a"),u},inputTooShort:function(n){var e=n.minimum-n.input.length,u="Моля въведете още "+e+" символ";return e>1&&(u+="a"),u},loadingMore:function(){return"Зареждат се още…"},maximumSelected:function(n){var e="Можете да направите до "+n.maximum+" ";return n.maximum>1?e+="избора":e+="избор",e},noResults:function(){return"Няма намерени съвпадения"},searching:function(){return"Търсене…"},removeAllItems:function(){return"Премахнете всички елементи"}}}),n.define,n.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/bn.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/bn.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/bn",[],function(){return{errorLoading:function(){return"ফলাফলগুলি লোড করা যায়নি।"},inputTooLong:function(n){var e=n.input.length-n.maximum,u="অনুগ্রহ করে "+e+" টি অক্ষর মুছে দিন।";return 1!=e&&(u="অনুগ্রহ করে "+e+" টি অক্ষর মুছে দিন।"),u},inputTooShort:function(n){return n.minimum-n.input.length+" টি অক্ষর অথবা অধিক অক্ষর লিখুন।"},loadingMore:function(){return"আরো ফলাফল লোড হচ্ছে ..."},maximumSelected:function(n){var e=n.maximum+" টি আইটেম নির্বাচন করতে পারবেন।";return 1!=n.maximum&&(e=n.maximum+" টি আইটেম নির্বাচন করতে পারবেন।"),e},noResults:function(){return"কোন ফলাফল পাওয়া যায়নি।"},searching:function(){return"অনুসন্ধান করা হচ্ছে ..."}}}),n.define,n.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/bs.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/bs.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/bs",[],function(){function e(e,n,r,t){return e%10==1&&e%100!=11?n:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?r:t}return{errorLoading:function(){return"Preuzimanje nije uspijelo."},inputTooLong:function(n){var r=n.input.length-n.maximum,t="Obrišite "+r+" simbol";return t+=e(r,"","a","a")},inputTooShort:function(n){var r=n.minimum-n.input.length,t="Ukucajte bar još "+r+" simbol";return t+=e(r,"","a","a")},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(n){var r="Možete izabrati samo "+n.maximum+" stavk";return r+=e(n.maximum,"u","e","i")},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"},removeAllItems:function(){return"Uklonite sve stavke"}}}),e.define,e.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/ca.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/ca.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/ca",[],function(){return{errorLoading:function(){return"La càrrega ha fallat"},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Si us plau, elimina "+n+" car";return r+=1==n?"àcter":"àcters"},inputTooShort:function(e){var n=e.minimum-e.input.length,r="Si us plau, introdueix "+n+" car";return r+=1==n?"àcter":"àcters"},loadingMore:function(){return"Carregant més resultats…"},maximumSelected:function(e){var n="Només es pot seleccionar "+e.maximum+" element";return 1!=e.maximum&&(n+="s"),n},noResults:function(){return"No s'han trobat resultats"},searching:function(){return"Cercant…"},removeAllItems:function(){return"Treu tots els elements"}}}),e.define,e.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/cs.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/cs.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/cs",[],function(){function e(e,n){switch(e){case 2:return n?"dva":"dvě";case 3:return"tři";case 4:return"čtyři"}return""}return{errorLoading:function(){return"Výsledky nemohly být načteny."},inputTooLong:function(n){var t=n.input.length-n.maximum;return 1==t?"Prosím, zadejte o jeden znak méně.":t<=4?"Prosím, zadejte o "+e(t,!0)+" znaky méně.":"Prosím, zadejte o "+t+" znaků méně."},inputTooShort:function(n){var t=n.minimum-n.input.length;return 1==t?"Prosím, zadejte ještě jeden znak.":t<=4?"Prosím, zadejte ještě další "+e(t,!0)+" znaky.":"Prosím, zadejte ještě dalších "+t+" znaků."},loadingMore:function(){return"Načítají se další výsledky…"},maximumSelected:function(n){var t=n.maximum;return 1==t?"Můžete zvolit jen jednu položku.":t<=4?"Můžete zvolit maximálně "+e(t,!1)+" položky.":"Můžete zvolit maximálně "+t+" položek."},noResults:function(){return"Nenalezeny žádné položky."},searching:function(){return"Vyhledávání…"},removeAllItems:function(){return"Odstraňte všechny položky"}}}),e.define,e.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/da.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/da.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/da",[],function(){return{errorLoading:function(){return"Resultaterne kunne ikke indlæses."},inputTooLong:function(e){return"Angiv venligst "+(e.input.length-e.maximum)+" tegn mindre"},inputTooShort:function(e){return"Angiv venligst "+(e.minimum-e.input.length)+" tegn mere"},loadingMore:function(){return"Indlæser flere resultater…"},maximumSelected:function(e){var n="Du kan kun vælge "+e.maximum+" emne";return 1!=e.maximum&&(n+="r"),n},noResults:function(){return"Ingen resultater fundet"},searching:function(){return"Søger…"},removeAllItems:function(){return"Fjern alle elementer"}}}),e.define,e.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/de.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/de.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/de",[],function(){return{errorLoading:function(){return"Die Ergebnisse konnten nicht geladen werden."},inputTooLong:function(e){return"Bitte "+(e.input.length-e.maximum)+" Zeichen weniger eingeben"},inputTooShort:function(e){return"Bitte "+(e.minimum-e.input.length)+" Zeichen mehr eingeben"},loadingMore:function(){return"Lade mehr Ergebnisse…"},maximumSelected:function(e){var n="Sie können nur "+e.maximum+" Element";return 1!=e.maximum&&(n+="e"),n+=" auswählen"},noResults:function(){return"Keine Übereinstimmungen gefunden"},searching:function(){return"Suche…"},removeAllItems:function(){return"Entferne alle Elemente"}}}),e.define,e.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/dsb.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/dsb.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/dsb",[],function(){var n=["znamuško","znamušce","znamuška","znamuškow"],e=["zapisk","zapiska","zapiski","zapiskow"],u=function(n,e){return 1===n?e[0]:2===n?e[1]:n>2&&n<=4?e[2]:n>=5?e[3]:void 0};return{errorLoading:function(){return"Wuslědki njejsu se dali zacytaś."},inputTooLong:function(e){var a=e.input.length-e.maximum;return"Pšosym lašuj "+a+" "+u(a,n)},inputTooShort:function(e){var a=e.minimum-e.input.length;return"Pšosym zapódaj nanejmjenjej "+a+" "+u(a,n)},loadingMore:function(){return"Dalšne wuslědki se zacytaju…"},maximumSelected:function(n){return"Móžoš jano "+n.maximum+" "+u(n.maximum,e)+"wubraś."},noResults:function(){return"Žedne wuslědki namakane"},searching:function(){return"Pyta se…"},removeAllItems:function(){return"Remove all items"}}}),n.define,n.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/el.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/el.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/el",[],function(){return{errorLoading:function(){return"Τα αποτελέσματα δεν μπόρεσαν να φορτώσουν."},inputTooLong:function(n){var e=n.input.length-n.maximum,u="Παρακαλώ διαγράψτε "+e+" χαρακτήρ";return 1==e&&(u+="α"),1!=e&&(u+="ες"),u},inputTooShort:function(n){return"Παρακαλώ συμπληρώστε "+(n.minimum-n.input.length)+" ή περισσότερους χαρακτήρες"},loadingMore:function(){return"Φόρτωση περισσότερων αποτελεσμάτων…"},maximumSelected:function(n){var e="Μπορείτε να επιλέξετε μόνο "+n.maximum+" επιλογ";return 1==n.maximum&&(e+="ή"),1!=n.maximum&&(e+="ές"),e},noResults:function(){return"Δεν βρέθηκαν αποτελέσματα"},searching:function(){return"Αναζήτηση…"},removeAllItems:function(){return"Καταργήστε όλα τα στοιχεία"}}}),n.define,n.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/en.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/en.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Please delete "+n+" character";return 1!=n&&(r+="s"),r},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var n="You can only select "+e.maximum+" item";return 1!=e.maximum&&(n+="s"),n},noResults:function(){return"No results found"},searching:function(){return"Searching…"},removeAllItems:function(){return"Remove all items"}}}),e.define,e.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/es.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/es.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/es",[],function(){return{errorLoading:function(){return"No se pudieron cargar los resultados"},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Por favor, elimine "+n+" car";return r+=1==n?"ácter":"acteres"},inputTooShort:function(e){var n=e.minimum-e.input.length,r="Por favor, introduzca "+n+" car";return r+=1==n?"ácter":"acteres"},loadingMore:function(){return"Cargando más resultados…"},maximumSelected:function(e){var n="Sólo puede seleccionar "+e.maximum+" elemento";return 1!=e.maximum&&(n+="s"),n},noResults:function(){return"No se encontraron resultados"},searching:function(){return"Buscando…"},removeAllItems:function(){return"Eliminar todos los elementos"}}}),e.define,e.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/et.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/et.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/et",[],function(){return{inputTooLong:function(e){var n=e.input.length-e.maximum,t="Sisesta "+n+" täht";return 1!=n&&(t+="e"),t+=" vähem"},inputTooShort:function(e){var n=e.minimum-e.input.length,t="Sisesta "+n+" täht";return 1!=n&&(t+="e"),t+=" rohkem"},loadingMore:function(){return"Laen tulemusi…"},maximumSelected:function(e){var n="Saad vaid "+e.maximum+" tulemus";return 1==e.maximum?n+="e":n+="t",n+=" valida"},noResults:function(){return"Tulemused puuduvad"},searching:function(){return"Otsin…"},removeAllItems:function(){return"Eemalda kõik esemed"}}}),e.define,e.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/eu.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/eu.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/eu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Idatzi ";return n+=1==t?"karaktere bat":t+" karaktere",n+=" gutxiago"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Idatzi ";return n+=1==t?"karaktere bat":t+" karaktere",n+=" gehiago"},loadingMore:function(){return"Emaitza gehiago kargatzen…"},maximumSelected:function(e){return 1===e.maximum?"Elementu bakarra hauta dezakezu":e.maximum+" elementu hauta ditzakezu soilik"},noResults:function(){return"Ez da bat datorrenik aurkitu"},searching:function(){return"Bilatzen…"},removeAllItems:function(){return"Kendu elementu guztiak"}}}),e.define,e.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/fa.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/fa.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/fa",[],function(){return{errorLoading:function(){return"امکان بارگذاری نتایج وجود ندارد."},inputTooLong:function(n){return"لطفاً "+(n.input.length-n.maximum)+" کاراکتر را حذف نمایید"},inputTooShort:function(n){return"لطفاً تعداد "+(n.minimum-n.input.length)+" کاراکتر یا بیشتر وارد نمایید"},loadingMore:function(){return"در حال بارگذاری نتایج بیشتر..."},maximumSelected:function(n){return"شما تنها میتوانید "+n.maximum+" آیتم را انتخاب نمایید"},noResults:function(){return"هیچ نتیجهای یافت نشد"},searching:function(){return"در حال جستجو..."},removeAllItems:function(){return"همه موارد را حذف کنید"}}}),n.define,n.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/fi.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/fi.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/fi",[],function(){return{errorLoading:function(){return"Tuloksia ei saatu ladattua."},inputTooLong:function(n){return"Ole hyvä ja anna "+(n.input.length-n.maximum)+" merkkiä vähemmän"},inputTooShort:function(n){return"Ole hyvä ja anna "+(n.minimum-n.input.length)+" merkkiä lisää"},loadingMore:function(){return"Ladataan lisää tuloksia…"},maximumSelected:function(n){return"Voit valita ainoastaan "+n.maximum+" kpl"},noResults:function(){return"Ei tuloksia"},searching:function(){return"Haetaan…"},removeAllItems:function(){return"Poista kaikki kohteet"}}}),n.define,n.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/fr.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/fr.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/fr",[],function(){return{errorLoading:function(){return"Les résultats ne peuvent pas être chargés."},inputTooLong:function(e){var n=e.input.length-e.maximum;return"Supprimez "+n+" caractère"+(n>1?"s":"")},inputTooShort:function(e){var n=e.minimum-e.input.length;return"Saisissez au moins "+n+" caractère"+(n>1?"s":"")},loadingMore:function(){return"Chargement de résultats supplémentaires…"},maximumSelected:function(e){return"Vous pouvez seulement sélectionner "+e.maximum+" élément"+(e.maximum>1?"s":"")},noResults:function(){return"Aucun résultat trouvé"},searching:function(){return"Recherche en cours…"},removeAllItems:function(){return"Supprimer tous les éléments"}}}),e.define,e.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/gl.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/gl.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/gl",[],function(){return{errorLoading:function(){return"Non foi posíbel cargar os resultados."},inputTooLong:function(e){var n=e.input.length-e.maximum;return 1===n?"Elimine un carácter":"Elimine "+n+" caracteres"},inputTooShort:function(e){var n=e.minimum-e.input.length;return 1===n?"Engada un carácter":"Engada "+n+" caracteres"},loadingMore:function(){return"Cargando máis resultados…"},maximumSelected:function(e){return 1===e.maximum?"Só pode seleccionar un elemento":"Só pode seleccionar "+e.maximum+" elementos"},noResults:function(){return"Non se atoparon resultados"},searching:function(){return"Buscando…"},removeAllItems:function(){return"Elimina todos os elementos"}}}),e.define,e.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/he.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/he.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/he",[],function(){return{errorLoading:function(){return"שגיאה בטעינת התוצאות"},inputTooLong:function(n){var e=n.input.length-n.maximum,r="נא למחוק ";return r+=1===e?"תו אחד":e+" תווים"},inputTooShort:function(n){var e=n.minimum-n.input.length,r="נא להכניס ";return r+=1===e?"תו אחד":e+" תווים",r+=" או יותר"},loadingMore:function(){return"טוען תוצאות נוספות…"},maximumSelected:function(n){var e="באפשרותך לבחור עד ";return 1===n.maximum?e+="פריט אחד":e+=n.maximum+" פריטים",e},noResults:function(){return"לא נמצאו תוצאות"},searching:function(){return"מחפש…"},removeAllItems:function(){return"הסר את כל הפריטים"}}}),n.define,n.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/hi.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/hi.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/hi",[],function(){return{errorLoading:function(){return"परिणामों को लोड नहीं किया जा सका।"},inputTooLong:function(n){var e=n.input.length-n.maximum,r=e+" अक्षर को हटा दें";return e>1&&(r=e+" अक्षरों को हटा दें "),r},inputTooShort:function(n){return"कृपया "+(n.minimum-n.input.length)+" या अधिक अक्षर दर्ज करें"},loadingMore:function(){return"अधिक परिणाम लोड हो रहे है..."},maximumSelected:function(n){return"आप केवल "+n.maximum+" आइटम का चयन कर सकते हैं"},noResults:function(){return"कोई परिणाम नहीं मिला"},searching:function(){return"खोज रहा है..."},removeAllItems:function(){return"सभी वस्तुओं को हटा दें"}}}),n.define,n.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/hr.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/hr.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/hr",[],function(){function n(n){var e=" "+n+" znak";return n%10<5&&n%10>0&&(n%100<5||n%100>19)?n%10>1&&(e+="a"):e+="ova",e}return{errorLoading:function(){return"Preuzimanje nije uspjelo."},inputTooLong:function(e){return"Unesite "+n(e.input.length-e.maximum)},inputTooShort:function(e){return"Unesite još "+n(e.minimum-e.input.length)},loadingMore:function(){return"Učitavanje rezultata…"},maximumSelected:function(n){return"Maksimalan broj odabranih stavki je "+n.maximum},noResults:function(){return"Nema rezultata"},searching:function(){return"Pretraga…"},removeAllItems:function(){return"Ukloni sve stavke"}}}),n.define,n.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/hsb.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/hsb.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/hsb",[],function(){var n=["znamješko","znamješce","znamješka","znamješkow"],e=["zapisk","zapiskaj","zapiski","zapiskow"],u=function(n,e){return 1===n?e[0]:2===n?e[1]:n>2&&n<=4?e[2]:n>=5?e[3]:void 0};return{errorLoading:function(){return"Wuslědki njedachu so začitać."},inputTooLong:function(e){var a=e.input.length-e.maximum;return"Prošu zhašej "+a+" "+u(a,n)},inputTooShort:function(e){var a=e.minimum-e.input.length;return"Prošu zapodaj znajmjeńša "+a+" "+u(a,n)},loadingMore:function(){return"Dalše wuslědki so začitaja…"},maximumSelected:function(n){return"Móžeš jenož "+n.maximum+" "+u(n.maximum,e)+"wubrać"},noResults:function(){return"Žane wuslědki namakane"},searching:function(){return"Pyta so…"},removeAllItems:function(){return"Remove all items"}}}),n.define,n.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/hu.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/hu.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/hu",[],function(){return{errorLoading:function(){return"Az eredmények betöltése nem sikerült."},inputTooLong:function(e){return"Túl hosszú. "+(e.input.length-e.maximum)+" karakterrel több, mint kellene."},inputTooShort:function(e){return"Túl rövid. Még "+(e.minimum-e.input.length)+" karakter hiányzik."},loadingMore:function(){return"Töltés…"},maximumSelected:function(e){return"Csak "+e.maximum+" elemet lehet kiválasztani."},noResults:function(){return"Nincs találat."},searching:function(){return"Keresés…"},removeAllItems:function(){return"Távolítson el minden elemet"}}}),e.define,e.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/hy.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/hy.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/hy",[],function(){return{errorLoading:function(){return"Արդյունքները հնարավոր չէ բեռնել։"},inputTooLong:function(n){return"Խնդրում ենք հեռացնել "+(n.input.length-n.maximum)+" նշան"},inputTooShort:function(n){return"Խնդրում ենք մուտքագրել "+(n.minimum-n.input.length)+" կամ ավել նշաններ"},loadingMore:function(){return"Բեռնվում են նոր արդյունքներ․․․"},maximumSelected:function(n){return"Դուք կարող եք ընտրել առավելագույնը "+n.maximum+" կետ"},noResults:function(){return"Արդյունքներ չեն գտնվել"},searching:function(){return"Որոնում․․․"},removeAllItems:function(){return"Հեռացնել բոլոր տարրերը"}}}),n.define,n.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/id.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/id.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/id",[],function(){return{errorLoading:function(){return"Data tidak boleh diambil."},inputTooLong:function(n){return"Hapuskan "+(n.input.length-n.maximum)+" huruf"},inputTooShort:function(n){return"Masukkan "+(n.minimum-n.input.length)+" huruf lagi"},loadingMore:function(){return"Mengambil data…"},maximumSelected:function(n){return"Anda hanya dapat memilih "+n.maximum+" pilihan"},noResults:function(){return"Tidak ada data yang sesuai"},searching:function(){return"Mencari…"},removeAllItems:function(){return"Hapus semua item"}}}),n.define,n.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/is.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/is.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/is",[],function(){return{inputTooLong:function(n){var t=n.input.length-n.maximum,e="Vinsamlegast styttið texta um "+t+" staf";return t<=1?e:e+"i"},inputTooShort:function(n){var t=n.minimum-n.input.length,e="Vinsamlegast skrifið "+t+" staf";return t>1&&(e+="i"),e+=" í viðbót"},loadingMore:function(){return"Sæki fleiri niðurstöður…"},maximumSelected:function(n){return"Þú getur aðeins valið "+n.maximum+" atriði"},noResults:function(){return"Ekkert fannst"},searching:function(){return"Leita…"},removeAllItems:function(){return"Fjarlægðu öll atriði"}}}),n.define,n.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/it.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/it.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/it",[],function(){return{errorLoading:function(){return"I risultati non possono essere caricati."},inputTooLong:function(e){var n=e.input.length-e.maximum,t="Per favore cancella "+n+" caratter";return t+=1!==n?"i":"e"},inputTooShort:function(e){return"Per favore inserisci "+(e.minimum-e.input.length)+" o più caratteri"},loadingMore:function(){return"Caricando più risultati…"},maximumSelected:function(e){var n="Puoi selezionare solo "+e.maximum+" element";return 1!==e.maximum?n+="i":n+="o",n},noResults:function(){return"Nessun risultato trovato"},searching:function(){return"Sto cercando…"},removeAllItems:function(){return"Rimuovi tutti gli oggetti"}}}),e.define,e.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/ja.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/ja.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ja",[],function(){return{errorLoading:function(){return"結果が読み込まれませんでした"},inputTooLong:function(n){return n.input.length-n.maximum+" 文字を削除してください"},inputTooShort:function(n){return"少なくとも "+(n.minimum-n.input.length)+" 文字を入力してください"},loadingMore:function(){return"読み込み中…"},maximumSelected:function(n){return n.maximum+" 件しか選択できません"},noResults:function(){return"対象が見つかりません"},searching:function(){return"検索しています…"},removeAllItems:function(){return"すべてのアイテムを削除"}}}),n.define,n.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/ka.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/ka.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ka",[],function(){return{errorLoading:function(){return"მონაცემების ჩატვირთვა შეუძლებელია."},inputTooLong:function(n){return"გთხოვთ აკრიფეთ "+(n.input.length-n.maximum)+" სიმბოლოთი ნაკლები"},inputTooShort:function(n){return"გთხოვთ აკრიფეთ "+(n.minimum-n.input.length)+" სიმბოლო ან მეტი"},loadingMore:function(){return"მონაცემების ჩატვირთვა…"},maximumSelected:function(n){return"თქვენ შეგიძლიათ აირჩიოთ არაუმეტეს "+n.maximum+" ელემენტი"},noResults:function(){return"რეზულტატი არ მოიძებნა"},searching:function(){return"ძიება…"},removeAllItems:function(){return"ამოიღე ყველა ელემენტი"}}}),n.define,n.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/km.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/km.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/km",[],function(){return{errorLoading:function(){return"មិនអាចទាញយកទិន្នន័យ"},inputTooLong:function(n){return"សូមលុបចេញ "+(n.input.length-n.maximum)+" អក្សរ"},inputTooShort:function(n){return"សូមបញ្ចូល"+(n.minimum-n.input.length)+" អក្សរ រឺ ច្រើនជាងនេះ"},loadingMore:function(){return"កំពុងទាញយកទិន្នន័យបន្ថែម..."},maximumSelected:function(n){return"អ្នកអាចជ្រើសរើសបានតែ "+n.maximum+" ជម្រើសប៉ុណ្ណោះ"},noResults:function(){return"មិនមានលទ្ធផល"},searching:function(){return"កំពុងស្វែងរក..."},removeAllItems:function(){return"លុបធាតុទាំងអស់"}}}),n.define,n.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/ko.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/ko.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ko",[],function(){return{errorLoading:function(){return"결과를 불러올 수 없습니다."},inputTooLong:function(n){return"너무 깁니다. "+(n.input.length-n.maximum)+" 글자 지워주세요."},inputTooShort:function(n){return"너무 짧습니다. "+(n.minimum-n.input.length)+" 글자 더 입력해주세요."},loadingMore:function(){return"불러오는 중…"},maximumSelected:function(n){return"최대 "+n.maximum+"개까지만 선택 가능합니다."},noResults:function(){return"결과가 없습니다."},searching:function(){return"검색 중…"},removeAllItems:function(){return"모든 항목 삭제"}}}),n.define,n.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/lt.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/lt.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/lt",[],function(){function n(n,e,i,t){return n%10==1&&(n%100<11||n%100>19)?e:n%10>=2&&n%10<=9&&(n%100<11||n%100>19)?i:t}return{inputTooLong:function(e){var i=e.input.length-e.maximum,t="Pašalinkite "+i+" simbol";return t+=n(i,"į","ius","ių")},inputTooShort:function(e){var i=e.minimum-e.input.length,t="Įrašykite dar "+i+" simbol";return t+=n(i,"į","ius","ių")},loadingMore:function(){return"Kraunama daugiau rezultatų…"},maximumSelected:function(e){var i="Jūs galite pasirinkti tik "+e.maximum+" element";return i+=n(e.maximum,"ą","us","ų")},noResults:function(){return"Atitikmenų nerasta"},searching:function(){return"Ieškoma…"},removeAllItems:function(){return"Pašalinti visus elementus"}}}),n.define,n.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/lv.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/lv.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/lv",[],function(){function e(e,n,u,i){return 11===e?n:e%10==1?u:i}return{inputTooLong:function(n){var u=n.input.length-n.maximum,i="Lūdzu ievadiet par "+u;return(i+=" simbol"+e(u,"iem","u","iem"))+" mazāk"},inputTooShort:function(n){var u=n.minimum-n.input.length,i="Lūdzu ievadiet vēl "+u;return i+=" simbol"+e(u,"us","u","us")},loadingMore:function(){return"Datu ielāde…"},maximumSelected:function(n){var u="Jūs varat izvēlēties ne vairāk kā "+n.maximum;return u+=" element"+e(n.maximum,"us","u","us")},noResults:function(){return"Sakritību nav"},searching:function(){return"Meklēšana…"},removeAllItems:function(){return"Noņemt visus vienumus"}}}),e.define,e.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/mk.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/mk.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/mk",[],function(){return{inputTooLong:function(n){var e=(n.input.length,n.maximum,"Ве молиме внесете "+n.maximum+" помалку карактер");return 1!==n.maximum&&(e+="и"),e},inputTooShort:function(n){var e=(n.minimum,n.input.length,"Ве молиме внесете уште "+n.maximum+" карактер");return 1!==n.maximum&&(e+="и"),e},loadingMore:function(){return"Вчитување резултати…"},maximumSelected:function(n){var e="Можете да изберете само "+n.maximum+" ставк";return 1===n.maximum?e+="а":e+="и",e},noResults:function(){return"Нема пронајдено совпаѓања"},searching:function(){return"Пребарување…"},removeAllItems:function(){return"Отстрани ги сите предмети"}}}),n.define,n.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/ms.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/ms.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ms",[],function(){return{errorLoading:function(){return"Keputusan tidak berjaya dimuatkan."},inputTooLong:function(n){return"Sila hapuskan "+(n.input.length-n.maximum)+" aksara"},inputTooShort:function(n){return"Sila masukkan "+(n.minimum-n.input.length)+" atau lebih aksara"},loadingMore:function(){return"Sedang memuatkan keputusan…"},maximumSelected:function(n){return"Anda hanya boleh memilih "+n.maximum+" pilihan"},noResults:function(){return"Tiada padanan yang ditemui"},searching:function(){return"Mencari…"},removeAllItems:function(){return"Keluarkan semua item"}}}),n.define,n.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/nb.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/nb.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/nb",[],function(){return{errorLoading:function(){return"Kunne ikke hente resultater."},inputTooLong:function(e){return"Vennligst fjern "+(e.input.length-e.maximum)+" tegn"},inputTooShort:function(e){return"Vennligst skriv inn "+(e.minimum-e.input.length)+" tegn til"},loadingMore:function(){return"Laster flere resultater…"},maximumSelected:function(e){return"Du kan velge maks "+e.maximum+" elementer"},noResults:function(){return"Ingen treff"},searching:function(){return"Søker…"},removeAllItems:function(){return"Fjern alle elementer"}}}),e.define,e.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/ne.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/ne.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ne",[],function(){return{errorLoading:function(){return"नतिजाहरु देखाउन सकिएन।"},inputTooLong:function(n){var e=n.input.length-n.maximum,u="कृपया "+e+" अक्षर मेटाउनुहोस्।";return 1!=e&&(u+="कृपया "+e+" अक्षरहरु मेटाउनुहोस्।"),u},inputTooShort:function(n){return"कृपया बाँकी रहेका "+(n.minimum-n.input.length)+" वा अरु धेरै अक्षरहरु भर्नुहोस्।"},loadingMore:function(){return"अरु नतिजाहरु भरिँदैछन् …"},maximumSelected:function(n){var e="तँपाई "+n.maximum+" वस्तु मात्र छान्न पाउँनुहुन्छ।";return 1!=n.maximum&&(e="तँपाई "+n.maximum+" वस्तुहरु मात्र छान्न पाउँनुहुन्छ।"),e},noResults:function(){return"कुनै पनि नतिजा भेटिएन।"},searching:function(){return"खोजि हुँदैछ…"}}}),n.define,n.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/nl.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/nl.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/nl",[],function(){return{errorLoading:function(){return"De resultaten konden niet worden geladen."},inputTooLong:function(e){return"Gelieve "+(e.input.length-e.maximum)+" karakters te verwijderen"},inputTooShort:function(e){return"Gelieve "+(e.minimum-e.input.length)+" of meer karakters in te voeren"},loadingMore:function(){return"Meer resultaten laden…"},maximumSelected:function(e){var n=1==e.maximum?"kan":"kunnen",r="Er "+n+" maar "+e.maximum+" item";return 1!=e.maximum&&(r+="s"),r+=" worden geselecteerd"},noResults:function(){return"Geen resultaten gevonden…"},searching:function(){return"Zoeken…"},removeAllItems:function(){return"Verwijder alle items"}}}),e.define,e.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/pl.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/pl.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/pl",[],function(){var n=["znak","znaki","znaków"],e=["element","elementy","elementów"],r=function(n,e){return 1===n?e[0]:n>1&&n<=4?e[1]:n>=5?e[2]:void 0};return{errorLoading:function(){return"Nie można załadować wyników."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Usuń "+t+" "+r(t,n)},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Podaj przynajmniej "+t+" "+r(t,n)},loadingMore:function(){return"Trwa ładowanie…"},maximumSelected:function(n){return"Możesz zaznaczyć tylko "+n.maximum+" "+r(n.maximum,e)},noResults:function(){return"Brak wyników"},searching:function(){return"Trwa wyszukiwanie…"},removeAllItems:function(){return"Usuń wszystkie przedmioty"}}}),n.define,n.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/ps.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/ps.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ps",[],function(){return{errorLoading:function(){return"پايلي نه سي ترلاسه کېدای"},inputTooLong:function(n){var e=n.input.length-n.maximum,r="د مهربانۍ لمخي "+e+" توری ړنګ کړئ";return 1!=e&&(r=r.replace("توری","توري")),r},inputTooShort:function(n){return"لږ تر لږه "+(n.minimum-n.input.length)+" يا ډېر توري وليکئ"},loadingMore:function(){return"نوري پايلي ترلاسه کيږي..."},maximumSelected:function(n){var e="تاسو يوازي "+n.maximum+" قلم په نښه کولای سی";return 1!=n.maximum&&(e=e.replace("قلم","قلمونه")),e},noResults:function(){return"پايلي و نه موندل سوې"},searching:function(){return"لټول کيږي..."},removeAllItems:function(){return"ټول توکي لرې کړئ"}}}),n.define,n.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/pt-BR.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/pt-BR.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/pt-BR",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Apague "+n+" caracter";return 1!=n&&(r+="es"),r},inputTooShort:function(e){return"Digite "+(e.minimum-e.input.length)+" ou mais caracteres"},loadingMore:function(){return"Carregando mais resultados…"},maximumSelected:function(e){var n="Você só pode selecionar "+e.maximum+" ite";return 1==e.maximum?n+="m":n+="ns",n},noResults:function(){return"Nenhum resultado encontrado"},searching:function(){return"Buscando…"},removeAllItems:function(){return"Remover todos os itens"}}}),e.define,e.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/pt.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/pt.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/pt",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var r=e.input.length-e.maximum,n="Por favor apague "+r+" ";return n+=1!=r?"caracteres":"caractere"},inputTooShort:function(e){return"Introduza "+(e.minimum-e.input.length)+" ou mais caracteres"},loadingMore:function(){return"A carregar mais resultados…"},maximumSelected:function(e){var r="Apenas pode seleccionar "+e.maximum+" ";return r+=1!=e.maximum?"itens":"item"},noResults:function(){return"Sem resultados"},searching:function(){return"A procurar…"},removeAllItems:function(){return"Remover todos os itens"}}}),e.define,e.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/ro.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/ro.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/ro",[],function(){return{errorLoading:function(){return"Rezultatele nu au putut fi incărcate."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vă rugăm să ștergeți"+t+" caracter";return 1!==t&&(n+="e"),n},inputTooShort:function(e){return"Vă rugăm să introduceți "+(e.minimum-e.input.length)+" sau mai multe caractere"},loadingMore:function(){return"Se încarcă mai multe rezultate…"},maximumSelected:function(e){var t="Aveți voie să selectați cel mult "+e.maximum;return t+=" element",1!==e.maximum&&(t+="e"),t},noResults:function(){return"Nu au fost găsite rezultate"},searching:function(){return"Căutare…"},removeAllItems:function(){return"Eliminați toate elementele"}}}),e.define,e.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/ru.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/ru.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ru",[],function(){function n(n,e,r,u){return n%10<5&&n%10>0&&n%100<5||n%100>20?n%10>1?r:e:u}return{errorLoading:function(){return"Невозможно загрузить результаты"},inputTooLong:function(e){var r=e.input.length-e.maximum,u="Пожалуйста, введите на "+r+" символ";return u+=n(r,"","a","ов"),u+=" меньше"},inputTooShort:function(e){var r=e.minimum-e.input.length,u="Пожалуйста, введите ещё хотя бы "+r+" символ";return u+=n(r,"","a","ов")},loadingMore:function(){return"Загрузка данных…"},maximumSelected:function(e){var r="Вы можете выбрать не более "+e.maximum+" элемент";return r+=n(e.maximum,"","a","ов")},noResults:function(){return"Совпадений не найдено"},searching:function(){return"Поиск…"},removeAllItems:function(){return"Удалить все элементы"}}}),n.define,n.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/sk.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/sk.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/sk",[],function(){var e={2:function(e){return e?"dva":"dve"},3:function(){return"tri"},4:function(){return"štyri"}};return{errorLoading:function(){return"Výsledky sa nepodarilo načítať."},inputTooLong:function(n){var t=n.input.length-n.maximum;return 1==t?"Prosím, zadajte o jeden znak menej":t>=2&&t<=4?"Prosím, zadajte o "+e[t](!0)+" znaky menej":"Prosím, zadajte o "+t+" znakov menej"},inputTooShort:function(n){var t=n.minimum-n.input.length;return 1==t?"Prosím, zadajte ešte jeden znak":t<=4?"Prosím, zadajte ešte ďalšie "+e[t](!0)+" znaky":"Prosím, zadajte ešte ďalších "+t+" znakov"},loadingMore:function(){return"Načítanie ďalších výsledkov…"},maximumSelected:function(n){return 1==n.maximum?"Môžete zvoliť len jednu položku":n.maximum>=2&&n.maximum<=4?"Môžete zvoliť najviac "+e[n.maximum](!1)+" položky":"Môžete zvoliť najviac "+n.maximum+" položiek"},noResults:function(){return"Nenašli sa žiadne položky"},searching:function(){return"Vyhľadávanie…"},removeAllItems:function(){return"Odstráňte všetky položky"}}}),e.define,e.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/sl.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/sl.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/sl",[],function(){return{errorLoading:function(){return"Zadetkov iskanja ni bilo mogoče naložiti."},inputTooLong:function(e){var n=e.input.length-e.maximum,t="Prosim zbrišite "+n+" znak";return 2==n?t+="a":1!=n&&(t+="e"),t},inputTooShort:function(e){var n=e.minimum-e.input.length,t="Prosim vpišite še "+n+" znak";return 2==n?t+="a":1!=n&&(t+="e"),t},loadingMore:function(){return"Nalagam več zadetkov…"},maximumSelected:function(e){var n="Označite lahko največ "+e.maximum+" predmet";return 2==e.maximum?n+="a":1!=e.maximum&&(n+="e"),n},noResults:function(){return"Ni zadetkov."},searching:function(){return"Iščem…"},removeAllItems:function(){return"Odstranite vse elemente"}}}),e.define,e.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/sq.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/sq.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/sq",[],function(){return{errorLoading:function(){return"Rezultatet nuk mund të ngarkoheshin."},inputTooLong:function(e){var n=e.input.length-e.maximum,t="Të lutem fshi "+n+" karakter";return 1!=n&&(t+="e"),t},inputTooShort:function(e){return"Të lutem shkruaj "+(e.minimum-e.input.length)+" ose më shumë karaktere"},loadingMore:function(){return"Duke ngarkuar më shumë rezultate…"},maximumSelected:function(e){var n="Mund të zgjedhësh vetëm "+e.maximum+" element";return 1!=e.maximum&&(n+="e"),n},noResults:function(){return"Nuk u gjet asnjë rezultat"},searching:function(){return"Duke kërkuar…"},removeAllItems:function(){return"Hiq të gjitha sendet"}}}),e.define,e.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/sr-Cyrl.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/sr-Cyrl.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/sr-Cyrl",[],function(){function n(n,e,r,u){return n%10==1&&n%100!=11?e:n%10>=2&&n%10<=4&&(n%100<12||n%100>14)?r:u}return{errorLoading:function(){return"Преузимање није успело."},inputTooLong:function(e){var r=e.input.length-e.maximum,u="Обришите "+r+" симбол";return u+=n(r,"","а","а")},inputTooShort:function(e){var r=e.minimum-e.input.length,u="Укуцајте бар још "+r+" симбол";return u+=n(r,"","а","а")},loadingMore:function(){return"Преузимање још резултата…"},maximumSelected:function(e){var r="Можете изабрати само "+e.maximum+" ставк";return r+=n(e.maximum,"у","е","и")},noResults:function(){return"Ништа није пронађено"},searching:function(){return"Претрага…"},removeAllItems:function(){return"Уклоните све ставке"}}}),n.define,n.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/sr.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/sr.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/sr",[],function(){function n(n,e,r,t){return n%10==1&&n%100!=11?e:n%10>=2&&n%10<=4&&(n%100<12||n%100>14)?r:t}return{errorLoading:function(){return"Preuzimanje nije uspelo."},inputTooLong:function(e){var r=e.input.length-e.maximum,t="Obrišite "+r+" simbol";return t+=n(r,"","a","a")},inputTooShort:function(e){var r=e.minimum-e.input.length,t="Ukucajte bar još "+r+" simbol";return t+=n(r,"","a","a")},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(e){var r="Možete izabrati samo "+e.maximum+" stavk";return r+=n(e.maximum,"u","e","i")},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"},removeAllItems:function(){return"Уклоните све ставке"}}}),n.define,n.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/sv.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/sv.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/sv",[],function(){return{errorLoading:function(){return"Resultat kunde inte laddas."},inputTooLong:function(n){return"Vänligen sudda ut "+(n.input.length-n.maximum)+" tecken"},inputTooShort:function(n){return"Vänligen skriv in "+(n.minimum-n.input.length)+" eller fler tecken"},loadingMore:function(){return"Laddar fler resultat…"},maximumSelected:function(n){return"Du kan max välja "+n.maximum+" element"},noResults:function(){return"Inga träffar"},searching:function(){return"Söker…"},removeAllItems:function(){return"Ta bort alla objekt"}}}),n.define,n.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/th.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/th.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/th",[],function(){return{errorLoading:function(){return"ไม่สามารถค้นข้อมูลได้"},inputTooLong:function(n){return"โปรดลบออก "+(n.input.length-n.maximum)+" ตัวอักษร"},inputTooShort:function(n){return"โปรดพิมพ์เพิ่มอีก "+(n.minimum-n.input.length)+" ตัวอักษร"},loadingMore:function(){return"กำลังค้นข้อมูลเพิ่ม…"},maximumSelected:function(n){return"คุณสามารถเลือกได้ไม่เกิน "+n.maximum+" รายการ"},noResults:function(){return"ไม่พบข้อมูล"},searching:function(){return"กำลังค้นข้อมูล…"},removeAllItems:function(){return"ลบรายการทั้งหมด"}}}),n.define,n.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/tk.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/tk.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/tk",[],function(){return{errorLoading:function(){return"Netije ýüklenmedi."},inputTooLong:function(e){return e.input.length-e.maximum+" harp bozuň."},inputTooShort:function(e){return"Ýene-de iň az "+(e.minimum-e.input.length)+" harp ýazyň."},loadingMore:function(){return"Köpräk netije görkezilýär…"},maximumSelected:function(e){return"Diňe "+e.maximum+" sanysyny saýlaň."},noResults:function(){return"Netije tapylmady."},searching:function(){return"Gözlenýär…"},removeAllItems:function(){return"Remove all items"}}}),e.define,e.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/tr.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/tr.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/tr",[],function(){return{errorLoading:function(){return"Sonuç yüklenemedi"},inputTooLong:function(n){return n.input.length-n.maximum+" karakter daha girmelisiniz"},inputTooShort:function(n){return"En az "+(n.minimum-n.input.length)+" karakter daha girmelisiniz"},loadingMore:function(){return"Daha fazla…"},maximumSelected:function(n){return"Sadece "+n.maximum+" seçim yapabilirsiniz"},noResults:function(){return"Sonuç bulunamadı"},searching:function(){return"Aranıyor…"},removeAllItems:function(){return"Tüm öğeleri kaldır"}}}),n.define,n.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/uk.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/uk.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/uk",[],function(){function n(n,e,u,r){return n%100>10&&n%100<15?r:n%10==1?e:n%10>1&&n%10<5?u:r}return{errorLoading:function(){return"Неможливо завантажити результати"},inputTooLong:function(e){return"Будь ласка, видаліть "+(e.input.length-e.maximum)+" "+n(e.maximum,"літеру","літери","літер")},inputTooShort:function(n){return"Будь ласка, введіть "+(n.minimum-n.input.length)+" або більше літер"},loadingMore:function(){return"Завантаження інших результатів…"},maximumSelected:function(e){return"Ви можете вибрати лише "+e.maximum+" "+n(e.maximum,"пункт","пункти","пунктів")},noResults:function(){return"Нічого не знайдено"},searching:function(){return"Пошук…"},removeAllItems:function(){return"Видалити всі елементи"}}}),n.define,n.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/vi.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/vi.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/vi",[],function(){return{inputTooLong:function(n){return"Vui lòng xóa bớt "+(n.input.length-n.maximum)+" ký tự"},inputTooShort:function(n){return"Vui lòng nhập thêm từ "+(n.minimum-n.input.length)+" ký tự trở lên"},loadingMore:function(){return"Đang lấy thêm kết quả…"},maximumSelected:function(n){return"Chỉ có thể chọn được "+n.maximum+" lựa chọn"},noResults:function(){return"Không tìm thấy kết quả"},searching:function(){return"Đang tìm…"},removeAllItems:function(){return"Xóa tất cả các mục"}}}),n.define,n.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/zh-CN.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/zh-CN.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/zh-CN",[],function(){return{errorLoading:function(){return"无法载入结果。"},inputTooLong:function(n){return"请删除"+(n.input.length-n.maximum)+"个字符"},inputTooShort:function(n){return"请再输入至少"+(n.minimum-n.input.length)+"个字符"},loadingMore:function(){return"载入更多结果…"},maximumSelected:function(n){return"最多只能选择"+n.maximum+"个项目"},noResults:function(){return"未找到结果"},searching:function(){return"搜索中…"},removeAllItems:function(){return"删除所有项目"}}}),n.define,n.require}();
|
||||
3
ext/phpbbstudio/ass/adm/style/js/i18n/zh-TW.js
Normal file
3
ext/phpbbstudio/ass/adm/style/js/i18n/zh-TW.js
Normal file
@@ -0,0 +1,3 @@
|
||||
/*! Select2 4.0.10 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
|
||||
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/zh-TW",[],function(){return{inputTooLong:function(n){return"請刪掉"+(n.input.length-n.maximum)+"個字元"},inputTooShort:function(n){return"請再輸入"+(n.minimum-n.input.length)+"個字元"},loadingMore:function(){return"載入中…"},maximumSelected:function(n){return"你只能選擇最多"+n.maximum+"項"},noResults:function(){return"沒有找到相符的項目"},searching:function(){return"搜尋中…"},removeAllItems:function(){return"刪除所有項目"}}}),n.define,n.require}();
|
||||
1
ext/phpbbstudio/ass/adm/style/js/moment.min.js
vendored
Normal file
1
ext/phpbbstudio/ass/adm/style/js/moment.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
6749
ext/phpbbstudio/ass/adm/style/js/select2.full.js
Normal file
6749
ext/phpbbstudio/ass/adm/style/js/select2.full.js
Normal file
File diff suppressed because it is too large
Load Diff
2
ext/phpbbstudio/ass/adm/style/js/select2.full.min.js
vendored
Normal file
2
ext/phpbbstudio/ass/adm/style/js/select2.full.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
6037
ext/phpbbstudio/ass/adm/style/js/select2.js
Normal file
6037
ext/phpbbstudio/ass/adm/style/js/select2.js
Normal file
File diff suppressed because it is too large
Load Diff
2
ext/phpbbstudio/ass/adm/style/js/select2.min.js
vendored
Normal file
2
ext/phpbbstudio/ass/adm/style/js/select2.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
32
ext/phpbbstudio/ass/composer.json
Normal file
32
ext/phpbbstudio/ass/composer.json
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"name": "phpbbstudio/ass",
|
||||
"type": "phpbb-extension",
|
||||
"description": "A fully integrated and extendable shop extension for the Advanced Points System.",
|
||||
"homepage": "https://www.phpbbstudio.com",
|
||||
"version": "1.1.4-RC",
|
||||
"time": "2020-03-11",
|
||||
"license": "GPL-2.0-only",
|
||||
"authors": [
|
||||
{
|
||||
"name": "phpBB Studio",
|
||||
"email": "info@phpbbstudio.com",
|
||||
"homepage": "https://www.phpbbstudio.com",
|
||||
"role": "Lead developers"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.5.0",
|
||||
"composer/installers": "~1.0"
|
||||
},
|
||||
"extra": {
|
||||
"display-name": "phpBB Studio - Advanced Shop System",
|
||||
"soft-require": {
|
||||
"phpbb/phpbb": ">=3.2.7,<4.0.0@dev"
|
||||
},
|
||||
"version-check": {
|
||||
"host": "3d-i.github.io",
|
||||
"directory": "/site/vchecks",
|
||||
"filename": "advshop.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
54
ext/phpbbstudio/ass/config/routing.yml
Normal file
54
ext/phpbbstudio/ass/config/routing.yml
Normal file
@@ -0,0 +1,54 @@
|
||||
phpbbstudio_ass_shop:
|
||||
path: /aps/shop
|
||||
defaults:
|
||||
_controller: phpbbstudio.ass.controller.shop:shop
|
||||
|
||||
phpbbstudio_ass_category:
|
||||
path: /aps/shop/{category_slug}
|
||||
defaults:
|
||||
_controller: phpbbstudio.ass.controller.shop:category
|
||||
page: 1
|
||||
|
||||
phpbbstudio_ass_category_pagination:
|
||||
path: /aps/shop/{category_slug}/page-{page}
|
||||
defaults:
|
||||
_controller: phpbbstudio.ass.controller.shop:category
|
||||
|
||||
phpbbstudio_ass_item:
|
||||
path: /aps/shop/{category_slug}/{item_slug}
|
||||
defaults:
|
||||
_controller: phpbbstudio.ass.controller.shop:item
|
||||
|
||||
phpbbstudio_ass_purchase:
|
||||
path: /aps/shop/purchase/{category_slug}/{item_slug}
|
||||
defaults:
|
||||
_controller: phpbbstudio.ass.controller.inventory:purchase
|
||||
purchase: true
|
||||
|
||||
phpbbstudio_ass_gift:
|
||||
path: /aps/shop/gift/{category_slug}/{item_slug}
|
||||
defaults:
|
||||
_controller: phpbbstudio.ass.controller.inventory:purchase
|
||||
purchase: false
|
||||
|
||||
phpbbstudio_ass_history:
|
||||
path: /aps/inventory/history
|
||||
defaults:
|
||||
_controller: phpbbstudio.ass.controller.inventory:history
|
||||
page: 1
|
||||
|
||||
phpbbstudio_ass_history_pagination:
|
||||
path: /aps/inventory/history/page-{page}
|
||||
defaults:
|
||||
_controller: phpbbstudio.ass.controller.inventory:history
|
||||
|
||||
phpbbstudio_ass_inventory:
|
||||
path: /aps/inventory/{category_slug}/{item_slug}/{index}/{action}
|
||||
defaults:
|
||||
_controller: phpbbstudio.ass.controller.inventory:inventory
|
||||
category_slug: ''
|
||||
item_slug: ''
|
||||
action: ''
|
||||
index: 1
|
||||
requirements:
|
||||
index: '\d+'
|
||||
11
ext/phpbbstudio/ass/config/services.yml
Normal file
11
ext/phpbbstudio/ass/config/services.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
parameters:
|
||||
phpbbstudio.aps.extended: "phpBB Studio - Advanced Shop System"
|
||||
|
||||
imports:
|
||||
- { resource: services_controllers.yml }
|
||||
- { resource: services_helpers.yml }
|
||||
- { resource: services_items.yml }
|
||||
- { resource: services_listeners.yml }
|
||||
- { resource: services_notifications.yml }
|
||||
- { resource: services_objects.yml }
|
||||
- { resource: tables.yml }
|
||||
139
ext/phpbbstudio/ass/config/services_controllers.yml
Normal file
139
ext/phpbbstudio/ass/config/services_controllers.yml
Normal file
@@ -0,0 +1,139 @@
|
||||
services:
|
||||
phpbbstudio.ass.controller.acp.files:
|
||||
class: phpbbstudio\ass\controller\acp_files_controller
|
||||
arguments:
|
||||
- '@cache.driver'
|
||||
- '@config'
|
||||
- '@phpbbstudio.ass.files'
|
||||
- '@language'
|
||||
- '@request'
|
||||
- '@template'
|
||||
- '@user'
|
||||
|
||||
phpbbstudio.ass.controller.acp.inventory:
|
||||
class: phpbbstudio\ass\controller\acp_inventory_controller
|
||||
arguments:
|
||||
- '@dbal.conn'
|
||||
- '@group_helper'
|
||||
- '@language'
|
||||
- '@log'
|
||||
- '@phpbbstudio.ass.notification'
|
||||
- '@phpbbstudio.ass.operator.category'
|
||||
- '@phpbbstudio.ass.operator.item'
|
||||
- '@request'
|
||||
- '@template'
|
||||
- '@user'
|
||||
- '%tables.groups%'
|
||||
- '%tables.users%'
|
||||
- '%tables.user_group%'
|
||||
- '%phpbbstudio.ass.tables.inventory%'
|
||||
- '%core.root_path%'
|
||||
- '%core.php_ext%'
|
||||
|
||||
|
||||
phpbbstudio.ass.controller.acp.items:
|
||||
class: phpbbstudio\ass\controller\acp_items_controller
|
||||
arguments:
|
||||
- '@cache.driver'
|
||||
- '@phpbbstudio.ass.items.manager'
|
||||
- '@language'
|
||||
- '@log'
|
||||
- '@phpbbstudio.ass.operator.category'
|
||||
- '@phpbbstudio.ass.operator.inventory'
|
||||
- '@phpbbstudio.ass.operator.item'
|
||||
- '@request'
|
||||
- '@template'
|
||||
- '@phpbbstudio.ass.time'
|
||||
- '@user'
|
||||
- '%core.adm_relative_path%'
|
||||
- '%core.root_path%'
|
||||
- '%core.php_ext%'
|
||||
|
||||
phpbbstudio.ass.controller.acp.logs:
|
||||
class: phpbbstudio\ass\controller\acp_logs_controller
|
||||
arguments:
|
||||
- '@config'
|
||||
- '@phpbbstudio.ass.items.manager'
|
||||
- '@language'
|
||||
- '@phpbbstudio.ass.log'
|
||||
- '@log'
|
||||
- '@phpbbstudio.ass.operator.category'
|
||||
- '@phpbbstudio.ass.operator.item'
|
||||
- '@pagination'
|
||||
- '@request'
|
||||
- '@template'
|
||||
- '@user'
|
||||
|
||||
phpbbstudio.ass.controller.acp.overview:
|
||||
class: phpbbstudio\ass\controller\acp_overview_controller
|
||||
arguments:
|
||||
- '@config'
|
||||
- '@config_text'
|
||||
- '@dbal.conn'
|
||||
- '@language'
|
||||
- '@phpbbstudio.ass.operator.item'
|
||||
- '@text_formatter.parser'
|
||||
- '@text_formatter.renderer'
|
||||
- '@request'
|
||||
- '@template'
|
||||
- '@user_loader'
|
||||
- '@text_formatter.utils'
|
||||
- '%phpbbstudio.ass.tables.categories%'
|
||||
- '%phpbbstudio.ass.tables.items%'
|
||||
- '%phpbbstudio.ass.tables.logs%'
|
||||
|
||||
phpbbstudio.ass.controller.acp.settings:
|
||||
class: phpbbstudio\ass\controller\acp_settings_controller
|
||||
arguments:
|
||||
- '@phpbbstudio.aps.functions'
|
||||
- '@config'
|
||||
- '@config_text'
|
||||
- '@language'
|
||||
- '@log'
|
||||
- '@text_formatter.parser'
|
||||
- '@request'
|
||||
- '@template'
|
||||
- '@user'
|
||||
- '@text_formatter.utils'
|
||||
- '%core.root_path%'
|
||||
- '%core.php_ext%'
|
||||
|
||||
phpbbstudio.ass.controller.inventory:
|
||||
class: phpbbstudio\ass\controller\inventory_controller
|
||||
arguments:
|
||||
- '@phpbbstudio.aps.distributor'
|
||||
- '@phpbbstudio.aps.functions'
|
||||
- '@auth'
|
||||
- '@config'
|
||||
- '@phpbbstudio.ass.controller'
|
||||
- '@controller.helper'
|
||||
- '@phpbbstudio.ass.items.manager'
|
||||
- '@language'
|
||||
- '@phpbbstudio.ass.log'
|
||||
- '@log'
|
||||
- '@phpbbstudio.ass.operator.category'
|
||||
- '@phpbbstudio.ass.operator.inventory'
|
||||
- '@phpbbstudio.ass.operator.item'
|
||||
- '@phpbbstudio.ass.notification'
|
||||
- '@pagination'
|
||||
- '@request'
|
||||
- '@phpbbstudio.ass.router'
|
||||
- '@template'
|
||||
- '@phpbbstudio.ass.time'
|
||||
- '@user'
|
||||
- '@user_loader'
|
||||
|
||||
phpbbstudio.ass.controller.shop:
|
||||
class: phpbbstudio\ass\controller\shop_controller
|
||||
arguments:
|
||||
- '@config'
|
||||
- '@phpbbstudio.ass.controller'
|
||||
- '@dbal.conn'
|
||||
- '@controller.helper'
|
||||
- '@phpbbstudio.ass.items.manager'
|
||||
- '@language'
|
||||
- '@phpbbstudio.ass.operator.category'
|
||||
- '@phpbbstudio.ass.operator.item'
|
||||
- '@pagination'
|
||||
- '@request'
|
||||
- '@template'
|
||||
45
ext/phpbbstudio/ass/config/services_helpers.yml
Normal file
45
ext/phpbbstudio/ass/config/services_helpers.yml
Normal file
@@ -0,0 +1,45 @@
|
||||
services:
|
||||
phpbbstudio.ass.controller:
|
||||
class: phpbbstudio\ass\helper\controller
|
||||
arguments:
|
||||
- '@phpbbstudio.aps.functions'
|
||||
- '@auth'
|
||||
- '@config'
|
||||
- '@config_text'
|
||||
- '@controller.helper'
|
||||
- '@language'
|
||||
- '@phpbbstudio.ass.operator.category'
|
||||
- '@phpbbstudio.ass.router'
|
||||
- '@template'
|
||||
- '@user'
|
||||
|
||||
phpbbstudio.ass.files:
|
||||
class: phpbbstudio\ass\helper\files
|
||||
arguments:
|
||||
- '@cache'
|
||||
- '@files.factory'
|
||||
- '@filesystem'
|
||||
- '%core.root_path%'
|
||||
|
||||
phpbbstudio.ass.log:
|
||||
class: phpbbstudio\ass\helper\log
|
||||
arguments:
|
||||
- '@dbal.conn'
|
||||
- '@user'
|
||||
- '%phpbbstudio.ass.tables.categories%'
|
||||
- '%phpbbstudio.ass.tables.items%'
|
||||
- '%phpbbstudio.ass.tables.logs%'
|
||||
- '%tables.users%'
|
||||
|
||||
phpbbstudio.ass.router:
|
||||
class: phpbbstudio\ass\helper\router
|
||||
arguments:
|
||||
- '@controller.helper'
|
||||
- '%core.root_path%'
|
||||
- '%core.php_ext%'
|
||||
|
||||
phpbbstudio.ass.time:
|
||||
class: phpbbstudio\ass\helper\time
|
||||
arguments:
|
||||
- '@config'
|
||||
- '@language'
|
||||
50
ext/phpbbstudio/ass/config/services_items.yml
Normal file
50
ext/phpbbstudio/ass/config/services_items.yml
Normal file
@@ -0,0 +1,50 @@
|
||||
services:
|
||||
phpbbstudio.ass.items:
|
||||
class: phpbb\di\service_collection
|
||||
arguments:
|
||||
- '@service_container'
|
||||
tags:
|
||||
- { name: service_collection, tag: phpbbstudio.ass.item }
|
||||
|
||||
phpbbstudio.ass.items.manager:
|
||||
class: phpbbstudio\ass\items\manager
|
||||
arguments:
|
||||
- '@language'
|
||||
- '@template'
|
||||
- '@phpbbstudio.ass.items'
|
||||
|
||||
phpbbstudio.ass.items.base:
|
||||
class: phpbbstudio\ass\items\type\base
|
||||
shared: false
|
||||
abstract: true
|
||||
arguments:
|
||||
- '@auth'
|
||||
- '@config'
|
||||
- '@dbal.conn'
|
||||
- '@controller.helper'
|
||||
- '@language'
|
||||
- '@log'
|
||||
- '@request'
|
||||
- '@template'
|
||||
- '@user'
|
||||
- '%core.table_prefix%'
|
||||
|
||||
# --- Items --- #
|
||||
phpbbstudio.ass.items.points:
|
||||
class: phpbbstudio\ass\items\type\points
|
||||
parent: phpbbstudio.ass.items.base
|
||||
shared: false
|
||||
calls:
|
||||
- [set_aps_distributor, ['@phpbbstudio.aps.distributor']]
|
||||
- [set_aps_functions, ['@phpbbstudio.aps.functions']]
|
||||
tags:
|
||||
- { name: phpbbstudio.ass.item }
|
||||
|
||||
phpbbstudio.ass.items.file:
|
||||
class: phpbbstudio\ass\items\type\file
|
||||
parent: phpbbstudio.ass.items.base
|
||||
shared: false
|
||||
calls:
|
||||
- [set_files, ['@phpbbstudio.ass.files']]
|
||||
tags:
|
||||
- { name: phpbbstudio.ass.item }
|
||||
30
ext/phpbbstudio/ass/config/services_listeners.yml
Normal file
30
ext/phpbbstudio/ass/config/services_listeners.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
services:
|
||||
phpbbstudio.ass.listener.blocks:
|
||||
class: phpbbstudio\ass\event\blocks_listener
|
||||
arguments:
|
||||
- '@phpbbstudio.ass.operator.blocks'
|
||||
- '@config'
|
||||
- '@language'
|
||||
tags:
|
||||
- { name: event.listener }
|
||||
|
||||
phpbbstudio.ass.listener.setup:
|
||||
class: phpbbstudio\ass\event\setup_listener
|
||||
arguments:
|
||||
- '@config'
|
||||
- '@phpbbstudio.aps.functions'
|
||||
- '@language'
|
||||
- '@template'
|
||||
tags:
|
||||
- { name: event.listener }
|
||||
|
||||
phpbbstudio.ass.listener.exception:
|
||||
class: phpbbstudio\ass\event\exception_listener
|
||||
arguments:
|
||||
- '@config_text'
|
||||
- '@phpbbstudio.ass.controller'
|
||||
- '@language'
|
||||
- '@text_formatter.renderer'
|
||||
- '@template'
|
||||
tags:
|
||||
- { name: event.listener }
|
||||
29
ext/phpbbstudio/ass/config/services_notifications.yml
Normal file
29
ext/phpbbstudio/ass/config/services_notifications.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
services:
|
||||
phpbbstudio.ass.notification:
|
||||
class: phpbbstudio\ass\notification\notification
|
||||
arguments:
|
||||
- '@config'
|
||||
- '@notification_manager'
|
||||
- '@phpbbstudio.ass.operator.item'
|
||||
- '@user'
|
||||
|
||||
phpbbstudio.ass.notification.type.gift:
|
||||
class: phpbbstudio\ass\notification\type\gift
|
||||
shared: false # service MUST not be shared for this to work!
|
||||
parent: notification.type.base
|
||||
calls:
|
||||
- [set_auth, ['@auth']]
|
||||
- [set_router, ['@phpbbstudio.ass.router']]
|
||||
- [set_user_loader, ['@user_loader']]
|
||||
tags:
|
||||
- { name: notification.type }
|
||||
|
||||
phpbbstudio.ass.notification.type.stock:
|
||||
class: phpbbstudio\ass\notification\type\stock
|
||||
shared: false # service MUST not be shared for this to work!
|
||||
parent: notification.type.base
|
||||
calls:
|
||||
- [set_auth, ['@auth']]
|
||||
- [set_router, ['@phpbbstudio.ass.router']]
|
||||
tags:
|
||||
- { name: notification.type }
|
||||
75
ext/phpbbstudio/ass/config/services_objects.yml
Normal file
75
ext/phpbbstudio/ass/config/services_objects.yml
Normal file
@@ -0,0 +1,75 @@
|
||||
services:
|
||||
phpbbstudio.ass.entity.category:
|
||||
class: phpbbstudio\ass\entity\category
|
||||
shared: false
|
||||
arguments:
|
||||
- '@dbal.conn'
|
||||
- '@text_formatter.parser'
|
||||
- '@text_formatter.renderer'
|
||||
- '@text_formatter.utils'
|
||||
- '%phpbbstudio.ass.tables.categories%'
|
||||
|
||||
phpbbstudio.ass.entity.item:
|
||||
class: phpbbstudio\ass\entity\item
|
||||
shared: false
|
||||
arguments:
|
||||
- '@config'
|
||||
- '@dbal.conn'
|
||||
- '@text_formatter.parser'
|
||||
- '@text_formatter.renderer'
|
||||
- '@phpbbstudio.ass.time'
|
||||
- '@text_formatter.utils'
|
||||
- '%phpbbstudio.ass.tables.items%'
|
||||
|
||||
phpbbstudio.ass.operator.blocks:
|
||||
class: phpbbstudio\ass\operator\blocks
|
||||
arguments:
|
||||
- '@phpbbstudio.aps.functions'
|
||||
- '@auth'
|
||||
- '@config'
|
||||
- '@dbal.conn'
|
||||
- '@group_helper'
|
||||
- '@phpbbstudio.ass.operator.item'
|
||||
- '@template'
|
||||
- '@user_loader'
|
||||
- '%phpbbstudio.ass.tables.categories%'
|
||||
- '%phpbbstudio.ass.tables.items%'
|
||||
- '%phpbbstudio.ass.tables.logs%'
|
||||
|
||||
phpbbstudio.ass.operator.category:
|
||||
class: phpbbstudio\ass\operator\category
|
||||
arguments:
|
||||
- '@auth'
|
||||
- '@service_container'
|
||||
- '@dbal.conn'
|
||||
- '@phpbbstudio.ass.router'
|
||||
- '%phpbbstudio.ass.tables.categories%'
|
||||
|
||||
phpbbstudio.ass.operator.inventory:
|
||||
class: phpbbstudio\ass\operator\inventory
|
||||
arguments:
|
||||
- '@phpbbstudio.aps.distributor'
|
||||
- '@phpbbstudio.aps.functions'
|
||||
- '@config'
|
||||
- '@dbal.conn'
|
||||
- '@phpbbstudio.ass.operator.item'
|
||||
- '@user'
|
||||
- '%phpbbstudio.ass.tables.inventory%'
|
||||
- '%phpbbstudio.ass.tables.items%'
|
||||
- '%tables.users%'
|
||||
|
||||
phpbbstudio.ass.operator.item:
|
||||
class: phpbbstudio\ass\operator\item
|
||||
arguments:
|
||||
- '@phpbbstudio.aps.dbal'
|
||||
- '@auth'
|
||||
- '@service_container'
|
||||
- '@dbal.conn'
|
||||
- '@phpbbstudio.ass.files'
|
||||
- '@path_helper'
|
||||
- '@phpbbstudio.ass.router'
|
||||
- '@template'
|
||||
- '@phpbbstudio.ass.time'
|
||||
- '@user'
|
||||
- '%phpbbstudio.ass.tables.categories%'
|
||||
- '%phpbbstudio.ass.tables.items%'
|
||||
5
ext/phpbbstudio/ass/config/tables.yml
Normal file
5
ext/phpbbstudio/ass/config/tables.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
parameters:
|
||||
phpbbstudio.ass.tables.categories: '%core.table_prefix%ass_categories'
|
||||
phpbbstudio.ass.tables.inventory: '%core.table_prefix%ass_inventory'
|
||||
phpbbstudio.ass.tables.items: '%core.table_prefix%ass_items'
|
||||
phpbbstudio.ass.tables.logs: '%core.table_prefix%ass_logs'
|
||||
295
ext/phpbbstudio/ass/controller/acp_files_controller.php
Normal file
295
ext/phpbbstudio/ass/controller/acp_files_controller.php
Normal file
@@ -0,0 +1,295 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* phpBB Studio - Advanced Shop System. An extension for the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) 2019, phpBB Studio, https://www.phpbbstudio.com
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbbstudio\ass\controller;
|
||||
|
||||
use phpbb\exception\runtime_exception;
|
||||
|
||||
/**
|
||||
* phpBB Studio - Advanced Shop System: ACP Files controller
|
||||
*/
|
||||
class acp_files_controller
|
||||
{
|
||||
/** @var \phpbb\cache\driver\driver_interface */
|
||||
protected $cache;
|
||||
|
||||
/** @var \phpbb\config\config */
|
||||
protected $config;
|
||||
|
||||
/** @var \phpbbstudio\ass\helper\files */
|
||||
protected $files;
|
||||
|
||||
/** @var \phpbb\language\language */
|
||||
protected $language;
|
||||
|
||||
/** @var \phpbb\request\request */
|
||||
protected $request;
|
||||
|
||||
/** @var \phpbb\template\template */
|
||||
protected $template;
|
||||
|
||||
/** @var \phpbb\user */
|
||||
protected $user;
|
||||
|
||||
/** @var string Custom form action */
|
||||
protected $u_action;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param \phpbb\cache\driver\driver_interface $cache Cache driver object
|
||||
* @param \phpbb\config\config $config Config object
|
||||
* @param \phpbbstudio\ass\helper\files $files Files object
|
||||
* @param \phpbb\language\language $language Language object
|
||||
* @param \phpbb\request\request $request Request object
|
||||
* @param \phpbb\template\template $template Template object
|
||||
* @param \phpbb\user $user User object
|
||||
* @return void
|
||||
* @access public
|
||||
*/
|
||||
public function __construct(
|
||||
\phpbb\cache\driver\driver_interface $cache,
|
||||
\phpbb\config\config $config,
|
||||
\phpbbstudio\ass\helper\files $files,
|
||||
\phpbb\language\language $language,
|
||||
\phpbb\request\request $request,
|
||||
\phpbb\template\template $template,
|
||||
\phpbb\user $user
|
||||
)
|
||||
{
|
||||
$this->cache = $cache;
|
||||
$this->config = $config;
|
||||
$this->files = $files;
|
||||
$this->language = $language;
|
||||
$this->request = $request;
|
||||
$this->template = $template;
|
||||
$this->user = $user;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle and display the "Files" ACP mode.
|
||||
*
|
||||
* @return void
|
||||
* @access public
|
||||
*/
|
||||
public function files()
|
||||
{
|
||||
$this->language->add_lang(['ass_acp_files', 'ass_acp_common', 'ass_common'], 'phpbbstudio/ass');
|
||||
$this->language->add_lang('posting');
|
||||
|
||||
$mode = $this->request->variable('m', '', true);
|
||||
$action = $this->request->variable('action', '', true);
|
||||
$directory = $this->request->variable('dir', '', true);
|
||||
$item_file = $this->request->variable('file', '', true);
|
||||
$item_img = $this->request->variable('image', '', true);
|
||||
$img_input = $this->request->variable('input', '', true);
|
||||
|
||||
$s_item_img = $this->request->is_set('image');
|
||||
$img_value = $item_img ? $item_img : ($s_item_img ? true : '');
|
||||
|
||||
switch ($mode)
|
||||
{
|
||||
case 'images':
|
||||
case 'files':
|
||||
$this->files->set_mode($mode);
|
||||
$json_response = new \phpbb\json_response;
|
||||
|
||||
$form_key = 'ass_files';
|
||||
add_form_key($form_key);
|
||||
|
||||
switch ($action)
|
||||
{
|
||||
case 'add_dir':
|
||||
if (!check_form_key($form_key))
|
||||
{
|
||||
trigger_error($this->language->lang('FORM_INVALID') . adm_back_link($this->get_file_action($mode, $directory), E_USER_WARNING));
|
||||
}
|
||||
|
||||
$folder = $this->request->variable('folder', '', true);
|
||||
|
||||
$refresh = str_replace('&', '&', $this->get_file_action($mode, $directory));
|
||||
|
||||
try
|
||||
{
|
||||
$this->files->add($directory, $folder);
|
||||
}
|
||||
catch (runtime_exception $e)
|
||||
{
|
||||
trigger_error($this->language->lang_array($e->getMessage(), array_merge([$this->language->lang('ASS_FOLDER')], $e->get_parameters())) . adm_back_link($refresh), E_USER_WARNING);
|
||||
}
|
||||
|
||||
if ($this->config['ass_purge_cache'])
|
||||
{
|
||||
$this->cache->purge();
|
||||
}
|
||||
|
||||
if ($this->request->is_ajax())
|
||||
{
|
||||
$json_response->send(['REFRESH_DATA' => ['url' => $refresh, 'time' => 0]]);
|
||||
}
|
||||
|
||||
redirect($refresh);
|
||||
break;
|
||||
|
||||
case 'add_file':
|
||||
if (!check_form_key($form_key))
|
||||
{
|
||||
trigger_error($this->language->lang('FORM_INVALID') . adm_back_link($this->get_file_action($mode, $directory)), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$refresh = str_replace('&', '&', $this->get_file_action($mode, $directory));
|
||||
|
||||
try
|
||||
{
|
||||
$this->files->upload($directory, 'file');
|
||||
}
|
||||
catch (runtime_exception $e)
|
||||
{
|
||||
trigger_error($this->language->lang_array($e->getMessage(), array_merge([$this->language->lang('ASS_FILENAME')], $e->get_parameters())) . adm_back_link($refresh), E_USER_WARNING);
|
||||
}
|
||||
|
||||
if ($this->config['ass_purge_cache'])
|
||||
{
|
||||
$this->cache->purge();
|
||||
}
|
||||
|
||||
redirect($refresh);
|
||||
break;
|
||||
|
||||
case 'delete_dir':
|
||||
case 'delete_file':
|
||||
$type = $action === 'delete_dir' ? 'FOLDER' : 'FILE';
|
||||
|
||||
if (confirm_box(true))
|
||||
{
|
||||
$this->files->delete($directory);
|
||||
|
||||
if ($this->config['ass_purge_cache'])
|
||||
{
|
||||
$this->cache->purge();
|
||||
}
|
||||
|
||||
trigger_error("ASS_{$type}_DELETE_SUCCESS");
|
||||
}
|
||||
else
|
||||
{
|
||||
confirm_box(false, "ASS_{$type}_DELETE", '');
|
||||
}
|
||||
break;
|
||||
|
||||
case 'select_file':
|
||||
if (($item_img || $item_file) && !$this->request->is_set('dir'))
|
||||
{
|
||||
$directory = pathinfo($item_img, PATHINFO_DIRNAME);
|
||||
$directory = $directory === '.' ? '' : $directory;
|
||||
}
|
||||
|
||||
$this->template->assign_vars([
|
||||
'S_FILE_SELECT' => $s_item_img ? $img_input : 'file',
|
||||
]);
|
||||
break;
|
||||
}
|
||||
|
||||
$files = $this->files->view($directory);
|
||||
|
||||
foreach ($files['folders'] as $folder)
|
||||
{
|
||||
$file_time = $this->files->get_file_time($directory, $folder);
|
||||
|
||||
$this->template->assign_block_vars('ass_folders', [
|
||||
'NAME' => $folder,
|
||||
'TIME' => $file_time ? $this->user->format_date($file_time) : '',
|
||||
'U_DELETE' => $this->get_file_action($mode, ($directory ? $directory . '%2F' : '') . $folder, 'delete_dir'),
|
||||
'U_VIEW' => $this->get_file_action($mode, ($directory ? $directory . '%2F' : '') . $folder, $action, $img_value, $item_file, $img_input),
|
||||
]);
|
||||
}
|
||||
|
||||
foreach ($files['files'] as $file)
|
||||
{
|
||||
$dir_file = $directory ? $directory . '/' . $file : $file;
|
||||
|
||||
$file_size = $this->files->get_file_size($directory, $file);
|
||||
$file_time = $this->files->get_file_time($directory, $file);
|
||||
|
||||
$this->template->assign_block_vars('ass_files', [
|
||||
'NAME' => $file,
|
||||
'ICON' => $this->files->get_file_icon($file),
|
||||
'IMG' => $this->files->get_path($directory, true, $file),
|
||||
'SIZE' => $file_size ? get_formatted_filesize($file_size) : '',
|
||||
'TIME' => $file_time ? $this->user->format_date($file_time) : '',
|
||||
'VALUE' => $dir_file,
|
||||
'S_SELECTED' => $s_item_img ? $dir_file === $item_img : $dir_file === $item_file,
|
||||
'U_DELETE' => $this->get_file_action($mode, ($directory ? $directory . '%2F' : '') . $file, 'delete_file'),
|
||||
]);
|
||||
}
|
||||
|
||||
$directories = array_filter(explode('/', $directory));
|
||||
|
||||
$this->template->assign_vars([
|
||||
'DIRECTORIES' => $directories,
|
||||
|
||||
'S_FILE_MODE' => $mode,
|
||||
|
||||
'U_ACTION' => $this->get_file_action($mode, '', $action, $img_value, $item_file, $img_input),
|
||||
'U_ACTION_FORM' => $this->get_file_action($mode, implode('%2F', $directories), $action),
|
||||
'U_BACK' => $this->u_action,
|
||||
]);
|
||||
break;
|
||||
|
||||
default:
|
||||
$this->template->assign_vars([
|
||||
'ALLOWED_EXTS' => $mode === 'images' ? implode(',', $this->files->get_extensions()) : '',
|
||||
'S_FILE_INDEX' => true,
|
||||
'U_FILE_FILES' => $this->get_file_action('files'),
|
||||
'U_FILE_IMAGES' => $this->get_file_action('images'),
|
||||
]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a custom form action for the "files" mode.
|
||||
*
|
||||
* @param string $mode The file mode (images|files)
|
||||
* @param string $directory The file directory
|
||||
* @param string $action The action
|
||||
* @param string $image The image name
|
||||
* @param string $file The file name
|
||||
* @param string $input The input field name
|
||||
* @return string The custom form action
|
||||
* @access protected
|
||||
*/
|
||||
protected function get_file_action($mode, $directory = '', $action = '', $image = '', $file = '', $input = '')
|
||||
{
|
||||
$mode = $mode ? "&m={$mode}" : '';
|
||||
$action = $action ? "&action={$action}" : '';
|
||||
$directory = $directory ? "&dir={$directory}" : '';
|
||||
$file = $file ? "&file={$file}" : '';
|
||||
$input = $input ? "&input={$input}" : '';
|
||||
|
||||
$image = $image === true ? '&image=' : ($image ? "&image={$image}" : '');
|
||||
|
||||
return "{$this->u_action}{$mode}{$directory}{$action}{$image}{$file}{$input}";
|
||||
}
|
||||
|
||||
/**
|
||||
* Set custom form action.
|
||||
*
|
||||
* @param string $u_action Custom form action
|
||||
* @return self $this This controller for chaining calls
|
||||
* @access public
|
||||
*/
|
||||
public function set_page_url($u_action)
|
||||
{
|
||||
$this->u_action = $u_action;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
604
ext/phpbbstudio/ass/controller/acp_inventory_controller.php
Normal file
604
ext/phpbbstudio/ass/controller/acp_inventory_controller.php
Normal file
@@ -0,0 +1,604 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* phpBB Studio - Advanced Shop System. An extension for the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) 2019, phpBB Studio, https://www.phpbbstudio.com
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbbstudio\ass\controller;
|
||||
|
||||
use phpbbstudio\ass\entity\item;
|
||||
use phpbbstudio\ass\entity\category;
|
||||
|
||||
/**
|
||||
* phpBB Studio - Advanced Shop System: ACP Inventory controller
|
||||
*/
|
||||
class acp_inventory_controller
|
||||
{
|
||||
/** @var \phpbb\db\driver\driver_interface */
|
||||
protected $db;
|
||||
|
||||
/** @var \phpbb\group\helper */
|
||||
protected $group_helper;
|
||||
|
||||
/** @var \phpbb\language\language */
|
||||
protected $language;
|
||||
|
||||
/** @var \phpbb\log\log */
|
||||
protected $log;
|
||||
|
||||
/** @var \phpbbstudio\ass\notification\notification */
|
||||
protected $notification;
|
||||
|
||||
/** @var \phpbbstudio\ass\operator\category */
|
||||
protected $operator_cat;
|
||||
|
||||
/** @var \phpbbstudio\ass\operator\item */
|
||||
protected $operator_item;
|
||||
|
||||
/** @var \phpbb\request\request */
|
||||
protected $request;
|
||||
|
||||
/** @var \phpbb\template\template */
|
||||
protected $template;
|
||||
|
||||
/** @var \phpbb\user */
|
||||
protected $user;
|
||||
|
||||
/** @var string Groups table */
|
||||
protected $groups_table;
|
||||
|
||||
/** @var string Users table */
|
||||
protected $users_table;
|
||||
|
||||
/** @var string Usergroup table */
|
||||
protected $user_group_table;
|
||||
|
||||
/** @var string Inventory table */
|
||||
protected $inventory_table;
|
||||
|
||||
/** @var string phpBB root path */
|
||||
protected $root_path;
|
||||
|
||||
/** @var string php File extension */
|
||||
protected $php_ext;
|
||||
|
||||
/** @var string Custom form action */
|
||||
protected $u_action;
|
||||
|
||||
public function __construct(
|
||||
\phpbb\db\driver\driver_interface $db,
|
||||
\phpbb\group\helper $group_helper,
|
||||
\phpbb\language\language $language,
|
||||
\phpbb\log\log $log,
|
||||
\phpbbstudio\ass\notification\notification $notification,
|
||||
\phpbbstudio\ass\operator\category $operator_cat,
|
||||
\phpbbstudio\ass\operator\item $operator_item,
|
||||
\phpbb\request\request $request,
|
||||
\phpbb\template\template $template,
|
||||
\phpbb\user $user,
|
||||
$groups_table,
|
||||
$users_table,
|
||||
$user_group_table,
|
||||
$inventory_table,
|
||||
$root_path,
|
||||
$php_ext
|
||||
)
|
||||
{
|
||||
$this->db = $db;
|
||||
$this->group_helper = $group_helper;
|
||||
$this->language = $language;
|
||||
$this->log = $log;
|
||||
$this->notification = $notification;
|
||||
$this->operator_cat = $operator_cat;
|
||||
$this->operator_item = $operator_item;
|
||||
$this->request = $request;
|
||||
$this->template = $template;
|
||||
$this->user = $user;
|
||||
|
||||
$this->groups_table = $groups_table;
|
||||
$this->users_table = $users_table;
|
||||
$this->user_group_table = $user_group_table;
|
||||
$this->inventory_table = $inventory_table;
|
||||
|
||||
$this->root_path = $root_path;
|
||||
$this->php_ext = $php_ext;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle and display the "Inventory" ACP mode.
|
||||
*
|
||||
* @return void
|
||||
* @access public
|
||||
*/
|
||||
public function inventory()
|
||||
{
|
||||
$this->language->add_lang(['ass_acp_common', 'ass_common'], 'phpbbstudio/ass');
|
||||
|
||||
$type = $this->request->variable('type', '', true);
|
||||
$submit = $this->request->is_set_post('submit');
|
||||
|
||||
$errors = [];
|
||||
|
||||
$form_key = 'ass_inventory';
|
||||
add_form_key($form_key);
|
||||
|
||||
switch ($type)
|
||||
{
|
||||
case 'global';
|
||||
$action = $this->request->variable('action', 'add', true);
|
||||
$item_ids = $this->request->variable('items', [0]);
|
||||
$group_ids = $this->request->variable('groups', [0]);
|
||||
$usernames = $this->request->variable('usernames', '', true);
|
||||
|
||||
$items = [];
|
||||
|
||||
/** @var category $category */
|
||||
foreach ($this->operator_cat->get_categories() as $category)
|
||||
{
|
||||
$this->template->assign_block_vars('categories', array_merge([
|
||||
'S_INACTIVE' => !$category->get_active(),
|
||||
], $this->operator_cat->get_variables($category)));
|
||||
|
||||
$items += $category_items = $this->operator_item->get_items($category->get_id());
|
||||
|
||||
/** @var item $item */
|
||||
foreach ($category_items as $item)
|
||||
{
|
||||
$this->template->assign_block_vars('categories.items', array_merge([
|
||||
'S_INACTIVE' => !$item->get_active(),
|
||||
'S_SELECTED' => in_array($item->get_id(), $item_ids),
|
||||
], $this->operator_item->get_variables($item)));
|
||||
}
|
||||
}
|
||||
|
||||
if ($submit)
|
||||
{
|
||||
if (!check_form_key($form_key))
|
||||
{
|
||||
$errors[] = 'FORM_INVALID';
|
||||
}
|
||||
|
||||
if (!in_array($action, ['add', 'delete']))
|
||||
{
|
||||
$errors[] = 'NO_ACTION';
|
||||
}
|
||||
|
||||
if (empty($item_ids))
|
||||
{
|
||||
$errors[] = 'ACP_ASS_NO_ITEMS_SELECTED';
|
||||
}
|
||||
|
||||
$user_ids = [];
|
||||
$usernames_array = array_filter(explode("\n", $usernames));
|
||||
|
||||
if (empty($usernames_array) && empty($group_ids))
|
||||
{
|
||||
$this->language->add_lang('acp/permissions');
|
||||
|
||||
$errors[] = 'NO_USER_GROUP_SELECTED';
|
||||
}
|
||||
|
||||
if (!empty($usernames_array))
|
||||
{
|
||||
$this->get_ids_from_usernames($usernames_array, $user_ids, $errors);
|
||||
}
|
||||
|
||||
if (!empty($group_ids))
|
||||
{
|
||||
$this->get_ids_from_groups($group_ids, $user_ids);
|
||||
}
|
||||
|
||||
if (empty($errors) && empty($user_ids))
|
||||
{
|
||||
$errors[] = 'NO_GROUP_MEMBERS';
|
||||
}
|
||||
|
||||
if (empty($errors))
|
||||
{
|
||||
$user_ids = array_unique($user_ids);
|
||||
|
||||
$this->update_inventory($action, $user_ids, $item_ids);
|
||||
|
||||
$count_items = count($item_ids);
|
||||
$count_users = count($user_ids);
|
||||
|
||||
$item_names = [];
|
||||
|
||||
foreach ($item_ids as $item_id)
|
||||
{
|
||||
$item_names[] = $items[$item_id]->get_title();
|
||||
}
|
||||
|
||||
$l_action = 'ACP_ASS_INVENTORY_' . utf8_strtoupper($action);
|
||||
|
||||
$this->log->add('admin', $this->user->data['user_id'], $this->user->ip, "LOG_{$l_action}", time(), [$count_items, implode(', ', $item_names), $count_users, implode(', ', $usernames_array)]);
|
||||
|
||||
$message = $this->language->lang("{$l_action}_SUCCESS", $count_items);
|
||||
$message .= '<br>» ' . $this->language->lang('ACP_ASS_AMOUNT_ITEMS') . $this->language->lang('COLON') . ' ' . $count_items;
|
||||
$message .= '<br>» ' . $this->language->lang('ACP_ASS_AMOUNT_USERS') . $this->language->lang('COLON') . ' ' . $count_users;
|
||||
$message .= adm_back_link($this->u_action);
|
||||
|
||||
trigger_error($message);
|
||||
}
|
||||
}
|
||||
|
||||
$sql = 'SELECT group_id, group_name, group_type
|
||||
FROM ' . $this->groups_table . "
|
||||
WHERE group_name <> 'BOTS'
|
||||
AND group_name <> 'GUESTS'
|
||||
ORDER BY group_type DESC, group_name ASC";
|
||||
$result = $this->db->sql_query($sql);
|
||||
while ($row = $this->db->sql_fetchrow($result))
|
||||
{
|
||||
$this->template->assign_block_vars('groups', [
|
||||
'ID' => (int) $row['group_id'],
|
||||
'NAME' => $this->group_helper->get_name($row['group_name']),
|
||||
'S_SELECTED' => in_array((int) $row['group_id'], $group_ids),
|
||||
'S_SPECIAL' => GROUP_SPECIAL === (int) $row['group_type'],
|
||||
]);
|
||||
}
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
$this->template->assign_vars([
|
||||
'USERNAMES' => $usernames,
|
||||
'S_ADD' => $action === 'add',
|
||||
'U_FIND_USER' => append_sid("{$this->root_path}memberlist.{$this->php_ext}", [
|
||||
'mode' => 'searchuser',
|
||||
'form' => 'ass_inventory',
|
||||
'field' => 'usernames',
|
||||
]),
|
||||
]);
|
||||
break;
|
||||
|
||||
case 'manage':
|
||||
$action = $this->request->variable('action', '', true);
|
||||
$username = $this->request->variable('username', '', true);
|
||||
$user_id = $this->request->variable('u', 0);
|
||||
$item_ids = $this->request->variable('items', [0]);
|
||||
|
||||
if (empty($username) && empty($user_id))
|
||||
{
|
||||
$this->template->assign_var('U_FIND_USER', append_sid("{$this->root_path}memberlist.{$this->php_ext}", [
|
||||
'mode' => 'searchuser',
|
||||
'form' => 'ass_inventory',
|
||||
'field' => 'username',
|
||||
'select_single' => true,
|
||||
]));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (empty($user_id))
|
||||
{
|
||||
$user_ids = [];
|
||||
|
||||
$this->get_ids_from_usernames([$username], $user_ids, $errors);
|
||||
|
||||
if (empty($user_ids))
|
||||
{
|
||||
trigger_error($this->language->lang('NO_USER') . adm_back_link($this->u_action . "&type={$type}"), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$user_id = (int) reset($user_ids);
|
||||
}
|
||||
|
||||
$rowset = [];
|
||||
|
||||
$sql = 'SELECT i.*, u.username as gifter_name, u.user_colour as gifter_colour
|
||||
FROM ' . $this->inventory_table . ' i
|
||||
LEFT JOIN ' . $this->users_table . ' u
|
||||
ON i.gifter_id = u.user_id
|
||||
WHERE i.user_id = ' . (int) $user_id;
|
||||
$result = $this->db->sql_query($sql);
|
||||
while ($row = $this->db->sql_fetchrow($result))
|
||||
{
|
||||
$rowset[(int) $row['item_id']] = $row;
|
||||
}
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
$inventory = [
|
||||
'categories' => array_column($rowset, 'category_id'),
|
||||
'items' => array_keys($rowset),
|
||||
];
|
||||
|
||||
$items = [];
|
||||
$categories = $this->operator_cat->get_categories();
|
||||
|
||||
/** @var category $category */
|
||||
foreach ($categories as $category)
|
||||
{
|
||||
$this->template->assign_block_vars('categories', array_merge([
|
||||
'S_INACTIVE' => !$category->get_active(),
|
||||
'S_INVENTORY' => in_array($category->get_id(), $inventory['categories']),
|
||||
], $this->operator_cat->get_variables($category)));
|
||||
|
||||
$items += $category_items = $this->operator_item->get_items($category->get_id());
|
||||
|
||||
/** @var item $item */
|
||||
foreach ($category_items as $item)
|
||||
{
|
||||
$variables = array_merge([
|
||||
'S_INACTIVE' => !$item->get_active(),
|
||||
'S_INVENTORY' => in_array($item->get_id(), $inventory['items']),
|
||||
'S_SELECTED' => in_array($item->get_id(), $item_ids),
|
||||
], $this->operator_item->get_variables($item));
|
||||
|
||||
if ($variables['S_INVENTORY'])
|
||||
{
|
||||
$row = $rowset[$item->get_id()];
|
||||
|
||||
$variables = array_merge($variables, [
|
||||
'GIFTER' => $row['gifter_id'] ? get_username_string('full', $row['gifter_id'], $row['gifter_name'], $row['gifter_colour']) : '',
|
||||
'PURCHASE_TIME' => $this->user->format_date($row['purchase_time']),
|
||||
'USE_TIME' => $row['use_time'] ? $this->user->format_date($row['use_time']) : $this->language->lang('NEVER'),
|
||||
'USE_COUNT' => (int) $row['use_count'],
|
||||
]);
|
||||
}
|
||||
|
||||
$this->template->assign_block_vars('categories.items', $variables);
|
||||
}
|
||||
}
|
||||
|
||||
$u_back = $this->u_action . "&type={$type}&u={$user_id}";
|
||||
|
||||
if ($action === 'delete')
|
||||
{
|
||||
$item_id = $this->request->variable('iid', 0);
|
||||
|
||||
if (confirm_box(true))
|
||||
{
|
||||
$this->update_inventory($action, [$user_id], [$item_id]);
|
||||
|
||||
if (empty($username))
|
||||
{
|
||||
$username = $this->get_username($user_id);
|
||||
}
|
||||
|
||||
$this->log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_ACP_ASS_INVENTORY_DELETE_USER', time(), [$items[$item_id]->get_title(), $username]);
|
||||
|
||||
trigger_error($this->language->lang('ASS_DELETE_SUCCESS') . adm_back_link($u_back));
|
||||
}
|
||||
else
|
||||
{
|
||||
confirm_box(false, 'ASS_DELETE', '');
|
||||
|
||||
redirect($u_back);
|
||||
}
|
||||
}
|
||||
|
||||
if ($submit)
|
||||
{
|
||||
if (!check_form_key($form_key))
|
||||
{
|
||||
$errors[] = 'FORM_INVALID';
|
||||
}
|
||||
|
||||
if (empty($item_ids))
|
||||
{
|
||||
$errors[] = 'ACP_ASS_NO_ITEMS_SELECTED';
|
||||
}
|
||||
|
||||
if (empty($errors))
|
||||
{
|
||||
$this->update_inventory('add', [$user_id], $item_ids);
|
||||
|
||||
if (empty($username))
|
||||
{
|
||||
$username = $this->get_username($user_id);
|
||||
}
|
||||
|
||||
$count_items = count($item_ids);
|
||||
|
||||
$item_names = [];
|
||||
|
||||
foreach ($item_ids as $item_id)
|
||||
{
|
||||
$item_names[] = $items[$item_id]->get_title();
|
||||
}
|
||||
|
||||
$this->log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_ACP_ASS_INVENTORY_ADD_USER', time(), [$count_items, implode(', ', $item_names), $username]);
|
||||
|
||||
trigger_error($this->language->lang('ACP_ASS_INVENTORY_ADD_SUCCESS', $count_items) . adm_back_link($u_back));
|
||||
}
|
||||
}
|
||||
|
||||
$this->template->assign_vars([
|
||||
'ASS_USERNAME' => $username,
|
||||
|
||||
'U_DELETE' => $this->u_action . "&type={$type}&u={$user_id}&action=delete&iid=",
|
||||
]);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
$this->template->assign_vars([
|
||||
'U_GLOBAL' => $this->u_action . '&type=global',
|
||||
'U_MANAGE' => $this->u_action . '&type=manage',
|
||||
]);
|
||||
break;
|
||||
}
|
||||
|
||||
$this->template->assign_vars([
|
||||
'ERRORS' => $errors,
|
||||
|
||||
'S_TYPE' => $type,
|
||||
|
||||
'U_ACTION' => $this->u_action . ($type ? "&type={$type}" : ''),
|
||||
'U_BACK' => $this->u_action,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update users' inventories.
|
||||
*
|
||||
* @param string $action The action to perform (add|delete)
|
||||
* @param array $user_ids The user identifiers
|
||||
* @param array $item_ids The item identifiers
|
||||
* @return void
|
||||
* @access protected
|
||||
*/
|
||||
protected function update_inventory($action, array $user_ids, array $item_ids)
|
||||
{
|
||||
switch ($action)
|
||||
{
|
||||
case 'add':
|
||||
$owned = [];
|
||||
$stack = [];
|
||||
|
||||
$sql = 'SELECT item_id, user_id
|
||||
FROM ' . $this->inventory_table . '
|
||||
WHERE ' . $this->db->sql_in_set('item_id', $item_ids) . '
|
||||
AND ' . $this->db->sql_in_set('user_id', $user_ids);
|
||||
$result = $this->db->sql_query($sql);
|
||||
while ($row = $this->db->sql_fetchrow($result))
|
||||
{
|
||||
$item_id = (int) $row['item_id'];
|
||||
$user_id = (int) $row['user_id'];
|
||||
|
||||
$owned[$item_id][] = $user_id;
|
||||
$stack[$user_id][$item_id][] = $item_id;
|
||||
}
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
$items = $this->operator_item->get_items_by_id($item_ids);
|
||||
|
||||
foreach ($item_ids as $item_id)
|
||||
{
|
||||
/** @var item $item */
|
||||
$item = $items[$item_id];
|
||||
|
||||
$users = !empty($owned[$item_id]) && !$item->get_stack() ? array_diff($user_ids, $owned[$item_id]) : $user_ids;
|
||||
|
||||
foreach ($users as $user_id)
|
||||
{
|
||||
$sql = 'INSERT INTO ' . $this->inventory_table . ' ' . $this->db->sql_build_array('INSERT', [
|
||||
'category_id' => $item->get_category(),
|
||||
'item_id' => $item->get_id(),
|
||||
'user_id' => $user_id,
|
||||
'gifter_id' => (int) $this->user->data['user_id'],
|
||||
'purchase_time' => time(),
|
||||
'purchase_price' => 0.00,
|
||||
]);
|
||||
$this->db->sql_query($sql);
|
||||
|
||||
$index = !empty($stack[$user_id][$item_id]) ? count($stack[$user_id][$item_id]) : 0;
|
||||
$index = $index + 1;
|
||||
|
||||
$this->notification->gift($item, $user_id, $this->db->sql_nextid(), $index);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'delete':
|
||||
$sql = 'DELETE FROM ' . $this->inventory_table . '
|
||||
WHERE ' . $this->db->sql_in_set('item_id', $item_ids) . '
|
||||
AND ' . $this->db->sql_in_set('user_id', $user_ids);
|
||||
$this->db->sql_query($sql);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user identifiers from usernames.
|
||||
*
|
||||
* @param array $usernames The usernames
|
||||
* @param array $user_ids The user identifiers
|
||||
* @param array $errors The errors
|
||||
* @return void
|
||||
* @access protected
|
||||
*/
|
||||
protected function get_ids_from_usernames(array $usernames, array &$user_ids, array &$errors)
|
||||
{
|
||||
$usernames_clean = [];
|
||||
$usernames_found = [];
|
||||
|
||||
foreach ($usernames as $username)
|
||||
{
|
||||
$usernames_clean[$username] = utf8_clean_string($username);
|
||||
}
|
||||
|
||||
$sql = 'SELECT user_id, username_clean
|
||||
FROM ' . $this->users_table . '
|
||||
WHERE ' . $this->db->sql_in_set('username_clean', $usernames_clean);
|
||||
$result = $this->db->sql_query($sql);
|
||||
while ($row = $this->db->sql_fetchrow($result))
|
||||
{
|
||||
$usernames_found[] = $row['username_clean'];
|
||||
$user_ids[] = (int) $row['user_id'];
|
||||
}
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
$usernames_not_found = array_diff($usernames_clean, $usernames_found);
|
||||
|
||||
if (!empty($usernames_not_found))
|
||||
{
|
||||
$errors[] = count($usernames_not_found) > 1 ? 'NO_USERS' : 'NO_USER';
|
||||
|
||||
$not_found = array_intersect($usernames_clean, $usernames_not_found);
|
||||
$not_found = array_flip($not_found);
|
||||
|
||||
foreach ($not_found as $username)
|
||||
{
|
||||
$errors[] = '» ' . $username;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user identifiers from group identifiers.
|
||||
*
|
||||
* @param array $group_ids The group identifiers
|
||||
* @param array $user_ids The user identifiers
|
||||
* @return void
|
||||
* @access protected
|
||||
*/
|
||||
protected function get_ids_from_groups(array $group_ids, array &$user_ids)
|
||||
{
|
||||
$sql = 'SELECT user_id
|
||||
FROM ' . $this->user_group_table . '
|
||||
WHERE user_pending <> 1
|
||||
AND ' . $this->db->sql_in_set('group_id', $group_ids);
|
||||
$result = $this->db->sql_query($sql);
|
||||
while ($row = $this->db->sql_fetchrow($result))
|
||||
{
|
||||
$user_ids[] = (int) $row['user_id'];
|
||||
}
|
||||
$this->db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a username from user identifier.
|
||||
*
|
||||
* @param int $user_id The user identifier
|
||||
* @return string The username
|
||||
* @access protected
|
||||
*/
|
||||
protected function get_username($user_id)
|
||||
{
|
||||
$sql = 'SELECT username
|
||||
FROM ' . $this->users_table . '
|
||||
WHERE user_id = ' . (int) $user_id;
|
||||
$result = $this->db->sql_query_limit($sql, 1);
|
||||
$username = $this->db->sql_fetchfield('username');
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
return (string) $username;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set custom form action.
|
||||
*
|
||||
* @param string $u_action Custom form action
|
||||
* @return self $this This controller for chaining calls
|
||||
* @access public
|
||||
*/
|
||||
public function set_page_url($u_action)
|
||||
{
|
||||
$this->u_action = $u_action;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
703
ext/phpbbstudio/ass/controller/acp_items_controller.php
Normal file
703
ext/phpbbstudio/ass/controller/acp_items_controller.php
Normal file
@@ -0,0 +1,703 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* phpBB Studio - Advanced Shop System. An extension for the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) 2019, phpBB Studio, https://www.phpbbstudio.com
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbbstudio\ass\controller;
|
||||
|
||||
use phpbb\exception\runtime_exception;
|
||||
use phpbbstudio\ass\entity\category;
|
||||
use phpbbstudio\ass\entity\item;
|
||||
use phpbbstudio\ass\items\type\item_type;
|
||||
|
||||
/**
|
||||
* phpBB Studio - Advanced Shop System: ACP Items controller
|
||||
*/
|
||||
class acp_items_controller
|
||||
{
|
||||
/** @var \phpbb\cache\driver\driver_interface */
|
||||
protected $cache;
|
||||
|
||||
/** @var \phpbbstudio\ass\items\manager */
|
||||
protected $items_manager;
|
||||
|
||||
/** @var \phpbb\language\language */
|
||||
protected $language;
|
||||
|
||||
/** @var \phpbb\log\log */
|
||||
protected $log;
|
||||
|
||||
/** @var \phpbbstudio\ass\operator\category */
|
||||
protected $operator_cat;
|
||||
|
||||
/** @var \phpbbstudio\ass\operator\inventory */
|
||||
protected $operator_inv;
|
||||
|
||||
/** @var \phpbbstudio\ass\operator\item */
|
||||
protected $operator_item;
|
||||
|
||||
/** @var \phpbb\request\request */
|
||||
protected $request;
|
||||
|
||||
/** @var \phpbb\template\template */
|
||||
protected $template;
|
||||
|
||||
/** @var \phpbbstudio\ass\helper\time */
|
||||
protected $time;
|
||||
|
||||
/** @var \phpbb\user */
|
||||
protected $user;
|
||||
|
||||
/** @var string phpBB admin path */
|
||||
protected $admin_path;
|
||||
|
||||
/** @var string phpBB root path */
|
||||
protected $root_path;
|
||||
|
||||
/** @var string php File extension */
|
||||
protected $php_ext;
|
||||
|
||||
/** @var string Custom form action */
|
||||
protected $u_action;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param \phpbb\cache\driver\driver_interface $cache Cache object
|
||||
* @param \phpbbstudio\ass\items\manager $items_manager Items manager object
|
||||
* @param \phpbb\language\language $language Language object
|
||||
* @param \phpbb\log\log $log Log object
|
||||
* @param \phpbbstudio\ass\operator\category $operator_cat Category operator object
|
||||
* @param \phpbbstudio\ass\operator\inventory $operator_inv Inventory operator object
|
||||
* @param \phpbbstudio\ass\operator\item $operator_item Item operator object
|
||||
* @param \phpbb\request\request $request Request object
|
||||
* @param \phpbb\template\template $template Template object
|
||||
* @param \phpbbstudio\ass\helper\time $time Time helper object
|
||||
* @param \phpbb\user $user User object
|
||||
* @param string $admin_path phpBB admin path
|
||||
* @param string $root_path phpBB root path
|
||||
* @param string $php_ext php File extension
|
||||
* @return void
|
||||
* @access public
|
||||
*/
|
||||
public function __construct(
|
||||
\phpbb\cache\driver\driver_interface $cache,
|
||||
\phpbbstudio\ass\items\manager $items_manager,
|
||||
\phpbb\language\language $language,
|
||||
\phpbb\log\log $log,
|
||||
\phpbbstudio\ass\operator\category $operator_cat,
|
||||
\phpbbstudio\ass\operator\inventory $operator_inv,
|
||||
\phpbbstudio\ass\operator\item $operator_item,
|
||||
\phpbb\request\request $request,
|
||||
\phpbb\template\template $template,
|
||||
\phpbbstudio\ass\helper\time $time,
|
||||
\phpbb\user $user,
|
||||
$admin_path,
|
||||
$root_path,
|
||||
$php_ext
|
||||
)
|
||||
{
|
||||
$this->cache = $cache;
|
||||
$this->items_manager = $items_manager;
|
||||
$this->language = $language;
|
||||
$this->log = $log;
|
||||
$this->operator_cat = $operator_cat;
|
||||
$this->operator_inv = $operator_inv;
|
||||
$this->operator_item = $operator_item;
|
||||
$this->request = $request;
|
||||
$this->template = $template;
|
||||
$this->time = $time;
|
||||
$this->user = $user;
|
||||
|
||||
$this->admin_path = $root_path . $admin_path;
|
||||
$this->root_path = $root_path;
|
||||
$this->php_ext = $php_ext;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle and display the "Items" ACP mode.
|
||||
*
|
||||
* @return void
|
||||
* @access public
|
||||
*/
|
||||
public function items()
|
||||
{
|
||||
$this->language->add_lang(['ass_acp_common', 'ass_common'], 'phpbbstudio/ass');
|
||||
|
||||
$action = $this->request->variable('action', '', true);
|
||||
$item_id = $this->request->variable('iid', 0);
|
||||
$category_id = $this->request->variable('cid', 0);
|
||||
|
||||
$s_items = ($item_id || ($category_id && strpos($action, 'cat_') !== 0));
|
||||
|
||||
switch ($action)
|
||||
{
|
||||
case 'move':
|
||||
$id = $this->request->variable('id', 0);
|
||||
$order = $this->request->variable('order', 0) + 1;
|
||||
|
||||
$s_items ? $this->operator_item->move($id, $order) : $this->operator_cat->move($id, $order);
|
||||
break;
|
||||
|
||||
case 'resolve':
|
||||
$item = $this->operator_item->get_entity()->load($item_id);
|
||||
$category = $this->operator_cat->get_entity()->load($item->get_category());
|
||||
|
||||
if (confirm_box(true))
|
||||
{
|
||||
$item->set_conflict(false)
|
||||
->save();
|
||||
|
||||
$category->set_conflicts($category->get_conflicts() - 1)
|
||||
->save();
|
||||
|
||||
$this->log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_ACP_ASS_ITEM_RESOLVED', time(), [$item->get_title()]);
|
||||
|
||||
if ($this->request->is_ajax())
|
||||
{
|
||||
$json_response = new \phpbb\json_response;
|
||||
|
||||
$json_response->send([
|
||||
'MESSAGE_TITLE' => $this->language->lang('INFORMATION'),
|
||||
'MESSAGE_TEXT' => $this->language->lang('ACP_ASS_ITEM_RESOLVE_SUCCESS')
|
||||
]);
|
||||
}
|
||||
|
||||
trigger_error($this->language->lang('ACP_ASS_ITEM_RESOLVE_SUCCESS') . adm_back_link($this->u_action . '&iid=' . $item->get_id()));
|
||||
}
|
||||
else
|
||||
{
|
||||
confirm_box(false, 'ACP_ASS_ITEM_RESOLVE', '');
|
||||
|
||||
redirect($this->u_action . '&iid=' . $item->get_id());
|
||||
}
|
||||
break;
|
||||
|
||||
case 'type':
|
||||
$json_response = new \phpbb\json_response;
|
||||
|
||||
$type = $this->items_manager->get_type($this->request->variable('type', '', true));
|
||||
|
||||
if ($type !== null)
|
||||
{
|
||||
$data = $item_id ? $this->operator_item->get_entity()->load($item_id)->get_data() : [];
|
||||
|
||||
$this->template->set_filenames(['type' => $type->get_acp_template($data)]);
|
||||
|
||||
$this->template->assign_var('U_ACTION', $this->u_action);
|
||||
|
||||
try
|
||||
{
|
||||
$body = $this->template->assign_display('type');
|
||||
|
||||
$json_response->send([
|
||||
'success' => true,
|
||||
'body' => $body,
|
||||
]);
|
||||
}
|
||||
/** @noinspection PhpRedundantCatchClauseInspection */
|
||||
catch (\Twig\Error\Error $e)
|
||||
{
|
||||
$json_response->send([
|
||||
'error' => true,
|
||||
'MESSAGE_TEXT' => $e->getMessage(),
|
||||
'MESSAGE_TITLE' => $this->language->lang('INFORMATION'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$json_response->send([
|
||||
'error' => true,
|
||||
'MESSAGE_TEXT' => $this->language->lang('ASS_ITEM_TYPE_NOT_EXIST'),
|
||||
'MESSAGE_TITLE' => $this->language->lang('INFORMATION'),
|
||||
]);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'cat_delete':
|
||||
case 'delete':
|
||||
$s_item = $action === 'delete';
|
||||
|
||||
$item = $s_item ? $this->operator_item->get_entity()->load($item_id) : null;
|
||||
$category = $this->operator_cat->get_entity()->load($s_item ? $item->get_category() : $category_id);
|
||||
|
||||
$l_mode = $s_item ? 'ITEM' : 'CATEGORY';
|
||||
$u_mode = $this->u_action . ($s_item ? "&cid={$item->get_category()}" : '');
|
||||
|
||||
if ($s_item)
|
||||
{
|
||||
$type = $this->items_manager->get_type($item->get_type());
|
||||
|
||||
if ($type !== null && $type->is_admin_authed() === false)
|
||||
{
|
||||
trigger_error($this->language->lang('ACP_ASS_ITEM_TYPE_NO_AUTH'), E_USER_WARNING);
|
||||
}
|
||||
}
|
||||
|
||||
if (confirm_box(true))
|
||||
{
|
||||
if (!$s_item)
|
||||
{
|
||||
$this->operator_cat->delete_category($category_id);
|
||||
}
|
||||
|
||||
$this->operator_item->delete_items($category_id, $item_id);
|
||||
$this->operator_inv->delete_items($category_id, $item_id);
|
||||
|
||||
$log_title = $s_item ? $item->get_title() : $category->get_title();
|
||||
|
||||
$this->log->add('admin', $this->user->data['user_id'], $this->user->ip, "LOG_ACP_ASS_{$l_mode}_DELETED", false, [$log_title]);
|
||||
|
||||
$message = $this->language->lang("ACP_ASS_{$l_mode}_DELETE_SUCCESS");
|
||||
|
||||
if (!$this->request->is_ajax())
|
||||
{
|
||||
$message .= adm_back_link($u_mode);
|
||||
}
|
||||
|
||||
trigger_error($message);
|
||||
}
|
||||
else
|
||||
{
|
||||
confirm_box(false, "ACP_ASS_{$l_mode}_DELETE", build_hidden_fields([
|
||||
'action' => $action,
|
||||
'cid' => $category_id,
|
||||
'iid' => $item_id,
|
||||
]));
|
||||
|
||||
redirect($u_mode);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'cat_add':
|
||||
case 'cat_edit':
|
||||
case 'add':
|
||||
case 'copy':
|
||||
case 'edit':
|
||||
$s_edit = in_array($action, ['edit', 'cat_edit']);
|
||||
$s_item = in_array($action, ['add', 'copy', 'edit']);
|
||||
|
||||
$entity = $s_item ? $this->operator_item->get_entity() : $this->operator_cat->get_entity();
|
||||
|
||||
if ($s_edit)
|
||||
{
|
||||
try
|
||||
{
|
||||
$entity->load(($s_item ? $item_id : $category_id));
|
||||
}
|
||||
catch (runtime_exception $e)
|
||||
{
|
||||
$message = $this->language->lang($e->getMessage(), $this->language->lang($s_item ? 'ASS_ITEM' : 'ASS_CATEGORY'));
|
||||
trigger_error($message . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
}
|
||||
else if ($s_item)
|
||||
{
|
||||
// Copy an item
|
||||
if ($action === 'copy')
|
||||
{
|
||||
$data = $this->operator_item->get_items_by_id([$item_id], false);
|
||||
|
||||
if (empty($data[0]))
|
||||
{
|
||||
$message = $this->language->lang('ASS_ERROR_NOT_FOUND', $this->language->lang('ASS_ITEM'));
|
||||
trigger_error($message . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$data = array_diff_key($data[0], array_flip([
|
||||
'item_id',
|
||||
'item_title',
|
||||
'item_slug',
|
||||
'item_purchases',
|
||||
'item_stock',
|
||||
'item_create_time',
|
||||
'item_edit_time',
|
||||
'item_conflict',
|
||||
'category_slug',
|
||||
]));
|
||||
|
||||
$entity->import($data);
|
||||
|
||||
$action = 'add';
|
||||
$item_id = 0;
|
||||
$category_id = $entity->get_category();
|
||||
}
|
||||
else
|
||||
{
|
||||
$entity->set_category($category_id);
|
||||
}
|
||||
}
|
||||
|
||||
if ($s_item && $s_edit)
|
||||
{
|
||||
$type = $this->items_manager->get_type($entity->get_type());
|
||||
|
||||
if ($type !== null && $type->is_admin_authed() === false)
|
||||
{
|
||||
$message = $this->language->lang('ACP_ASS_ITEM_TYPE_NO_AUTH');
|
||||
$u_back = $this->u_action . ($entity->get_category() ? '&cid=' . $entity->get_category() : '');
|
||||
|
||||
trigger_error($message . adm_back_link($u_back), E_USER_WARNING);
|
||||
}
|
||||
}
|
||||
|
||||
$this->add_edit_data($entity, $s_item);
|
||||
|
||||
$this->template->assign_vars([
|
||||
'S_ASS_ADD' => !$s_edit,
|
||||
'S_ASS_EDIT' => $s_edit,
|
||||
]);
|
||||
break;
|
||||
}
|
||||
|
||||
if ($s_items)
|
||||
{
|
||||
/** @var item $entity */
|
||||
foreach ($this->operator_item->get_items($category_id) as $entity)
|
||||
{
|
||||
/** @var item_type $type */
|
||||
$type = $this->items_manager->get_type($entity->get_type());
|
||||
|
||||
$s_auth = $type !== null ? $type->is_admin_authed() : true;
|
||||
|
||||
$this->template->assign_block_vars('ass_items', [
|
||||
'ID' => $entity->get_id(),
|
||||
'TITLE' => $entity->get_title(),
|
||||
'SLUG' => $entity->get_slug(),
|
||||
'ICON' => $entity->get_icon(),
|
||||
'CONFLICT' => $entity->get_conflict(),
|
||||
|
||||
'S_ACTIVE' => $entity->get_active(),
|
||||
'S_AVAILABLE' => $this->operator_item->is_available($entity),
|
||||
'S_AUTH' => $s_auth,
|
||||
|
||||
'U_DELETE' => $s_auth ? "{$this->u_action}&action=delete&iid={$entity->get_id()}" : '',
|
||||
'U_COPY' => $s_auth ? "{$this->u_action}&action=copy&iid={$entity->get_id()}" : '',
|
||||
'U_EDIT' => $s_auth ? "{$this->u_action}&action=edit&iid={$entity->get_id()}" : '',
|
||||
]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/** @var category $entity */
|
||||
foreach ($this->operator_cat->get_categories() as $entity)
|
||||
{
|
||||
$this->template->assign_block_vars('ass_categories', [
|
||||
'ID' => $entity->get_id(),
|
||||
'TITLE' => $entity->get_title(),
|
||||
'SLUG' => $entity->get_slug(),
|
||||
'ICON' => $entity->get_icon(),
|
||||
'CONFLICT' => $entity->get_conflicts(),
|
||||
|
||||
'S_ACTIVE' => $entity->get_active(),
|
||||
'S_AUTH' => true,
|
||||
|
||||
'U_DELETE' => "{$this->u_action}&action=cat_delete&cid={$entity->get_id()}",
|
||||
'U_EDIT' => "{$this->u_action}&action=cat_edit&cid={$entity->get_id()}",
|
||||
'U_VIEW' => "{$this->u_action}&cid={$entity->get_id()}",
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
$this->template->assign_vars([
|
||||
'S_ITEMS' => $s_items,
|
||||
|
||||
'U_ACTION' => $this->u_action . ($action ? "&action=$action" : '') . ($category_id ? "&cid=$category_id" : '') . ($item_id ? "&iid=$item_id" : ''),
|
||||
'U_ASS_ADD' => $this->u_action . '&action=' . ($s_items ? 'add' : 'cat_add') . ($category_id ? "&cid=$category_id" : ''),
|
||||
'U_BACK' => $this->u_action,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle adding and editing an entity.
|
||||
*
|
||||
* @param item|category $entity The entity
|
||||
* @param bool $s_item Whether it's an item or a category
|
||||
* @return void
|
||||
* @access protected
|
||||
*/
|
||||
protected function add_edit_data($entity, $s_item)
|
||||
{
|
||||
$errors = [];
|
||||
$submit = $this->request->is_set_post('submit');
|
||||
$s_edit = (bool) $entity->get_id();
|
||||
$l_mode = $s_item ? 'ITEM' : 'CATEGORY';
|
||||
|
||||
$form_key = 'add_edit_categories';
|
||||
add_form_key($form_key);
|
||||
|
||||
$data = [
|
||||
'active' => $this->request->variable('active', false),
|
||||
'title' => $this->request->variable('title', '', true),
|
||||
'slug' => $this->request->variable('slug', '', true),
|
||||
'icon' => $this->request->variable('icon', '', true),
|
||||
'desc' => $this->request->variable('desc', '', true),
|
||||
];
|
||||
|
||||
if ($s_item)
|
||||
{
|
||||
$data += [
|
||||
'type' => $this->request->variable('type', '', true),
|
||||
'price' => $this->request->variable('price', 0.00),
|
||||
'stock_unlimited' => $this->request->variable('stock_unlimited', false),
|
||||
'stock' => $this->request->variable('stock', 0),
|
||||
'stock_threshold' => $this->request->variable('stock_threshold', 0),
|
||||
'gift' => $this->request->variable('gift', false),
|
||||
'gift_only' => $this->request->variable('gift_only', false),
|
||||
'gift_type' => $this->request->variable('gift_type', false),
|
||||
'gift_percentage' => $this->request->variable('gift_percentage', 0),
|
||||
'gift_price' => $this->request->variable('gift_price', 0.00),
|
||||
'sale_price' => $this->request->variable('sale_price', 0.00),
|
||||
'sale_start' => $this->request->variable('sale_start', ''),
|
||||
'sale_until' => $this->request->variable('sale_until', ''),
|
||||
'featured_start' => $this->request->variable('featured_start', ''),
|
||||
'featured_until' => $this->request->variable('featured_until', ''),
|
||||
'available_start' => $this->request->variable('available_start', ''),
|
||||
'available_until' => $this->request->variable('available_until', ''),
|
||||
'count' => $this->request->variable('count', 0),
|
||||
'stack' => $this->request->variable('stack', 1),
|
||||
'refund_string' => $this->request->variable('refund_string', '', true),
|
||||
'expire_string' => $this->request->variable('expire_string', '', true),
|
||||
'delete_string' => $this->request->variable('delete_string', '', true),
|
||||
'background' => $this->request->variable('background', '', true),
|
||||
'images' => $this->request->variable('images', [''], true),
|
||||
'related_enabled' => $this->request->variable('related_enabled', false),
|
||||
'related_items' => $this->request->variable('related_items', [0]),
|
||||
];
|
||||
|
||||
$post_variables = $this->request->get_super_global(\phpbb\request\request_interface::POST);
|
||||
|
||||
$data['data'] = isset($post_variables['data']) ? $this->request->escape($post_variables['data'], true) : [];
|
||||
}
|
||||
|
||||
if ($submit)
|
||||
{
|
||||
if (!check_form_key($form_key))
|
||||
{
|
||||
$errors[] = $this->language->lang('FORM_INVALID');
|
||||
}
|
||||
|
||||
foreach ($data as $key => $value)
|
||||
{
|
||||
try
|
||||
{
|
||||
$entity->{"set_{$key}"}($value);
|
||||
|
||||
if ($key === 'slug' && $value !== $entity->get_slug())
|
||||
{
|
||||
$s_purge = true;
|
||||
}
|
||||
}
|
||||
catch (runtime_exception $e)
|
||||
{
|
||||
$errors[] = $this->get_error_message($e, $l_mode);
|
||||
}
|
||||
}
|
||||
|
||||
if ($s_item)
|
||||
{
|
||||
$type = $this->items_manager->get_type($entity->get_type());
|
||||
|
||||
if ($type === null)
|
||||
{
|
||||
$errors[] = $this->language->lang('ASS_ITEM_TYPE_NOT_EXIST');
|
||||
}
|
||||
else
|
||||
{
|
||||
$errors += (array) $type->validate_acp_data($entity->get_data());
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($errors))
|
||||
{
|
||||
$function = $s_edit ? 'save' : 'insert';
|
||||
$message = $s_edit ? "ACP_ASS_{$l_mode}_EDIT_SUCCESS" : "ACP_ASS_{$l_mode}_ADD_SUCCESS";
|
||||
$action = $s_edit ? "LOG_ACP_ASS_{$l_mode}_EDITED" : "LOG_ACP_ASS_{$l_mode}_ADDED";
|
||||
|
||||
try
|
||||
{
|
||||
$entity->$function();
|
||||
|
||||
$this->log->add('admin', $this->user->data['user_id'], $this->user->ip, $action, false, [$entity->get_title()]);
|
||||
|
||||
if (!empty($s_purge))
|
||||
{
|
||||
$this->cache->purge();
|
||||
}
|
||||
|
||||
$return = $this->u_action . ($s_item ? "&cid={$entity->get_category()}" : '');
|
||||
|
||||
meta_refresh(3, $return);
|
||||
|
||||
trigger_error($this->language->lang($message) . adm_back_link($return));
|
||||
}
|
||||
catch (runtime_exception $e)
|
||||
{
|
||||
$errors[] = $this->get_error_message($e, $l_mode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->generate_bbcodes();
|
||||
|
||||
if ($s_item)
|
||||
{
|
||||
$type = $this->items_manager->get_type($entity->get_type());
|
||||
|
||||
$this->items_manager->set_types_for_select($entity->get_type());
|
||||
|
||||
$this->template->assign_vars($this->operator_item->get_variables($entity, 'ITEM_', false));
|
||||
|
||||
$this->template->assign_vars([
|
||||
'ITEM_HELP_DATA' => $this->get_help_data(array_keys($data), $s_edit),
|
||||
|
||||
'T_ITEM_TEMPLATE' => $type !== null ? $type->get_acp_template($entity->get_data()) : '',
|
||||
|
||||
'U_ITEM_IMAGE' => $this->u_action . '&m=images&action=select_file&image=',
|
||||
'U_ITEM_RESOLVE' => $this->u_action . '&iid=' . $entity->get_id() . '&action=resolve',
|
||||
'U_ITEM_TYPE' => $this->u_action . '&iid=' . $entity->get_id() . '&action=type',
|
||||
'U_ITEM_ERROR_LOG' => append_sid("{$this->admin_path}index.{$this->php_ext}", [
|
||||
'i' => 'acp_logs',
|
||||
'mode' => 'admin',
|
||||
'keywords' => urlencode(htmlspecialchars_decode($entity->get_title())),
|
||||
]),
|
||||
]);
|
||||
|
||||
$this->set_related_items_for_select($entity->get_id(), $entity->get_related_items());
|
||||
|
||||
if ($s_edit && !$submit && $type === null)
|
||||
{
|
||||
$errors[] = $this->language->lang('ASS_ITEM_TYPE_NOT_EXIST');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->template->assign_vars($this->operator_cat->get_variables($entity, 'CATEGORY_', false));
|
||||
}
|
||||
|
||||
$this->template->assign_vars([
|
||||
'ASS_ERRORS' => $errors,
|
||||
'DATE_FORMAT' => $this->time->get_format(),
|
||||
'TIMEZONE' => $this->time->get_timezone(),
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate BBCodes for a textarea editor.
|
||||
*
|
||||
* @return void
|
||||
* @access protected
|
||||
*/
|
||||
protected function generate_bbcodes()
|
||||
{
|
||||
include_once $this->root_path . 'includes/functions_display.' . $this->php_ext;
|
||||
|
||||
$this->language->add_lang('posting');
|
||||
|
||||
display_custom_bbcodes();
|
||||
|
||||
$this->template->assign_vars([
|
||||
'S_BBCODE_IMG' => true,
|
||||
'S_BBCODE_QUOTE' => true,
|
||||
'S_BBCODE_FLASH' => true,
|
||||
'S_LINKS_ALLOWED' => true,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a localised error message from a thrown exception.
|
||||
*
|
||||
* @param runtime_exception $e The thrown exception
|
||||
* @param string $mode The mode (ITEM|CATEGORY)
|
||||
* @return string The localised error message.
|
||||
* @access protected
|
||||
*/
|
||||
protected function get_error_message(runtime_exception $e, $mode)
|
||||
{
|
||||
$params = $e->get_parameters();
|
||||
|
||||
$field = array_shift($params);
|
||||
$field = $field ? "ACP_ASS_{$mode}_{$field}" : "ASS_{$mode}";
|
||||
|
||||
$params = array_merge([$this->language->lang($field)], $params);
|
||||
|
||||
return $this->language->lang_array($e->getMessage(), $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* The item's data keys.
|
||||
*
|
||||
* @param array $data Item's data keys
|
||||
* @param bool $s_edit Whether or not the item is being edited
|
||||
* @return array Item help data values
|
||||
* @access protected
|
||||
*/
|
||||
protected function get_help_data(array $data, $s_edit)
|
||||
{
|
||||
$this->language->add_lang('ass_acp_help', 'phpbbstudio/ass');
|
||||
|
||||
$data = array_filter($data, function($value) {
|
||||
return $value !== 'data' && strpos($value, '_until') === false;
|
||||
});
|
||||
|
||||
if ($s_edit)
|
||||
{
|
||||
$data = array_merge($data, ['dates', 'states', 'stock_info', 'sale_info']);
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Assign categories and items to the template for the related items selection.
|
||||
*
|
||||
* @param int $item_id The item identifiers
|
||||
* @param array $item_ids The related items identifiers
|
||||
* @return void
|
||||
* @access protected
|
||||
*/
|
||||
protected function set_related_items_for_select($item_id, array $item_ids)
|
||||
{
|
||||
/** @var category $category */
|
||||
foreach ($this->operator_cat->get_categories() as $category)
|
||||
{
|
||||
$this->template->assign_block_vars('categories', array_merge([
|
||||
'S_INACTIVE' => !$category->get_active(),
|
||||
], $this->operator_cat->get_variables($category)));
|
||||
|
||||
/** @var item $item */
|
||||
foreach ($this->operator_item->get_items($category->get_id()) as $item)
|
||||
{
|
||||
if ($item->get_id() === $item_id)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$this->template->assign_block_vars('categories.items', array_merge([
|
||||
'S_INACTIVE' => !$item->get_active(),
|
||||
'S_SELECTED' => in_array($item->get_id(), $item_ids),
|
||||
], $this->operator_item->get_variables($item)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set custom form action.
|
||||
*
|
||||
* @param string $u_action Custom form action
|
||||
* @return self $this This controller for chaining calls
|
||||
* @access public
|
||||
*/
|
||||
public function set_page_url($u_action)
|
||||
{
|
||||
$this->u_action = $u_action;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
246
ext/phpbbstudio/ass/controller/acp_logs_controller.php
Normal file
246
ext/phpbbstudio/ass/controller/acp_logs_controller.php
Normal file
@@ -0,0 +1,246 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* phpBB Studio - Advanced Shop System. An extension for the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) 2019, phpBB Studio, https://www.phpbbstudio.com
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbbstudio\ass\controller;
|
||||
|
||||
use phpbbstudio\ass\entity\category;
|
||||
use phpbbstudio\ass\entity\item;
|
||||
use phpbbstudio\ass\items\type\item_type;
|
||||
|
||||
/**
|
||||
* phpBB Studio - Advanced Shop System: ACP Logs controller
|
||||
*/
|
||||
class acp_logs_controller
|
||||
{
|
||||
/** @var \phpbb\config\config */
|
||||
protected $config;
|
||||
|
||||
/** @var \phpbbstudio\ass\items\manager */
|
||||
protected $items_manager;
|
||||
|
||||
/** @var \phpbb\language\language */
|
||||
protected $language;
|
||||
|
||||
/** @var \phpbbstudio\ass\helper\log */
|
||||
protected $log;
|
||||
|
||||
/** @var \phpbb\log\log */
|
||||
protected $log_phpbb;
|
||||
|
||||
/** @var \phpbbstudio\ass\operator\category */
|
||||
protected $operator_cat;
|
||||
|
||||
/** @var \phpbbstudio\ass\operator\item */
|
||||
protected $operator_item;
|
||||
|
||||
/** @var \phpbb\pagination */
|
||||
protected $pagination;
|
||||
|
||||
/** @var \phpbb\request\request */
|
||||
protected $request;
|
||||
|
||||
/** @var \phpbb\template\template */
|
||||
protected $template;
|
||||
|
||||
/** @var \phpbb\user */
|
||||
protected $user;
|
||||
|
||||
/** @var string Custom form action */
|
||||
protected $u_action;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param \phpbb\config\config $config Config object
|
||||
* @param \phpbbstudio\ass\items\manager $items_manager Items manager object
|
||||
* @param \phpbb\language\language $language Language object
|
||||
* @param \phpbbstudio\ass\helper\log $log Log helper object
|
||||
* @param \phpbb\log\log $log_phpbb Log object
|
||||
* @param \phpbbstudio\ass\operator\category $operator_cat Category operator object
|
||||
* @param \phpbbstudio\ass\operator\item $operator_item Item operator object
|
||||
* @param \phpbb\pagination $pagination Pagination object
|
||||
* @param \phpbb\request\request $request Request object
|
||||
* @param \phpbb\template\template $template Template object
|
||||
* @param \phpbb\user $user User object
|
||||
* @return void
|
||||
* @access public
|
||||
*/
|
||||
public function __construct(
|
||||
\phpbb\config\config $config,
|
||||
\phpbbstudio\ass\items\manager $items_manager,
|
||||
\phpbb\language\language $language,
|
||||
\phpbbstudio\ass\helper\log $log,
|
||||
\phpbb\log\log $log_phpbb,
|
||||
\phpbbstudio\ass\operator\category $operator_cat,
|
||||
\phpbbstudio\ass\operator\item $operator_item,
|
||||
\phpbb\pagination $pagination,
|
||||
\phpbb\request\request $request,
|
||||
\phpbb\template\template $template,
|
||||
\phpbb\user $user
|
||||
)
|
||||
{
|
||||
$this->config = $config;
|
||||
$this->items_manager = $items_manager;
|
||||
$this->language = $language;
|
||||
$this->log = $log;
|
||||
$this->log_phpbb = $log_phpbb;
|
||||
$this->operator_cat = $operator_cat;
|
||||
$this->operator_item = $operator_item;
|
||||
$this->pagination = $pagination;
|
||||
$this->request = $request;
|
||||
$this->template = $template;
|
||||
$this->user = $user;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle and display the "Logs" ACP mode.
|
||||
*
|
||||
* @return void
|
||||
* @access public
|
||||
*/
|
||||
public function logs()
|
||||
{
|
||||
$this->language->add_lang(['ass_acp_common', 'ass_common'], 'phpbbstudio/ass');
|
||||
|
||||
$show_array = [
|
||||
'all' => ['title' => 'ASS_ALL', 'sql' => ''],
|
||||
'use' => ['title' => 'ASS_USAGES', 'sql' => 'l.item_purchase = 0'],
|
||||
'buy' => ['title' => 'ASS_PURCHASES', 'sql' => 'l.item_purchase = 1 AND l.recipient_id = 0'],
|
||||
'given' => ['title' => 'ASS_GIFTS_GIVEN', 'sql' => 'l.item_purchase = 1 AND l.recipient_id <> 0'],
|
||||
];
|
||||
$sort_array = [
|
||||
'time' => ['title' => 'TIME', 'sql' => 'l.log_time'],
|
||||
'price' => ['title' => 'ASS_ITEM_PRICE', 'sql' => 'l.points_sum'],
|
||||
'item' => ['title' => 'ASS_ITEM_TITLE', 'sql' => 'i.item_title'],
|
||||
'category' => ['title' => 'ASS_CATEGORY_TITLE', 'sql' => 'c.category_title'],
|
||||
'recipient' => ['title' => 'ASS_RECIPIENT_NAME', 'sql' => 'recipient_name'],
|
||||
];
|
||||
$dir_array = [
|
||||
'desc' => ['title' => 'DESCENDING', 'sql' => 'DESC'],
|
||||
'asc' => ['title' => 'ASCENDING', 'sql' => 'ASC'],
|
||||
];
|
||||
|
||||
$page = $this->request->variable('page', 1);
|
||||
$show = $this->request->variable('display', 'all', true);
|
||||
$sort = $this->request->variable('sort', 'time', true);
|
||||
$dir = $this->request->variable('direction', 'desc', true);
|
||||
|
||||
$show = in_array($show, array_keys($show_array)) ? $show : 'all';
|
||||
$sort = in_array($sort, array_keys($sort_array)) ? $sort : 'time';
|
||||
$dir = in_array($dir, array_keys($dir_array)) ? $dir : 'desc';
|
||||
|
||||
$delete_mark = $this->request->variable('del_marked', false, false, \phpbb\request\request_interface::POST);
|
||||
$delete_all = $this->request->variable('del_all', false, false, \phpbb\request\request_interface::POST);
|
||||
$marked = $this->request->variable('mark', [0]);
|
||||
|
||||
$log_action = $this->u_action . "&display={$show}&sort={$sort}&direction={$dir}";
|
||||
|
||||
if (($delete_mark || $delete_all))
|
||||
{
|
||||
if (confirm_box(true))
|
||||
{
|
||||
$this->log->delete($delete_all, $marked);
|
||||
|
||||
$l_delete = $delete_all ? 'ALL' : (count($marked) > 1 ? 'ENTRIES' : 'ENTRY');
|
||||
|
||||
$this->log_phpbb->add('admin', $this->user->data['user_id'], $this->user->ip, "LOG_ACP_ASS_LOG_DELETED_{$l_delete}");
|
||||
|
||||
trigger_error($this->language->lang("ACP_ASS_LOG_DELETED_{$l_delete}") . adm_back_link($log_action . "&page{$page}"));
|
||||
}
|
||||
else
|
||||
{
|
||||
confirm_box(false, $this->language->lang('CONFIRM_OPERATION'), build_hidden_fields([
|
||||
'del_marked' => $delete_mark,
|
||||
'del_all' => $delete_all,
|
||||
'mark' => $marked,
|
||||
]));
|
||||
|
||||
redirect($log_action . "&page{$page}");
|
||||
}
|
||||
}
|
||||
|
||||
$sql_where = $show_array[$show]['sql'];
|
||||
$sql_order = $sort_array[$sort]['sql'];
|
||||
$sql_dir = $dir_array[$dir]['sql'];
|
||||
|
||||
$limit = (int) $this->config['ass_logs_per_page'];
|
||||
$start = ($page - 1) * $limit;
|
||||
|
||||
$total = $this->log->get_user_logs_count($sql_where);
|
||||
$rowset = $this->log->get_user_logs($sql_where, $sql_order, $sql_dir, $limit, $start);
|
||||
|
||||
$categories = $this->operator_cat->get_categories_by_id(array_column($rowset, 'category_id'));
|
||||
$items = $this->operator_item->get_items_by_id(array_column($rowset, 'item_id'));
|
||||
|
||||
foreach ($rowset as $row)
|
||||
{
|
||||
$category_id = (int) $row['category_id'];
|
||||
$item_id = (int) $row['item_id'];
|
||||
|
||||
/** @var category $category */
|
||||
$category = !empty($categories[$category_id]) ? $categories[$category_id] : null;
|
||||
|
||||
/** @var item $item */
|
||||
$item = !empty($items[$item_id]) ? $items[$item_id] : null;
|
||||
|
||||
/** @var item_type $type */
|
||||
$type = $item ? $this->items_manager->get_type($item->get_type()) : null;
|
||||
|
||||
$this->template->assign_block_vars('ass_logs', [
|
||||
'CATEGORY_TITLE' => $category ? $category->get_title() : $this->language->lang('ASS_UNAVAILABLE_CATEGORY'),
|
||||
'ITEM_TITLE' => $item ? $item->get_title() : $this->language->lang('ASS_UNAVAILABLE_ITEM'),
|
||||
|
||||
'LOG_ACTION' => $type ? $this->language->lang($type->get_language('log')) : $this->language->lang('ASS_UNAVAILABLE_' . (!$item ? 'ITEM' : 'TYPE')),
|
||||
'LOG_ID' => $row['log_id'],
|
||||
'LOG_IP' => $row['log_ip'],
|
||||
'LOG_TIME' => $this->user->format_date($row['log_time']),
|
||||
|
||||
'POINTS_NEW' => $row['points_new'],
|
||||
'POINTS_OLD' => $row['points_old'],
|
||||
'POINTS_SUM' => -$row['points_sum'],
|
||||
|
||||
'RECIPIENT' => $row['recipient_id'] ? get_username_string('full', $row['recipient_id'], $row['recipient_name'], $row['recipient_colour']) : '',
|
||||
'USER' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
|
||||
|
||||
'S_PURCHASE' => $row['item_purchase'],
|
||||
'S_GIFT_RECEIVE' => $row['recipient_id'] != 0,
|
||||
]);
|
||||
}
|
||||
|
||||
$this->pagination->generate_template_pagination($log_action, 'pagination', 'page', $total, $limit, $start);
|
||||
|
||||
$this->template->assign_vars([
|
||||
'SORT_DISPLAY' => $show,
|
||||
'SORT_DISPLAY_ARRAY' => $show_array,
|
||||
'SORT_SORT' => $sort,
|
||||
'SORT_SORT_ARRAY' => $sort_array,
|
||||
'SORT_DIR' => $dir,
|
||||
'SORT_DIR_ARRAY' => $dir_array,
|
||||
|
||||
'TOTAL_LOGS' => $this->language->lang('TOTAL_LOGS', $total),
|
||||
|
||||
'U_ACTION' => $this->u_action,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set custom form action.
|
||||
*
|
||||
* @param string $u_action Custom form action
|
||||
* @return self $this This controller for chaining calls
|
||||
* @access public
|
||||
*/
|
||||
public function set_page_url($u_action)
|
||||
{
|
||||
$this->u_action = $u_action;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
444
ext/phpbbstudio/ass/controller/acp_overview_controller.php
Normal file
444
ext/phpbbstudio/ass/controller/acp_overview_controller.php
Normal file
@@ -0,0 +1,444 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* phpBB Studio - Advanced Shop System. An extension for the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) 2019, phpBB Studio, https://www.phpbbstudio.com
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbbstudio\ass\controller;
|
||||
|
||||
/**
|
||||
* phpBB Studio - Advanced Shop System: ACP Overview controller
|
||||
*/
|
||||
class acp_overview_controller
|
||||
{
|
||||
/** @var \phpbb\config\config */
|
||||
protected $config;
|
||||
|
||||
/** @var \phpbb\config\db_text */
|
||||
protected $config_text;
|
||||
|
||||
/** @var \phpbb\db\driver\driver_interface */
|
||||
protected $db;
|
||||
|
||||
/** @var \phpbb\language\language */
|
||||
protected $language;
|
||||
|
||||
/** @var \phpbbstudio\ass\operator\item */
|
||||
protected $operator_item;
|
||||
|
||||
/** @var \phpbb\textformatter\s9e\parser */
|
||||
protected $parser;
|
||||
|
||||
/** @var \phpbb\textformatter\s9e\renderer */
|
||||
protected $renderer;
|
||||
|
||||
/** @var \phpbb\request\request */
|
||||
protected $request;
|
||||
|
||||
/** @var \phpbb\template\template */
|
||||
protected $template;
|
||||
|
||||
/** @var \phpbb\user_loader */
|
||||
protected $user_loader;
|
||||
|
||||
/** @var \phpbb\textformatter\s9e\utils */
|
||||
protected $utils;
|
||||
|
||||
/** @var string Categories table */
|
||||
protected $categories_table;
|
||||
|
||||
/** @var string Items table */
|
||||
protected $items_table;
|
||||
|
||||
/** @var string Logs table */
|
||||
protected $logs_table;
|
||||
|
||||
/** @var string Custom form action */
|
||||
protected $u_action;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param \phpbb\config\config $config Config object
|
||||
* @param \phpbb\config\db_text $config_text Config text object
|
||||
* @param \phpbb\db\driver\driver_interface $db Database object
|
||||
* @param \phpbb\language\language $language Language object
|
||||
* @param \phpbbstudio\ass\operator\item $operator_item Item operator object
|
||||
* @param \phpbb\textformatter\s9e\parser $parser Text formatter parser object
|
||||
* @param \phpbb\textformatter\s9e\renderer $renderer Text formatter renderer object
|
||||
* @param \phpbb\request\request $request Request object
|
||||
* @param \phpbb\template\template $template Template object
|
||||
* @param \phpbb\user_loader $user_loader User loader object
|
||||
* @param \phpbb\textformatter\s9e\utils $utils Text formatter utilities object
|
||||
* @param string $categories_table Categories table
|
||||
* @param string $items_table Items table
|
||||
* @param string $logs_table Logs table
|
||||
* @return void
|
||||
* @access public
|
||||
*/
|
||||
public function __construct(
|
||||
\phpbb\config\config $config,
|
||||
\phpbb\config\db_text $config_text,
|
||||
\phpbb\db\driver\driver_interface $db,
|
||||
\phpbb\language\language $language,
|
||||
\phpbbstudio\ass\operator\item $operator_item,
|
||||
\phpbb\textformatter\s9e\parser $parser,
|
||||
\phpbb\textformatter\s9e\renderer $renderer,
|
||||
\phpbb\request\request $request,
|
||||
\phpbb\template\template $template,
|
||||
\phpbb\user_loader $user_loader,
|
||||
\phpbb\textformatter\s9e\utils $utils,
|
||||
$categories_table,
|
||||
$items_table,
|
||||
$logs_table
|
||||
)
|
||||
{
|
||||
$this->config = $config;
|
||||
$this->config_text = $config_text;
|
||||
$this->db = $db;
|
||||
$this->language = $language;
|
||||
$this->operator_item = $operator_item;
|
||||
$this->parser = $parser;
|
||||
$this->renderer = $renderer;
|
||||
$this->request = $request;
|
||||
$this->template = $template;
|
||||
$this->user_loader = $user_loader;
|
||||
$this->utils = $utils;
|
||||
|
||||
$this->categories_table = $categories_table;
|
||||
$this->items_table = $items_table;
|
||||
$this->logs_table = $logs_table;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle and display the "Overview" ACP mode.
|
||||
*
|
||||
* @return void
|
||||
* @access public
|
||||
*/
|
||||
public function overview()
|
||||
{
|
||||
$this->language->add_lang(['ass_acp_common', 'ass_common'], 'phpbbstudio/ass');
|
||||
|
||||
$action = $this->request->variable('action', '', true);
|
||||
$submit = $this->request->is_set_post('submit');
|
||||
|
||||
$notes = $this->config_text->get('ass_admin_notes');
|
||||
|
||||
if ($action === 'notes')
|
||||
{
|
||||
if ($submit)
|
||||
{
|
||||
$notes = $this->parser->parse($this->request->variable('notes', '', true));
|
||||
|
||||
$this->config_text->set('ass_admin_notes', $notes);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->template->assign_vars([
|
||||
'NOTES_EDIT' => $this->utils->unparse($notes),
|
||||
'S_NOTES' => true,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
$item_modes = [
|
||||
'featured', 'featured_coming', 'sale', 'sale_coming',
|
||||
'low_stock', 'low_sellers', 'top_sellers', 'recent',
|
||||
];
|
||||
|
||||
foreach ($item_modes as $mode)
|
||||
{
|
||||
$items = $this->get_items($mode);
|
||||
|
||||
foreach ($items as $item)
|
||||
{
|
||||
$this->template->assign_block_vars($mode, $this->operator_item->get_variables($item));
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($this->get_recent() as $row)
|
||||
{
|
||||
$item = $this->operator_item->get_entity()->import($row);
|
||||
|
||||
$this->template->assign_block_vars('purchases', array_merge(
|
||||
$this->operator_item->get_variables($item),
|
||||
['PURCHASE_TIME' => (int) $row['log_time']]
|
||||
));
|
||||
}
|
||||
|
||||
$buyers = $this->get_users('buyers');
|
||||
$gifters = $this->get_users('gifters');
|
||||
$spenders = $this->get_users('spenders');
|
||||
|
||||
$this->user_loader->load_users(array_merge(array_keys($buyers), array_keys($gifters), array_keys($spenders)));
|
||||
|
||||
$users = [
|
||||
'buyers' => $buyers,
|
||||
'gifters' => $gifters,
|
||||
'spenders' => $spenders,
|
||||
];
|
||||
|
||||
foreach ($users as $user_mode => $users_array)
|
||||
{
|
||||
foreach ($users_array as $user_id => $count)
|
||||
{
|
||||
$this->template->assign_block_vars($user_mode, [
|
||||
'NAME' => $this->user_loader->get_username($user_id, 'full'),
|
||||
'AVATAR' => $this->user_loader->get_avatar($user_id),
|
||||
'COUNT' => $count,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
$this->template->assign_vars([
|
||||
'COUNTS' => $this->get_counts(),
|
||||
'NOTES' => $notes ? $this->renderer->render(htmlspecialchars_decode($notes, ENT_COMPAT)) : '',
|
||||
|
||||
'GIFTING_ENABLED' => (bool) $this->config['ass_gift_enabled'],
|
||||
'NO_IMAGE_ICON' => (string) $this->config['ass_no_image_icon'],
|
||||
'SHOP_ACTIVE' => (bool) $this->config['ass_active'],
|
||||
'SHOP_ENABLED' => (bool) $this->config['ass_enabled'],
|
||||
|
||||
'U_ACTION' => $this->u_action,
|
||||
'U_NOTES' => $this->u_action . '&action=notes',
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get items for a specific mode.
|
||||
*
|
||||
* @param string $mode The item mode (featured|sale|etc..)
|
||||
* @return array Item entities
|
||||
* @access protected
|
||||
*/
|
||||
protected function get_items($mode)
|
||||
{
|
||||
$sql_array = [
|
||||
'SELECT' => 'i.*',
|
||||
'FROM' => [$this->items_table => 'i'],
|
||||
'WHERE' => $this->get_sql_where($mode),
|
||||
'ORDER_BY' => $this->get_sql_order($mode),
|
||||
];
|
||||
|
||||
$sql = $this->db->sql_build_query('SELECT', $sql_array);
|
||||
$result = $this->db->sql_query_limit($sql, 5);
|
||||
$rowset = $this->db->sql_fetchrowset($result);
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
return $this->operator_item->get_entities($rowset);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get recent items.
|
||||
*
|
||||
* @return array Item entities
|
||||
* @access protected
|
||||
*/
|
||||
protected function get_recent()
|
||||
{
|
||||
$sql = 'SELECT i.*, l.log_time
|
||||
FROM ' . $this->logs_table . ' l,
|
||||
' . $this->items_table . ' i
|
||||
WHERE i.item_id = l.item_id
|
||||
AND l.item_purchase = 1
|
||||
ORDER BY l.log_time DESC';
|
||||
$result = $this->db->sql_query_limit($sql, 5);
|
||||
$rowset = $this->db->sql_fetchrowset($result);
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
return (array) $rowset;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get users for a specific mode.
|
||||
*
|
||||
* @param string $mode The mode (buyers|gifters|spenders)
|
||||
* @return array User rows
|
||||
* @access protected
|
||||
*/
|
||||
protected function get_users($mode)
|
||||
{
|
||||
$users = [];
|
||||
|
||||
switch ($mode)
|
||||
{
|
||||
case 'buyers':
|
||||
$select = 'COUNT(log_id)';
|
||||
$where = ' WHERE recipient_id = 0';
|
||||
break;
|
||||
|
||||
case 'gifters':
|
||||
$select = 'COUNT(log_id)';
|
||||
$where = ' WHERE recipient_id <> 0';
|
||||
break;
|
||||
|
||||
case 'spenders':
|
||||
default:
|
||||
$select = 'SUM(points_sum)';
|
||||
$where = '';
|
||||
break;
|
||||
}
|
||||
|
||||
$sql = 'SELECT ' . $select . ' as count, user_id
|
||||
FROM ' . $this->logs_table . $where . '
|
||||
GROUP BY user_id
|
||||
ORDER BY count DESC';
|
||||
$result = $this->db->sql_query_limit($sql, 5);
|
||||
while ($row = $this->db->sql_fetchrow($result))
|
||||
{
|
||||
$users[(int) $row['user_id']] = $row['count'];
|
||||
}
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
return (array) $users;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get counts for various things.
|
||||
*
|
||||
* @return array Array of counts
|
||||
* @access protected
|
||||
*/
|
||||
protected function get_counts()
|
||||
{
|
||||
$counts = [
|
||||
'categories' => (int) $this->db->get_row_count($this->categories_table),
|
||||
'items' => (int) $this->db->get_row_count($this->items_table),
|
||||
];
|
||||
|
||||
$sql = 'SELECT COUNT(i.item_id) as count
|
||||
FROM ' . $this->items_table . ' i
|
||||
WHERE ' . $this->get_sql_where('featured');
|
||||
$result = $this->db->sql_query_limit($sql , 1);
|
||||
$counts['featured'] = (int) $this->db->sql_fetchfield('count');
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
$sql = 'SELECT COUNT(i.item_id) as count
|
||||
FROM ' . $this->items_table . ' i
|
||||
WHERE ' . $this->get_sql_where('sale');
|
||||
$result = $this->db->sql_query_limit($sql , 1);
|
||||
$counts['sale'] = (int) $this->db->sql_fetchfield('count');
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
$sql = 'SELECT SUM(item_purchases) as count
|
||||
FROM ' . $this->items_table;
|
||||
$result = $this->db->sql_query_limit($sql , 1);
|
||||
$counts['purchases'] = (int) $this->db->sql_fetchfield('count');
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
$sql = 'SELECT SUM(points_sum) as count
|
||||
FROM ' . $this->logs_table;
|
||||
$result = $this->db->sql_query_limit($sql , 1);
|
||||
$counts['spent'] = (double) $this->db->sql_fetchfield('count');
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
$sql = 'SELECT COUNT(item_conflict) as count
|
||||
FROM ' . $this->items_table . '
|
||||
WHERE item_conflict = 1';
|
||||
$result = $this->db->sql_query_limit($sql , 1);
|
||||
$counts['errors'] = (double) $this->db->sql_fetchfield('count');
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
return $counts;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the SQL WHERE statement for a specific mode
|
||||
*
|
||||
* @param string $mode
|
||||
* @return string
|
||||
* @access protected
|
||||
*/
|
||||
protected function get_sql_where($mode)
|
||||
{
|
||||
switch ($mode)
|
||||
{
|
||||
case 'low_stock':
|
||||
return 'i.item_stock_unlimited <> 1';
|
||||
|
||||
case 'featured':
|
||||
return 'i.item_sale_start < ' . time() . '
|
||||
AND i.item_featured_start <> 0
|
||||
AND i.item_featured_until <> 0
|
||||
AND (' . time() . ' BETWEEN i.item_featured_start AND i.item_featured_until)';
|
||||
|
||||
case 'featured_coming':
|
||||
return 'i.item_featured_start <> 0
|
||||
AND i.item_featured_until <> 0
|
||||
AND i.item_featured_start > ' . time();
|
||||
|
||||
case 'sale':
|
||||
return 'i.item_featured_start < ' . time() . '
|
||||
AND i.item_sale_start <> 0
|
||||
AND i.item_sale_until <> 0
|
||||
AND (' . time() . ' BETWEEN i.item_sale_start AND item_sale_until)';
|
||||
|
||||
case 'sale_coming':
|
||||
return 'i.item_sale_start <> 0
|
||||
AND i.item_sale_until <> 0
|
||||
AND i.item_sale_start > ' . time();
|
||||
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the SQL ORDER BY statement for a specific mode.
|
||||
*
|
||||
* @param string $mode
|
||||
* @return string
|
||||
* @access protected
|
||||
*/
|
||||
protected function get_sql_order($mode)
|
||||
{
|
||||
switch ($mode)
|
||||
{
|
||||
case 'low_stock':
|
||||
return 'i.item_stock ASC, i.item_title ASC';
|
||||
|
||||
case 'low_sellers':
|
||||
return 'i.item_purchases ASC, i.item_title ASC';
|
||||
|
||||
case 'top_sellers':
|
||||
return 'i.item_purchases DESC, i.item_title ASC';
|
||||
|
||||
case 'recent':
|
||||
return 'i.item_create_time DESC';
|
||||
|
||||
case 'featured':
|
||||
return 'i.item_featured_until ASC, i.item_title ASC';
|
||||
|
||||
case 'featured_coming':
|
||||
return 'i.item_featured_start ASC, i.item_title ASC';
|
||||
|
||||
case 'sale':
|
||||
return 'i.item_sale_until ASC, i.item_title ASC';
|
||||
|
||||
case 'sale_coming':
|
||||
return 'i.item_sale_start ASC, i.item_title ASC';
|
||||
|
||||
default:
|
||||
return 'i.item_title ASC';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set custom form action.
|
||||
*
|
||||
* @param string $u_action Custom form action
|
||||
* @return self $this This controller for chaining calls
|
||||
* @access public
|
||||
*/
|
||||
public function set_page_url($u_action)
|
||||
{
|
||||
$this->u_action = $u_action;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
341
ext/phpbbstudio/ass/controller/acp_settings_controller.php
Normal file
341
ext/phpbbstudio/ass/controller/acp_settings_controller.php
Normal file
@@ -0,0 +1,341 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* phpBB Studio - Advanced Shop System. An extension for the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) 2019, phpBB Studio, https://www.phpbbstudio.com
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbbstudio\ass\controller;
|
||||
|
||||
/**
|
||||
* phpBB Studio - Advanced Shop System: ACP Settings controller
|
||||
*/
|
||||
class acp_settings_controller
|
||||
{
|
||||
/** @var \phpbbstudio\aps\core\functions */
|
||||
protected $aps_functions;
|
||||
|
||||
/** @var \phpbb\config\config */
|
||||
protected $config;
|
||||
|
||||
/** @var \phpbb\config\db_text */
|
||||
protected $config_text;
|
||||
|
||||
/** @var \phpbb\language\language */
|
||||
protected $language;
|
||||
|
||||
/** @var \phpbb\log\log */
|
||||
protected $log;
|
||||
|
||||
/** @var \phpbb\textformatter\s9e\parser */
|
||||
protected $parser;
|
||||
|
||||
/** @var \phpbb\request\request */
|
||||
protected $request;
|
||||
|
||||
/** @var \phpbb\template\template */
|
||||
protected $template;
|
||||
|
||||
/** @var \phpbb\user */
|
||||
protected $user;
|
||||
|
||||
/** @var \phpbb\textformatter\s9e\utils */
|
||||
protected $utils;
|
||||
|
||||
/** @var string phpBB root path */
|
||||
protected $root_path;
|
||||
|
||||
/** @var string php File extension */
|
||||
protected $php_ext;
|
||||
|
||||
/** @var string Custom form action */
|
||||
protected $u_action;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param \phpbbstudio\aps\core\functions $aps_functions APS Functions object
|
||||
* @param \phpbb\config\config $config Config object
|
||||
* @param \phpbb\config\db_text $config_text Config text object
|
||||
* @param \phpbb\language\language $language Language object
|
||||
* @param \phpbb\log\log $log Log object
|
||||
* @param \phpbb\textformatter\s9e\parser $parser Text formatter parser object
|
||||
* @param \phpbb\request\request $request Request object
|
||||
* @param \phpbb\template\template $template Template object
|
||||
* @param \phpbb\user $user User object
|
||||
* @param \phpbb\textformatter\s9e\utils $utils Text formatter utilities object
|
||||
* @param string $root_path phpBB root path
|
||||
* @param string $php_ext php File extension
|
||||
* @return void
|
||||
* @access public
|
||||
*/
|
||||
public function __construct(
|
||||
\phpbbstudio\aps\core\functions $aps_functions,
|
||||
\phpbb\config\config $config,
|
||||
\phpbb\config\db_text $config_text,
|
||||
\phpbb\language\language $language,
|
||||
\phpbb\log\log $log,
|
||||
\phpbb\textformatter\s9e\parser $parser,
|
||||
\phpbb\request\request $request,
|
||||
\phpbb\template\template $template,
|
||||
\phpbb\user $user,
|
||||
\phpbb\textformatter\s9e\utils $utils,
|
||||
$root_path,
|
||||
$php_ext
|
||||
)
|
||||
{
|
||||
$this->aps_functions = $aps_functions;
|
||||
$this->config = $config;
|
||||
$this->config_text = $config_text;
|
||||
$this->language = $language;
|
||||
$this->log = $log;
|
||||
$this->parser = $parser;
|
||||
$this->request = $request;
|
||||
$this->template = $template;
|
||||
$this->user = $user;
|
||||
$this->utils = $utils;
|
||||
|
||||
$this->root_path = $root_path;
|
||||
$this->php_ext = $php_ext;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle and display the "Settings" ACP mode.
|
||||
*
|
||||
* @return void
|
||||
* @access public
|
||||
*/
|
||||
public function settings()
|
||||
{
|
||||
$this->language->add_lang(['ass_acp_common', 'ass_common'], 'phpbbstudio/ass');
|
||||
|
||||
$errors = [];
|
||||
$submit = $this->request->is_set_post('submit');
|
||||
|
||||
$form_key = 'shop_settings';
|
||||
add_form_key($form_key);
|
||||
|
||||
if ($submit)
|
||||
{
|
||||
if (!check_form_key($form_key))
|
||||
{
|
||||
$errors[] = $this->language->lang('FORM_INVALID');
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->request->variable('action', '', true) === 'locations')
|
||||
{
|
||||
$this->link_locations();
|
||||
}
|
||||
|
||||
$banner_sizes = ['small', 'tiny'];
|
||||
$banner_colours = ['blue', 'red', 'green', 'orange', 'aqua', 'yellow', 'pink', 'violet', 'purple', 'gold', 'silver', 'bronze'];
|
||||
$icon_colours = ['blue', 'red', 'green', 'orange', 'aqua', 'yellow', 'pink', 'violet', 'purple', 'gold', 'silver', 'bronze',
|
||||
'bluegray', 'gray', 'lightgray', 'black', 'white', 'lighten', 'darken'];
|
||||
|
||||
$panels = [
|
||||
'featured' => ['limit' => ['min' => 0, 'max' => 10], 'order' => ['min' => 1, 'max' => 6], 'width' => ['min' => 4, 'max' => 6]],
|
||||
'sale' => ['limit' => ['min' => 0, 'max' => 10], 'order' => ['min' => 1, 'max' => 6], 'width' => ['min' => 4, 'max' => 6]],
|
||||
'featured_sale' => ['limit' => ['min' => 0, 'max' => 4], 'order' => ['min' => 1, 'max' => 6], 'width' => ['min' => 4, 'max' => 6]],
|
||||
'random' => ['limit' => ['min' => 0, 'max' => 20], 'order' => ['min' => 1, 'max' => 6], 'width' => ['min' => 3, 'max' => 4]],
|
||||
'recent' => ['limit' => ['min' => 0, 'max' => 10], 'order' => ['min' => 1, 'max' => 6], 'width' => ['min' => 4, 'max' => 6]],
|
||||
'limited' => ['limit' => ['min' => 0, 'max' => 10], 'order' => ['min' => 1, 'max' => 6], 'width' => ['min' => 4, 'max' => 6]],
|
||||
];
|
||||
|
||||
$options = ['banner_size', 'banner_colour', 'icon_colour', 'icon', 'limit', 'order', 'width'];
|
||||
$settings = [
|
||||
'int' => ['enabled', 'active', 'gift_enabled', 'deactivate_conflicts', 'purge_cache', 'items_per_page', 'logs_per_page', 'carousel_arrows', 'carousel_dots', 'carousel_fade', 'carousel_play', 'carousel_play_speed', 'carousel_speed'],
|
||||
'string' => ['shop_icon', 'inventory_icon', 'no_image_icon', 'gift_icon'],
|
||||
];
|
||||
|
||||
// General settings
|
||||
foreach ($settings as $type => $data)
|
||||
{
|
||||
foreach ($data as $name)
|
||||
{
|
||||
$config_name = "ass_{$name}";
|
||||
$default = $this->config[$config_name];
|
||||
settype($default, $type);
|
||||
|
||||
$this->template->assign_var(utf8_strtoupper($name), $default);
|
||||
|
||||
if ($submit && empty($errors))
|
||||
{
|
||||
$value = $this->request->variable($name, '', $type === 'string');
|
||||
|
||||
if ($value !== $default)
|
||||
{
|
||||
$this->config->set($config_name, $value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Panel settings
|
||||
$variables = [];
|
||||
|
||||
foreach ($panels as $panel => $data)
|
||||
{
|
||||
foreach ($options as $option)
|
||||
{
|
||||
$name = "{$panel}_{$option}";
|
||||
$config_name = "ass_panel_{$name}";
|
||||
|
||||
$default = $this->config[$config_name];
|
||||
$variables[utf8_strtoupper($option)][$panel] = $default;
|
||||
|
||||
if ($submit && empty($errors))
|
||||
{
|
||||
$value = $this->request->variable($name, $default);
|
||||
|
||||
if (isset($data[$option]))
|
||||
{
|
||||
if ($value < $data[$option]['min'])
|
||||
{
|
||||
$field = $this->language->lang('ACP_ASS_PANEL_' . utf8_strtoupper($panel));
|
||||
$field .= $this->language->lang('COLON');
|
||||
$field .= ' ' . $this->language->lang('ACP_ASS_PANEL_' . utf8_strtoupper($option));
|
||||
|
||||
$errors[] = $this->language->lang('ASS_ERROR_TOO_LOW', $field, $data[$option]['min'], $value);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($value > $data[$option]['max'])
|
||||
{
|
||||
$field = $this->language->lang('ACP_ASS_PANEL_' . utf8_strtoupper($panel));
|
||||
$field .= $this->language->lang('COLON');
|
||||
$field .= ' ' . $this->language->lang('ACP_ASS_PANEL_' . utf8_strtoupper($option));
|
||||
|
||||
$errors[] = $this->language->lang('ASS_ERROR_TOO_HIGH', $field, $data[$option]['max'], $value);
|
||||
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if ($value != $default)
|
||||
{
|
||||
$this->config->set($config_name, $value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uksort($panels, function($a, $b)
|
||||
{
|
||||
if ($this->config["ass_panel_{$a}_order"] == $this->config["ass_panel_{$b}_order"])
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return $this->config["ass_panel_{$a}_order"] < $this->config["ass_panel_{$b}_order"] ? -1 : 1;
|
||||
});
|
||||
|
||||
if ($submit && empty($errors))
|
||||
{
|
||||
$message = $this->request->variable('inactive_desc', '', true);
|
||||
$message = $this->parser->parse($message);
|
||||
|
||||
$this->config_text->set('ass_inactive_desc', $message);
|
||||
|
||||
meta_refresh(3, $this->u_action);
|
||||
|
||||
trigger_error($this->language->lang('CONFIG_UPDATED') . adm_back_link($this->u_action));
|
||||
}
|
||||
|
||||
$message = $this->config_text->get('ass_inactive_desc');
|
||||
$message = $this->utils->unparse($message);
|
||||
|
||||
$this->generate_bbcodes();
|
||||
|
||||
$this->template->assign_vars(array_merge($variables, [
|
||||
'ERRORS' => $errors,
|
||||
|
||||
'INACTIVE_DESC' => $message,
|
||||
|
||||
'SHOP_BLOCKS' => $panels,
|
||||
'SHOP_ICON_COLOURS' => $icon_colours,
|
||||
'SHOP_BANNER_COLOURS' => $banner_colours,
|
||||
'SHOP_BANNER_SIZES' => $banner_sizes,
|
||||
|
||||
'U_ACTION' => $this->u_action,
|
||||
'U_LOCATIONS' => $this->u_action . '&action=locations',
|
||||
]));
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate BBCodes for a textarea editor.
|
||||
*
|
||||
* @return void
|
||||
* @access protected
|
||||
*/
|
||||
protected function generate_bbcodes()
|
||||
{
|
||||
include_once $this->root_path . 'includes/functions_display.' . $this->php_ext;
|
||||
|
||||
$this->language->add_lang('posting');
|
||||
|
||||
display_custom_bbcodes();
|
||||
|
||||
$this->template->assign_vars([
|
||||
'S_BBCODE_IMG' => true,
|
||||
'S_BBCODE_QUOTE' => true,
|
||||
'S_BBCODE_FLASH' => true,
|
||||
'S_LINKS_ALLOWED' => true,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the link locations from the settings page.
|
||||
*
|
||||
* @return void
|
||||
* @access protected
|
||||
*/
|
||||
protected function link_locations()
|
||||
{
|
||||
$this->language->add_lang('aps_acp_common', 'phpbbstudio/aps');
|
||||
|
||||
$locations = $this->aps_functions->get_link_locations('ass_link_locations');
|
||||
$variables = ['S_ASS_LOCATIONS' => true];
|
||||
|
||||
foreach ($locations as $location => $status)
|
||||
{
|
||||
$variables[$location] = (bool) $status;
|
||||
}
|
||||
|
||||
$this->template->assign_vars($variables);
|
||||
|
||||
if ($this->request->is_set_post('submit_locations'))
|
||||
{
|
||||
$links = [];
|
||||
|
||||
foreach (array_keys($locations) as $location)
|
||||
{
|
||||
$links[$location] = $this->request->variable((string) $location, false);
|
||||
}
|
||||
|
||||
$this->aps_functions->set_link_locations($links, 'ass_link_locations');
|
||||
|
||||
$this->log->add('admin', $this->user->data['user_id'], $this->user->data['user_ip'], 'LOG_ACP_ASS_LOCATIONS');
|
||||
|
||||
trigger_error($this->language->lang('ACP_APS_LOCATIONS_SUCCESS') . adm_back_link($this->u_action));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set custom form action.
|
||||
*
|
||||
* @param string $u_action Custom form action
|
||||
* @return self $this This controller for chaining calls
|
||||
* @access public
|
||||
*/
|
||||
public function set_page_url($u_action)
|
||||
{
|
||||
$this->u_action = $u_action;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
968
ext/phpbbstudio/ass/controller/inventory_controller.php
Normal file
968
ext/phpbbstudio/ass/controller/inventory_controller.php
Normal file
@@ -0,0 +1,968 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* phpBB Studio - Advanced Shop System. An extension for the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) 2019, phpBB Studio, https://www.phpbbstudio.com
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbbstudio\ass\controller;
|
||||
|
||||
use phpbbstudio\ass\entity\item;
|
||||
use phpbbstudio\ass\entity\category;
|
||||
use phpbbstudio\ass\exceptions\shop_exception;
|
||||
use phpbbstudio\ass\exceptions\shop_item_exception;
|
||||
use phpbbstudio\ass\items\type\item_type;
|
||||
use Symfony\Component\HttpFoundation\RedirectResponse;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
/**
|
||||
* phpBB Studio - Advanced Shop System: Inventory controller
|
||||
*/
|
||||
class inventory_controller
|
||||
{
|
||||
/** @var \phpbbstudio\aps\points\distributor */
|
||||
protected $aps_distributor;
|
||||
|
||||
/** @var \phpbbstudio\aps\core\functions */
|
||||
protected $aps_functions;
|
||||
|
||||
/** @var \phpbb\auth\auth */
|
||||
protected $auth;
|
||||
|
||||
/** @var \phpbb\config\config */
|
||||
protected $config;
|
||||
|
||||
/** @var \phpbbstudio\ass\helper\controller */
|
||||
protected $controller;
|
||||
|
||||
/** @var \phpbb\controller\helper */
|
||||
protected $helper;
|
||||
|
||||
/** @var \phpbbstudio\ass\items\manager */
|
||||
protected $items_manager;
|
||||
|
||||
/** @var \phpbb\language\language */
|
||||
protected $language;
|
||||
|
||||
/** @var \phpbbstudio\ass\helper\log */
|
||||
protected $log;
|
||||
|
||||
/** @var \phpbb\log\log */
|
||||
protected $log_phpbb;
|
||||
|
||||
/** @var \phpbbstudio\ass\operator\category */
|
||||
protected $operator_cat;
|
||||
|
||||
/** @var \phpbbstudio\ass\operator\inventory */
|
||||
protected $operator_inv;
|
||||
|
||||
/** @var \phpbbstudio\ass\operator\item */
|
||||
protected $operator_item;
|
||||
|
||||
/** @var \phpbbstudio\ass\notification\notification */
|
||||
protected $notification;
|
||||
|
||||
/** @var \phpbb\pagination */
|
||||
protected $pagination;
|
||||
|
||||
/** @var \phpbb\request\request */
|
||||
protected $request;
|
||||
|
||||
/** @var \phpbbstudio\ass\helper\router */
|
||||
protected $router;
|
||||
|
||||
/** @var \phpbb\template\template */
|
||||
protected $template;
|
||||
|
||||
/** @var \phpbbstudio\ass\helper\time */
|
||||
protected $time;
|
||||
|
||||
/** @var \phpbb\user */
|
||||
protected $user;
|
||||
|
||||
/** @var \phpbb\user_loader */
|
||||
protected $user_loader;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param \phpbbstudio\aps\points\distributor $aps_distributor APS Distributor object
|
||||
* @param \phpbbstudio\aps\core\functions $aps_functions APS Functions object
|
||||
* @param \phpbb\auth\auth $auth Auth object
|
||||
* @param \phpbb\config\config $config Config object
|
||||
* @param \phpbbstudio\ass\helper\controller $controller ASS Controller helper object
|
||||
* @param \phpbb\controller\helper $helper Controller helper object
|
||||
* @param \phpbbstudio\ass\items\manager $items_manager Items manager object
|
||||
* @param \phpbb\language\language $language Language object
|
||||
* @param \phpbbstudio\ass\helper\log $log Log helper object
|
||||
* @param \phpbb\log\log $log_phpbb Log object
|
||||
* @param \phpbbstudio\ass\operator\category $operator_cat Category operator object
|
||||
* @param \phpbbstudio\ass\operator\inventory $operator_inv Inventory operator object
|
||||
* @param \phpbbstudio\ass\operator\item $operator_item Item operator object
|
||||
* @param \phpbbstudio\ass\notification\notification $notification Notification helper object
|
||||
* @param \phpbb\pagination $pagination Pagination object
|
||||
* @param \phpbb\request\request $request Request object
|
||||
* @param \phpbbstudio\ass\helper\router $router Router helper object
|
||||
* @param \phpbb\template\template $template Template object
|
||||
* @param \phpbbstudio\ass\helper\time $time Time helper object
|
||||
* @param \phpbb\user $user User object
|
||||
* @param \phpbb\user_loader $user_loader User loader object
|
||||
* @return void
|
||||
* @access public
|
||||
*/
|
||||
public function __construct(
|
||||
\phpbbstudio\aps\points\distributor $aps_distributor,
|
||||
\phpbbstudio\aps\core\functions $aps_functions,
|
||||
\phpbb\auth\auth $auth,
|
||||
\phpbb\config\config $config,
|
||||
\phpbbstudio\ass\helper\controller $controller,
|
||||
\phpbb\controller\helper $helper,
|
||||
\phpbbstudio\ass\items\manager $items_manager,
|
||||
\phpbb\language\language $language,
|
||||
\phpbbstudio\ass\helper\log $log,
|
||||
\phpbb\log\log $log_phpbb,
|
||||
\phpbbstudio\ass\operator\category $operator_cat,
|
||||
\phpbbstudio\ass\operator\inventory $operator_inv,
|
||||
\phpbbstudio\ass\operator\item $operator_item,
|
||||
\phpbbstudio\ass\notification\notification $notification,
|
||||
\phpbb\pagination $pagination,
|
||||
\phpbb\request\request $request,
|
||||
\phpbbstudio\ass\helper\router $router,
|
||||
\phpbb\template\template $template,
|
||||
\phpbbstudio\ass\helper\time $time,
|
||||
\phpbb\user $user,
|
||||
\phpbb\user_loader $user_loader
|
||||
)
|
||||
{
|
||||
$this->aps_distributor = $aps_distributor;
|
||||
$this->aps_functions = $aps_functions;
|
||||
$this->auth = $auth;
|
||||
$this->config = $config;
|
||||
$this->controller = $controller;
|
||||
$this->helper = $helper;
|
||||
$this->items_manager = $items_manager;
|
||||
$this->language = $language;
|
||||
$this->log = $log;
|
||||
$this->log_phpbb = $log_phpbb;
|
||||
$this->operator_cat = $operator_cat;
|
||||
$this->operator_inv = $operator_inv;
|
||||
$this->operator_item = $operator_item;
|
||||
$this->notification = $notification;
|
||||
$this->pagination = $pagination;
|
||||
$this->request = $request;
|
||||
$this->router = $router;
|
||||
$this->template = $template;
|
||||
$this->time = $time;
|
||||
$this->user = $user;
|
||||
$this->user_loader = $user_loader;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the purchase/gift action.
|
||||
*
|
||||
* @param string $category_slug The category slug
|
||||
* @param string $item_slug The item slug
|
||||
* @param bool $purchase Whether it's a purchase or a gift
|
||||
* @return Response
|
||||
* @access public
|
||||
*/
|
||||
public function purchase($category_slug, $item_slug, $purchase)
|
||||
{
|
||||
$this->controller->check_shop();
|
||||
|
||||
if (!$this->user->data['is_registered'])
|
||||
{
|
||||
throw new shop_exception(401, 'ASS_ERROR_NOT_AUTH_PURCHASE');
|
||||
}
|
||||
|
||||
$category = $this->operator_cat->load_entity($category_slug);
|
||||
$item = $this->operator_item->load_entity($item_slug, $category->get_slug(), $category->get_id());
|
||||
|
||||
$this->template->assign_vars($this->operator_item->get_variables($item));
|
||||
|
||||
if ($purchase && !$this->auth->acl_get('u_ass_can_purchase'))
|
||||
{
|
||||
throw new shop_exception(403, 'ASS_ERROR_NOT_AUTH_PURCHASE');
|
||||
}
|
||||
|
||||
if (!$this->operator_item->is_available($item))
|
||||
{
|
||||
throw new shop_exception(410, 'ASS_ERROR_NOT_AVAILABLE');
|
||||
}
|
||||
|
||||
if (!$purchase)
|
||||
{
|
||||
if (!$this->auth->acl_get('u_ass_can_gift'))
|
||||
{
|
||||
throw new shop_exception(403, 'ASS_ERROR_NOT_AUTH_GIFT');
|
||||
}
|
||||
|
||||
if (!$item->get_gift())
|
||||
{
|
||||
throw new shop_exception(400, 'ASS_ERROR_NOT_GIFTABLE');
|
||||
}
|
||||
}
|
||||
|
||||
if (!$this->operator_inv->check_price($item, $purchase))
|
||||
{
|
||||
throw new shop_exception(400, 'ASS_ERROR_NOT_ENOUGH_POINTS', [$this->aps_functions->get_name()]);
|
||||
}
|
||||
|
||||
if (!$item->get_stock() && !$item->get_stock_unlimited())
|
||||
{
|
||||
throw new shop_exception(400, 'ASS_ERROR_OUT_OF_STOCK');
|
||||
}
|
||||
|
||||
$stack = 0;
|
||||
$user_id = 0;
|
||||
$username = '';
|
||||
|
||||
if (confirm_box(true) && !$purchase)
|
||||
{
|
||||
$username = $this->request->variable('username', '', true);
|
||||
$user_id = (int) $this->user_loader->load_user_by_username($username);
|
||||
$user2 = $this->user_loader->get_user($user_id);
|
||||
|
||||
if ($user_id === ANONYMOUS)
|
||||
{
|
||||
throw new shop_exception(404, 'NO_USER');
|
||||
}
|
||||
|
||||
if ($user_id === (int) $this->user->data['user_id'])
|
||||
{
|
||||
throw new shop_exception(403, 'ASS_ERROR_NOT_GIFT_SELF');
|
||||
}
|
||||
|
||||
$auth2 = new \phpbb\auth\auth;
|
||||
$auth2->acl($user2);
|
||||
|
||||
if (!$auth2->acl_get('u_ass_can_receive_gift'))
|
||||
{
|
||||
throw new shop_exception(403, 'ASS_ERROR_NOT_AUTH_RECEIVE');
|
||||
}
|
||||
|
||||
$username = $this->user_loader->get_username($user_id, 'no_profile');
|
||||
}
|
||||
|
||||
if ($purchase || (confirm_box(true) && !$purchase))
|
||||
{
|
||||
$stack = $this->operator_inv->get_inventory_stack($item, $user_id);
|
||||
|
||||
if ($stack >= $item->get_stack())
|
||||
{
|
||||
$message = $purchase ? 'ASS_ERROR_STACK_LIMIT' : 'ASS_ERROR_STACK_LIMIT_USER';
|
||||
$params = $purchase ? [] : [$username];
|
||||
|
||||
throw new shop_exception(409, $message, $params);
|
||||
}
|
||||
|
||||
$auth = !empty($auth2) ? $auth2 : $this->auth;
|
||||
|
||||
if ($stack && !$auth->acl_get('u_ass_can_stack'))
|
||||
{
|
||||
$message = $purchase ? 'ASS_ERROR_STACK_NO_AUTH' : 'ASS_ERROR_STACK_NO_AUTH_USER';
|
||||
$params = $purchase ? [] : [$username];
|
||||
|
||||
throw new shop_exception(409, $message, $params);
|
||||
}
|
||||
}
|
||||
|
||||
if (!$this->request->is_ajax())
|
||||
{
|
||||
$this->controller->create_shop('shop', $category, $item);
|
||||
}
|
||||
|
||||
$l_mode = $purchase ? 'ASS_PURCHASE' : 'ASS_GIFT';
|
||||
|
||||
$this->template->assign_vars([
|
||||
'ASS_ITEM_STACK' => $stack,
|
||||
'ASS_PURCHASE_PRICE' => $this->operator_inv->get_price($item, $purchase),
|
||||
'S_ASS_PURCHASE' => $purchase,
|
||||
]);
|
||||
|
||||
if (confirm_box(true))
|
||||
{
|
||||
$points_new = $this->operator_inv->add_purchase($item, $user_id, $purchase);
|
||||
$inventory_id = $this->operator_inv->get_purchase_id();
|
||||
|
||||
$item->set_purchases($item->get_purchases() + 1)
|
||||
->set_stock($item->get_stock() - (int) !$item->get_stock_unlimited())
|
||||
->save();
|
||||
|
||||
if ($item->get_stock() === $item->get_stock_threshold() && !$item->get_stock_unlimited())
|
||||
{
|
||||
$this->notification->low_stock($item);
|
||||
}
|
||||
|
||||
if (!$purchase)
|
||||
{
|
||||
$this->notification->gift($item, $user_id, $inventory_id, $stack + 1);
|
||||
|
||||
if ($this->config['allow_privmsg'] && $this->auth->acl_get('u_sendpm'))
|
||||
{
|
||||
$u_pm = $this->router->regular('ucp', [
|
||||
'i' => 'pm',
|
||||
'mode' => 'compose',
|
||||
'u' => $user_id,
|
||||
], true, $this->request->is_ajax());
|
||||
}
|
||||
}
|
||||
|
||||
$this->log->add($item, true, $this->operator_inv->get_price($item), $user_id);
|
||||
|
||||
$this->template->assign_vars([
|
||||
'NEW_USER_POINTS' => $points_new,
|
||||
'RECIPIENT_NAME' => $username,
|
||||
'U_SEND_PM' => !empty($u_pm) ? $u_pm : '',
|
||||
]);
|
||||
|
||||
if ($this->request->is_ajax())
|
||||
{
|
||||
$this->template->set_filenames([
|
||||
'body' => 'ass_purchase_ajax.html',
|
||||
]);
|
||||
|
||||
$this->template->assign_var('S_PURCHASE_SUCCESS', true);
|
||||
|
||||
return new JsonResponse([
|
||||
'MESSAGE_TITLE' => $this->language->lang($l_mode),
|
||||
'MESSAGE_TEXT' => $this->template->assign_display('body'),
|
||||
'id' => $item->get_id(),
|
||||
'points' => $this->aps_functions->display_points($points_new, false),
|
||||
'stock' => !$item->get_stock_unlimited() ? $item->get_stock() : false,
|
||||
]);
|
||||
}
|
||||
else
|
||||
{
|
||||
return $this->helper->render('ass_purchase.html', $this->language->lang($l_mode));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$ajax = $this->request->is_ajax() ? '_ajax' : '';
|
||||
$body = "ass_purchase{$ajax}.html";
|
||||
|
||||
confirm_box(false, $l_mode, '', $body, $this->helper->get_current_url());
|
||||
|
||||
return new RedirectResponse($this->router->item($category->get_slug(), $item->get_slug()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the inventory and handle any actions.
|
||||
*
|
||||
* @param string $category_slug The category slug
|
||||
* @param string $item_slug The item slug
|
||||
* @param int $index The item index
|
||||
* @param string $action The action
|
||||
* @return Response
|
||||
* @access public
|
||||
*/
|
||||
public function inventory($category_slug, $item_slug, $index, $action)
|
||||
{
|
||||
$index0 = (int) $index - 1;
|
||||
|
||||
$this->controller->check_shop();
|
||||
|
||||
$this->operator_inv->clean_inventory();
|
||||
|
||||
$category = $category_slug ? $this->operator_cat->load_entity($category_slug) : null;
|
||||
$item = $item_slug ? $this->operator_item->load_entity($item_slug, $category->get_slug(), $category->get_id()) : null;
|
||||
|
||||
$s_category = $category !== null;
|
||||
$s_item = $item !== null;
|
||||
|
||||
$inventory = $this->operator_inv->get_inventory($category);
|
||||
|
||||
$cat_ids = array_column($inventory, 'category_id');
|
||||
$item_ids = array_column($inventory, 'item_id', 'inventory_id');
|
||||
|
||||
$categories = $this->operator_cat->get_categories_by_id($cat_ids);
|
||||
$items = $this->operator_item->get_items_by_id($item_ids);
|
||||
|
||||
$variables = [];
|
||||
$item_map = [];
|
||||
|
||||
foreach ($item_ids as $inventory_id => $item_id)
|
||||
{
|
||||
$item_map[$item_id] = array_keys($item_ids, $item_id);
|
||||
}
|
||||
|
||||
if ($s_item && !in_array($item->get_id(), array_keys($items)))
|
||||
{
|
||||
throw new shop_exception(404, 'ASS_ERROR_NOT_OWNED');
|
||||
}
|
||||
|
||||
$this->controller->create_shop('inventory', $category);
|
||||
|
||||
if ($s_category && $s_item && !empty($action))
|
||||
{
|
||||
$type = $this->items_manager->get_type($item->get_type());
|
||||
|
||||
if ($type === null)
|
||||
{
|
||||
$this->log_phpbb->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_ACP_ASS_ITEM_TYPE_ERROR', time(), [$category->get_title(), $item->get_title()]);
|
||||
|
||||
throw new shop_item_exception(404, 'ASS_ITEM_TYPE_NOT_EXIST');
|
||||
}
|
||||
|
||||
$row = $this->operator_inv->get_inventory_item($item, $index0);
|
||||
|
||||
switch ($action)
|
||||
{
|
||||
case 'activate':
|
||||
$type->set_category($category);
|
||||
$type->set_item($item);
|
||||
|
||||
if (confirm_box(true))
|
||||
{
|
||||
try
|
||||
{
|
||||
$success = $type->activate($item->get_data());
|
||||
}
|
||||
catch (shop_item_exception $e)
|
||||
{
|
||||
$this->log_phpbb->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_ACP_ASS_ITEM_TYPE_ERROR', time(), [$category->get_title(), $item->get_title()]);
|
||||
|
||||
if (!$item->get_conflict())
|
||||
{
|
||||
if ($this->config['ass_deactivate_conflicts'])
|
||||
{
|
||||
$item->set_active(false);
|
||||
}
|
||||
|
||||
$item->set_conflict(true)
|
||||
->save();
|
||||
|
||||
$category->set_conflicts($category->get_conflicts() + 1)
|
||||
->save();
|
||||
}
|
||||
|
||||
throw $e;
|
||||
}
|
||||
|
||||
$message = !empty($success) ? $this->language->lang($type->get_language('success')) : 'Some error message';
|
||||
$title = !empty($success) ? $this->language->lang($type->get_language('title')) : $this->language->lang('INFORMATION');
|
||||
|
||||
$count = (int) $row['use_count'];
|
||||
|
||||
if (!empty($success) && empty($success['file']))
|
||||
{
|
||||
$count++;
|
||||
}
|
||||
|
||||
$limit = $item->get_count() && $item->get_count() === $count;
|
||||
$delete = !$item->get_delete_seconds() && $limit;
|
||||
|
||||
$file = !empty($success['file']) ? $success['file'] : false;
|
||||
|
||||
if ($file)
|
||||
{
|
||||
$limit = $item->get_count() && $item->get_count() === ($count + 1);
|
||||
$delete = !$item->get_delete_seconds() && $limit;
|
||||
|
||||
$u_file = $this->router->inventory($item->get_category_slug(), $item->get_slug(), $index, 'download', ['hash' => generate_link_hash($file)]);
|
||||
}
|
||||
else if (!empty($success))
|
||||
{
|
||||
$data = [
|
||||
'use_count' => $count,
|
||||
'use_time' => time(),
|
||||
];
|
||||
|
||||
$delete
|
||||
? $this->operator_inv->delete($row['inventory_id'])
|
||||
: $this->operator_inv->activated($row['inventory_id'], $data);
|
||||
|
||||
$data['use_time'] = $this->user->format_date($data['use_time']);
|
||||
|
||||
$this->log->add($item, false);
|
||||
}
|
||||
|
||||
if ($this->request->is_ajax())
|
||||
{
|
||||
if ($delete)
|
||||
{
|
||||
$inventory_ids = $item_map[$item->get_id()];
|
||||
|
||||
unset($inventory_ids[array_search($row['inventory_id'], $inventory_ids)]);
|
||||
|
||||
if (!empty($inventory_ids))
|
||||
{
|
||||
$inventory_ids = array_values($inventory_ids);
|
||||
|
||||
// Get the first inventory row
|
||||
$row = $inventory[$inventory_ids[0]];
|
||||
|
||||
$stack = $this->get_stack_info($inventory_ids, $index0);
|
||||
|
||||
$vars = $this->get_inventory_variables($category, $item, $row, $stack);
|
||||
|
||||
if (!empty($vars['BACKGROUND_SRC']))
|
||||
{
|
||||
// Fix the incorrect web root path
|
||||
$vars['BACKGROUND_SRC'] = $this->operator_item->get_absolute_background_path($vars['BACKGROUND_SRC']);
|
||||
}
|
||||
|
||||
$this->template->set_filenames(['item' => '@phpbbstudio_ass/ass_item_inventory.html']);
|
||||
$this->template->assign_vars(['item' => $vars]);
|
||||
$next_item = $this->template->assign_display('item');
|
||||
}
|
||||
}
|
||||
|
||||
return new JsonResponse([
|
||||
'MESSAGE_TITLE' => $title,
|
||||
'MESSAGE_TEXT' => $message,
|
||||
'success' => $success,
|
||||
'delete' => $delete,
|
||||
'limit' => $limit ? $this->language->lang('ASS_ITEM_USE_REACHED') : false,
|
||||
'id' => $item->get_id(),
|
||||
'data' => !empty($data) ? $data : false,
|
||||
'file' => !empty($u_file) ? $u_file . '&force=1' : false,
|
||||
'item' => !empty($next_item) ? $next_item : false,
|
||||
'index' => $index,
|
||||
]);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!empty($u_file))
|
||||
{
|
||||
return new RedirectResponse($u_file);
|
||||
}
|
||||
|
||||
return $this->helper->message($message);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
confirm_box(false, $type->get_language(), '', $type->get_confirm_template($item->get_data()), $this->helper->get_current_url());
|
||||
|
||||
return new RedirectResponse($this->router->inventory($item->get_category_slug(), $item->get_slug(), $index));
|
||||
}
|
||||
break;
|
||||
|
||||
case 'download':
|
||||
$hash = $this->request->variable('hash', '', true);
|
||||
|
||||
$data = $type->activate($item->get_data());
|
||||
|
||||
if (empty($data['file']))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
$file = $data['file'];
|
||||
|
||||
if (check_link_hash($hash, $file) && $this->request->is_set('force', \phpbb\request\request_interface::GET))
|
||||
{
|
||||
$count = (int) $row['use_count'] + 1;
|
||||
$limit = $item->get_count() && $item->get_count() === $count;
|
||||
$delete = !$item->get_delete_seconds() && $limit;
|
||||
|
||||
$data = [
|
||||
'use_count' => $count,
|
||||
'use_time' => time(),
|
||||
];
|
||||
|
||||
$delete
|
||||
? $this->operator_inv->delete($row['inventory_id'])
|
||||
: $this->operator_inv->activated($row['inventory_id'], $data);
|
||||
|
||||
$data['use_time'] = $this->user->format_date($data['use_time']);
|
||||
|
||||
$this->log->add($item, false);
|
||||
|
||||
return $this->download($file);
|
||||
}
|
||||
else if ($this->request->is_set('hash', \phpbb\request\request_interface::GET))
|
||||
{
|
||||
$u_file = $this->router->inventory($item->get_category_slug(), $item->get_slug(), $index, 'download', ['hash' => $hash, 'force' => true]);
|
||||
|
||||
$this->template->assign_var('U_DOWNLOAD_FILE', $u_file);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'delete':
|
||||
case 'refund':
|
||||
$l_action = 'ASS_' . utf8_strtoupper($action);
|
||||
|
||||
if (confirm_box(true))
|
||||
{
|
||||
if ($action === 'refund')
|
||||
{
|
||||
if (!empty($row['use_count']))
|
||||
{
|
||||
throw new shop_exception(403, 'ASS_ERROR_NOT_REFUND');
|
||||
}
|
||||
|
||||
$points = $this->aps_functions->equate_points($this->user->data['user_points'], $row['purchase_price']);
|
||||
$points = $this->aps_functions->boundaries($points);
|
||||
$points = $this->aps_functions->format_points($points);
|
||||
|
||||
$this->aps_distributor->update_points($points);
|
||||
|
||||
$item->set_purchases($item->get_purchases() - 1)
|
||||
->set_stock($item->get_stock() + (int) !$item->get_stock_unlimited())
|
||||
->save();
|
||||
}
|
||||
|
||||
$this->operator_inv->delete($row['inventory_id']);
|
||||
|
||||
if ($this->request->is_ajax())
|
||||
{
|
||||
$inventory_ids = $item_map[$item->get_id()];
|
||||
|
||||
unset($inventory_ids[array_search($row['inventory_id'], $inventory_ids)]);
|
||||
|
||||
if (!empty($inventory_ids))
|
||||
{
|
||||
$inventory_ids = array_values($inventory_ids);
|
||||
|
||||
// Get the first inventory row
|
||||
$row = $inventory[$inventory_ids[0]];
|
||||
|
||||
$stack = $this->get_stack_info($inventory_ids, $index0);
|
||||
|
||||
$vars = $this->get_inventory_variables($category, $item, $row, $stack);
|
||||
|
||||
if (!empty($vars['BACKGROUND_SRC']))
|
||||
{
|
||||
// Fix the incorrect web root path
|
||||
$vars['BACKGROUND_SRC'] = $this->operator_item->get_absolute_background_path($vars['BACKGROUND_SRC']);
|
||||
}
|
||||
|
||||
$this->template->set_filenames(['item' => '@phpbbstudio_ass/ass_item_inventory.html']);
|
||||
$this->template->assign_vars(['item' => $vars]);
|
||||
$next_item = $this->template->assign_display('item');
|
||||
}
|
||||
|
||||
return new JsonResponse([
|
||||
'MESSAGE_TITLE' => $this->language->lang($l_action),
|
||||
'MESSAGE_TEXT' => $this->language->lang($l_action . '_SUCCESS'),
|
||||
'id' => $item->get_id(),
|
||||
'item' => !empty($next_item) ? $next_item : false,
|
||||
'index' => $index,
|
||||
]);
|
||||
}
|
||||
else
|
||||
{
|
||||
return $this->helper->message($l_action . '_SUCCESS');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$body = $this->request->is_ajax() ? '@phpbbstudio_ass/ass_confirm_body.html' : 'confirm_body.html';
|
||||
|
||||
confirm_box(false, $l_action, '', $body, $this->helper->get_current_url());
|
||||
|
||||
return new RedirectResponse($this->helper->route('phpbbstudio_ass_inventory'));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$counts = [
|
||||
'expire' => 0,
|
||||
'gifts' => 0,
|
||||
'total' => 0,
|
||||
];
|
||||
|
||||
/** @var category $cat */
|
||||
foreach ($categories as $cat)
|
||||
{
|
||||
$this->template->assign_block_vars('ass_categories', $this->operator_cat->get_variables($cat));
|
||||
|
||||
/** @var item $it */
|
||||
foreach ($items as $it)
|
||||
{
|
||||
if ($it->get_category() === $cat->get_id())
|
||||
{
|
||||
$inventory_ids = $item_map[$it->get_id()];
|
||||
$inventory_id = $inventory_ids[0];
|
||||
|
||||
$s_this_item = $s_item && $item->get_id() === $it->get_id();
|
||||
|
||||
if ($s_this_item)
|
||||
{
|
||||
if (isset($inventory_ids[$index0]))
|
||||
{
|
||||
$inventory_id = $inventory_ids[$index0];
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new shop_exception(404, 'ASS_ERROR_NOT_OWNED_STACK');
|
||||
}
|
||||
}
|
||||
|
||||
// Get the first inventory row
|
||||
$row = $inventory[$inventory_id];
|
||||
|
||||
$stack = $this->get_stack_info($inventory_ids, $index0);
|
||||
|
||||
$vars = $this->get_inventory_variables($cat, $it, $row, $stack, $index, $counts);
|
||||
|
||||
$this->template->assign_block_vars('ass_categories.items', $vars);
|
||||
|
||||
if (empty($variables) && $s_this_item)
|
||||
{
|
||||
$variables = $vars;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($variables['S_TYPE_ERROR']))
|
||||
{
|
||||
$this->log_phpbb->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_ACP_ASS_ITEM_TYPE_ERROR', time(), [$category->get_title(), $item->get_title()]);
|
||||
}
|
||||
|
||||
$this->template->assign_vars([
|
||||
'ITEM_INFO' => $variables,
|
||||
|
||||
'COUNT_EXPIRE' => $counts['expire'],
|
||||
'COUNT_GIFTS' => $counts['gifts'],
|
||||
'COUNT_TOTAL' => $counts['total'],
|
||||
|
||||
'S_IS_GIFT' => $action === 'gift',
|
||||
|
||||
'T_SHOP_ICON' => $s_category ? $category->get_icon() : $this->config['ass_inventory_icon'],
|
||||
|
||||
'L_VIEW_SHOP' => $s_category ? $category->get_title() : $this->language->lang('ASS_SHOP_INDEX'),
|
||||
'U_VIEW_SHOP' => $s_category ? $this->router->category($category->get_slug()) : $this->helper->route('phpbbstudio_ass_shop'),
|
||||
]);
|
||||
|
||||
return $this->helper->render('ass_inventory.html', $this->language->lang('ASS_INVENTORY'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the history page.
|
||||
*
|
||||
* @param int $page The page number
|
||||
* @return Response
|
||||
* @access public
|
||||
*/
|
||||
public function history($page)
|
||||
{
|
||||
$this->controller->check_shop();
|
||||
$this->controller->create_shop_crumbs('history');
|
||||
|
||||
$points_name = $this->aps_functions->get_name();
|
||||
$points_new = $this->language->lang('ASS_POINTS_NEW', $points_name);
|
||||
$points_old = $this->language->lang('ASS_POINTS_OLD', $points_name);
|
||||
|
||||
$show_array = [
|
||||
'all' => ['title' => 'ASS_ALL', 'sql' => ''],
|
||||
'use' => ['title' => 'ASS_USAGES', 'sql' => 'l.item_purchase = 0'],
|
||||
'buy' => ['title' => 'ASS_PURCHASES', 'sql' => 'l.item_purchase = 1'],
|
||||
'given' => ['title' => 'ASS_GIFTS_GIVEN', 'sql' => 'l.item_purchase = 1 AND l.recipient_id <> 0'],
|
||||
'received' => ['title' => 'ASS_GIFTS_RECEIVED', 'sql' => 'l.recipient_id = ' . (int) $this->user->data['user_id']],
|
||||
];
|
||||
$sort_array = [
|
||||
'time' => ['title' => 'TIME', 'sql' => 'l.log_time'],
|
||||
'old' => ['title' => $points_old, 'sql' => 'l.points_old'],
|
||||
'new' => ['title' => $points_new, 'sql' => 'l.points_new'],
|
||||
'price' => ['title' => 'ASS_ITEM_PRICE', 'sql' => 'l.points_sum'],
|
||||
'item' => ['title' => 'ASS_ITEM_TITLE', 'sql' => 'i.item_title'],
|
||||
'category' => ['title' => 'ASS_CATEGORY_TITLE', 'sql' => 'c.category_title'],
|
||||
'recipient' => ['title' => 'ASS_RECIPIENT_NAME', 'sql' => 'recipient_name'],
|
||||
];
|
||||
$dir_array = [
|
||||
'desc' => ['title' => 'DESCENDING', 'sql' => 'DESC'],
|
||||
'asc' => ['title' => 'ASCENDING', 'sql' => 'ASC'],
|
||||
];
|
||||
|
||||
$show = $this->request->variable('display', 'all', true, \phpbb\request\request_interface::GET);
|
||||
$sort = $this->request->variable('sort', 'time', true, \phpbb\request\request_interface::GET);
|
||||
$dir = $this->request->variable('direction', 'desc', true, \phpbb\request\request_interface::GET);
|
||||
|
||||
$show = in_array($show, array_keys($show_array)) ? $show : 'all';
|
||||
$sort = in_array($sort, array_keys($sort_array)) ? $sort : 'time';
|
||||
$dir = in_array($dir, array_keys($dir_array)) ? $dir : 'desc';
|
||||
|
||||
$sql_where = $show_array[$show]['sql'];
|
||||
$sql_order = $sort_array[$sort]['sql'];
|
||||
$sql_dir = $dir_array[$dir]['sql'];
|
||||
|
||||
$limit = (int) $this->config['ass_logs_per_page'];
|
||||
$start = ($page - 1) * $limit;
|
||||
|
||||
$total = $this->log->get_user_logs_count($sql_where, $this->user->data['user_id']);
|
||||
$rowset = $this->log->get_user_logs($sql_where, $sql_order, $sql_dir, $limit, $start, $this->user->data['user_id']);
|
||||
|
||||
$categories = $this->operator_cat->get_categories_by_id(array_column($rowset, 'category_id'));
|
||||
$items = $this->operator_item->get_items_by_id(array_column($rowset, 'item_id'));
|
||||
|
||||
foreach ($rowset as $row)
|
||||
{
|
||||
$category_id = (int) $row['category_id'];
|
||||
$item_id = (int) $row['item_id'];
|
||||
|
||||
/** @var category $category */
|
||||
$category = !empty($categories[$category_id]) ? $categories[$category_id] : null;
|
||||
|
||||
/** @var item $item */
|
||||
$item = !empty($items[$item_id]) ? $items[$item_id] : null;
|
||||
|
||||
/** @var item_type $type */
|
||||
$type = $item ? $this->items_manager->get_type($item->get_type()) : null;
|
||||
|
||||
$this->template->assign_block_vars('ass_logs', [
|
||||
'CATEGORY_TITLE' => $category ? $category->get_title() : $this->language->lang('ASS_UNAVAILABLE_CATEGORY'),
|
||||
'ITEM_TITLE' => $item ? $item->get_title() : $this->language->lang('ASS_UNAVAILABLE_ITEM'),
|
||||
|
||||
'LOG_ACTION' => $type ? $this->language->lang($type->get_language('log')) : $this->language->lang('ASS_UNAVAILABLE_' . (!$item ? 'ITEM' : 'TYPE')),
|
||||
'LOG_ID' => $row['log_id'],
|
||||
'LOG_IP' => $row['log_ip'],
|
||||
'LOG_TIME' => $this->user->format_date($row['log_time']),
|
||||
|
||||
'POINTS_NEW' => $row['points_new'],
|
||||
'POINTS_OLD' => $row['points_old'],
|
||||
'POINTS_SUM' => -$row['points_sum'],
|
||||
|
||||
'RECIPIENT' => $row['recipient_id'] ? get_username_string('full', $row['recipient_id'], $row['recipient_name'], $row['recipient_colour']) : '',
|
||||
'USER' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
|
||||
|
||||
'S_PURCHASE' => $row['item_purchase'],
|
||||
'S_GIFT_RECEIVE' => $row['recipient_id'] == $this->user->data['user_id'],
|
||||
|
||||
'U_CATEGORY' => $category ? $this->router->category($category->get_slug()) : '',
|
||||
'U_ITEM' => $item ? $this->router->item($item->get_category_slug(), $item->get_slug()) : '',
|
||||
]);
|
||||
}
|
||||
|
||||
$this->pagination->generate_template_pagination([
|
||||
'routes' => ['phpbbstudio_ass_history', 'phpbbstudio_ass_history_pagination'],
|
||||
'params' => ['display' => $show, 'sort' => $sort, 'direction' => $dir],
|
||||
], 'shop_pagination', 'page', $total, $limit, $start);
|
||||
|
||||
$this->template->assign_vars([
|
||||
'SORT_DISPLAY' => $show,
|
||||
'SORT_DISPLAY_ARRAY' => $show_array,
|
||||
'SORT_SORT' => $sort,
|
||||
'SORT_SORT_ARRAY' => $sort_array,
|
||||
'SORT_DIR' => $dir,
|
||||
'SORT_DIR_ARRAY' => $dir_array,
|
||||
|
||||
'TOTAL_LOGS' => $this->language->lang('TOTAL_LOGS', $total),
|
||||
|
||||
'S_ASS_INVENTORY' => true,
|
||||
]);
|
||||
|
||||
return $this->helper->render('ass_history.html', $this->language->lang('ASS_INVENTORY'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a download response for a specific file.
|
||||
*
|
||||
* @param string $file The file name
|
||||
* @return Response
|
||||
* @access protected
|
||||
*/
|
||||
protected function download($file)
|
||||
{
|
||||
$response = new Response($file);
|
||||
|
||||
$response->headers->set('Content-type', 'application/octet-stream');
|
||||
$response->headers->set('Content-Disposition', 'attachment; filename="' . basename($file) . '";');
|
||||
$response->headers->set('Content-length', filesize($file));
|
||||
|
||||
$response->sendHeaders();
|
||||
$response->setContent(readfile($file));
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an inventory item's template variables.
|
||||
*
|
||||
* @param category $category The category entity
|
||||
* @param item $item The item entity
|
||||
* @param array $row The inventory row
|
||||
* @param array $stack The item stack information
|
||||
* @param int $index The item index
|
||||
* @param array $counts The inventory overview counts
|
||||
* @return array The inventory item template variables
|
||||
* @access protected
|
||||
*/
|
||||
protected function get_inventory_variables(category $category, item $item, array $row, array $stack, $index = 1, array &$counts = [])
|
||||
{
|
||||
/** @var item_type $type */
|
||||
$type = $this->items_manager->get_type($item->get_type());
|
||||
|
||||
$s_type = $type !== null;
|
||||
|
||||
if ($s_type)
|
||||
{
|
||||
$type->set_category($category);
|
||||
$type->set_item($item);
|
||||
}
|
||||
|
||||
$s_has_expired = $this->time->has_expired($row['purchase_time'], $item->get_expire_seconds());
|
||||
$s_will_expire = $this->time->will_expire($row['purchase_time'], $item->get_expire_seconds());
|
||||
|
||||
if (!empty($counts))
|
||||
{
|
||||
$counts = [
|
||||
'expire' => !$s_has_expired && $s_will_expire ? $counts['expire'] + 1 : $counts['expire'],
|
||||
'gifts' => $row['gifter_id'] ? $counts['gifts'] + 1 : $counts['gifts'],
|
||||
'total' => $counts['total'] + $stack['count'],
|
||||
];
|
||||
}
|
||||
|
||||
return array_merge($this->operator_item->get_variables($item, '', true, $index), [
|
||||
'ACTIVATE' => $s_type ? $this->language->lang($type->get_language('action')) : '',
|
||||
'GIFTER_NAME' => $row['gifter_id'] ? get_username_string('full', $row['gifter_id'], $row['gifter_name'], $row['gifter_colour']) : '',
|
||||
'PURCHASE_UNIX' => (int) $row['purchase_time'],
|
||||
'STACK_COUNT' => (int) $stack['count'],
|
||||
'USE_COUNT' => (int) $row['use_count'],
|
||||
'USE_UNIX' => (int) $row['use_time'],
|
||||
|
||||
'S_AJAX' => $s_type ? $type->get_confirm_ajax() : '',
|
||||
'S_GIFTED' => !empty($row['gifter_id']),
|
||||
'S_LIMIT' => $item->get_count() && (int) $row['use_count'] >= $item->get_count(),
|
||||
'S_REFUND' => $item->get_refund_seconds() && !$row['use_count'] ? (int) $row['purchase_time'] + $item->get_refund_seconds() > time() : false,
|
||||
'S_HAS_EXPIRED' => $s_has_expired,
|
||||
'S_WILL_EXPIRE' => $s_will_expire,
|
||||
'S_TYPE_ERROR' => !$s_type,
|
||||
|
||||
'U_STACK_NEXT' => $stack['next'] ? $this->router->inventory($item->get_category_slug(), $item->get_slug(), $stack['next']) : '',
|
||||
'U_STACK_PREV' => $stack['prev'] ? $this->router->inventory($item->get_category_slug(), $item->get_slug(), $stack['prev']) : '',
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate an inventory item's stacking information.
|
||||
*
|
||||
* @param array $array The inventory identifiers
|
||||
* @param int $index The current index (0 based)
|
||||
* @return array The stacking information
|
||||
* @access protected
|
||||
*/
|
||||
protected function get_stack_info(array $array, $index)
|
||||
{
|
||||
// The amount of inventory items for this specific item
|
||||
$count = count($array);
|
||||
|
||||
// Whether or not the current item index is the first or the last
|
||||
$prev = $index !== 0 ? $index - 1 : false;
|
||||
$next = $index < ($count - 1) ? $index + 1 : false;
|
||||
|
||||
/**
|
||||
* Because the array with inventory identifiers is 0-based,
|
||||
* but we use a 1-based approach for routes,
|
||||
* we have to increment the previous and next indices by 1.
|
||||
*/
|
||||
$prev = $prev !== false ? $prev + 1 : 0;
|
||||
$next = $next !== false ? $next + 1 : 0;
|
||||
|
||||
return [
|
||||
'count' => (int) $count,
|
||||
'next' => (int) $next,
|
||||
'prev' => (int) $prev,
|
||||
];
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user