Merge branch 'master' into translation
Conflicts: language/br_FR/admin.lang.php language/ca_ES/admin.lang.php language/cs_CZ/admin.lang.php language/da_DK/admin.lang.php language/de_DE/admin.lang.php language/el_GR/admin.lang.php language/en_UK/admin.lang.php language/eo_EO/admin.lang.php language/es_ES/admin.lang.php language/et_EE/admin.lang.php language/eu_ES/admin.lang.php language/fa_IR/admin.lang.php language/fr_CA/admin.lang.php language/fr_CA/common.lang.php language/fr_FR/admin.lang.php language/he_IL/admin.lang.php language/hu_HU/admin.lang.php language/it_IT/admin.lang.php language/ja_JP/admin.lang.php language/ja_JP/common.lang.php language/lt_LT/admin.lang.php language/lv_LV/admin.lang.php language/nb_NO/admin.lang.php language/nl_NL/admin.lang.php language/pl_PL/admin.lang.php language/pt_BR/admin.lang.php language/pt_PT/admin.lang.php language/ro_RO/admin.lang.php language/ru_RU/admin.lang.php language/sk_SK/admin.lang.php language/sl_SI/admin.lang.php language/sr_RS/admin.lang.php language/sv_SE/admin.lang.php language/th_TH/admin.lang.php language/tr_TR/admin.lang.php language/uk_UA/admin.lang.php language/zh_CN/admin.lang.php themes/elegant/language/cs_CZ/index.php themes/elegant/language/index.php themes/elegant/language/nl_NL/theme.lang.php themes/smartpocket/language/nl_NL/theme.lang.php
@@ -2,7 +2,7 @@ COPYRIGHT
|
||||
|
||||
Piwigo - a photo library manager
|
||||
|
||||
Copyright(C) 2008-2019 Piwigo Team https://piwigo.org
|
||||
Copyright(C) 2008-2020 Piwigo Team https://piwigo.org
|
||||
Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net
|
||||
Copyright(C) 2002-2003 Pierrick LE GALL http://pierrick.le-gall.net
|
||||
|
||||
@@ -15,4 +15,4 @@ SOFTWARE LICENSE
|
||||
|
||||
TRADEMARK
|
||||
|
||||
Piwigo is a registered trademark.
|
||||
Piwigo is a registered trademark.
|
||||
|
||||
@@ -1,24 +1,15 @@
|
||||
[](http://piwigo.org)
|
||||
---------
|
||||
<img src="https://piwigo.org/plugins/piwigo-piwigodotorg/images/piwigo.org.svg" width="200" alt="Piwigo logo">
|
||||
|
||||
Piwigo is photo gallery software for the web, built by an active community of users and developers.
|
||||
Manage your photo library. Piwigo is open source photo gallery software for the web. Designed for organisations, teams and individuals.
|
||||
|
||||
Extensions make Piwigo easily customizable. Icing on the cake, Piwigo is free and open source.
|
||||

|
||||
|
||||

|
||||
|
||||
* [piwigo.org](http://piwigo.org)
|
||||
* [Demo](http://piwigo.org/demo)
|
||||
* [Downloads](http://piwigo.org/basics/downloads)
|
||||
* [User guide](http://piwigo.org/doc)
|
||||
* [Plugins and themes](http://piwigo.org/ext)
|
||||
* [Forum](http://piwigo.org/forum)
|
||||
* [News](http://piwigo.org/news)
|
||||
The [piwigo.org](https://piwigo.org) website introduces you to Piwigo. You'll find a demo, forums, wiki and news.
|
||||
|
||||
## Requirements
|
||||
|
||||
* A webserver (Apache or nginx recommended)
|
||||
* PHP 5.3 or greater
|
||||
* PHP 5.3 or greater (7+ recommended)
|
||||
* MySQL 5 or greater or MariaDB equivalent
|
||||
* ImageMagick (recommended) or PHP GD
|
||||
|
||||
@@ -26,26 +17,26 @@ Extensions make Piwigo easily customizable. Icing on the cake, Piwigo is free an
|
||||
|
||||
### NetInstall
|
||||
|
||||
* Download the [NetInstall script](http://piwigo.org/download/dlcounter.php?code=netinstall)
|
||||
* Download the [NetInstall script](https://piwigo.org/download/dlcounter.php?code=netinstall)
|
||||
* Transfer the script to your web space with any FTP client
|
||||
* Open the script in you web browser (for example http://example.com/piwigo-netinstall.php) and follow the steps
|
||||
|
||||
[More information](http://piwigo.org/basics/installation_netinstall)
|
||||
[More information](https://piwigo.org/guides/install/netinstall)
|
||||
|
||||
### Manual
|
||||
|
||||
* Download the [latest stable version](http://piwigo.org/download/dlcounter.php?code=latest) and unzip it
|
||||
* Download the [latest stable version](https://piwigo.org/download/dlcounter.php?code=latest) and unzip it
|
||||
* Transfer everything to your web space with any FTP client
|
||||
* Open your website (for example http://example.com/piwigo) and follow the steps
|
||||
|
||||
[More information](http://piwigo.org/basics/installation_manual)
|
||||
[More information](https://piwigo.org/guides/install/manual)
|
||||
|
||||
If you do not have your own server, consider the [piwigo.com](http://piwigo.com/) hosting solution.
|
||||
If you do not have your own server, consider the [piwigo.com](https://piwigo.com/) hosting solution.
|
||||
|
||||
## Contributing
|
||||
|
||||
Piwigo is widely driven by its community; if you want to improve the code, fork this repo and submit your changes to the `master` branch.
|
||||
Piwigo is widely driven by its community; if you want to improve the code, fork this repo and submit your changes to the `master` branch. See our [Contribution guide](https://github.com/Piwigo/Piwigo/blob/master/docs/CONTRIBUTING.md).
|
||||
|
||||
## License
|
||||
|
||||
Piwigo is released under the GPL v2 license.
|
||||
Piwigo is released under the GPL v2 license. See our [Copying details](https://github.com/Piwigo/Piwigo/blob/master/COPYING.txt).
|
||||
|
||||
@@ -220,7 +220,9 @@ if (ini_get('safe_mode') == 0)
|
||||
{
|
||||
@set_time_limit(0);
|
||||
}
|
||||
|
||||
// Without clean and flush there may be some image download problems, or image can be corrupted after download
|
||||
ob_clean();
|
||||
flush();
|
||||
@readfile($file);
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -181,7 +181,9 @@ $template->assign(
|
||||
'U_CONFIG_LANGUAGES' => $link_start.'languages',
|
||||
'U_CONFIG_THEMES'=> $link_start.'themes',
|
||||
'U_CATEGORIES'=> $link_start.'cat_list',
|
||||
'U_CAT_MOVE'=> $link_start.'cat_move',
|
||||
'U_CAT_OPTIONS'=> $link_start.'cat_options',
|
||||
'U_CAT_SEARCH'=> $link_start.'cat_search',
|
||||
'U_CAT_UPDATE'=> $link_start.'site_update&site=1',
|
||||
'U_RATING'=> $link_start.'rating',
|
||||
'U_RECENT_SET'=> $link_start.'batch_manager&filter=prefilter-last_import',
|
||||
@@ -238,15 +240,14 @@ if ($nb_photos_in_caddie > 0)
|
||||
}
|
||||
|
||||
// any photos with no md5sum ?
|
||||
$nb_no_md5sum = count(get_photos_no_md5sum());
|
||||
if ($nb_no_md5sum > 0)
|
||||
if (in_array($page['page'], array('site_update', 'batch_manager')))
|
||||
{
|
||||
$template->assign(
|
||||
array(
|
||||
'NB_NO_MD5SUM' => $nb_no_md5sum,
|
||||
'U_NO_MD5SUM' => $link_start.'batch_manager&filter=prefilter-no_sync_md5sum',
|
||||
)
|
||||
);
|
||||
$nb_no_md5sum = count(get_photos_no_md5sum());
|
||||
|
||||
if ($nb_no_md5sum > 0)
|
||||
{
|
||||
$page['no_md5sum_number'] = $nb_no_md5sum;
|
||||
}
|
||||
}
|
||||
|
||||
// any orphan photo?
|
||||
@@ -262,19 +263,6 @@ if ($nb_orphans > 0)
|
||||
);
|
||||
}
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | Plugin menu |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
$plugin_menu_links = trigger_change('get_admin_plugin_menu_links', array() );
|
||||
|
||||
function UC_name_compare($a, $b)
|
||||
{
|
||||
return strcmp(strtolower($a['NAME']), strtolower($b['NAME']));
|
||||
}
|
||||
usort($plugin_menu_links, 'UC_name_compare');
|
||||
$template->assign('plugin_menu_items', $plugin_menu_links);
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | Refresh permissions |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
@@ -125,6 +125,8 @@ if (isset($_POST['submitFilter']))
|
||||
|
||||
if (isset($_POST['filter_category_use']))
|
||||
{
|
||||
check_input_parameter('filter_category', $_POST, false, PATTERN_ID);
|
||||
|
||||
$_SESSION['bulk_manager_filter']['category'] = $_POST['filter_category'];
|
||||
|
||||
if (isset($_POST['filter_category_recursive']))
|
||||
@@ -603,7 +605,7 @@ foreach ($filter_sets as $set)
|
||||
{
|
||||
$current_set = array_intersect($current_set, $set);
|
||||
}
|
||||
$page['cat_elements_id'] = $current_set;
|
||||
$page['cat_elements_id'] = empty($current_set) ? [] : $current_set;
|
||||
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
@@ -453,11 +453,21 @@ if ($conf['enable_synchronization'])
|
||||
$prefilters[] = array('ID' => 'no_sync_md5sum', 'NAME' => l10n('With no checksum'));
|
||||
}
|
||||
|
||||
function UC_name_compare($a, $b)
|
||||
{
|
||||
return strcmp(strtolower($a['NAME']), strtolower($b['NAME']));
|
||||
}
|
||||
|
||||
$prefilters = trigger_change('get_batch_manager_prefilters', $prefilters);
|
||||
usort($prefilters, 'UC_name_compare');
|
||||
|
||||
// Sort prefilters by localized name.
|
||||
usort($prefilters, function ($a, $b) {
|
||||
return strcmp(strtolower($a['NAME']), strtolower($b['NAME']));
|
||||
});
|
||||
|
||||
$template->assign(
|
||||
array(
|
||||
'conf_checksum_compute_blocksize' => $conf['checksum_compute_blocksize'],
|
||||
'prefilters' => $prefilters,
|
||||
'filter' => $_SESSION['bulk_manager_filter'],
|
||||
'selection' => $collection,
|
||||
@@ -469,6 +479,15 @@ $template->assign(
|
||||
)
|
||||
);
|
||||
|
||||
if (isset($page['no_md5sum_number']))
|
||||
{
|
||||
$template->assign(
|
||||
array(
|
||||
'NB_NO_MD5SUM' => $page['no_md5sum_number'],
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | caddie options |
|
||||
// +-----------------------------------------------------------------------+
|
||||
@@ -545,6 +564,8 @@ $template->assign('filter_category_selected', $selected_category);
|
||||
// Dissociate from a category : categories listed for dissociation can only
|
||||
// represent virtual links. We can't create orphans. Links to physical
|
||||
// categories can't be broken.
|
||||
$associated_categories = array();
|
||||
|
||||
if (count($page['cat_elements_id']) > 0)
|
||||
{
|
||||
$query = '
|
||||
@@ -559,9 +580,11 @@ SELECT
|
||||
)
|
||||
;';
|
||||
|
||||
$template->assign('associated_categories', query2array($query, 'id', 'id'));
|
||||
$associated_categories = query2array($query, 'id', 'id');
|
||||
}
|
||||
|
||||
$template->assign('associated_categories', $associated_categories);
|
||||
|
||||
if (count($page['cat_elements_id']) > 0)
|
||||
{
|
||||
// remove tags
|
||||
@@ -651,10 +674,15 @@ if (count($page['cat_elements_id']) > 0)
|
||||
$is_category = true;
|
||||
}
|
||||
|
||||
// If using the 'duplicates' filter,
|
||||
// order by the fields that are used to find duplicates.
|
||||
if (isset($_SESSION['bulk_manager_filter']['prefilter'])
|
||||
and 'duplicates' == $_SESSION['bulk_manager_filter']['prefilter'])
|
||||
and 'duplicates' === $_SESSION['bulk_manager_filter']['prefilter']
|
||||
and isset($duplicates_on_fields))
|
||||
{
|
||||
$conf['order_by'] = ' ORDER BY file, id';
|
||||
// The $duplicates_on_fields variable is defined in ./batch_manager.php
|
||||
$order_by_fields = array_merge( $duplicates_on_fields, array( 'id' ) );
|
||||
$conf['order_by'] = ' ORDER BY '.join(', ', $order_by_fields);
|
||||
}
|
||||
|
||||
$query = '
|
||||
@@ -690,7 +718,7 @@ SELECT id,path,representative_ext,file,filesize,level,name,width,height,rotation
|
||||
;';
|
||||
$result = pwg_query($query);
|
||||
|
||||
$thumb_params = ImageStdParams::get_by_type(IMG_THUMB);
|
||||
$thumb_params = ImageStdParams::get_by_type(IMG_SQUARE);
|
||||
// template thumbnail initialization
|
||||
while ($row = pwg_db_fetch_assoc($result))
|
||||
{
|
||||
|
||||
@@ -161,7 +161,7 @@ elseif (isset($_POST['submitAdd']))
|
||||
$output_create = create_virtual_category(
|
||||
$_POST['virtual_name'],
|
||||
@$_GET['parent_id']
|
||||
);
|
||||
);
|
||||
|
||||
invalidate_user_cache();
|
||||
if (isset($output_create['error']))
|
||||
@@ -174,86 +174,6 @@ elseif (isset($_POST['submitAdd']))
|
||||
$page['infos'][] = $output_create['info'].' <a class="icon-pencil" href="'.$edit_url.'">'.l10n('Edit album').'</a>';
|
||||
}
|
||||
}
|
||||
// save manual category ordering
|
||||
elseif (isset($_POST['submitManualOrder']))
|
||||
{
|
||||
asort($_POST['catOrd'], SORT_NUMERIC);
|
||||
save_categories_order(array_keys($_POST['catOrd']));
|
||||
|
||||
$page['infos'][] = l10n('Album manual order was saved');
|
||||
}
|
||||
elseif (isset($_POST['submitAutoOrder']))
|
||||
{
|
||||
if (!isset($sort_orders[ $_POST['order_by'] ]))
|
||||
{
|
||||
die('Invalid sort order');
|
||||
}
|
||||
|
||||
$query = '
|
||||
SELECT id
|
||||
FROM '.CATEGORIES_TABLE.'
|
||||
WHERE id_uppercat '.
|
||||
(!isset($_GET['parent_id']) ? 'IS NULL' : '= '.$_GET['parent_id']).'
|
||||
;';
|
||||
$category_ids = array_from_query($query, 'id');
|
||||
|
||||
if (isset($_POST['recursive']))
|
||||
{
|
||||
$category_ids = get_subcat_ids($category_ids);
|
||||
}
|
||||
|
||||
$categories = array();
|
||||
$sort = array();
|
||||
|
||||
list($order_by_field, $order_by_asc) = explode(' ', $_POST['order_by']);
|
||||
|
||||
$order_by_date = false;
|
||||
if (strpos($order_by_field, 'date_') === 0)
|
||||
{
|
||||
$order_by_date = true;
|
||||
|
||||
$ref_dates = get_categories_ref_date(
|
||||
$category_ids,
|
||||
$order_by_field,
|
||||
'ASC' == $order_by_asc ? 'min' : 'max'
|
||||
);
|
||||
}
|
||||
|
||||
$query = '
|
||||
SELECT id, name, id_uppercat
|
||||
FROM '.CATEGORIES_TABLE.'
|
||||
WHERE id IN ('.implode(',', $category_ids).')
|
||||
;';
|
||||
$result = pwg_query($query);
|
||||
while ($row = pwg_db_fetch_assoc($result))
|
||||
{
|
||||
if ($order_by_date)
|
||||
{
|
||||
$sort[] = $ref_dates[ $row['id'] ];
|
||||
}
|
||||
else
|
||||
{
|
||||
$sort[] = remove_accents($row['name']);
|
||||
}
|
||||
|
||||
$categories[] = array(
|
||||
'id' => $row['id'],
|
||||
'id_uppercat' => $row['id_uppercat'],
|
||||
);
|
||||
}
|
||||
|
||||
array_multisort(
|
||||
$sort,
|
||||
SORT_REGULAR,
|
||||
'ASC' == $order_by_asc ? SORT_ASC : SORT_DESC,
|
||||
$categories
|
||||
);
|
||||
|
||||
save_categories_order($categories);
|
||||
|
||||
$page['infos'][] = l10n('Albums automatically sorted');
|
||||
}
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | Navigation path |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
@@ -109,9 +109,9 @@ if (isset($_POST['submit']))
|
||||
|
||||
if ($conf['activate_comments'])
|
||||
{
|
||||
$data['commentable'] = isset($_POST['commentable'])?$_POST['commentable']:'false';
|
||||
$data['commentable'] = isset($_POST['commentable'])? 'true':'false';
|
||||
}
|
||||
|
||||
|
||||
single_update(
|
||||
CATEGORIES_TABLE,
|
||||
$data,
|
||||
@@ -131,13 +131,15 @@ UPDATE '.CATEGORIES_TABLE.'
|
||||
// retrieve cat infos before continuing (following updates are expensive)
|
||||
$cat_info = get_cat_info($_GET['cat_id']);
|
||||
|
||||
if ($_POST['visible']=='true_sub')
|
||||
$visible = false;
|
||||
if (!isset($_POST['locked']))
|
||||
{
|
||||
set_cat_visible(array($_GET['cat_id']), true, true);
|
||||
$visible = true;
|
||||
}
|
||||
elseif ($cat_info['visible'] != get_boolean( $_POST['visible'] ) )
|
||||
|
||||
if ($visible !== $cat_info['visible'])
|
||||
{
|
||||
set_cat_visible(array($_GET['cat_id']), $_POST['visible']);
|
||||
set_cat_visible(array($_GET['cat_id']), $visible);
|
||||
}
|
||||
|
||||
// in case the use moves his album to the gallery root, we force
|
||||
@@ -275,7 +277,7 @@ $template->assign(
|
||||
'CAT_ID' => $category['id'],
|
||||
'CAT_NAME' => @htmlspecialchars($category['name']),
|
||||
'CAT_COMMENT' => @htmlspecialchars($category['comment']),
|
||||
'CAT_VISIBLE' => boolean_to_string($category['visible']),
|
||||
'IS_LOCKED' => !get_boolean($category['visible']),
|
||||
|
||||
'U_JUMPTO' => make_index_url(
|
||||
array(
|
||||
@@ -317,7 +319,7 @@ SELECT
|
||||
|
||||
if ($min_date == $max_date)
|
||||
{
|
||||
$intro = l10n(
|
||||
$info_title = l10n(
|
||||
'This album contains %d photos, added on %s.',
|
||||
$image_count,
|
||||
format_date($min_date)
|
||||
@@ -325,19 +327,64 @@ SELECT
|
||||
}
|
||||
else
|
||||
{
|
||||
$intro = l10n(
|
||||
$info_title = l10n(
|
||||
'This album contains %d photos, added between %s and %s.',
|
||||
$image_count,
|
||||
format_date($min_date),
|
||||
format_date($max_date)
|
||||
);
|
||||
}
|
||||
$info_photos = l10n('%d photos', $image_count);
|
||||
|
||||
$template->assign(
|
||||
array(
|
||||
'INFO_PHOTO' => $info_photos,
|
||||
'INFO_TITLE' => $info_title
|
||||
)
|
||||
);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$intro = l10n('This album contains no photo.');
|
||||
|
||||
// date creation
|
||||
$query = '
|
||||
SELECT occured_on
|
||||
FROM `'.ACTIVITY_TABLE.'`
|
||||
WHERE object_id = '.$category['id'].'
|
||||
AND object = "album"
|
||||
AND action = "add"
|
||||
';
|
||||
$result = query2array($query);
|
||||
|
||||
if (count($result) > 0) {
|
||||
$template->assign(
|
||||
array(
|
||||
'INFO_CREATION' => l10n('Created on %s',format_date($result[0]['occured_on'], array('day', 'month','year')))
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// Sub Albums
|
||||
$query = '
|
||||
SELECT COUNT(*)
|
||||
FROM `'.CATEGORIES_TABLE.'`
|
||||
WHERE id_uppercat = '.$category['id'].'
|
||||
';
|
||||
$result = query2array($query);
|
||||
|
||||
if ($result[0]['COUNT(*)'] > 0) {
|
||||
$template->assign(
|
||||
array(
|
||||
'INFO_DIRECT_SUB' => l10n('%d sub-albums',$result[0]['COUNT(*)'])
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
$template->assign(array(
|
||||
'INFO_ID' => l10n('Numeric identifier : %d',$category['id']),
|
||||
'INFO_LAST_MODIFIED'=> l10n('Edited on %s',format_date($category['lastmodified'], array('day', 'month','year')))
|
||||
)
|
||||
);
|
||||
|
||||
// info for deletion
|
||||
$template->assign(
|
||||
array(
|
||||
@@ -349,10 +396,7 @@ $template->assign(
|
||||
)
|
||||
);
|
||||
|
||||
$intro.= '<br>'.l10n('Numeric identifier : %d', $category['id']);
|
||||
|
||||
$template->assign(array(
|
||||
'INTRO' => $intro,
|
||||
'U_MANAGE_RANKS' => $base_url.'element_set_ranks&cat_id='.$category['id'],
|
||||
'CACHE_KEYS' => get_admin_client_cache_keys(array('categories')),
|
||||
));
|
||||
@@ -393,7 +437,7 @@ if ($category['has_images'] or !empty($category['representative_picture_id']))
|
||||
// representant ?
|
||||
if (!empty($category['representative_picture_id']))
|
||||
{
|
||||
$tpl_representant['picture'] = get_category_representant_properties($category['representative_picture_id']);
|
||||
$tpl_representant['picture'] = get_category_representant_properties($category['representative_picture_id'], IMG_SMALL);
|
||||
}
|
||||
|
||||
// can the admin choose to set a new random representant ?
|
||||
|
||||
@@ -19,27 +19,95 @@ include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
|
||||
check_status(ACCESS_ADMINISTRATOR);
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | functions |
|
||||
// | categories auto order |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
$open_cat = -1;
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | categories movement |
|
||||
// +-----------------------------------------------------------------------+
|
||||
$sort_orders = array(
|
||||
'name ASC',
|
||||
'name DESC',
|
||||
'date_creation DESC',
|
||||
'date_creation ASC',
|
||||
'date_available DESC',
|
||||
'date_available ASC'
|
||||
);
|
||||
|
||||
if (isset($_POST['submit']))
|
||||
if (isset($_POST['simpleAutoOrder']) || isset($_POST['recursiveAutoOrder']) )
|
||||
{
|
||||
if (count($_POST['selection']) > 0)
|
||||
|
||||
if (!in_array($_POST['order'],$sort_orders))
|
||||
{
|
||||
// TODO: tests
|
||||
move_categories($_POST['selection'], $_POST['parent']);
|
||||
die('Invalid sort order');
|
||||
}
|
||||
else
|
||||
|
||||
$query = '
|
||||
SELECT id
|
||||
FROM '.CATEGORIES_TABLE.'
|
||||
WHERE id_uppercat '.
|
||||
(($_POST['id'] === '-1') ? 'IS NULL' : '= '.$_POST['id']).'
|
||||
;';
|
||||
$category_ids = array_from_query($query, 'id');
|
||||
|
||||
if (isset($_POST['recursiveAutoOrder']))
|
||||
{
|
||||
$page['errors'][] = l10n('Select at least one album');
|
||||
$category_ids = get_subcat_ids($category_ids);
|
||||
}
|
||||
|
||||
$categories = array();
|
||||
$sort = array();
|
||||
|
||||
list($order_by_field, $order_by_asc) = explode(' ', $_POST['order']);
|
||||
|
||||
$order_by_date = false;
|
||||
if (strpos($order_by_field, 'date_') === 0)
|
||||
{
|
||||
$order_by_date = true;
|
||||
|
||||
$ref_dates = get_categories_ref_date(
|
||||
$category_ids,
|
||||
$order_by_field,
|
||||
'ASC' == $order_by_asc ? 'min' : 'max'
|
||||
);
|
||||
}
|
||||
|
||||
$query = '
|
||||
SELECT id, name, id_uppercat
|
||||
FROM '.CATEGORIES_TABLE.'
|
||||
WHERE id IN ('.implode(',', $category_ids).')
|
||||
;';
|
||||
$result = pwg_query($query);
|
||||
while ($row = pwg_db_fetch_assoc($result))
|
||||
{
|
||||
if ($order_by_date)
|
||||
{
|
||||
$sort[] = $ref_dates[ $row['id'] ];
|
||||
}
|
||||
else
|
||||
{
|
||||
$sort[] = remove_accents($row['name']);
|
||||
}
|
||||
|
||||
$categories[] = array(
|
||||
'id' => $row['id'],
|
||||
'id_uppercat' => $row['id_uppercat'],
|
||||
);
|
||||
}
|
||||
|
||||
array_multisort(
|
||||
$sort,
|
||||
SORT_REGULAR,
|
||||
'ASC' == $order_by_asc ? SORT_ASC : SORT_DESC,
|
||||
$categories
|
||||
);
|
||||
|
||||
save_categories_order($categories);
|
||||
|
||||
$open_cat = $_POST['id'];
|
||||
}
|
||||
|
||||
$template->assign('open_cat', $open_cat);
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | template initialization |
|
||||
// +-----------------------------------------------------------------------+
|
||||
@@ -47,47 +115,146 @@ $template->set_filename('cat_move', 'cat_move.tpl');
|
||||
|
||||
$template->assign(
|
||||
array(
|
||||
'U_HELP' => get_root_url().'admin/popuphelp.php?page=cat_move',
|
||||
'F_ACTION' => get_root_url().'admin.php?page=cat_move',
|
||||
)
|
||||
);
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | tabs |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
$page['tab'] = 'move';
|
||||
include(PHPWG_ROOT_PATH.'admin/include/albums_tab.inc.php');
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | Categories display |
|
||||
// | Album display |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
//Get all albums
|
||||
$query = '
|
||||
SELECT id,name,uppercats,global_rank
|
||||
FROM '.CATEGORIES_TABLE.'
|
||||
WHERE dir IS NULL
|
||||
;';
|
||||
display_select_cat_wrapper(
|
||||
$query,
|
||||
array(),
|
||||
'category_to_move_options'
|
||||
);
|
||||
|
||||
$query = '
|
||||
SELECT id,name,uppercats,global_rank
|
||||
SELECT id,name,rank,status, uppercats
|
||||
FROM '.CATEGORIES_TABLE.'
|
||||
;';
|
||||
|
||||
display_select_cat_wrapper(
|
||||
$query,
|
||||
array(),
|
||||
'category_parent_options'
|
||||
);
|
||||
$allAlbum = query2array($query);
|
||||
|
||||
//Make an id tree
|
||||
$associatedTree = array();
|
||||
|
||||
foreach ($allAlbum as $album)
|
||||
{
|
||||
$parents = explode(',',$album['uppercats']);
|
||||
$the_place = &$associatedTree[strval($parents[0])];
|
||||
for ($i=1; $i < count($parents); $i++)
|
||||
{
|
||||
$the_place = &$the_place['children'][strval($parents[$i])];
|
||||
}
|
||||
$the_place['cat'] = $album;
|
||||
}
|
||||
|
||||
//Make an ordered tree
|
||||
function cmpCat($a, $b)
|
||||
{
|
||||
if ($a['rank'] == $b['rank'])
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return ($a['rank'] < $b['rank']) ? -1 : 1;
|
||||
}
|
||||
|
||||
function assocToOrderedTree($assocT)
|
||||
{
|
||||
$orderedTree = array();
|
||||
|
||||
foreach($assocT as $cat)
|
||||
{
|
||||
$orderedCat = array();
|
||||
$orderedCat['rank'] = $cat['cat']['rank'];
|
||||
$orderedCat['name'] = $cat['cat']['name'];
|
||||
$orderedCat['status'] = $cat['cat']['status'];
|
||||
$orderedCat['id'] = $cat['cat']['id'];
|
||||
if (isset($cat['children']))
|
||||
{
|
||||
$orderedCat['children'] = assocToOrderedTree($cat['children']);
|
||||
}
|
||||
array_push($orderedTree, $orderedCat);
|
||||
}
|
||||
usort($orderedTree, 'cmpCat');
|
||||
return $orderedTree;
|
||||
}
|
||||
|
||||
$template->assign('album_data', assocToOrderedTree($associatedTree));
|
||||
$template->assign('PWG_TOKEN', get_pwg_token());
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | sending html code |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
$template->assign_var_from_handle('ADMIN_CONTENT', 'cat_move');
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | functions |
|
||||
// +-----------------------------------------------------------------------+
|
||||
function get_categories_ref_date($ids, $field='date_available', $minmax='max')
|
||||
{
|
||||
// we need to work on the whole tree under each category, even if we don't
|
||||
// want to sort sub categories
|
||||
$category_ids = get_subcat_ids($ids);
|
||||
|
||||
// search for the reference date of each album
|
||||
$query = '
|
||||
SELECT
|
||||
category_id,
|
||||
'.$minmax.'('.$field.') as ref_date
|
||||
FROM '.IMAGE_CATEGORY_TABLE.'
|
||||
JOIN '.IMAGES_TABLE.' ON image_id = id
|
||||
WHERE category_id IN ('.implode(',', $category_ids).')
|
||||
GROUP BY category_id
|
||||
;';
|
||||
$ref_dates = query2array($query, 'category_id', 'ref_date');
|
||||
|
||||
// the iterate on all albums (having a ref_date or not) to find the
|
||||
// reference_date, with a search on sub-albums
|
||||
$query = '
|
||||
SELECT
|
||||
id,
|
||||
uppercats
|
||||
FROM '.CATEGORIES_TABLE.'
|
||||
WHERE id IN ('.implode(',', $category_ids).')
|
||||
;';
|
||||
$uppercats_of = query2array($query, 'id', 'uppercats');
|
||||
|
||||
foreach (array_keys($uppercats_of) as $cat_id)
|
||||
{
|
||||
// find the subcats
|
||||
$subcat_ids = array();
|
||||
|
||||
foreach ($uppercats_of as $id => $uppercats)
|
||||
{
|
||||
if (preg_match('/(^|,)'.$cat_id.'(,|$)/', $uppercats))
|
||||
{
|
||||
$subcat_ids[] = $id;
|
||||
}
|
||||
}
|
||||
|
||||
$to_compare = array();
|
||||
foreach ($subcat_ids as $id)
|
||||
{
|
||||
if (isset($ref_dates[$id]))
|
||||
{
|
||||
$to_compare[] = $ref_dates[$id];
|
||||
}
|
||||
}
|
||||
|
||||
if (count($to_compare) > 0)
|
||||
{
|
||||
$ref_dates[$cat_id] = 'max' == $minmax ? max($to_compare) : min($to_compare);
|
||||
}
|
||||
else
|
||||
{
|
||||
$ref_dates[$cat_id] = null;
|
||||
}
|
||||
}
|
||||
|
||||
// only return the list of $ids, not the sub-categories
|
||||
$return = array();
|
||||
foreach ($ids as $id)
|
||||
{
|
||||
$return[$id] = $ref_dates[$id];
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | This file is part of Piwigo. |
|
||||
// | |
|
||||
// | For copyright and license information, please view the COPYING.txt |
|
||||
// | file that was distributed with this source code. |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
if (!defined('PHPWG_ROOT_PATH'))
|
||||
{
|
||||
die('Hacking attempt!');
|
||||
}
|
||||
|
||||
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | Check Access and exit when user status is not ok |
|
||||
// +-----------------------------------------------------------------------+
|
||||
check_status(ACCESS_ADMINISTRATOR);
|
||||
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | tabs |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
$page['tab'] = 'search';
|
||||
include(PHPWG_ROOT_PATH.'admin/include/albums_tab.inc.php');
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | Get Categories |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
$categories = array();
|
||||
|
||||
$query = '
|
||||
SELECT id, name, status, uppercats
|
||||
FROM '.CATEGORIES_TABLE;
|
||||
|
||||
$result = query2array($query);
|
||||
|
||||
foreach ($result as $cat)
|
||||
{
|
||||
$private = ($cat['status'] == 'private')? 1:0;
|
||||
|
||||
$parents = explode(',', $cat['uppercats']);
|
||||
|
||||
$content = array($cat['name'], $parents, $private);
|
||||
$categories[$cat['id']] = $content;
|
||||
}
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | template initialization |
|
||||
// +-----------------------------------------------------------------------+
|
||||
$template->set_filename('cat_search', 'cat_search.tpl');
|
||||
$template->assign('data_cat', $categories);
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | sending html code |
|
||||
// +-----------------------------------------------------------------------+
|
||||
$template->assign_var_from_handle('ADMIN_CONTENT', 'cat_search');
|
||||
?>
|
||||
@@ -43,6 +43,8 @@ $main_checkboxes = array(
|
||||
'log',
|
||||
'history_admin',
|
||||
'history_guest',
|
||||
'show_mobile_app_banner_in_gallery',
|
||||
'show_mobile_app_banner_in_admin',
|
||||
);
|
||||
|
||||
$sizes_checkboxes = array(
|
||||
|
||||
@@ -109,7 +109,7 @@ SELECT *
|
||||
;';
|
||||
$category = pwg_db_fetch_assoc(pwg_query($query));
|
||||
|
||||
if ($category['image_order']=='rank ASC')
|
||||
if ($category['image_order']=='rank ASC' or $category['image_order']=='`rank` ASC')
|
||||
{
|
||||
$image_order_choice = 'rank';
|
||||
}
|
||||
|
||||
@@ -35,333 +35,8 @@ if (!empty($_POST) or isset($_GET['delete']) or isset($_GET['toggle_is_default']
|
||||
{
|
||||
check_pwg_token();
|
||||
}
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | add a group |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
if (isset($_POST['submit_add']))
|
||||
{
|
||||
if (empty($_POST['groupname']))
|
||||
{
|
||||
$page['errors'][] = l10n('The name of a group must not contain " or \' or be empty.');
|
||||
}
|
||||
if (count($page['errors']) == 0)
|
||||
{
|
||||
// is the group not already existing ?
|
||||
$query = '
|
||||
SELECT COUNT(*)
|
||||
FROM `'.GROUPS_TABLE.'`
|
||||
WHERE name = \''.$_POST['groupname'].'\'
|
||||
;';
|
||||
list($count) = pwg_db_fetch_row(pwg_query($query));
|
||||
if ($count != 0)
|
||||
{
|
||||
$page['errors'][] = l10n('This name is already used by another group.');
|
||||
}
|
||||
}
|
||||
if (count($page['errors']) == 0)
|
||||
{
|
||||
// creating the group
|
||||
$query = '
|
||||
INSERT INTO `'.GROUPS_TABLE.'`
|
||||
(name)
|
||||
VALUES
|
||||
(\''.pwg_db_real_escape_string($_POST['groupname']).'\')
|
||||
;';
|
||||
pwg_query($query);
|
||||
|
||||
$page['infos'][] = l10n('group "%s" added', $_POST['groupname']);
|
||||
|
||||
$inserted_id = pwg_db_insert_id(GROUPS_TABLE);
|
||||
pwg_activity('group', $inserted_id, 'add');
|
||||
}
|
||||
}
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | action send |
|
||||
// +-----------------------------------------------------------------------+
|
||||
if (isset($_POST['submit']) and isset($_POST['selectAction']) and isset($_POST['group_selection']))
|
||||
{
|
||||
// if the user tries to apply an action, it means that there is at least 1
|
||||
// photo in the selection
|
||||
$groups = $_POST['group_selection'];
|
||||
if (count($groups) == 0)
|
||||
{
|
||||
$page['errors'][] = l10n('Select at least one group');
|
||||
}
|
||||
|
||||
$action = $_POST['selectAction'];
|
||||
|
||||
// +
|
||||
// |rename a group
|
||||
// +
|
||||
|
||||
if ($action=="rename")
|
||||
{
|
||||
// is the group not already existing ?
|
||||
$query = '
|
||||
SELECT name
|
||||
FROM `'.GROUPS_TABLE.'`
|
||||
;';
|
||||
$group_names = array_from_query($query, 'name');
|
||||
foreach($groups as $group)
|
||||
{
|
||||
$_POST['rename_'.$group] = stripslashes($_POST['rename_'.$group]);
|
||||
|
||||
if (in_array($_POST['rename_'.$group], $group_names))
|
||||
{
|
||||
$page['errors'][] = $_POST['rename_'.$group].' | '.l10n('This name is already used by another group.');
|
||||
}
|
||||
elseif ( !empty($_POST['rename_'.$group.'']))
|
||||
{
|
||||
$query = '
|
||||
UPDATE `'.GROUPS_TABLE.'`
|
||||
SET name = \''.pwg_db_real_escape_string($_POST['rename_'.$group]).'\'
|
||||
WHERE id = '.$group.'
|
||||
;';
|
||||
pwg_query($query);
|
||||
pwg_activity('group', $group, 'edit', array('action'=>$action));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// +
|
||||
// |delete a group
|
||||
// +
|
||||
|
||||
if ($action=="delete" and isset($_POST['confirm_deletion']) and $_POST['confirm_deletion'])
|
||||
{
|
||||
foreach($groups as $group)
|
||||
{
|
||||
// destruction of the access linked to the group
|
||||
$query = '
|
||||
DELETE
|
||||
FROM '.GROUP_ACCESS_TABLE.'
|
||||
WHERE group_id = '.$group.'
|
||||
;';
|
||||
pwg_query($query);
|
||||
|
||||
// destruction of the users links for this group
|
||||
$query = '
|
||||
DELETE
|
||||
FROM '.USER_GROUP_TABLE.'
|
||||
WHERE group_id = '.$group.'
|
||||
;';
|
||||
pwg_query($query);
|
||||
|
||||
$query = '
|
||||
SELECT id, name
|
||||
FROM `'.GROUPS_TABLE.'`
|
||||
WHERE id = '.$group.'
|
||||
;';
|
||||
|
||||
$group_list = query2array($query, 'id', 'name');
|
||||
$groupids = array_keys($group_list);
|
||||
list($groupname) = array_values($group_list);
|
||||
|
||||
// destruction of the group
|
||||
$query = '
|
||||
DELETE
|
||||
FROM `'.GROUPS_TABLE.'`
|
||||
WHERE id = '.$group.'
|
||||
;';
|
||||
pwg_query($query);
|
||||
|
||||
trigger_notify('delete_group', $groupids);
|
||||
pwg_activity('group', $groupids, 'delete');
|
||||
|
||||
$page['infos'][] = l10n('group "%s" deleted', $groupname);
|
||||
}
|
||||
}
|
||||
|
||||
// +
|
||||
// |merge groups into a new one
|
||||
// +
|
||||
|
||||
if ($action=="merge" and count($groups) > 1)
|
||||
{
|
||||
// is the group not already existing ?
|
||||
$query = '
|
||||
SELECT COUNT(*)
|
||||
FROM `'.GROUPS_TABLE.'`
|
||||
WHERE name = \''.pwg_db_real_escape_string($_POST['merge']).'\'
|
||||
;';
|
||||
list($count) = pwg_db_fetch_row(pwg_query($query));
|
||||
if ($count != 0)
|
||||
{
|
||||
$page['errors'][] = l10n('This name is already used by another group.');
|
||||
}
|
||||
else
|
||||
{
|
||||
// creating the group
|
||||
$query = '
|
||||
INSERT INTO `'.GROUPS_TABLE.'`
|
||||
(name)
|
||||
VALUES
|
||||
(\''.pwg_db_real_escape_string($_POST['merge']).'\')
|
||||
;';
|
||||
pwg_query($query);
|
||||
$query = '
|
||||
SELECT id
|
||||
FROM `'.GROUPS_TABLE.'`
|
||||
WHERE name = \''.pwg_db_real_escape_string($_POST['merge']).'\'
|
||||
;';
|
||||
list($groupid) = pwg_db_fetch_row(pwg_query($query));
|
||||
pwg_activity('group', $groupid, 'add', array('action'=>$action, 'groups'=>implode(',', $groups)));
|
||||
}
|
||||
$grp_access = array();
|
||||
$usr_grp = array();
|
||||
foreach($groups as $group)
|
||||
{
|
||||
$query = '
|
||||
SELECT *
|
||||
FROM '.GROUP_ACCESS_TABLE.'
|
||||
WHERE group_id = '.$group.'
|
||||
;';
|
||||
$res=pwg_query($query);
|
||||
while ($row = pwg_db_fetch_assoc($res))
|
||||
{
|
||||
$new_grp_access= array(
|
||||
'cat_id' => $row['cat_id'],
|
||||
'group_id' => $groupid
|
||||
);
|
||||
if (!in_array($new_grp_access,$grp_access))
|
||||
{
|
||||
$grp_access[]=$new_grp_access;
|
||||
}
|
||||
}
|
||||
|
||||
$query = '
|
||||
SELECT *
|
||||
FROM '.USER_GROUP_TABLE.'
|
||||
WHERE group_id = '.$group.'
|
||||
;';
|
||||
$res=pwg_query($query);
|
||||
while ($row = pwg_db_fetch_assoc($res))
|
||||
{
|
||||
$new_usr_grp= array(
|
||||
'user_id' => $row['user_id'],
|
||||
'group_id' => $groupid
|
||||
);
|
||||
if (!in_array($new_usr_grp,$usr_grp))
|
||||
{
|
||||
$usr_grp[]=$new_usr_grp;
|
||||
}
|
||||
}
|
||||
}
|
||||
mass_inserts(USER_GROUP_TABLE, array('user_id','group_id'), $usr_grp);
|
||||
mass_inserts(GROUP_ACCESS_TABLE, array('group_id','cat_id'), $grp_access);
|
||||
|
||||
$page['infos'][] = l10n('group "%s" added', $_POST['merge']);
|
||||
}
|
||||
|
||||
// +
|
||||
// |duplicate a group
|
||||
// +
|
||||
|
||||
if ($action=="duplicate" )
|
||||
{
|
||||
foreach($groups as $group)
|
||||
{
|
||||
if ( empty($_POST['duplicate_'.$group.'']) )
|
||||
{
|
||||
break;
|
||||
}
|
||||
// is the group not already existing ?
|
||||
$query = '
|
||||
SELECT COUNT(*)
|
||||
FROM `'.GROUPS_TABLE.'`
|
||||
WHERE name = \''.pwg_db_real_escape_string($_POST['duplicate_'.$group.'']).'\'
|
||||
;';
|
||||
list($count) = pwg_db_fetch_row(pwg_query($query));
|
||||
if ($count != 0)
|
||||
{
|
||||
$page['errors'][] = l10n('This name is already used by another group.');
|
||||
break;
|
||||
}
|
||||
// creating the group
|
||||
$query = '
|
||||
INSERT INTO `'.GROUPS_TABLE.'`
|
||||
(name)
|
||||
VALUES
|
||||
(\''.pwg_db_real_escape_string($_POST['duplicate_'.$group.'']).'\')
|
||||
;';
|
||||
pwg_query($query);
|
||||
$query = '
|
||||
SELECT id
|
||||
FROM `'.GROUPS_TABLE.'`
|
||||
WHERE name = \''.pwg_db_real_escape_string($_POST['duplicate_'.$group.'']).'\'
|
||||
;';
|
||||
|
||||
list($groupid) = pwg_db_fetch_row(pwg_query($query));
|
||||
pwg_activity('group', $groupid, 'add', array('action'=>$action, 'group'=>$group));
|
||||
$query = '
|
||||
SELECT *
|
||||
FROM '.GROUP_ACCESS_TABLE.'
|
||||
WHERE group_id = '.$group.'
|
||||
;';
|
||||
$grp_access = array();
|
||||
$res=pwg_query($query);
|
||||
while ($row = pwg_db_fetch_assoc($res))
|
||||
{
|
||||
$grp_access[] = array(
|
||||
'cat_id' => $row['cat_id'],
|
||||
'group_id' => $groupid
|
||||
);
|
||||
}
|
||||
mass_inserts(GROUP_ACCESS_TABLE, array('group_id','cat_id'), $grp_access);
|
||||
|
||||
$query = '
|
||||
SELECT *
|
||||
FROM '.USER_GROUP_TABLE.'
|
||||
WHERE group_id = '.$group.'
|
||||
;';
|
||||
$usr_grp = array();
|
||||
$res=pwg_query($query);
|
||||
while ($row = pwg_db_fetch_assoc($res))
|
||||
{
|
||||
$usr_grp[] = array(
|
||||
'user_id' => $row['user_id'],
|
||||
'group_id' => $groupid
|
||||
);
|
||||
}
|
||||
mass_inserts(USER_GROUP_TABLE, array('user_id','group_id'), $usr_grp);
|
||||
|
||||
$page['infos'][] = l10n('group "%s" added', $_POST['duplicate_'.$group.'']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// +
|
||||
// | toggle_default
|
||||
// +
|
||||
|
||||
if ($action=="toggle_default")
|
||||
{
|
||||
foreach($groups as $group)
|
||||
{
|
||||
$query = '
|
||||
SELECT name, is_default
|
||||
FROM `'.GROUPS_TABLE.'`
|
||||
WHERE id = '.$group.'
|
||||
;';
|
||||
list($groupname, $is_default) = pwg_db_fetch_row(pwg_query($query));
|
||||
|
||||
// update of the group
|
||||
$query = '
|
||||
UPDATE `'.GROUPS_TABLE.'`
|
||||
SET is_default = \''.boolean_to_string(!get_boolean($is_default)).'\'
|
||||
WHERE id = '.$group.'
|
||||
;';
|
||||
pwg_query($query);
|
||||
|
||||
pwg_activity('group', $group, 'edit', array('action'=>$action));
|
||||
|
||||
$page['infos'][] = l10n('group "%s" updated', $groupname);
|
||||
}
|
||||
}
|
||||
invalidate_user_cache();
|
||||
}
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | template init |
|
||||
// +-----------------------------------------------------------------------+
|
||||
@@ -373,6 +48,7 @@ $template->assign(
|
||||
'F_ADD_ACTION' => get_root_url().'admin.php?page=group_list',
|
||||
'U_HELP' => get_root_url().'admin/popuphelp.php?page=group_list',
|
||||
'PWG_TOKEN' => get_pwg_token(),
|
||||
'CACHE_KEYS' => get_admin_client_cache_keys(array('groups', 'users')),
|
||||
)
|
||||
);
|
||||
|
||||
@@ -389,6 +65,7 @@ $result = pwg_query($query);
|
||||
|
||||
$admin_url = get_root_url().'admin.php?page=';
|
||||
$perm_url = $admin_url.'group_perm&group_id=';
|
||||
$users_url = $admin_url.'user_list&group=';
|
||||
$del_url = $admin_url.'group_list&delete=';
|
||||
$toggle_is_default_url = $admin_url.'group_list&toggle_is_default=';
|
||||
|
||||
@@ -418,6 +95,7 @@ SELECT u.'. $conf['user_fields']['username'].' AS username
|
||||
'MEMBERS' => l10n_dec('%d member', '%d members', count($members)),
|
||||
'U_DELETE' => $del_url.$row['id'].'&pwg_token='.get_pwg_token(),
|
||||
'U_PERM' => $perm_url.$row['id'],
|
||||
'U_USERS' => $users_url.$row['id'],
|
||||
'U_ISDEFAULT' => $toggle_is_default_url.$row['id'].'&pwg_token='.get_pwg_token(),
|
||||
)
|
||||
);
|
||||
|
||||
@@ -18,19 +18,26 @@ include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
|
||||
// +-----------------------------------------------------------------------+
|
||||
check_status(ACCESS_ADMINISTRATOR);
|
||||
|
||||
if (!empty($_POST))
|
||||
{
|
||||
check_pwg_token();
|
||||
check_input_parameter('cat_true', $_POST, true, PATTERN_ID);
|
||||
check_input_parameter('cat_false', $_POST, true, PATTERN_ID);
|
||||
}
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | variables init |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
if (isset($_GET['group_id']) and is_numeric($_GET['group_id']))
|
||||
if (!isset($_GET['group_id']))
|
||||
{
|
||||
$page['group'] = $_GET['group_id'];
|
||||
}
|
||||
else
|
||||
{
|
||||
die('group_id URL parameter is missing');
|
||||
fatal_error('group_id URL parameter is missing');
|
||||
}
|
||||
|
||||
check_input_parameter('group_id', $_GET, false, PATTERN_ID);
|
||||
|
||||
$page['group'] = $_GET['group_id'];
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | updates |
|
||||
// +-----------------------------------------------------------------------+
|
||||
@@ -157,6 +164,8 @@ $query_false.= '
|
||||
;';
|
||||
display_select_cat_wrapper($query_false,array(),'category_option_false');
|
||||
|
||||
$template->assign('PWG_TOKEN', get_pwg_token());
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | html code display |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
@@ -32,8 +32,8 @@ function add_core_tabs($sheets, $tab_id)
|
||||
case 'albums':
|
||||
global $my_base_url;
|
||||
$sheets['list'] = array('caption' => '<span class="icon-menu"></span>'.l10n('List'), 'url' => $my_base_url.'cat_list');
|
||||
$sheets['move'] = array('caption' => '<span class="icon-move"></span>'.l10n('Move'), 'url' => $my_base_url.'cat_move');
|
||||
$sheets['permalinks'] = array('caption' => '<span class="icon-link-1"></span>'.l10n('Permalinks'), 'url' => $my_base_url.'permalinks');
|
||||
$sheets['search'] = array('caption' => '<span class="icon-search"></span>'.l10n('Search'), 'url' => $my_base_url.'cat_search');
|
||||
break;
|
||||
|
||||
case 'batch_manager':
|
||||
@@ -149,6 +149,10 @@ function add_core_tabs($sheets, $tab_id)
|
||||
$sheets['pwg'] = array('caption' => l10n('Piwigo Update'), 'url' => $my_base_url);
|
||||
$sheets['ext'] = array('caption' => l10n('Extensions Update'), 'url' => $my_base_url.'&tab=ext');
|
||||
break;
|
||||
case 'site_update':
|
||||
global $my_base_url;
|
||||
$sheets['synchronization'] = array('caption' => l10n('Database synchronization with files'), 'url' => $my_base_url.'site_update&site=1');
|
||||
break;
|
||||
}
|
||||
|
||||
return $sheets;
|
||||
|
||||
@@ -250,7 +250,7 @@ else
|
||||
$template->append(
|
||||
'sizes',
|
||||
array(
|
||||
$field => $_POST[$field]
|
||||
$field => strip_tags($_POST[$field]) // strip_tags prevents from XSS attempt
|
||||
),
|
||||
true
|
||||
);
|
||||
|
||||
@@ -989,15 +989,20 @@ SELECT uppercats
|
||||
|
||||
/**
|
||||
*/
|
||||
function get_category_representant_properties($image_id)
|
||||
function get_category_representant_properties($image_id, $size = NULL)
|
||||
{
|
||||
$query = '
|
||||
SELECT id,representative_ext,path
|
||||
FROM '.IMAGES_TABLE.'
|
||||
WHERE id = '.$image_id.'
|
||||
;';
|
||||
|
||||
$row = pwg_db_fetch_assoc(pwg_query($query));
|
||||
$src = DerivativeImage::thumb_url($row);
|
||||
if ($size == NULL) {
|
||||
$src = DerivativeImage::thumb_url($row);
|
||||
} else {
|
||||
$src = DerivativeImage::url($size, $row);
|
||||
}
|
||||
$url = get_root_url().'admin.php?page=photo-'.$image_id;
|
||||
|
||||
return array(
|
||||
@@ -1571,7 +1576,7 @@ SELECT id, uppercats, global_rank, visible, status
|
||||
WHERE cat_id = '.$insert['id_uppercat'].'
|
||||
;';
|
||||
$granted_users = query2array($query, null, 'user_id');
|
||||
add_permission_on_category($inserted_id, array_unique(array_merge(get_admins(), array($user['id']), $granted_users)));
|
||||
add_permission_on_category($inserted_id, $granted_users);
|
||||
}
|
||||
elseif ('private' == $insert['status'])
|
||||
{
|
||||
@@ -1582,7 +1587,7 @@ SELECT id, uppercats, global_rank, visible, status
|
||||
pwg_activity('album', $inserted_id, 'add');
|
||||
|
||||
return array(
|
||||
'info' => l10n('Virtual album added'),
|
||||
'info' => l10n('Album added'),
|
||||
'id' => $inserted_id,
|
||||
);
|
||||
}
|
||||
@@ -2454,6 +2459,57 @@ SELECT name
|
||||
return $groupname;
|
||||
}
|
||||
|
||||
function delete_groups($group_ids)
|
||||
{
|
||||
|
||||
if (count($group_ids) == 0)
|
||||
{
|
||||
trigger_error('There is no group to delete', E_USER_WARNING);
|
||||
return false;
|
||||
}
|
||||
|
||||
$group_id_string = implode(',', $group_ids);
|
||||
|
||||
// destruction of the access linked to the group
|
||||
$query = '
|
||||
DELETE
|
||||
FROM '. GROUP_ACCESS_TABLE .'
|
||||
WHERE group_id IN ('. $group_id_string .')
|
||||
;';
|
||||
pwg_query($query);
|
||||
|
||||
// destruction of the users links for this group
|
||||
$query = '
|
||||
DELETE
|
||||
FROM '. USER_GROUP_TABLE .'
|
||||
WHERE group_id IN ('. $group_id_string .')
|
||||
;';
|
||||
pwg_query($query);
|
||||
|
||||
$query = '
|
||||
SELECT id, name
|
||||
FROM `'. GROUPS_TABLE .'`
|
||||
WHERE id IN ('. $group_id_string .')
|
||||
;';
|
||||
|
||||
$group_list = query2array($query, 'id', 'name');
|
||||
$groupids = array_keys($group_list);
|
||||
|
||||
// destruction of the group
|
||||
$query = '
|
||||
DELETE
|
||||
FROM `'. GROUPS_TABLE .'`
|
||||
WHERE id IN ('. $group_id_string .')
|
||||
;';
|
||||
pwg_query($query);
|
||||
|
||||
trigger_notify('delete_group', $groupids);
|
||||
pwg_activity('group', $groupids, 'delete');
|
||||
|
||||
|
||||
return $group_list;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the username corresponding to the given user identifier if exists.
|
||||
*
|
||||
@@ -2521,6 +2577,7 @@ function get_active_menu($menu_page)
|
||||
case 'cat_list':
|
||||
case 'cat_move':
|
||||
case 'cat_options':
|
||||
case 'cat_search':
|
||||
case 'permalinks':
|
||||
return 1;
|
||||
|
||||
@@ -2531,10 +2588,6 @@ function get_active_menu($menu_page)
|
||||
case 'notification_by_mail':
|
||||
return 2;
|
||||
|
||||
case 'plugins':
|
||||
case 'plugin':
|
||||
return 3;
|
||||
|
||||
case 'site_manager':
|
||||
case 'site_update':
|
||||
case 'stats':
|
||||
@@ -2542,7 +2595,7 @@ function get_active_menu($menu_page)
|
||||
case 'maintenance':
|
||||
case 'comments':
|
||||
case 'updates':
|
||||
return 4;
|
||||
return 3;
|
||||
|
||||
case 'configuration':
|
||||
case 'derivatives':
|
||||
@@ -2551,10 +2604,10 @@ function get_active_menu($menu_page)
|
||||
case 'themes':
|
||||
case 'theme':
|
||||
case 'languages':
|
||||
return 5;
|
||||
return 4;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -400,6 +400,7 @@ SELECT
|
||||
|
||||
if ($count <= $conf['history_autopurge_keep_lines'])
|
||||
{
|
||||
history_remove_summarized_column();
|
||||
return; // no need to purge for now
|
||||
}
|
||||
|
||||
@@ -463,6 +464,39 @@ DELETE
|
||||
WHERE id < '.$history_id_delete_before.'
|
||||
;';
|
||||
pwg_query($query);
|
||||
|
||||
history_remove_summarized_column();
|
||||
}
|
||||
|
||||
function history_remove_summarized_column()
|
||||
{
|
||||
global $conf;
|
||||
|
||||
if (isset($conf['history_summarized_dropped']) and $conf['history_summarized_dropped'])
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$query = '
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM '.HISTORY_TABLE.'
|
||||
;';
|
||||
list($count) = pwg_db_fetch_row(pwg_query($query));
|
||||
|
||||
if ($count > $conf['history_autopurge_keep_lines']+$conf['history_autopurge_blocksize'])
|
||||
{
|
||||
// it's not yet time to remove history.summarized
|
||||
return;
|
||||
}
|
||||
|
||||
$result = pwg_query('SHOW COLUMNS FROM `'.HISTORY_TABLE.'` LIKE "summarized";');
|
||||
if (pwg_db_num_rows($result))
|
||||
{
|
||||
pwg_query('ALTER TABLE `'.HISTORY_TABLE.'` DROP COLUMN `summarized`;');
|
||||
}
|
||||
|
||||
conf_update_param('history_summarized_dropped', true);
|
||||
}
|
||||
|
||||
add_event_handler('get_history', 'get_history');
|
||||
|
||||
@@ -100,9 +100,7 @@ function deactivate_non_standard_themes()
|
||||
global $page, $conf;
|
||||
|
||||
$standard_themes = array(
|
||||
'clear',
|
||||
'Sylvia',
|
||||
'dark',
|
||||
'modus',
|
||||
'elegant',
|
||||
'smartpocket',
|
||||
);
|
||||
@@ -146,9 +144,26 @@ SELECT theme
|
||||
// if the default theme has just been deactivated, let's set another core theme as default
|
||||
if (in_array($default_theme, $theme_ids))
|
||||
{
|
||||
// make sure default Piwigo theme is active
|
||||
$query = '
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM '.PREFIX_TABLE.'themes
|
||||
WHERE id = \''.PHPWG_DEFAULT_TEMPLATE.'\'
|
||||
;';
|
||||
list($counter) = pwg_db_fetch_row(pwg_query($query));
|
||||
if ($counter < 1)
|
||||
{
|
||||
// we need to activate theme first
|
||||
include_once(PHPWG_ROOT_PATH.'admin/include/themes.class.php');
|
||||
$themes = new themes();
|
||||
$themes->perform_action('activate', PHPWG_DEFAULT_TEMPLATE);
|
||||
}
|
||||
|
||||
// then associate it to default user
|
||||
$query = '
|
||||
UPDATE '.PREFIX_TABLE.'user_infos
|
||||
SET theme = \'elegant\'
|
||||
SET theme = \''.PHPWG_DEFAULT_TEMPLATE.'\'
|
||||
WHERE user_id = '.$conf['default_user_id'].'
|
||||
;';
|
||||
pwg_query($query);
|
||||
|
||||
@@ -237,11 +237,13 @@ SELECT
|
||||
}
|
||||
else
|
||||
{
|
||||
unlink($source_filepath);
|
||||
die('unexpected file type');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
unlink($source_filepath);
|
||||
die('forbidden file type');
|
||||
}
|
||||
|
||||
@@ -398,6 +400,8 @@ SELECT
|
||||
|
||||
fetchRemote($derivative_url, $dest);
|
||||
|
||||
trigger_notify('loc_end_add_uploaded_file', $image_infos);
|
||||
|
||||
return $image_id;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,421 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Dump MySQL database
|
||||
*
|
||||
* Here is an inline example:
|
||||
* <code>
|
||||
* $connection = @mysql_connect($dbhost,$dbuser,$dbpsw);
|
||||
* $dumper = new MySQLDump($dbname,'filename.sql',false,false);
|
||||
* $dumper->doDump();
|
||||
* </code>
|
||||
*
|
||||
* Special thanks to:
|
||||
* - Andrea Ingaglio <andrea@coders4fun.com> helping in development of all class code
|
||||
* - Dylan Pugh for precious advices halfing the size of the output file and for helping in debug
|
||||
*
|
||||
* @name MySQLDump
|
||||
* @author Daniele Viganò - CreativeFactory.it <daniele.vigano@creativefactory.it>
|
||||
* @version 2.20 - 02/11/2007
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*/
|
||||
|
||||
class MySQLDump {
|
||||
/**
|
||||
* @access private
|
||||
*/
|
||||
var $database = null;
|
||||
|
||||
/**
|
||||
* @access private
|
||||
*/
|
||||
var $compress = false;
|
||||
|
||||
/**
|
||||
* @access private
|
||||
*/
|
||||
var $hexValue = false;
|
||||
|
||||
/**
|
||||
* The output filename
|
||||
* @access private
|
||||
*/
|
||||
var $filename = null;
|
||||
|
||||
/**
|
||||
* The pointer of the output file
|
||||
* @access private
|
||||
*/
|
||||
var $file = null;
|
||||
|
||||
/**
|
||||
* @access private
|
||||
*/
|
||||
var $isWritten = false;
|
||||
|
||||
/**
|
||||
* Class constructor
|
||||
* @param string $db The database name
|
||||
* @param string $filepath The file where the dump will be written
|
||||
* @param boolean $compress It defines if the output file is compress (gzip) or not
|
||||
* @param boolean $hexValue It defines if the outup values are base-16 or not
|
||||
*/
|
||||
function __construct($db = null, $filepath = 'dump.sql', $compress = false, $hexValue = false){
|
||||
$this->compress = $compress;
|
||||
if ( !$this->setOutputFile($filepath) )
|
||||
return false;
|
||||
return $this->setDatabase($db);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the database to work on
|
||||
* @param string $db The database name
|
||||
*/
|
||||
function setDatabase($db){
|
||||
$this->database = $db;
|
||||
if ( !@mysql_select_db($this->database) )
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the database where the class is working on
|
||||
* @return string
|
||||
*/
|
||||
function getDatabase(){
|
||||
return $this->database;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the output file type (It can be made only if the file hasn't been already written)
|
||||
* @param boolean $compress If it's true, the output file will be compressed
|
||||
*/
|
||||
function setCompress($compress){
|
||||
if ( $this->isWritten )
|
||||
return false;
|
||||
$this->compress = $compress;
|
||||
$this->openFile($this->filename);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns if the output file is or not compressed
|
||||
* @return boolean
|
||||
*/
|
||||
function getCompress(){
|
||||
return $this->compress;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the output file
|
||||
* @param string $filepath The file where the dump will be written
|
||||
*/
|
||||
function setOutputFile($filepath){
|
||||
if ( $this->isWritten )
|
||||
return false;
|
||||
$this->filename = $filepath;
|
||||
$this->file = $this->openFile($this->filename);
|
||||
return $this->file;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the output filename
|
||||
* @return string
|
||||
*/
|
||||
function getOutputFile(){
|
||||
return $this->filename;
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes to file the $table's structure
|
||||
* @param string $table The table name
|
||||
*/
|
||||
function getTableStructure($table){
|
||||
if ( !$this->setDatabase($this->database) )
|
||||
return false;
|
||||
// Structure Header
|
||||
$structure = "-- \n";
|
||||
$structure .= "-- Table structure for table `{$table}` \n";
|
||||
$structure .= "-- \n\n";
|
||||
// Dump Structure
|
||||
$structure .= 'DROP TABLE IF EXISTS `'.$table.'`;'."\n";
|
||||
$structure .= "CREATE TABLE `".$table."` (\n";
|
||||
$records = @mysql_query('SHOW FIELDS FROM `'.$table.'`');
|
||||
if ( @mysql_num_rows($records) == 0 )
|
||||
return false;
|
||||
while ( $record = mysql_fetch_assoc($records) ) {
|
||||
$structure .= '`'.$record['Field'].'` '.$record['Type'];
|
||||
if ( isset($record['Default']) )
|
||||
$structure .= ' DEFAULT \''.$record['Default'].'\'';
|
||||
if ( @strcmp($record['Null'],'YES') != 0 )
|
||||
$structure .= ' NOT NULL';
|
||||
elseif ( is_null($record['Default']) )
|
||||
$structure .= ' DEFAULT NULL';
|
||||
if ( !empty($record['Extra']) )
|
||||
$structure .= ' '.$record['Extra'];
|
||||
$structure .= ",\n";
|
||||
}
|
||||
$structure = @ereg_replace(",\n$", null, $structure);
|
||||
|
||||
// Save all Column Indexes
|
||||
$structure .= $this->getSqlKeysTable($table);
|
||||
$structure .= "\n)";
|
||||
|
||||
//Save table engine
|
||||
$records = @mysql_query("SHOW TABLE STATUS LIKE '".$table."'");
|
||||
|
||||
if ( $record = @mysql_fetch_assoc($records) ) {
|
||||
if ( !empty($record['Engine']) )
|
||||
$structure .= ' ENGINE='.$record['Engine'];
|
||||
if ( !empty($record['Auto_increment']) )
|
||||
$structure .= ' AUTO_INCREMENT='.$record['Auto_increment'];
|
||||
}
|
||||
|
||||
$structure .= ";\n\n-- --------------------------------------------------------\n\n";
|
||||
$this->saveToFile($this->file,$structure);
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes to file the $table's data
|
||||
* @param string $table The table name
|
||||
* @param boolean $hexValue It defines if the output is base 16 or not
|
||||
*/
|
||||
function getTableData($table,$hexValue = true) {
|
||||
if ( !$this->setDatabase($this->database) )
|
||||
return false;
|
||||
// Header
|
||||
$data = "-- \n";
|
||||
$data .= "-- Dumping data for table `$table` \n";
|
||||
$data .= "-- \n\n";
|
||||
|
||||
$records = mysql_query('SHOW FIELDS FROM `'.$table.'`');
|
||||
$num_fields = @mysql_num_rows($records);
|
||||
if ( $num_fields == 0 )
|
||||
return false;
|
||||
// Field names
|
||||
$selectStatement = "SELECT ";
|
||||
$insertStatement = "INSERT INTO `$table` (";
|
||||
$hexField = array();
|
||||
for ($x = 0; $x < $num_fields; $x++) {
|
||||
$record = @mysql_fetch_assoc($records);
|
||||
if ( ($hexValue) && ($this->isTextValue($record['Type'])) ) {
|
||||
$selectStatement .= 'HEX(`'.$record['Field'].'`)';
|
||||
$hexField [$x] = true;
|
||||
}
|
||||
else
|
||||
$selectStatement .= '`'.$record['Field'].'`';
|
||||
$insertStatement .= '`'.$record['Field'].'`';
|
||||
$insertStatement .= ", ";
|
||||
$selectStatement .= ", ";
|
||||
}
|
||||
$insertStatement = @substr($insertStatement,0,-2).') VALUES'."\n";
|
||||
$selectStatement = @substr($selectStatement,0,-2).' FROM `'.$table.'`';
|
||||
|
||||
$records = @mysql_query($selectStatement);
|
||||
$num_rows = @mysql_num_rows($records);
|
||||
$num_fields = @mysql_num_fields($records);
|
||||
// Dump data
|
||||
if ( $num_rows > 0 ) {
|
||||
$data .= $insertStatement;
|
||||
for ($i = 0; $i < $num_rows; $i++) {
|
||||
$record = @mysql_fetch_assoc($records);
|
||||
$data .= ' (';
|
||||
for ($j = 0; $j < $num_fields; $j++) {
|
||||
$field_name = @mysql_field_name($records, $j);
|
||||
if ( @$hexField[$j] && (@strlen($record[$field_name]) > 0) )
|
||||
$data .= "0x".$record[$field_name];
|
||||
elseif (is_null($record[$field_name]))
|
||||
$data .= "NULL";
|
||||
else
|
||||
$data .= "'".@str_replace('\"','"',@mysql_real_escape_string($record[$field_name]))."'";
|
||||
$data .= ',';
|
||||
}
|
||||
$data = @substr($data,0,-1).")";
|
||||
$data .= ( $i < ($num_rows-1) ) ? ',' : ';';
|
||||
$data .= "\n";
|
||||
//if data in greather than 1MB save
|
||||
if (strlen($data) > 1048576) {
|
||||
$this->saveToFile($this->file,$data);
|
||||
$data = '';
|
||||
}
|
||||
}
|
||||
$data .= "\n-- --------------------------------------------------------\n\n";
|
||||
$this->saveToFile($this->file,$data);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes to file all the selected database tables structure
|
||||
* @return boolean
|
||||
*/
|
||||
function getDatabaseStructure(){
|
||||
$records = @mysql_query('SHOW TABLES');
|
||||
if ( @mysql_num_rows($records) == 0 )
|
||||
return false;
|
||||
$structure = '';
|
||||
while ( $record = @mysql_fetch_row($records) ) {
|
||||
$structure .= $this->getTableStructure($record[0]);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes to file all the selected database tables data
|
||||
* @param boolean $hexValue It defines if the output is base-16 or not
|
||||
*/
|
||||
function getDatabaseData($hexValue = true){
|
||||
$records = @mysql_query('SHOW TABLES');
|
||||
if ( @mysql_num_rows($records) == 0 )
|
||||
return false;
|
||||
while ( $record = @mysql_fetch_row($records) ) {
|
||||
$this->getTableData($record[0],$hexValue);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes to file the selected database dump
|
||||
*/
|
||||
function doDump() {
|
||||
$this->saveToFile($this->file,"SET FOREIGN_KEY_CHECKS = 0;\n\n");
|
||||
$this->getDatabaseStructure();
|
||||
$this->getDatabaseData($this->hexValue);
|
||||
$this->saveToFile($this->file,"SET FOREIGN_KEY_CHECKS = 1;\n\n");
|
||||
$this->closeFile($this->file);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Look at the doDump() method
|
||||
*/
|
||||
function writeDump($filename) {
|
||||
if ( !$this->setOutputFile($filename) )
|
||||
return false;
|
||||
$this->doDump();
|
||||
$this->closeFile($this->file);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @access private
|
||||
*/
|
||||
function getSqlKeysTable ($table) {
|
||||
$primary = "";
|
||||
$unique = array();
|
||||
$index = array();
|
||||
$fulltext = array();
|
||||
$results = mysql_query("SHOW KEYS FROM `{$table}`");
|
||||
if ( @mysql_num_rows($results) == 0 )
|
||||
return false;
|
||||
while($row = mysql_fetch_object($results)) {
|
||||
if (($row->Key_name == 'PRIMARY') AND ($row->Index_type == 'BTREE')) {
|
||||
if ( $primary == "" )
|
||||
$primary = " PRIMARY KEY (`{$row->Column_name}`";
|
||||
else
|
||||
$primary .= ", `{$row->Column_name}`";
|
||||
}
|
||||
if (($row->Key_name != 'PRIMARY') AND ($row->Non_unique == '0') AND ($row->Index_type == 'BTREE')) {
|
||||
if ( (empty($unique)) OR (empty($unique[$row->Key_name])) )
|
||||
$unique[$row->Key_name] = " UNIQUE KEY `{$row->Key_name}` (`{$row->Column_name}`";
|
||||
else
|
||||
$unique[$row->Key_name] .= ", `{$row->Column_name}`";
|
||||
}
|
||||
if (($row->Key_name != 'PRIMARY') AND ($row->Non_unique == '1') AND ($row->Index_type == 'BTREE')) {
|
||||
if ( (empty($index)) OR (empty($index[$row->Key_name])) )
|
||||
$index[$row->Key_name] = " KEY `{$row->Key_name}` (`{$row->Column_name}`";
|
||||
else
|
||||
$index[$row->Key_name] .= ", `{$row->Column_name}`";
|
||||
}
|
||||
if (($row->Key_name != 'PRIMARY') AND ($row->Non_unique == '1') AND ($row->Index_type == 'FULLTEXT')) {
|
||||
if ( (empty($fulltext)) OR (empty($fulltext[$row->Key_name])) )
|
||||
$fulltext[$row->Key_name] = " FULLTEXT `{$row->Key_name}` (`{$row->Column_name}`";
|
||||
else
|
||||
$fulltext[$row->Key_name] .= ", `{$row->Column_name}`";
|
||||
}
|
||||
}
|
||||
$sqlKeyStatement = '';
|
||||
// generate primary, unique, key and fulltext
|
||||
if ( $primary != "" ) {
|
||||
$sqlKeyStatement .= ",\n";
|
||||
$primary .= ")";
|
||||
$sqlKeyStatement .= $primary;
|
||||
}
|
||||
if (!empty($unique)) {
|
||||
foreach ($unique as $keyName => $keyDef) {
|
||||
$sqlKeyStatement .= ",\n";
|
||||
$keyDef .= ")";
|
||||
$sqlKeyStatement .= $keyDef;
|
||||
|
||||
}
|
||||
}
|
||||
if (!empty($index)) {
|
||||
foreach ($index as $keyName => $keyDef) {
|
||||
$sqlKeyStatement .= ",\n";
|
||||
$keyDef .= ")";
|
||||
$sqlKeyStatement .= $keyDef;
|
||||
}
|
||||
}
|
||||
if (!empty($fulltext)) {
|
||||
foreach ($fulltext as $keyName => $keyDef) {
|
||||
$sqlKeyStatement .= ",\n";
|
||||
$keyDef .= ")";
|
||||
$sqlKeyStatement .= $keyDef;
|
||||
}
|
||||
}
|
||||
return $sqlKeyStatement;
|
||||
}
|
||||
|
||||
/**
|
||||
* @access private
|
||||
*/
|
||||
function isTextValue($field_type) {
|
||||
switch ($field_type) {
|
||||
case "tinytext":
|
||||
case "text":
|
||||
case "mediumtext":
|
||||
case "longtext":
|
||||
case "binary":
|
||||
case "varbinary":
|
||||
case "tinyblob":
|
||||
case "blob":
|
||||
case "mediumblob":
|
||||
case "longblob":
|
||||
return True;
|
||||
break;
|
||||
default:
|
||||
return False;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @access private
|
||||
*/
|
||||
function openFile($filename) {
|
||||
$file = false;
|
||||
if ( $this->compress )
|
||||
$file = @gzopen($filename, "w9");
|
||||
else
|
||||
$file = @fopen($filename, "w");
|
||||
return $file;
|
||||
}
|
||||
|
||||
/**
|
||||
* @access private
|
||||
*/
|
||||
function saveToFile($file, $data) {
|
||||
if ( $this->compress )
|
||||
@gzwrite($file, $data);
|
||||
else
|
||||
@fwrite($file, $data);
|
||||
$this->isWritten = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @access private
|
||||
*/
|
||||
function closeFile($file) {
|
||||
if ( $this->compress )
|
||||
@gzclose($file);
|
||||
else
|
||||
@fclose($file);
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -285,6 +285,7 @@ DELETE FROM '. PLUGINS_TABLE .'
|
||||
'uri'=>'',
|
||||
'description'=>'',
|
||||
'author'=>'',
|
||||
'hasSettings'=>false,
|
||||
);
|
||||
$plg_data = file_get_contents($path.'/main.inc.php', null, null, 0, 2048);
|
||||
|
||||
@@ -316,6 +317,10 @@ DELETE FROM '. PLUGINS_TABLE .'
|
||||
{
|
||||
$plugin['author uri'] = trim($val[1]);
|
||||
}
|
||||
if (preg_match("/Has Settings:\\s*(true|True)/", $plg_data, $val))
|
||||
{
|
||||
$plugin['hasSettings'] = true;
|
||||
}
|
||||
if (!empty($plugin['uri']) and strpos($plugin['uri'] , 'extension_view.php?eid='))
|
||||
{
|
||||
list( , $extension) = explode('extension_view.php?eid=', $plugin['uri']);
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | This file is part of Piwigo. |
|
||||
// | |
|
||||
// | For copyright and license information, please view the COPYING.txt |
|
||||
// | file that was distributed with this source code. |
|
||||
// +-----------------------------------------------------------------------+
|
||||
<?php
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | This file is part of Piwigo. |
|
||||
// | |
|
||||
// | For copyright and license information, please view the COPYING.txt |
|
||||
// | file that was distributed with this source code. |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
|
||||
|
||||
@@ -29,7 +29,7 @@ class updates
|
||||
{
|
||||
$this->types = array($page);
|
||||
}
|
||||
$this->default_themes = array('clear', 'dark', 'Sylvia', 'elegant', 'smartpocket');
|
||||
$this->default_themes = array('modus', 'elegant', 'smartpocket');
|
||||
$this->default_plugins = array('AdminTools', 'TakeATour', 'language_switch', 'LocalFilesEditor');
|
||||
|
||||
foreach ($this->types as $type)
|
||||
@@ -77,6 +77,7 @@ class updates
|
||||
|
||||
$url = PHPWG_URL.'/download/all_versions.php';
|
||||
$url.= '?rand='.md5(uniqid(rand(), true)); // Avoid server cache
|
||||
$url.= '&show_requirements';
|
||||
|
||||
if (@fetchRemote($url, $result)
|
||||
and $all_versions = @explode("\n", $result)
|
||||
@@ -84,29 +85,34 @@ class updates
|
||||
{
|
||||
$new_versions['piwigo.org-checked'] = true;
|
||||
$last_version = trim($all_versions[0]);
|
||||
list($last_version_number, $last_version_php) = explode('/', trim($all_versions[0]));
|
||||
|
||||
if (version_compare(PHPWG_VERSION, $last_version, '<'))
|
||||
if (version_compare(PHPWG_VERSION, $last_version_number, '<'))
|
||||
{
|
||||
$last_branch = get_branch_from_version($last_version);
|
||||
$last_branch = get_branch_from_version($last_version_number);
|
||||
|
||||
if ($last_branch == $actual_branch)
|
||||
{
|
||||
$new_versions['minor'] = $last_version;
|
||||
$new_versions['minor'] = $last_version_number;
|
||||
$new_versions['minor_php'] = $last_version_php;
|
||||
}
|
||||
else
|
||||
{
|
||||
$new_versions['major'] = $last_version;
|
||||
$new_versions['major'] = $last_version_number;
|
||||
$new_versions['major_php'] = $last_version_php;
|
||||
|
||||
// Check if new version exists in same branch
|
||||
foreach ($all_versions as $version)
|
||||
{
|
||||
$branch = get_branch_from_version($version);
|
||||
list($version_number, $version_php) = explode('/', trim($version));
|
||||
$branch = get_branch_from_version($version_number);
|
||||
|
||||
if ($branch == $actual_branch)
|
||||
{
|
||||
if (version_compare(PHPWG_VERSION, $version, '<'))
|
||||
if (version_compare(PHPWG_VERSION, $version_number, '<'))
|
||||
{
|
||||
$new_versions['minor'] = $version;
|
||||
$new_versions['minor'] = $version_number;
|
||||
$new_versions['minor_php'] = $version_php;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -448,60 +454,6 @@ class updates
|
||||
}
|
||||
}
|
||||
|
||||
static function dump_database($include_history=false)
|
||||
{
|
||||
global $page, $conf, $cfgBase;
|
||||
|
||||
if (version_compare(PHPWG_VERSION, '2.1', '<'))
|
||||
{
|
||||
$conf['db_base'] = $cfgBase;
|
||||
}
|
||||
|
||||
include(PHPWG_ROOT_PATH.'admin/include/mysqldump.php');
|
||||
|
||||
$path = PHPWG_ROOT_PATH.$conf['data_location'].'update';
|
||||
|
||||
if (@mkgetdir($path)
|
||||
and ($backupFile = tempnam($path, 'sql'))
|
||||
and ($dumper = new MySQLDump($conf['db_base'],$backupFile,false,false)))
|
||||
{
|
||||
foreach (get_defined_constants() as $constant => $value)
|
||||
{
|
||||
if (preg_match('/_TABLE$/', $constant))
|
||||
{
|
||||
$dumper->getTableStructure($value);
|
||||
if ($constant == 'HISTORY_TABLE' and !$include_history)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$dumper->getTableData($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (@filesize($backupFile))
|
||||
{
|
||||
$http_headers = array(
|
||||
'Content-Length: '.@filesize($backupFile),
|
||||
'Content-Type: text/x-sql',
|
||||
'Content-Disposition: attachment; filename="database.sql";',
|
||||
'Content-Transfer-Encoding: binary',
|
||||
);
|
||||
|
||||
foreach ($http_headers as $header) {
|
||||
header($header);
|
||||
}
|
||||
|
||||
@readfile($backupFile);
|
||||
deltree(PHPWG_ROOT_PATH.$conf['data_location'].'update');
|
||||
exit();
|
||||
}
|
||||
else
|
||||
{
|
||||
$page['errors'][] = l10n('Unable to dump database.');
|
||||
}
|
||||
}
|
||||
|
||||
static function upgrade_to($upgrade_to, &$step, $check_current_version=true)
|
||||
{
|
||||
global $page, $conf, $template;
|
||||
|
||||
@@ -44,28 +44,6 @@ $tabsheet->assign();
|
||||
// | actions |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
//check if images have no md5sum in database
|
||||
$query = '
|
||||
SELECT COUNT(*)
|
||||
FROM '.CATEGORIES_TABLE.'
|
||||
WHERE dir IS NOT NULL
|
||||
;';
|
||||
list($counter) = pwg_db_fetch_row(pwg_query($query));
|
||||
if ($counter > 0)
|
||||
{
|
||||
$query = '
|
||||
SELECT COUNT(*)
|
||||
FROM '.IMAGES_TABLE.'
|
||||
WHERE storage_category_id IS NOT NULL
|
||||
AND md5sum IS NULL
|
||||
;';
|
||||
list($counter) = pwg_db_fetch_row(pwg_query($query));
|
||||
if ($counter > 0)
|
||||
{
|
||||
$page['warnings'][] = '<a href="admin.php?page=batch_manager&filter=prefilter-no_sync_md5sum">'.l10n('Some checksums are missing.').'<i class="icon-right"></i></a>';
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($page['nb_pending_comments']))
|
||||
{
|
||||
$message = l10n('User comments').' <i class="icon-chat"></i> ';
|
||||
@@ -209,6 +187,220 @@ SELECT MIN(date_available)
|
||||
|
||||
trigger_notify('loc_end_intro');
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | get activity data |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
$nb_weeks = $conf['dashboard_activity_nb_weeks'];
|
||||
$date = new DateTime();
|
||||
//Array for the JS tooltip
|
||||
$activity_last_weeks = array();
|
||||
//Count mondays
|
||||
$mondays = 0;
|
||||
//Get mondays number for the chart legend
|
||||
$week_number = array();
|
||||
//Array for sorting days in circle size
|
||||
$temp_data = array();
|
||||
|
||||
//Get data from $nb_weeks last weeks
|
||||
while ($mondays < $nb_weeks)
|
||||
{
|
||||
if ($date->format('D') == 'Mon')
|
||||
{
|
||||
$week_number[] = $date->format('W');
|
||||
$mondays += 1;
|
||||
}
|
||||
|
||||
$date->sub(new DateInterval('P1D'));
|
||||
}
|
||||
|
||||
$week_number = array_reverse($week_number);
|
||||
|
||||
$date_string = $date->format('Y-m-d');
|
||||
$query = '
|
||||
SELECT *
|
||||
FROM `'.ACTIVITY_TABLE.'`
|
||||
WHERE occured_on >= "'.$date_string.'%"
|
||||
;';
|
||||
|
||||
$result = query2array($query, null);
|
||||
|
||||
foreach ($result as $row)
|
||||
{
|
||||
$day_date = new DateTime($row['occured_on']);
|
||||
|
||||
$week = 0;
|
||||
for ($i=0; $i < $nb_weeks; $i++)
|
||||
{
|
||||
if ($week_number[$i] == $day_date->format('W'))
|
||||
{
|
||||
$week = $i;
|
||||
}
|
||||
}
|
||||
$day_nb = $day_date->format('N');
|
||||
|
||||
@$activity_last_weeks[$week][$day_nb]['details'][ucfirst($row['object'])][ucfirst($row['action'])] += 1;
|
||||
@$activity_last_weeks[$week][$day_nb]['number'] += 1;
|
||||
@$activity_last_weeks[$week][$day_nb]['date'] = format_date($day_date->getTimestamp());
|
||||
}
|
||||
|
||||
foreach($activity_last_weeks as $week => $i)
|
||||
{
|
||||
foreach($i as $day => $j)
|
||||
{
|
||||
$details = $j['details'];
|
||||
ksort($details);
|
||||
$activity_last_weeks[$week][$day]['details'] = $details;
|
||||
if ($j['number'] > 0)
|
||||
{
|
||||
$temp_data[] = array('x' => $j['number'], 'd'=>$day, 'w'=>$week);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Algorithm to sort days in circle size :
|
||||
// * Get the difference between sorted numbers of activity per day (only not null numbers)
|
||||
// * Split days max $circle_sizes time on the biggest difference (but not below 120%)
|
||||
// * Set the sizes according to the groups created
|
||||
|
||||
//Function to sort days by number of activity
|
||||
function cmp_day($a, $b)
|
||||
{
|
||||
if ($a['x'] == $b['x'])
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return ($a['x'] < $b['x']) ? -1 : 1;
|
||||
}
|
||||
|
||||
usort($temp_data, 'cmp_day');
|
||||
|
||||
//Get the percent difference
|
||||
$diff_x = array();
|
||||
|
||||
for ($i=1; $i < count($temp_data); $i++)
|
||||
{
|
||||
$diff_x[] = $temp_data[$i]['x']/$temp_data[$i-1]['x']*100;
|
||||
}
|
||||
|
||||
$split = 0;
|
||||
//Split (split represented by -1)
|
||||
if (count($diff_x) > 0)
|
||||
{
|
||||
while (max($diff_x) > 120)
|
||||
{
|
||||
$diff_x[array_search(max($diff_x), $diff_x)] = -1;
|
||||
$split++;
|
||||
}
|
||||
}
|
||||
|
||||
//Fill empty chart data for the template
|
||||
$chart_data = array();
|
||||
for ($i=0; $i < $nb_weeks; $i++)
|
||||
{
|
||||
for ($j=1; $j <= 7; $j++)
|
||||
{
|
||||
$chart_data[$i][$j] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
$size = 1;
|
||||
$chart_data[$temp_data[0]['w']][$temp_data[0]['d']] = $size;
|
||||
//Set sizes in chart data
|
||||
for ($i=1; $i < count($temp_data); $i++)
|
||||
{
|
||||
if ($diff_x[$i-1] == -1)
|
||||
{
|
||||
$size++;
|
||||
}
|
||||
$chart_data[$temp_data[$i]['w']][$temp_data[$i]['d']] = $size;
|
||||
}
|
||||
|
||||
//Assign data for the template
|
||||
$template->assign('ACTIVITY_WEEK_NUMBER',$week_number);
|
||||
$template->assign('ACTIVITY_LAST_WEEKS', $activity_last_weeks);
|
||||
$template->assign('ACTIVITY_CHART_DATA',$chart_data);
|
||||
$template->assign('ACTIVITY_CHART_NUMBER_SIZES',$size);
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | get storage data |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
$video_format = array('webm','webmv','ogg','ogv','mp4','m4v');
|
||||
$data_storage = array();
|
||||
|
||||
//Select files in Image_Table
|
||||
$query = '
|
||||
SELECT file, filesize
|
||||
FROM `'.IMAGES_TABLE.'`
|
||||
;';
|
||||
|
||||
$result = query2array($query, null);
|
||||
|
||||
foreach ($result as $file)
|
||||
{
|
||||
$tabString = explode('.',$file['file']);
|
||||
$ext = $tabString[count($tabString) -1];
|
||||
$size = $file['filesize'];
|
||||
if (in_array($ext, $conf['picture_ext']))
|
||||
{
|
||||
if (isset($data_storage['Photos']))
|
||||
{
|
||||
$data_storage['Photos'] += $size;
|
||||
} else {
|
||||
$data_storage['Photos'] = $size;
|
||||
}
|
||||
} elseif (in_array($ext, $video_format)) {
|
||||
if (isset($data_storage['Videos']))
|
||||
{
|
||||
$data_storage['Videos'] += $size;
|
||||
} else {
|
||||
$data_storage['Videos'] = $size;
|
||||
}
|
||||
} else {
|
||||
if (isset($data_storage['Others']))
|
||||
{
|
||||
$data_storage['Others'] += $size;
|
||||
} else {
|
||||
$data_storage['Others'] = $size;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Select files from format table
|
||||
$query = '
|
||||
SELECT SUM(filesize)
|
||||
FROM `'.IMAGE_FORMAT_TABLE.'`
|
||||
;';
|
||||
|
||||
$result = query2array($query);
|
||||
|
||||
if (isset($result[0]['SUM(filesize)']))
|
||||
{
|
||||
$data_storage['Formats'] = $result[0]['SUM(filesize)'];
|
||||
}
|
||||
|
||||
//If the host is not windows, get the cache size
|
||||
if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN')
|
||||
{
|
||||
$f = './_data';
|
||||
$io = popen ( '/usr/bin/du -sk ' . $f, 'r' );
|
||||
$size = fgets ($io, 4096);
|
||||
$size = substr ( $size, 0, strpos ( $size, "\t" ) );
|
||||
pclose ( $io );
|
||||
$data_storage['Cache'] = $size;
|
||||
}
|
||||
|
||||
//Calculate total storage
|
||||
$total_storage = 0;
|
||||
foreach ($data_storage as $value)
|
||||
{
|
||||
$total_storage += $value;
|
||||
}
|
||||
|
||||
//Pass data to HTML
|
||||
$template->assign('STORAGE_TOTAL',$total_storage);
|
||||
$template->assign('STORAGE_CHART_DATA',$data_storage);
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | sending html code |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
@@ -496,12 +496,24 @@ if (!isset($_POST) or (count($_POST) ==0))
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | Treatment of tab post |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
if (!empty($_POST))
|
||||
{
|
||||
check_pwg_token();
|
||||
}
|
||||
|
||||
switch ($page['mode'])
|
||||
{
|
||||
case 'param' :
|
||||
{
|
||||
if (isset($_POST['param_submit']))
|
||||
{
|
||||
$_POST['nbm_send_mail_as'] = strip_tags($_POST['nbm_send_mail_as']);
|
||||
|
||||
check_input_parameter('nbm_send_html_mail', $_POST, false, '/^(true|false)$/');
|
||||
check_input_parameter('nbm_send_detailed_content', $_POST, false, '/^(true|false)$/');
|
||||
check_input_parameter('nbm_send_recent_post_dates', $_POST, false, '/^(true|false)$/');
|
||||
|
||||
$updated_param_count = 0;
|
||||
// Update param
|
||||
$result = pwg_query('select param, value from '.CONFIG_TABLE.' where param like \'nbm\\_%\'');
|
||||
@@ -509,17 +521,8 @@ switch ($page['mode'])
|
||||
{
|
||||
if (isset($_POST[$nbm_user['param']]))
|
||||
{
|
||||
$value = $_POST[$nbm_user['param']];
|
||||
|
||||
$query = '
|
||||
update
|
||||
'.CONFIG_TABLE.'
|
||||
set
|
||||
value = \''. str_replace("\'", "''", $value).'\'
|
||||
where
|
||||
param = \''.$nbm_user['param'].'\';';
|
||||
pwg_query($query);
|
||||
$updated_param_count += 1;
|
||||
conf_update_param($nbm_user['param'], $_POST[$nbm_user['param']], true);
|
||||
$updated_param_count++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -527,9 +530,6 @@ where
|
||||
'%d parameter was updated.', '%d parameters were updated.',
|
||||
$updated_param_count
|
||||
);
|
||||
|
||||
// Reload conf with new values
|
||||
load_conf_from_db('param like \'nbm\\_%\'');
|
||||
}
|
||||
}
|
||||
case 'subscribe' :
|
||||
@@ -574,6 +574,7 @@ $template->assign
|
||||
(
|
||||
array
|
||||
(
|
||||
'PWG_TOKEN' => get_pwg_token(),
|
||||
'U_HELP' => get_root_url().'admin/popuphelp.php?page=notification_by_mail',
|
||||
'F_ACTION'=> $base_url.get_query_string_diff(array())
|
||||
)
|
||||
|
||||
@@ -26,7 +26,13 @@ function parse_sort_variables(
|
||||
{
|
||||
$base_url .= $is_first ? '?' : '&';
|
||||
$is_first = false;
|
||||
$base_url .= $key.'='.urlencode($value);
|
||||
|
||||
if (!in_array($key, array('page', 'psf', 'dpsf', 'pwg_token')))
|
||||
{
|
||||
fatal_error('unexpected URL get key');
|
||||
}
|
||||
|
||||
$base_url .= urlencode($key).'='.urlencode($value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -235,7 +235,7 @@ $template->assign(
|
||||
|
||||
'PATH'=>$row['path'],
|
||||
|
||||
'TN_SRC' => DerivativeImage::url(IMG_THUMB, $src_image),
|
||||
'TN_SRC' => DerivativeImage::url(IMG_MEDIUM, $src_image),
|
||||
'FILE_SRC' => DerivativeImage::url(IMG_LARGE, $src_image),
|
||||
|
||||
'NAME' =>
|
||||
@@ -246,6 +246,8 @@ $template->assign(
|
||||
|
||||
'DIMENSIONS' => @$row['width'].' * '.@$row['height'],
|
||||
|
||||
'FORMAT' => ($row['width'] >= $row['height'])? 1:0,//0:horizontal, 1:vertical
|
||||
|
||||
'FILESIZE' => @$row['filesize'].' KB',
|
||||
|
||||
'REGISTRATION_DATE' => format_date($row['date_available']),
|
||||
@@ -280,13 +282,17 @@ while ($user_row = pwg_db_fetch_assoc($result))
|
||||
$row['added_by'] = $user_row['username'];
|
||||
}
|
||||
|
||||
$extTab = explode('.',$row['file']);
|
||||
|
||||
$intro_vars = array(
|
||||
'file' => l10n('Original file : %s', $row['file']),
|
||||
'add_date' => l10n('Posted %s on %s', time_since($row['date_available'], 'year'), format_date($row['date_available'], array('day', 'month', 'year'))),
|
||||
'file' => l10n('%s', $row['file']),
|
||||
'date' => l10n('Posted the %s', format_date($row['date_available'], array('day', 'month', 'year'))),
|
||||
'age' => l10n(ucfirst(time_since($row['date_available'], 'year'))),
|
||||
'added_by' => l10n('Added by %s', $row['added_by']),
|
||||
'size' => $row['width'].'×'.$row['height'].' pixels, '.sprintf('%.2f', $row['filesize']/1024).'MB',
|
||||
'stats' => l10n('Visited %d times', $row['hit']),
|
||||
'id' => l10n('Numeric identifier : %d', $row['id']),
|
||||
'id' => l10n($row['id']),
|
||||
'ext' => l10n('%s file type',strtoupper(end($extTab)))
|
||||
);
|
||||
|
||||
if ($conf['rate'] and !empty($row['rating_score']))
|
||||
@@ -416,7 +422,7 @@ else
|
||||
|
||||
if (isset($url_img))
|
||||
{
|
||||
$template->assign( 'U_JUMPTO', $url_img );
|
||||
$template->assign( 'U_JUMPTO', $url_img );
|
||||
}
|
||||
|
||||
// associate to albums
|
||||
|
||||
@@ -83,6 +83,21 @@ if (isset($_GET['incompatible_plugins']))
|
||||
exit;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------Get the menu with the depreciated version
|
||||
|
||||
$plugin_menu_links_deprec = trigger_change('get_admin_plugin_menu_links', array());
|
||||
|
||||
$settings_url_for_plugin_deprec = array();
|
||||
|
||||
foreach ($plugin_menu_links_deprec as $value)
|
||||
{
|
||||
if (preg_match('/^admin\.php\?page=plugin-(.*)$/', $value["URL"], $matches)) {
|
||||
$settings_url_for_plugin_deprec[$matches[1]] = $value["URL"];
|
||||
} elseif (preg_match('/^.*section=(.*)[\/&%].*$/', $value["URL"], $matches)) {
|
||||
$settings_url_for_plugin_deprec[$matches[1]] = $value["URL"];
|
||||
}
|
||||
}
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | start template output |
|
||||
// +-----------------------------------------------------------------------+
|
||||
@@ -91,7 +106,7 @@ $plugins->sort_fs_plugins('name');
|
||||
$merged_extensions = $plugins->get_merged_extensions();
|
||||
$merged_plugins = false;
|
||||
$tpl_plugins = array();
|
||||
$active_plugins = 0;
|
||||
$count_types_plugins = array("active"=>0, "inactive"=>0, "missing"=>0, "merged"=>0);
|
||||
|
||||
foreach($plugins->fs_plugins as $plugin_id => $fs_plugin)
|
||||
{
|
||||
@@ -102,6 +117,13 @@ foreach($plugins->fs_plugins as $plugin_id => $fs_plugin)
|
||||
unset($_SESSION['incompatible_plugins']);
|
||||
}
|
||||
|
||||
$setting_url = '';
|
||||
if (isset($settings_url_for_plugin_deprec[$plugin_id])) { //old version
|
||||
$setting_url = $settings_url_for_plugin_deprec[$plugin_id];
|
||||
} else if ($fs_plugin['hasSettings']) { // new version
|
||||
$setting_url = "admin.php?page=plugin-".$plugin_id;
|
||||
}
|
||||
|
||||
$tpl_plugin = array(
|
||||
'ID' => $plugin_id,
|
||||
'NAME' => $fs_plugin['name'],
|
||||
@@ -111,6 +133,7 @@ foreach($plugins->fs_plugins as $plugin_id => $fs_plugin)
|
||||
'AUTHOR' => $fs_plugin['author'],
|
||||
'AUTHOR_URL' => @$fs_plugin['author uri'],
|
||||
'U_ACTION' => sprintf($action_url, $plugin_id),
|
||||
'SETTINGS_URL' => $setting_url,
|
||||
);
|
||||
|
||||
if (isset($plugins->db_plugins_by_id[$plugin_id]))
|
||||
@@ -133,10 +156,7 @@ foreach($plugins->fs_plugins as $plugin_id => $fs_plugin)
|
||||
$merged_plugins = true;
|
||||
}
|
||||
|
||||
if ($tpl_plugin['STATE'] == 'active')
|
||||
{
|
||||
$active_plugins++;
|
||||
}
|
||||
$count_types_plugins[$tpl_plugin['STATE']]++;
|
||||
|
||||
$tpl_plugins[] = $tpl_plugin;
|
||||
}
|
||||
@@ -184,7 +204,7 @@ usort($tpl_plugins, 'cmp');
|
||||
$template->assign(
|
||||
array(
|
||||
'plugins' => $tpl_plugins,
|
||||
'active_plugins' => $active_plugins,
|
||||
'count_types_plugins' => $count_types_plugins,
|
||||
'PWG_TOKEN' => $pwg_token,
|
||||
'base_url' => $base_url,
|
||||
'show_details' => $show_details,
|
||||
|
||||
@@ -61,6 +61,12 @@ $template->assign(
|
||||
'HELP_CONTENT' => $help_content
|
||||
));
|
||||
|
||||
if (isset($_GET['output']) and 'content_only' == $_GET['output'])
|
||||
{
|
||||
echo $help_content;
|
||||
exit();
|
||||
}
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | html code display |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
@@ -67,6 +67,23 @@ else
|
||||
$site_reader = new LocalSiteReader($site_url);
|
||||
}
|
||||
|
||||
if (isset($page['no_md5sum_number']))
|
||||
{
|
||||
$page['messages'][] = '<a href="admin.php?page=batch_manager&filter=prefilter-no_sync_md5sum">'.l10n('Some checksums are missing.').'<i class="icon-right"></i></a>';
|
||||
}
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | tabs |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
|
||||
$my_base_url = get_root_url().'admin.php?page=';
|
||||
|
||||
$tabsheet = new tabsheet();
|
||||
$tabsheet->set_id('site_update');
|
||||
$tabsheet->select('synchronization');
|
||||
$tabsheet->assign();
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | Quick sync |
|
||||
// +-----------------------------------------------------------------------+
|
||||
@@ -252,7 +269,7 @@ SELECT id_uppercat, MAX(`rank`)+1 AS next_rank
|
||||
else
|
||||
{
|
||||
$insert['uppercats'] = $insert['id'];
|
||||
$insert{'rank'} = $next_rank['NULL']++;
|
||||
$insert['rank'] = $next_rank['NULL']++;
|
||||
$insert['global_rank'] = $insert['rank'];
|
||||
}
|
||||
|
||||
@@ -263,7 +280,7 @@ SELECT id_uppercat, MAX(`rank`)+1 AS next_rank
|
||||
);
|
||||
|
||||
// add the new category to $db_categories and $db_fulldirs array
|
||||
$db_categories[$insert{'id'}] =
|
||||
$db_categories[$insert['id']] =
|
||||
array(
|
||||
'id' => $insert['id'],
|
||||
'parent' => (isset($parent)) ? $parent : Null,
|
||||
@@ -273,7 +290,7 @@ SELECT id_uppercat, MAX(`rank`)+1 AS next_rank
|
||||
'global_rank' => $insert['global_rank']
|
||||
);
|
||||
$db_fulldirs[$fulldir] = $insert['id'];
|
||||
$next_rank[$insert{'id'}] = 1;
|
||||
$next_rank[$insert['id']] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -309,7 +326,7 @@ SELECT id_uppercat, MAX(`rank`)+1 AS next_rank
|
||||
pwg_activity('album', $category_ids, 'add', array('sync'=>true));
|
||||
|
||||
$category_up=implode(',',array_unique($category_up));
|
||||
if ($conf['inheritance_by_default'])
|
||||
if ($conf['inheritance_by_default'] and !empty($category_up))
|
||||
{
|
||||
$query = '
|
||||
SELECT *
|
||||
@@ -390,13 +407,6 @@ SELECT id_uppercat, MAX(`rank`)+1 AS next_rank
|
||||
);
|
||||
}
|
||||
}
|
||||
foreach (get_admins() as $granted_user)
|
||||
{
|
||||
$insert_granted_users[] = array(
|
||||
'user_id' => $granted_user,
|
||||
'cat_id' => $ids
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
mass_inserts(GROUP_ACCESS_TABLE, array('group_id','cat_id'), $insert_granted_grps);
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
// | file that was distributed with this source code. |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
if (!defined("PHPWG_ROOT_PATH"))
|
||||
if (!defined('PHPWG_ROOT_PATH'))
|
||||
{
|
||||
die ("Hacking attempt!");
|
||||
die ('Hacking attempt!');
|
||||
}
|
||||
|
||||
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
|
||||
@@ -18,7 +18,8 @@ include_once(PHPWG_ROOT_PATH.'admin/include/functions_history.inc.php');
|
||||
// | Functions |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
function get_summary($year = null, $month = null, $day = null)
|
||||
//Get the last unit of time for years, months, days and hours
|
||||
function get_last($last_number=60, $type='year')
|
||||
{
|
||||
$query = '
|
||||
SELECT
|
||||
@@ -29,42 +30,45 @@ SELECT
|
||||
nb_pages
|
||||
FROM '.HISTORY_SUMMARY_TABLE;
|
||||
|
||||
if (isset($day))
|
||||
if ($type === 'hour')
|
||||
{
|
||||
$query.= '
|
||||
WHERE year = '.$year.'
|
||||
AND month = '.$month.'
|
||||
AND day = '.$day.'
|
||||
WHERE year IS NOT NULL
|
||||
AND month IS NOT NULL
|
||||
AND day IS NOT NULL
|
||||
AND hour IS NOT NULL
|
||||
ORDER BY
|
||||
year ASC,
|
||||
month ASC,
|
||||
day ASC,
|
||||
hour ASC
|
||||
year DESC,
|
||||
month DESC,
|
||||
day DESC,
|
||||
hour DESC
|
||||
LIMIT '.$last_number.'
|
||||
;';
|
||||
}
|
||||
elseif (isset($month))
|
||||
elseif ($type === 'day')
|
||||
{
|
||||
$query.= '
|
||||
WHERE year = '.$year.'
|
||||
AND month = '.$month.'
|
||||
WHERE year IS NOT NULL
|
||||
AND month IS NOT NULL
|
||||
AND day IS NOT NULL
|
||||
AND hour IS NULL
|
||||
ORDER BY
|
||||
year ASC,
|
||||
month ASC,
|
||||
day ASC
|
||||
year DESC,
|
||||
month DESC,
|
||||
day DESC
|
||||
LIMIT '.$last_number.'
|
||||
;';
|
||||
}
|
||||
elseif (isset($year))
|
||||
elseif ($type === 'month')
|
||||
{
|
||||
$query.= '
|
||||
WHERE year = '.$year.'
|
||||
WHERE year IS NOT NULL
|
||||
AND month IS NOT NULL
|
||||
AND day IS NULL
|
||||
ORDER BY
|
||||
year ASC,
|
||||
month ASC
|
||||
year DESC,
|
||||
month DESC
|
||||
LIMIT '.$last_number.'
|
||||
;';
|
||||
}
|
||||
else
|
||||
@@ -73,7 +77,8 @@ SELECT
|
||||
WHERE year IS NOT NULL
|
||||
AND month IS NULL
|
||||
ORDER BY
|
||||
year ASC
|
||||
year DESC
|
||||
LIMIT '.$last_number.'
|
||||
;';
|
||||
}
|
||||
|
||||
@@ -88,6 +93,130 @@ SELECT
|
||||
return $output;
|
||||
}
|
||||
|
||||
function get_month_of_last_years ($last = 'all')
|
||||
{
|
||||
|
||||
$query = '
|
||||
SELECT
|
||||
year,
|
||||
month,
|
||||
day,
|
||||
hour,
|
||||
nb_pages
|
||||
FROM '.HISTORY_SUMMARY_TABLE.'
|
||||
WHERE month IS NOT NULL
|
||||
AND day IS NULL
|
||||
ORDER BY
|
||||
year DESC,
|
||||
month DESC';
|
||||
|
||||
if ($last !== 'all')
|
||||
{
|
||||
$date = new DateTime();
|
||||
$limit = ($last - 1)*12+$date->format('n') - 1;
|
||||
$query .=
|
||||
' LIMIT '.$limit;
|
||||
$result = query2array($query.';');
|
||||
$lastDate = $date->sub(new DateInterval('P'.($last - 1).'Y'.($date->format('n') - 1).'M'));
|
||||
return set_missing_values('month', $result, $lastDate, new DateTime());
|
||||
}
|
||||
|
||||
if (count(query2array($query.';')) > 1 )
|
||||
{
|
||||
return set_missing_values('month', query2array($query.';'));
|
||||
} else {
|
||||
$last_year_date = new DateTime();
|
||||
return set_missing_values(
|
||||
'month',
|
||||
query2array($query.';'),
|
||||
$last_year_date->sub(new DateInterval('P1Y')),
|
||||
new DateTime()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function get_month_stats()
|
||||
{
|
||||
$result = array();
|
||||
$date = new DateTime();
|
||||
$date_last_month = clone $date;
|
||||
$date_last_year = clone $date;
|
||||
$months = array();
|
||||
|
||||
$date_last_month->sub(new DateInterval('P1M'));
|
||||
$date_last_year->sub(new DateInterval('P1Y'));
|
||||
$query = '
|
||||
SELECT
|
||||
year,
|
||||
month,
|
||||
day,
|
||||
hour,
|
||||
nb_pages
|
||||
FROM '.HISTORY_SUMMARY_TABLE.'
|
||||
WHERE
|
||||
(
|
||||
(year = '.$date->format('Y').' AND month = '.$date->format('n').')
|
||||
OR (year = '.$date_last_month->format('Y').' AND month = '.$date_last_month->format('n').')
|
||||
OR (year = '.$date_last_year->format('Y').' AND month = '.$date_last_year->format('n').')
|
||||
)
|
||||
AND day IS NOT NULL
|
||||
AND hour IS NULL
|
||||
ORDER BY
|
||||
year DESC,
|
||||
month DESC
|
||||
;';
|
||||
|
||||
foreach (query2array($query) as $value)
|
||||
{
|
||||
$date = get_date_object($value);
|
||||
@$months[$date->format('Y/m/1')][] = $value;
|
||||
}
|
||||
|
||||
$actual_date = new DateTime();
|
||||
if (!isset($months[$actual_date->format('Y/m/1')]))
|
||||
{
|
||||
@$months[$actual_date->format('Y/m/1')][] = array(
|
||||
'year' => $actual_date->format('Y'),
|
||||
'month'=> $actual_date->format('n'),
|
||||
'day'=> null,
|
||||
'hour'=> null,
|
||||
'nb_pages' => 0
|
||||
);
|
||||
}
|
||||
|
||||
foreach ($months as $key => $val)
|
||||
{
|
||||
$lastDate = new DateTime($key);
|
||||
$lastDate = $lastDate->add(new DateInterval('P1M'));
|
||||
$lastDate = $lastDate->sub(new DateInterval('P1D'));
|
||||
if ($lastDate > new DateTime())
|
||||
{
|
||||
$lastDate = new DateTime();
|
||||
}
|
||||
$result['month'][] = set_missing_values('day',$val, new DateTime($key), $lastDate);
|
||||
}
|
||||
|
||||
$query = '
|
||||
SELECT
|
||||
AVG(nb_pages)
|
||||
FROM '.HISTORY_SUMMARY_TABLE.'
|
||||
WHERE
|
||||
(
|
||||
year = '.$date->format('Y').' OR
|
||||
(year = '.($date->format('Y')-1).' and month > '.$date->format('n').')
|
||||
)
|
||||
AND day IS NOT NULL
|
||||
AND hour IS NULL
|
||||
ORDER BY
|
||||
year DESC,
|
||||
month DESC
|
||||
;';
|
||||
|
||||
$result['avg'] = query2array($query)[0]['AVG(nb_pages)'];
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | Check Access and exit when user status is not ok |
|
||||
// +-----------------------------------------------------------------------+
|
||||
@@ -101,87 +230,9 @@ check_status(ACCESS_ADMINISTRATOR);
|
||||
history_summarize();
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | Page parameters check |
|
||||
// | Display statistics header |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
foreach (array('day', 'month', 'year') as $key)
|
||||
{
|
||||
if (isset($_GET[$key]))
|
||||
{
|
||||
$page[$key] = (int)$_GET[$key];
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($page['day']))
|
||||
{
|
||||
if (!isset($page['month']))
|
||||
{
|
||||
die('month is missing in URL');
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($page['month']))
|
||||
{
|
||||
if (!isset($page['year']))
|
||||
{
|
||||
die('year is missing in URL');
|
||||
}
|
||||
}
|
||||
|
||||
$summary_lines = get_summary(
|
||||
@$page['year'],
|
||||
@$page['month'],
|
||||
@$page['day']
|
||||
);
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | Display statistics header |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
// page title creation
|
||||
$title_parts = array();
|
||||
|
||||
$url = PHPWG_ROOT_PATH.'admin.php?page=stats';
|
||||
|
||||
$title_parts[] = '<a href="'.$url.'">'.l10n('Overall').'</a>';
|
||||
|
||||
$period_label = l10n('Year');
|
||||
|
||||
if (isset($page['year']))
|
||||
{
|
||||
$url.= '&year='.$page['year'];
|
||||
|
||||
$title_parts[] = '<a href="'.$url.'">'.$page['year'].'</a>';
|
||||
|
||||
$period_label = l10n('Month');
|
||||
}
|
||||
|
||||
if (isset($page['month']))
|
||||
{
|
||||
$url.= '&month='.$page['month'];
|
||||
|
||||
$title_parts[] = '<a href="'.$url.'">'.$lang['month'][$page['month']].'</a>';
|
||||
|
||||
$period_label = l10n('Day');
|
||||
}
|
||||
|
||||
if (isset($page['day']))
|
||||
{
|
||||
$url.= '&day='.$page['day'];
|
||||
|
||||
$time = mktime(12, 0, 0, $page['month'], $page['day'], $page['year']);
|
||||
|
||||
$day_title = sprintf(
|
||||
'%u (%s)',
|
||||
$page['day'],
|
||||
$lang['day'][date('w', $time)]
|
||||
);
|
||||
|
||||
$title_parts[] = '<a href="'.$url.'">'.$day_title.'</a>';
|
||||
|
||||
$period_label = l10n('Hour');
|
||||
}
|
||||
|
||||
$template->set_filename('stats', 'stats.tpl');
|
||||
|
||||
// TabSheet initialization
|
||||
@@ -191,135 +242,154 @@ $base_url = get_root_url().'admin.php?page=history';
|
||||
|
||||
$template->assign(
|
||||
array(
|
||||
'L_STAT_TITLE' => implode($conf['level_separator'], $title_parts),
|
||||
'PERIOD_LABEL' => $period_label,
|
||||
'U_HELP' => get_root_url().'admin/popuphelp.php?page=history',
|
||||
'F_ACTION' => $base_url,
|
||||
)
|
||||
);
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | Display statistic rows |
|
||||
// | Set missing rows to 0 |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
$max_width = 400;
|
||||
|
||||
$datas = array();
|
||||
|
||||
if (isset($page['day']))
|
||||
function set_missing_values($unit, $data, $firstDate = null, $lastDate = null)
|
||||
{
|
||||
$key = 'hour';
|
||||
$min_x = 0;
|
||||
$max_x = 23;
|
||||
}
|
||||
elseif (isset($page['month']))
|
||||
{
|
||||
$key = 'day';
|
||||
$min_x = 1;
|
||||
$max_x = date(
|
||||
't',
|
||||
mktime(12, 0, 0, $page['month'], 1, $page['year'])
|
||||
);
|
||||
}
|
||||
elseif (isset($page['year']))
|
||||
{
|
||||
$key = 'month';
|
||||
$min_x = 1;
|
||||
$max_x = 12;
|
||||
}
|
||||
else
|
||||
{
|
||||
$key = 'year';
|
||||
}
|
||||
|
||||
$max_pages = 1;
|
||||
foreach ($summary_lines as $line)
|
||||
{
|
||||
if ($line['nb_pages'] > $max_pages)
|
||||
$limit = count($data);
|
||||
$result = array();
|
||||
|
||||
if ($firstDate == null)
|
||||
{
|
||||
$max_pages = $line['nb_pages'];
|
||||
$date = get_date_object($data[count($data) - 1]);
|
||||
} else {
|
||||
$date = $firstDate;
|
||||
}
|
||||
if ($lastDate == null)
|
||||
{
|
||||
$date_end = get_date_object($data[0]);
|
||||
} else {
|
||||
$date_end = $lastDate;
|
||||
}
|
||||
|
||||
$datas[ $line[$key] ] = $line['nb_pages'];
|
||||
}
|
||||
|
||||
if (!isset($min_x) and !isset($max_x) and count($datas) > 0)
|
||||
{
|
||||
$min_x = min(array_keys($datas));
|
||||
$max_x = max(array_keys($datas));
|
||||
}
|
||||
|
||||
if (count($datas) > 0)
|
||||
{
|
||||
for ($i = $min_x; $i <= $max_x; $i++)
|
||||
//Declare variable according the unit
|
||||
if ($unit == 'year')
|
||||
{
|
||||
if (!isset($datas[$i]))
|
||||
{
|
||||
$datas[$i] = 0;
|
||||
}
|
||||
|
||||
$url = null;
|
||||
|
||||
if (isset($page['day']))
|
||||
{
|
||||
$value = sprintf('%02u', $i);
|
||||
}
|
||||
else if (isset($page['month']))
|
||||
{
|
||||
$url =
|
||||
get_root_url().'admin.php'
|
||||
.'?page=stats'
|
||||
.'&year='.$page['year']
|
||||
.'&month='.$page['month']
|
||||
.'&day='.$i
|
||||
;
|
||||
|
||||
$time = mktime(12, 0, 0, $page['month'], $i, $page['year']);
|
||||
|
||||
$value = $i.' ('.$lang['day'][date('w', $time)].')';
|
||||
}
|
||||
else if (isset($page['year']))
|
||||
{
|
||||
$url =
|
||||
get_root_url().'admin.php'
|
||||
.'?page=stats'
|
||||
.'&year='.$page['year']
|
||||
.'&month='.$i
|
||||
;
|
||||
|
||||
$value = $lang['month'][$i];
|
||||
}
|
||||
else
|
||||
{
|
||||
// at least the year is defined
|
||||
$url =
|
||||
get_root_url().'admin.php'
|
||||
.'?page=stats'
|
||||
.'&year='.$i
|
||||
;
|
||||
|
||||
$value = $i;
|
||||
}
|
||||
|
||||
if ($datas[$i] != 0 and isset($url))
|
||||
{
|
||||
$value = '<a href="'.$url.'">'.$value.'</a>';
|
||||
}
|
||||
|
||||
$template->append(
|
||||
'statrows',
|
||||
array(
|
||||
'VALUE' => $value,
|
||||
'PAGES' => $datas[$i],
|
||||
'WIDTH' => ceil(($datas[$i] * $max_width) / $max_pages ),
|
||||
)
|
||||
);
|
||||
$date_format = 'Y';
|
||||
$date_add = 'P1Y';
|
||||
}
|
||||
else if ($unit == 'month')
|
||||
{
|
||||
$date_format = 'Y-m';
|
||||
$date_add = 'P1M';
|
||||
}
|
||||
else if ($unit == 'day')
|
||||
{
|
||||
$date_format = 'Y-m-d';
|
||||
$date_add = 'P1D';
|
||||
}
|
||||
else if ($unit == 'hour')
|
||||
{
|
||||
$date_format = 'Y-m-d\TH:00';
|
||||
$date_add = 'PT1H';
|
||||
}
|
||||
|
||||
//Fill an empty array with all the dates
|
||||
while ($date <= $date_end) {
|
||||
$result[$date->format($date_format)] = 0;
|
||||
$date->add(new DateInterval($date_add));
|
||||
}
|
||||
|
||||
//Overload with database rows
|
||||
foreach ($data as $value)
|
||||
{
|
||||
$str = get_date_object($value)->format($date_format);
|
||||
if (isset($result[$str]))
|
||||
{
|
||||
$result[$str] += $value['nb_pages'];
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
//Get a DateTime object for a database row
|
||||
function get_date_object($row)
|
||||
{
|
||||
$date_string = $row['year'];
|
||||
if ($row['month'] != null)
|
||||
{
|
||||
$date_string = $date_string.'-'.$row['month'] ;
|
||||
if ($row['day'] != null)
|
||||
{
|
||||
$date_string = $date_string.'-'.$row['day'];
|
||||
if ($row['hour'] != null)
|
||||
{
|
||||
$date_string = $date_string.' '.$row['hour'].':00';
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$date_string .= '-1';
|
||||
}
|
||||
|
||||
return new DateTime($date_string);
|
||||
}
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | Sending html code |
|
||||
// | Send data to template |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
$actual_date = new DateTime();
|
||||
$actual_date->add(new DateInterval('PT1S'));
|
||||
|
||||
$first_date = new DateTime();
|
||||
$last_hours = set_missing_values(
|
||||
'hour',
|
||||
get_last(72, 'hour'),
|
||||
$first_date->sub(new DateInterval("P3D")),
|
||||
$actual_date
|
||||
);
|
||||
|
||||
$first_date = new DateTime();
|
||||
$last_days = set_missing_values(
|
||||
'day',
|
||||
get_last(90, 'day'),
|
||||
$first_date->sub(new DateInterval("P90D")),
|
||||
$actual_date
|
||||
);
|
||||
|
||||
$first_date = new DateTime();
|
||||
$last_months = set_missing_values(
|
||||
'month',
|
||||
get_last(60, 'month'),
|
||||
$first_date->sub(new DateInterval("P60M")),
|
||||
$actual_date
|
||||
);
|
||||
|
||||
if (count(get_last(60, 'year')) > 1 )
|
||||
{
|
||||
$last_years = set_missing_values(
|
||||
'year',
|
||||
get_last(60, 'year')
|
||||
);
|
||||
} else {
|
||||
$last_year_date = new DateTime();
|
||||
$last_years = set_missing_values(
|
||||
'year',
|
||||
get_last(60, 'year'),
|
||||
$last_year_date->sub(new DateInterval('P1Y')),
|
||||
new DateTime()
|
||||
);
|
||||
}
|
||||
|
||||
$template->assign(array(
|
||||
'compareYears' => get_month_of_last_years($conf['stat_compare_year_displayed']),
|
||||
'monthStats' => get_month_stats(),
|
||||
'lastHours' => $last_hours,
|
||||
'lastDays' => $last_days,
|
||||
'lastMonths' => $last_months,
|
||||
'lastYears' => $last_years,
|
||||
'langCode' => strval($user['language'])
|
||||
));
|
||||
|
||||
$template->assign_var_from_handle('ADMIN_CONTENT', 'stats');
|
||||
?>
|
||||
@@ -14,16 +14,6 @@ if( !defined("PHPWG_ROOT_PATH") )
|
||||
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
|
||||
check_status(ACCESS_ADMINISTRATOR);
|
||||
|
||||
if (!empty($_POST))
|
||||
{
|
||||
check_pwg_token();
|
||||
check_input_parameter('tags', $_POST, true, PATTERN_ID);
|
||||
check_input_parameter('selectAction', $_POST, false, '/^[a-zA-Z0-9_-]+$/');
|
||||
check_input_parameter('edit_list', $_POST, false, '/^\d+(,\d+)*$/');
|
||||
check_input_parameter('merge_list', $_POST, false, '/^\d+(,\d+)*$/');
|
||||
check_input_parameter('destination_tag', $_POST, false, PATTERN_ID);
|
||||
}
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | tabs |
|
||||
// +-----------------------------------------------------------------------+
|
||||
@@ -37,312 +27,21 @@ $tabsheet->set_id('tags');
|
||||
$tabsheet->select('');
|
||||
$tabsheet->assign();
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | edit tags |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
if (isset($_POST['edit_submit']))
|
||||
{
|
||||
$query = '
|
||||
SELECT name
|
||||
FROM '.TAGS_TABLE.'
|
||||
;';
|
||||
$existing_names = array_from_query($query, 'name');
|
||||
|
||||
|
||||
$current_name_of = array();
|
||||
$query = '
|
||||
SELECT id, name
|
||||
FROM '.TAGS_TABLE.'
|
||||
WHERE id IN ('.$_POST['edit_list'].')
|
||||
;';
|
||||
$result = pwg_query($query);
|
||||
while ($row = pwg_db_fetch_assoc($result))
|
||||
{
|
||||
$current_name_of[ $row['id'] ] = $row['name'];
|
||||
}
|
||||
|
||||
$updates = array();
|
||||
// we must not rename tag with an already existing name
|
||||
foreach (explode(',', $_POST['edit_list']) as $tag_id)
|
||||
{
|
||||
$tag_name = stripslashes($_POST['tag_name-'.$tag_id]);
|
||||
|
||||
if ($tag_name != $current_name_of[$tag_id])
|
||||
{
|
||||
if (in_array($tag_name, $existing_names))
|
||||
{
|
||||
$page['errors'][] = l10n('Tag "%s" already exists', $tag_name);
|
||||
}
|
||||
else if (!empty($tag_name))
|
||||
{
|
||||
$updates[] = array(
|
||||
'id' => $tag_id,
|
||||
'name' => addslashes($tag_name),
|
||||
'url_name' => trigger_change('render_tag_url', $tag_name),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
mass_updates(
|
||||
TAGS_TABLE,
|
||||
array(
|
||||
'primary' => array('id'),
|
||||
'update' => array('name', 'url_name'),
|
||||
),
|
||||
$updates
|
||||
);
|
||||
|
||||
pwg_activity('tag', explode(',', $_POST['edit_list']), 'edit');
|
||||
}
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | dulicate tags |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
if (isset($_POST['duplic_submit']))
|
||||
{
|
||||
$query = '
|
||||
SELECT name
|
||||
FROM '.TAGS_TABLE.'
|
||||
;';
|
||||
$existing_names = array_from_query($query, 'name');
|
||||
|
||||
|
||||
$current_name_of = array();
|
||||
$query = '
|
||||
SELECT id, name
|
||||
FROM '.TAGS_TABLE.'
|
||||
WHERE id IN ('.$_POST['edit_list'].')
|
||||
;';
|
||||
$result = pwg_query($query);
|
||||
while ($row = pwg_db_fetch_assoc($result))
|
||||
{
|
||||
$current_name_of[ $row['id'] ] = $row['name'];
|
||||
}
|
||||
|
||||
$updates = array();
|
||||
// we must not rename tag with an already existing name
|
||||
foreach (explode(',', $_POST['edit_list']) as $tag_id)
|
||||
{
|
||||
$tag_name = stripslashes($_POST['tag_name-'.$tag_id]);
|
||||
|
||||
if ($tag_name != $current_name_of[$tag_id])
|
||||
{
|
||||
if (in_array($tag_name, $existing_names))
|
||||
{
|
||||
$page['errors'][] = l10n('Tag "%s" already exists', $tag_name);
|
||||
}
|
||||
else if (!empty($tag_name))
|
||||
{
|
||||
single_insert(
|
||||
TAGS_TABLE,
|
||||
array(
|
||||
'name' => $tag_name,
|
||||
'url_name' => trigger_change('render_tag_url', $tag_name),
|
||||
)
|
||||
);
|
||||
$destination_tag_id = pwg_db_insert_id(TAGS_TABLE);
|
||||
|
||||
pwg_activity('tag', $destination_tag_id, 'add', array('action'=>'duplicate', 'source_tag'=>$tag_id));
|
||||
|
||||
$query = '
|
||||
SELECT
|
||||
image_id
|
||||
FROM '.IMAGE_TAG_TABLE.'
|
||||
WHERE tag_id = '.$tag_id.'
|
||||
;';
|
||||
$destination_tag_image_ids = array_from_query($query, 'image_id');
|
||||
|
||||
$inserts = array();
|
||||
foreach ($destination_tag_image_ids as $image_id)
|
||||
{
|
||||
$inserts[] = array(
|
||||
'tag_id' => $destination_tag_id,
|
||||
'image_id' => $image_id
|
||||
);
|
||||
}
|
||||
|
||||
if (count($inserts) > 0)
|
||||
{
|
||||
mass_inserts(
|
||||
IMAGE_TAG_TABLE,
|
||||
array_keys($inserts[0]),
|
||||
$inserts
|
||||
);
|
||||
}
|
||||
|
||||
$page['infos'][] = l10n(
|
||||
'Tag "%s" is now a duplicate of "%s"',
|
||||
stripslashes($tag_name),
|
||||
$current_name_of[$tag_id]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mass_updates(
|
||||
TAGS_TABLE,
|
||||
array(
|
||||
'primary' => array('id'),
|
||||
'update' => array('name', 'url_name'),
|
||||
),
|
||||
$updates
|
||||
);
|
||||
}
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | merge tags |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
if (isset($_POST['merge_submit']))
|
||||
{
|
||||
if (!isset($_POST['destination_tag']))
|
||||
{
|
||||
$page['errors'][] = l10n('No destination tag selected');
|
||||
}
|
||||
else
|
||||
{
|
||||
$destination_tag_id = $_POST['destination_tag'];
|
||||
$tag_ids = explode(',', $_POST['merge_list']);
|
||||
|
||||
if (is_array($tag_ids) and count($tag_ids) > 1)
|
||||
{
|
||||
$name_of_tag = array();
|
||||
$query = '
|
||||
SELECT
|
||||
id,
|
||||
name
|
||||
FROM '.TAGS_TABLE.'
|
||||
WHERE id IN ('.implode(',', $tag_ids).')
|
||||
;';
|
||||
$result = pwg_query($query);
|
||||
while ($row = pwg_db_fetch_assoc($result))
|
||||
{
|
||||
$name_of_tag[ $row['id'] ] = trigger_change('render_tag_name', $row['name'], $row);
|
||||
}
|
||||
|
||||
$tag_ids_to_delete = array_diff(
|
||||
$tag_ids,
|
||||
array($destination_tag_id)
|
||||
);
|
||||
|
||||
$query = '
|
||||
SELECT
|
||||
DISTINCT(image_id)
|
||||
FROM '.IMAGE_TAG_TABLE.'
|
||||
WHERE tag_id IN ('.implode(',', $tag_ids_to_delete).')
|
||||
;';
|
||||
$image_ids = array_from_query($query, 'image_id');
|
||||
|
||||
delete_tags($tag_ids_to_delete);
|
||||
|
||||
$query = '
|
||||
SELECT
|
||||
image_id
|
||||
FROM '.IMAGE_TAG_TABLE.'
|
||||
WHERE tag_id = '.$destination_tag_id.'
|
||||
;';
|
||||
$destination_tag_image_ids = array_from_query($query, 'image_id');
|
||||
|
||||
$image_ids_to_link = array_diff(
|
||||
$image_ids,
|
||||
$destination_tag_image_ids
|
||||
);
|
||||
|
||||
$inserts = array();
|
||||
foreach ($image_ids_to_link as $image_id)
|
||||
{
|
||||
$inserts[] = array(
|
||||
'tag_id' => $destination_tag_id,
|
||||
'image_id' => $image_id
|
||||
);
|
||||
}
|
||||
|
||||
if (count($inserts) > 0)
|
||||
{
|
||||
mass_inserts(
|
||||
IMAGE_TAG_TABLE,
|
||||
array_keys($inserts[0]),
|
||||
$inserts
|
||||
);
|
||||
}
|
||||
|
||||
$tags_deleted = array();
|
||||
foreach ($tag_ids_to_delete as $tag_id)
|
||||
{
|
||||
$tags_deleted[] = $name_of_tag[$tag_id];
|
||||
}
|
||||
|
||||
$page['infos'][] = l10n(
|
||||
'Tags <em>%s</em> merged into tag <em>%s</em>',
|
||||
implode(', ', $tags_deleted),
|
||||
$name_of_tag[$destination_tag_id]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | delete tags |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
if (isset($_POST['delete']) and isset($_POST['tags']))
|
||||
{
|
||||
if (!isset($_POST['confirm_deletion']))
|
||||
{
|
||||
$page['errors'][] = l10n('You need to confirm deletion');
|
||||
}
|
||||
else
|
||||
{
|
||||
$query = '
|
||||
SELECT name
|
||||
FROM '.TAGS_TABLE.'
|
||||
WHERE id IN ('.implode(',', $_POST['tags']).')
|
||||
;';
|
||||
$tag_names = array_from_query($query, 'name');
|
||||
|
||||
delete_tags($_POST['tags']);
|
||||
|
||||
$page['infos'][] = l10n_dec(
|
||||
'The following tag was deleted', 'The %d following tags were deleted',
|
||||
count($tag_names)
|
||||
)
|
||||
.' : '.implode(', ', $tag_names);
|
||||
}
|
||||
}
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | delete orphan tags |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
$message_tags = "";
|
||||
|
||||
if (isset($_GET['action']) and 'delete_orphans' == $_GET['action'])
|
||||
{
|
||||
check_pwg_token();
|
||||
|
||||
delete_orphan_tags();
|
||||
$_SESSION['page_infos'] = array(l10n('Orphan tags deleted'));
|
||||
$message_tags = array(l10n('Orphan tags deleted'));
|
||||
redirect(get_root_url().'admin.php?page=tags');
|
||||
}
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | add a tag |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
if (isset($_POST['add']) and !empty($_POST['add_tag']))
|
||||
{
|
||||
$ret = create_tag($_POST['add_tag']);
|
||||
|
||||
if (isset($ret['error']))
|
||||
{
|
||||
$page['errors'][] = $ret['error'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$page['infos'][] = $ret['info'];
|
||||
}
|
||||
}
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | template init |
|
||||
// +-----------------------------------------------------------------------+
|
||||
@@ -360,6 +59,8 @@ $template->assign(
|
||||
// | orphan tags |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
$warning_tags = "";
|
||||
|
||||
$orphan_tags = get_orphan_tags();
|
||||
|
||||
$orphan_tag_names = array();
|
||||
@@ -370,18 +71,28 @@ foreach ($orphan_tags as $tag)
|
||||
|
||||
if (count($orphan_tag_names) > 0)
|
||||
{
|
||||
$page['warnings'][] = sprintf(
|
||||
l10n('You have %d orphan tags: %s.').' <a href="%s" class="icon-trash">'.l10n('Delete orphan tags').'</a>',
|
||||
$warning_tags = sprintf(
|
||||
l10n('You have %d orphan tags %s'),
|
||||
count($orphan_tag_names),
|
||||
implode(', ', $orphan_tag_names),
|
||||
get_root_url().'admin.php?page=tags&action=delete_orphans&pwg_token='.get_pwg_token()
|
||||
'<a
|
||||
data-tags=\'["'.implode('" ,"', $orphan_tag_names).'"]\'
|
||||
class="icon-eye"
|
||||
data-url="'.get_root_url().'admin.php?page=tags&action=delete_orphans&pwg_token='.get_pwg_token().'">'
|
||||
.l10n('Review').'</a>'
|
||||
);
|
||||
}
|
||||
|
||||
$template->assign(
|
||||
array(
|
||||
'warning_tags' => $warning_tags,
|
||||
'message_tags' => $message_tags
|
||||
)
|
||||
);
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | form creation |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
$per_page = 100;
|
||||
|
||||
// tag counters
|
||||
$query = '
|
||||
@@ -392,7 +103,7 @@ $tag_counters = simple_hash_from_query($query, 'tag_id', 'counter');
|
||||
|
||||
// all tags
|
||||
$query = '
|
||||
SELECT *
|
||||
SELECT name, id, url_name
|
||||
FROM '.TAGS_TABLE.'
|
||||
;';
|
||||
$result = pwg_query($query);
|
||||
@@ -401,9 +112,11 @@ while ($tag = pwg_db_fetch_assoc($result))
|
||||
{
|
||||
$raw_name = $tag['name'];
|
||||
$tag['name'] = trigger_change('render_tag_name', $raw_name, $tag);
|
||||
$tag['counter'] = intval(@$tag_counters[ $tag['id'] ]);
|
||||
$tag['U_VIEW'] = make_index_url(array('tags'=>array($tag)));
|
||||
$tag['U_EDIT'] = 'admin.php?page=batch_manager&filter=tag-'.$tag['id'];
|
||||
$counter = intval(@$tag_counters[ $tag['id'] ]);
|
||||
if ($counter > 0)
|
||||
{
|
||||
$tag['counter'] = intval(@$tag_counters[ $tag['id'] ]);
|
||||
}
|
||||
|
||||
$alt_names = trigger_change('get_tag_alt_names', array(), $raw_name);
|
||||
$alt_names = array_diff( array_unique($alt_names), array($tag['name']) );
|
||||
@@ -415,46 +128,15 @@ while ($tag = pwg_db_fetch_assoc($result))
|
||||
}
|
||||
usort($all_tags, 'tag_alpha_compare');
|
||||
|
||||
|
||||
|
||||
$template->assign(
|
||||
array(
|
||||
'all_tags' => $all_tags,
|
||||
'first_tags' => array_slice($all_tags, 0, $per_page),
|
||||
'data' => $all_tags,
|
||||
'total' => count($all_tags),
|
||||
'per_page' => $per_page
|
||||
)
|
||||
);
|
||||
|
||||
if ((isset($_POST['edit']) or isset($_POST['duplicate']) or isset($_POST['merge'])) and isset($_POST['tags']))
|
||||
{
|
||||
$list_name = 'EDIT_TAGS_LIST';
|
||||
if (isset($_POST['duplicate']))
|
||||
{
|
||||
$list_name = 'DUPLIC_TAGS_LIST';
|
||||
}
|
||||
elseif (isset($_POST['merge']))
|
||||
{
|
||||
$list_name = 'MERGE_TAGS_LIST';
|
||||
}
|
||||
|
||||
$template->assign($list_name, implode(',', $_POST['tags']));
|
||||
|
||||
$query = '
|
||||
SELECT id, name
|
||||
FROM '.TAGS_TABLE.'
|
||||
WHERE id IN ('.implode(',', $_POST['tags']).')
|
||||
;';
|
||||
$result = pwg_query($query);
|
||||
while ($row = pwg_db_fetch_assoc($result))
|
||||
{
|
||||
$template->append(
|
||||
'tags',
|
||||
array(
|
||||
'ID' => $row['id'],
|
||||
'NAME' => $row['name'],
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | sending html code |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
|
Before Width: | Height: | Size: 928 B |
|
Before Width: | Height: | Size: 905 B |
|
Before Width: | Height: | Size: 871 B |
|
Before Width: | Height: | Size: 869 B |
|
Before Width: | Height: | Size: 902 B |
|
Before Width: | Height: | Size: 869 B |
|
Before Width: | Height: | Size: 870 B |
|
Before Width: | Height: | Size: 912 B |
@@ -79,17 +79,14 @@ h3, .throw, .row1 { background-color: #ddd; }
|
||||
|
||||
.content dl, dd { margin:5px; }
|
||||
|
||||
|
||||
UL.thumbnails span.wrap2:hover { background-color:#7CBA0F; color:#999; }
|
||||
UL.thumbnails span.wrap2 {
|
||||
background-color:#ddd;
|
||||
background-color:transparent;
|
||||
}
|
||||
|
||||
|
||||
/* borders */
|
||||
fieldset {
|
||||
border: none;
|
||||
border-top: 2px solid #ddd;
|
||||
}
|
||||
|
||||
fieldset.with-border {
|
||||
@@ -105,21 +102,17 @@ TEXTAREA { cursor:text; font-size: 13px; }
|
||||
ul.thumbnails input { color:#666; font-size:10px; margin:0; background-color:#bbb; text-align: center;}
|
||||
.throw { font-size: 120%; line-height: 26px; padding-top: 10px; font-weight: bold; }
|
||||
label { cursor:pointer }
|
||||
.categoryLi, .menuLi { background: #F3F3F3; }
|
||||
.menuLi { background: #F3F3F3; }
|
||||
.menuLi_hidden { background: #ccc !important; }
|
||||
a.Piwigo {
|
||||
font-family: verdana, arial, helvetica, sans-serif !important;
|
||||
font-size: 11px; font-weight: normal; letter-spacing: 0;
|
||||
color : #0cc; text-decoration: none; border: 0; }
|
||||
a.Piwigo:hover span.Piwigo {
|
||||
border-bottom: 1px solid #0cc9c;
|
||||
border-bottom: 1px solid #0cc;
|
||||
}
|
||||
TABLE.table2 { border: 2px solid #dddddd; }
|
||||
|
||||
.categoryUl>li:not(.virtual_cat) {
|
||||
background:url(images/stripe-cat.png);
|
||||
}
|
||||
|
||||
*, *:focus, *:active, input:active, a:active, input:focus, a:focus { outline: none; -moz-outline-width: 0px; }
|
||||
A{
|
||||
color:#3A3A3A;
|
||||
@@ -130,7 +123,6 @@ A:hover, A:active {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.content .navigationBar {color:#999;}
|
||||
ul.actions, .content form#waiting {text-align:center;}
|
||||
|
||||
/* jQuery tooltips */
|
||||
@@ -152,14 +144,6 @@ ul.actions, .content form#waiting {text-align:center;}
|
||||
.ui-resizable .ui-resizable-handle { display: block; }
|
||||
body .ui-resizable-disabled .ui-resizable-handle { display: none; } /* use 'body' to make it more specific (css order) */
|
||||
body .ui-resizable-autohide .ui-resizable-handle { display: none; } /* use 'body' to make it more specific (css order) */
|
||||
.ui-resizable-n { cursor: n-resize; height: 6px; width: 100%; top: 0px; left: 0px; background: transparent url(images/resizable-n.gif) no-repeat scroll center top; }
|
||||
.ui-resizable-s { cursor: s-resize; height: 6px; width: 100%; bottom: 0px; left: 0px; background: transparent url(images/resizable-s.gif) no-repeat scroll center top; }
|
||||
.ui-resizable-e { cursor: e-resize; width: 6px; right: 0px; top: 0px; height: 100%; background: transparent url(images/resizable-e.gif) no-repeat scroll right center; }
|
||||
.ui-resizable-w { cursor: w-resize; width: 6px; left: 0px; top: 0px; height: 100%; background: transparent url(images/resizable-w.gif) no-repeat scroll right center; }
|
||||
.ui-resizable-se { cursor: se-resize; width: 9px; height: 9px; right: 0px; bottom: 0px; background: transparent url(images/resizable-se.gif); }
|
||||
.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: 0px; bottom: 0px; background: transparent url(images/resizable-sw.gif); }
|
||||
.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: 0px; top: 0px; background: transparent url(images/resizable-nw.gif); }
|
||||
.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: 0px; top: 0px; background: transparent url(images/resizable-ne.gif); }
|
||||
|
||||
#ui-datepicker-div {background-color: #f1f1f1; border:2px solid #aaa;}
|
||||
#ui-datepicker-div .ui-datepicker-title {color:black;}
|
||||
@@ -180,7 +164,7 @@ body .ui-resizable-autohide .ui-resizable-handle { display: none; } /* use 'body
|
||||
#ui-datepicker-div .ui-datepicker-week-end-cell, #ui-datepicker-div .ui-datepicker-week-end-cell a { background-color: #ddd; color: #0cc; border-color: #bbb; border-top-color: #ddd; border-left-color: #ddd;}
|
||||
#ui-datepicker-div .ui-datepicker-title-row { background-color: #eee;}
|
||||
#ui-datepicker-div .ui-datepicker-title-row .ui-datepicker-week-end-cell a { color: #0cc;}
|
||||
#ui-datepicker-div a:hover { color: #0cccc !important; background-color: #eee !important;}
|
||||
#ui-datepicker-div a:hover { color: #0cc !important; background-color: #eee !important;}
|
||||
#ui-datepicker-div .ui-datepicker-header select { background-color:#bbb; color:#666; font-weight:normal;}
|
||||
#ui-datepicker-div .ui-datepicker-links { background-color:#ddd;}
|
||||
#ui-datepicker-div .ui-datepicker-header { background-color:#bbb;}
|
||||
@@ -192,7 +176,7 @@ img.ui-datepicker-trigger{margin:-2px 10px 1px -2px;}
|
||||
.ui-slider .ui-slider-range { background:#aaa;border-radius:2px; }
|
||||
|
||||
.ui-slider .ui-slider-handle {
|
||||
background-color: #eee;
|
||||
background-color: #ddd;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 3px;
|
||||
}
|
||||
@@ -210,11 +194,12 @@ INPUT[type="text"].large { width: 317px; }
|
||||
*+html .bigbutton input, * html .bigbutton input { left:0px; position:relative; top:-40px; }
|
||||
* html .bigtext { margin-right: 300px; }
|
||||
|
||||
.themeBox {background-color:#ddd;}
|
||||
.themeBox IMG {border:1px solid white;}
|
||||
.themeBox {background-color:#fafafa; box-shadow: 0px 0px 5px #acacac;}
|
||||
.themeName {color:black;}
|
||||
.themeActions span {background-color: #ddd;}
|
||||
#themesContent H3 {border-bottom:1px solid #aaa;}
|
||||
.themeDefault {background-color:#dbe8f3;}
|
||||
.themeSelect {background-color: #fafafa;}
|
||||
.themeSelect.themeDefault {background-color: #ffd7ad;}
|
||||
|
||||
#pluginsMenuSeparator {border:1px solid #555;}
|
||||
|
||||
@@ -226,7 +211,7 @@ INPUT[type="text"].large { width: 317px; }
|
||||
#pwgHead A, #footer A {color:#ccc;}
|
||||
#pwgHead A:hover, #footer A:hover {color:white;}
|
||||
|
||||
.pluginBox, .pluginMiniBox, .groups li {background-color:#ddd;color:#353535;border-color:#ddd;}
|
||||
.pluginBox, .pluginMiniBox {background-color:#ddd;color:#353535;border-color:#ddd;}
|
||||
.pluginBoxNameCell, .pluginMiniBoxNameCell {color:#111;}
|
||||
.pluginBox.incompatible, .pluginMiniBox.incompatible {border-color:#a00 !important;}
|
||||
.pluginBoxes .merged, .pluginBoxes .missing {background-color:#d99;border:1px solid #a00;}
|
||||
@@ -242,42 +227,47 @@ UL.thumbnails li.rank-of-image {background-color: #ddd;}
|
||||
color:#999;
|
||||
}
|
||||
|
||||
#batchManagerGlobal .thumbnails li:hover .font-checkbox [class*="icon-check"]::before {
|
||||
color:white;
|
||||
}
|
||||
|
||||
#batchManagerGlobal li.thumbSelected .font-checkbox [class*="icon-check"]::before {
|
||||
color:white;
|
||||
color: white;
|
||||
display: block;
|
||||
}
|
||||
|
||||
#batchManagerGlobal UL.thumbnails li:hover .wrap2 {
|
||||
background-color: #ff7700;
|
||||
background-color: transparent;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
#batchManagerGlobal .thumbSelected { background-color:transparent !important }
|
||||
|
||||
#batchManagerGlobal .thumbSelected .wrap2 {
|
||||
background-color: #444 !important;
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
#batchManagerGlobal #selectedMessage {
|
||||
background-color: #555;
|
||||
color:white;
|
||||
color: #FFA646;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* beta-test begins: specific changes on Batch Manager */
|
||||
#batchManagerGlobal legend {
|
||||
background-color:#ddd;
|
||||
color:#555;
|
||||
padding:5px 10px;
|
||||
#batchManagerGlobal #applyFilter,#batchManagerGlobal .addFilter-button {
|
||||
color: #3C3C3C;
|
||||
background-color: #ececec;
|
||||
}
|
||||
|
||||
#batchManagerGlobal fieldset {
|
||||
margin-top:2em;
|
||||
#batchManagerGlobal #applyFilter:hover, #batchManagerGlobal .addFilter-button:hover {
|
||||
color: #111;
|
||||
background-color: #ff9b32 ;
|
||||
}
|
||||
/* beta-test ends */
|
||||
|
||||
#batchManagerGlobal .addFilter-button.highlight {
|
||||
color: #3C3C3C;
|
||||
background-color: #ffc17e;
|
||||
}
|
||||
|
||||
#batchManagerGlobal .addFilter-button.highlight:hover {
|
||||
background-color: #ff7700;
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.slider-info {color:#ff7700;font-weight:bold;}
|
||||
|
||||
@@ -302,10 +292,10 @@ UL.thumbnails li.rank-of-image {background-color: #ddd;}
|
||||
font-size:14px;
|
||||
}
|
||||
|
||||
.buttonLike:disabled, input[type="submit"]:disabled, input[type="button"]:disabled, input[type="reset"]:disabled {
|
||||
background-color: #ECECEC;
|
||||
color: #D5D5D5;
|
||||
cursor:not-allowed;
|
||||
.buttonLike:disabled, .buttonGradient:disabled, input[type="submit"]:disabled, input[type="button"]:disabled, input[type="reset"]:disabled {
|
||||
background: #ECECEC !important;
|
||||
color: #D5D5D5 !important;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
#formCreateAlbum input[name="virtual_name"] {border: 1px solid #D5D5D5; transition: all 125ms ease-out;}
|
||||
@@ -313,16 +303,293 @@ UL.thumbnails li.rank-of-image {background-color: #ddd;}
|
||||
|
||||
p.albumTitle img {margin-bottom:-3px;}
|
||||
|
||||
.groups label>p {
|
||||
.groups .GroupContainer,
|
||||
.groups .showCreateGroup,
|
||||
.groups .addGroupFormBlock{
|
||||
font-size: 1.2em;
|
||||
color: #111;
|
||||
background-color:#ccc;
|
||||
background-color:#fafafa;
|
||||
}
|
||||
|
||||
.groups .Group-name>p,
|
||||
.addGroupForm .addGroupFormTitle{
|
||||
color:#3c3c3c;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
.groups .GroupContainer,
|
||||
.groups .showCreateGroup,
|
||||
.groups .addGroupFormBlock{
|
||||
box-shadow: 0px 2px 5px #00000024;
|
||||
}
|
||||
|
||||
.groups #addGroupForm:hover #addGroup,
|
||||
.groups .addGroupFormTitle{
|
||||
color:#3c3c3c;
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
.groups #addGroup{
|
||||
color:#777;
|
||||
}
|
||||
|
||||
.groups .group_number_users{
|
||||
color:#d5d5d5;
|
||||
}
|
||||
|
||||
.addGroupLabel{
|
||||
color:#3c3c3c;
|
||||
}
|
||||
|
||||
.addUserButton:hover{
|
||||
text-decoration:none;
|
||||
color:#3c3c3c;
|
||||
background-color:#f3f3f3;
|
||||
}
|
||||
|
||||
.groups p.list_user{
|
||||
color:#3c3c3c;
|
||||
}
|
||||
|
||||
label>p.group_select {
|
||||
color: #000;
|
||||
background-color:#C2F5C2;
|
||||
}
|
||||
|
||||
.groups input[type="text"]{
|
||||
background-color:white;
|
||||
border:1px solid #d5d5d5;
|
||||
}
|
||||
|
||||
.groups .AddUser .icon-user-add::before{
|
||||
background-color:#f3f3f3;
|
||||
color:#e0e0e0;
|
||||
}
|
||||
|
||||
|
||||
/*Edit group name*/
|
||||
|
||||
.groups .Group-name{
|
||||
color:#3c3c3c;
|
||||
}
|
||||
|
||||
.groups .Group-name .Group-name-container p:focus{
|
||||
border:1px solid #3c3c3c!important;
|
||||
background-color:white;
|
||||
}
|
||||
|
||||
/*Add Group */
|
||||
|
||||
.groups fieldset INPUT[type="text"]::placeholder{
|
||||
color:#d5d5d5;
|
||||
}
|
||||
|
||||
.groups button.submit{
|
||||
background-color:#ffa744;
|
||||
color:#3c3c3c;
|
||||
}
|
||||
|
||||
.groups button.submit:hover{
|
||||
background-color:#ff7700;
|
||||
}
|
||||
|
||||
/*Group manager buttons*/
|
||||
|
||||
.groups .manage-users,
|
||||
.groups .manage-permissions{
|
||||
border:1px solid #e7e7e7;
|
||||
background-color:transparent;
|
||||
}
|
||||
|
||||
|
||||
.groups .manage-users:hover,
|
||||
.groups .manage-permissions:hover{
|
||||
background-color:#ffa744;
|
||||
border:1px solid #ffa744;
|
||||
cursor:pointer;
|
||||
}
|
||||
|
||||
/*UserList Pop in*/
|
||||
|
||||
|
||||
.UserListPopInContainer{
|
||||
background-color:#f3f3f3;
|
||||
border-radius:10px;
|
||||
|
||||
}
|
||||
|
||||
#UserList .AddUserBlock button{
|
||||
background-color:#ffa744;
|
||||
color:#3c3c3c;
|
||||
}
|
||||
|
||||
#UserList .AddUserBlock button:hover{
|
||||
background-color:#ff7700;
|
||||
}
|
||||
|
||||
#UserList .AddUserBlock input,
|
||||
#UserList .FilterUserBlock input{
|
||||
background-color:white;
|
||||
}
|
||||
|
||||
#UserList .AddUserBlock p,
|
||||
#UserList .FilterUserBlock{
|
||||
color:#3c3c3c;
|
||||
}
|
||||
|
||||
.UsersInGroupList span{
|
||||
color:#d5d5d5;
|
||||
}
|
||||
|
||||
.UsersInGroupList .icon-cancel:hover{
|
||||
color:#ff7700;
|
||||
}
|
||||
|
||||
.LinkUserManager{
|
||||
color:#3c3c3c;
|
||||
}
|
||||
|
||||
/* Selection mode */
|
||||
|
||||
.slider {
|
||||
background-color: #e0e0e0;
|
||||
}
|
||||
|
||||
.slider:before {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
input:checked + .slider {
|
||||
background-color: #ffa646;
|
||||
}
|
||||
|
||||
input:focus + .slider {
|
||||
box-shadow: 0 0 1px #ffa646;
|
||||
}
|
||||
|
||||
#selection-mode-block{
|
||||
background-color: #FAFAFA;
|
||||
border-left:1px solid #e6e6e6;
|
||||
}
|
||||
|
||||
.GroupBackgroudSelected{
|
||||
background-color:#ffd7ad!important;
|
||||
}
|
||||
|
||||
.OrangeIcon{
|
||||
background-color:#f98100!important;
|
||||
color:#ffe4c7!important;
|
||||
}
|
||||
|
||||
.OrangeFont{
|
||||
color:#ff7700!important;
|
||||
}
|
||||
|
||||
/*Selection mode content*/
|
||||
|
||||
.SelectionModeGroupList{
|
||||
color:#a0a0a0;
|
||||
}
|
||||
|
||||
#selection-mode-block button{
|
||||
border: 1px solid #e7e7e7;
|
||||
}
|
||||
|
||||
|
||||
#selection-mode-block button:hover{
|
||||
background-color: #ffa744;
|
||||
border: 1px solid #ffa744;
|
||||
}
|
||||
|
||||
#ConfirmGroupAction{
|
||||
color:#3c3c3c;
|
||||
}
|
||||
|
||||
#ConfirmGroupAction p{
|
||||
color: #777;
|
||||
}
|
||||
|
||||
.ConfirmDeleteButton{
|
||||
background-color: #ffa744;
|
||||
}
|
||||
|
||||
/*Merge Options*/
|
||||
|
||||
|
||||
#MergeOptionsBlock p{
|
||||
color: #777;
|
||||
}
|
||||
|
||||
#MergeOptionsBlock a{
|
||||
color:#3c3c3c;
|
||||
}
|
||||
|
||||
/*Merge options Radio buttons*/
|
||||
|
||||
.ConfirmMergeButton{
|
||||
background-color: #ffa744;
|
||||
}
|
||||
|
||||
.MergeOptionsContainer select{
|
||||
background-color: white;
|
||||
box-shadow: 0 0 2px #c5c5c5;
|
||||
}
|
||||
|
||||
/*Group checkbox*/
|
||||
|
||||
.groups .group-checkmark {
|
||||
border:2px solid #ffa646;
|
||||
}
|
||||
|
||||
.groups .Group-checkbox:hover input ~ .group-checkmark {
|
||||
background-color: #ffa646;
|
||||
}
|
||||
|
||||
.groups .Group-checkbox input:checked ~ .group-checkmark {
|
||||
background-color: #ffa646;
|
||||
}
|
||||
|
||||
|
||||
/*Group manager buttons*/
|
||||
|
||||
.groups .manage-users,
|
||||
.groups .manage-users:hover,
|
||||
.groups .manage-permissions,
|
||||
.groups .manage-permissions:hover{
|
||||
color:#3c3c3c;
|
||||
}
|
||||
|
||||
/*UserList Pop in*/
|
||||
|
||||
.CloseUserList{
|
||||
color:white;
|
||||
}
|
||||
|
||||
#UserList .group-name-block p{
|
||||
color:#3c3c3c;
|
||||
}
|
||||
|
||||
.UsernameBlock{
|
||||
background-color:#f9f9f9;
|
||||
}
|
||||
|
||||
.Tooltip p.TooltipText{
|
||||
|
||||
background-color:#f3f3f3;
|
||||
color: #3c3c3c;
|
||||
border:1px solid #3c3c3c;
|
||||
}
|
||||
|
||||
.ValidationUserAssociated, .ValidationUserDissociated{
|
||||
color:#00aa00 !important;
|
||||
background-color:#c2f5c2;
|
||||
}
|
||||
|
||||
.ValidationUserAssociated p, .ValidationUserDissociated p {
|
||||
color:#00aa00 !important;
|
||||
}
|
||||
|
||||
/*------*/
|
||||
|
||||
.userSeparator {
|
||||
visibility: hidden;
|
||||
}
|
||||
@@ -371,25 +638,8 @@ table.dataTable thead th, table.dataTable.no-footer {
|
||||
color:#444;
|
||||
}
|
||||
|
||||
/* beta-test begins: specific changes on album edition page*/
|
||||
#catModify input[type="text"], #catModify textarea {
|
||||
border: 2px solid #ddd;
|
||||
background-color:#fff;
|
||||
padding:5px;
|
||||
}
|
||||
|
||||
#catModify input[type="text"].large, #catModify textarea.description {
|
||||
width:590px;
|
||||
}
|
||||
|
||||
#catModify input[type="text"]:focus, #catModify textarea:focus {
|
||||
border-color: #ff7700;
|
||||
background-color:#fff;
|
||||
}
|
||||
|
||||
FORM#categoryOrdering p.albumTitle a { color: #5B5B5B; }
|
||||
FORM#categoryOrdering p.albumActions a { border-left:1px solid #D6D6D6; }
|
||||
.albumInfos {color: #999999;}
|
||||
FORM#categoryOrdering p.albumActions a { border-left:1px solid #D6D6D6; background-color: #E8E8E8;}
|
||||
FORM#categoryOrdering p.albumActions a:hover {background-color: #FFA844; color: #3A3A3A;}
|
||||
FORM#categoryOrdering p.albumActions .userSeparator {border: 1px solid #E1E1E1;}
|
||||
#addAlbumOpen, #autoOrderOpen {border: 1px solid #D6D6D6; color: #5B5B5B;}
|
||||
@@ -412,11 +662,114 @@ li.plupload_delete a {background: url("images/cancel.svg")!important; background
|
||||
li.plupload_delete a:hover {background: url("images/cancelhover.svg")!important; background-size: cover!important;}
|
||||
|
||||
.addAlbumEmpty {color: #3C3C3C;}
|
||||
.addAlbumEmpty a {background-color: #FFA646; box-shadow: 0 1px 2px #0D0303;}
|
||||
.addAlbumEmpty a:hover{background-color: #ff7700; color: #3C3C3C; box-shadow: 0 2px 4px #0D0303;}
|
||||
#permitAction p {background: #FFF;}
|
||||
#addAlbumForm input[name="category_name"] {border:none!important; margin-top: 5px!important;}
|
||||
#addAlbumForm input[name="category_name"]:focus {background-color: #DDDDDD;}
|
||||
.buttonSeparator {color: #3C3C3C;}
|
||||
#uploadForm li.plupload_droptext {background-color: #F5F5F5!important;}
|
||||
.addFilesButtonChanged {background-color: #E5E5E5;}
|
||||
.addFilesButtonChanged:hover {background-color: #BBB;}
|
||||
|
||||
.addFilesButtonChanged:hover {background-color: #BBB;}
|
||||
|
||||
#checkActions a, .deleteDerivButtons a {background-color: #E8E8E8;}
|
||||
#filterList select, .pictureLevels select, #permitAction select {background-color: #FFF; color: #4E4E4E; border: 2px solid #7070704f !important; outline: none !important;}
|
||||
#filter_category .selectize-input.items.full.has-options.has-items, #filter_tags .selectize-input.items.not-full.has-options,
|
||||
#filter_tags .selectize-input.items.not-full, #filter_search input, #action_associate .selectize-input.items.full.has-options.has-items,
|
||||
#action_dissociate .selectize-input.items.full.has-options.has-items {
|
||||
border: 2px solid #7070704f !important;
|
||||
background: #FFF;
|
||||
color: #3C3C3CBD;
|
||||
}
|
||||
#action_associate a:last-child {background: #FFF; border: 1px solid #787777a6; box-shadow: none;}
|
||||
#forbidAction, .selectionEmptyBlock, .noFilter {background-color: #f3f3f3;}
|
||||
#action_title .large, #action_author .large {background-color: #FFF; color: #4E4E4E;}
|
||||
#filter_dimension .slider-choice, #filter_filesize .slider-choice {background-color: #EEE; color: #777;}
|
||||
#filter_dimension .slider-choice:hover, #filter_filesize .slider-choice:hover, .dimension-cancel:hover {
|
||||
text-decoration: none; background-color: #ffa646 !important; color: initial;
|
||||
}
|
||||
#filterList .ui-slider .ui-slider-range {background: rgba(255,166,70, 0.9); margin-top: -1px; border: 1px solid #ffaf58;}
|
||||
#filterList .ui-widget-content {border: 1px solid #EEE; background: #DDD;}
|
||||
|
||||
#batchManagerGlobal option[disabled] {background-color: #EEE;}
|
||||
.dimension-cancel {background-color: #F8F8F8 !important;}
|
||||
.pageNumberSelected {color: #FFF !important; font-weight: bold;}
|
||||
|
||||
#batchManagerGlobal .ui-state-default, #batchManagerGlobal .ui-widget-content .ui-state-default,#batchManagerGlobal .ui-widget-header .ui-state-default {
|
||||
border: 1px solid #ffaf58; background: #ffaf58;
|
||||
}
|
||||
#batchManagerGlobal .ui-state-hover,#batchManagerGlobal .ui-widget-content .ui-state-hover, #batchManagerGlobal .ui-widget-header .ui-state-hover {
|
||||
background: #ffaf58;
|
||||
}
|
||||
#batchManagerGlobal .ui-state-focus, #batchManagerGlobal .ui-widget-content .ui-state-focus,#batchManagerGlobal .ui-widget-header .ui-state-focus {
|
||||
border: 1px solid #ffaf58; background: #ffaf58;
|
||||
}
|
||||
#batchManagerGlobal .ui-state-active, #batchManagerGlobal .ui-widget-content .ui-state-active,#batchManagerGlobal .ui-widget-header .ui-state-active {
|
||||
background: #ffaf58;
|
||||
}
|
||||
#batchManagerGlobal .ui-slider-range.ui-widget-header.ui-corner-all {border: 1px solid #ffaf58;}
|
||||
#batchManagerGlobal .font-checkbox.selected {color: #777;}
|
||||
|
||||
/* Category List */
|
||||
.categoryContainer {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.categoryBox, .addAlbum{
|
||||
background-color: #fafafa;
|
||||
box-shadow: 0px 2px 5px #00000024;
|
||||
}
|
||||
|
||||
.addAlbumHead p {
|
||||
color: #3C3C3C;
|
||||
}
|
||||
|
||||
.addAlbum form input {
|
||||
background-color: white;
|
||||
border: 1px solid #d5d5d5;
|
||||
}
|
||||
|
||||
.albumTitle {
|
||||
color: #3c3c3c;
|
||||
}
|
||||
|
||||
.albumInfos {
|
||||
color: #d5d5d5;
|
||||
}
|
||||
|
||||
.albumActions a {
|
||||
color: #848484;
|
||||
}
|
||||
|
||||
.albumActions a:hover {
|
||||
color: #FFA646;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.albumActions > span {
|
||||
color: #c6c6c6;
|
||||
}
|
||||
|
||||
.icon-red {
|
||||
background-color: #ffcfcf;
|
||||
color: #ff5252;
|
||||
}
|
||||
|
||||
.icon-yellow {
|
||||
color: #ffa744;
|
||||
background-color: #ffe9cf;
|
||||
}
|
||||
|
||||
.icon-purple {
|
||||
background-color: #e0daf4;
|
||||
color: #896af3;
|
||||
}
|
||||
|
||||
.icon-blue {
|
||||
background-color: #cfebff;
|
||||
color: #2883c3;
|
||||
}
|
||||
|
||||
.icon-green {
|
||||
background-color: #d6ffcf;
|
||||
color: #6ece5e;
|
||||
}
|
||||
@@ -575,6 +575,222 @@
|
||||
"css": "link-1",
|
||||
"code": 59450,
|
||||
"src": "websymbols"
|
||||
},
|
||||
{
|
||||
"uid": "c8585e1e5b0467f28b70bce765d5840c",
|
||||
"css": "docs",
|
||||
"code": 61637,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "750058837a91edae64b03d60fc7e81a7",
|
||||
"css": "ellipsis-vert",
|
||||
"code": 61762,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "0d6ab2d08779e9f9d2b9199270b95909",
|
||||
"css": "user-minus",
|
||||
"code": 59451,
|
||||
"src": "custom_icons",
|
||||
"selected": true,
|
||||
"svg": {
|
||||
"path": "M1218.8 406.3H843.8C826.6 406.3 812.5 420.3 812.5 437.5V500C812.5 517.2 826.6 531.3 843.8 531.3H1218.8C1235.9 531.3 1250 517.2 1250 500V437.5C1250 420.3 1235.9 406.3 1218.8 406.3ZM437.5 500C575.6 500 687.5 388.1 687.5 250S575.6 0 437.5 0 187.5 111.9 187.5 250 299.4 500 437.5 500ZM612.5 562.5H579.9C536.5 582.4 488.3 593.8 437.5 593.8S338.7 582.4 295.1 562.5H262.5C117.6 562.5 0 680.1 0 825V906.3C0 958 42 1000 93.8 1000H781.3C833 1000 875 958 875 906.3V825C875 680.1 757.4 562.5 612.5 562.5Z",
|
||||
"width": 1250
|
||||
},
|
||||
"search": [
|
||||
"user-minus"
|
||||
]
|
||||
},
|
||||
{
|
||||
"uid": "31972e4e9d080eaa796290349ae6c1fd",
|
||||
"css": "users-1",
|
||||
"code": 59453,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "c0d665a4c7e90d20d29dfa9ee67da445",
|
||||
"css": "clone",
|
||||
"code": 59454,
|
||||
"src": "custom_icons",
|
||||
"selected": true,
|
||||
"svg": {
|
||||
"path": "M906.3 0C958 0 1000 42 1000 93.8V656.3C1000 708 958 750 906.3 750H343.8C292 750 250 708 250 656.3V93.8C250 42 292 0 343.8 0H906.3M343.8 812.5C257.6 812.5 187.5 742.4 187.5 656.3V250H93.8C42 250 0 292 0 343.8V906.3C0 958 42 1000 93.8 1000H656.3C708 1000 750 958 750 906.3V812.5H343.8Z",
|
||||
"width": 1000
|
||||
},
|
||||
"search": [
|
||||
"clone"
|
||||
]
|
||||
},
|
||||
{
|
||||
"uid": "301069b48d6466f5ec4866d375620908",
|
||||
"css": "object-group",
|
||||
"code": 59455,
|
||||
"src": "custom_icons",
|
||||
"selected": true,
|
||||
"svg": {
|
||||
"path": "M937.5 250V187.5H976.6C989.5 187.5 1000 177 1000 164.1V85.9C1000 73 989.5 62.5 976.6 62.5H898.4C885.5 62.5 875 73 875 85.9V125H125V85.9C125 73 114.5 62.5 101.6 62.5H23.4C10.5 62.5 0 73 0 85.9V164.1C0 177 10.5 187.5 23.4 187.5H62.5V812.5H23.4C10.5 812.5 0 823 0 835.9V914.1C0 927 10.5 937.5 23.4 937.5H101.6C114.5 937.5 125 927 125 914.1V875H875V914.1C875 927 885.5 937.5 898.4 937.5H976.6C989.5 937.5 1000 927 1000 914.1V835.9C1000 823 989.5 812.5 976.6 812.5H937.5V250ZM187.5 539.1V273.4C187.5 260.5 198 250 210.9 250H539.1C552 250 562.5 260.5 562.5 273.4V539.1C562.5 552 552 562.5 539.1 562.5H210.9C198 562.5 187.5 552 187.5 539.1ZM812.5 726.6C812.5 739.5 802 750 789.1 750H460.9C448 750 437.5 739.5 437.5 726.6V625H578.1C604 625 625 604 625 578.1V437.5H789.1C802 437.5 812.5 448 812.5 460.9V726.6Z",
|
||||
"width": 1000
|
||||
},
|
||||
"search": [
|
||||
"object-group"
|
||||
]
|
||||
},
|
||||
{
|
||||
"uid": "712d59357fea0bf3b685efe7c6ea6504",
|
||||
"css": "ellipsis-v",
|
||||
"code": 59456,
|
||||
"src": "custom_icons",
|
||||
"selected": true,
|
||||
"svg": {
|
||||
"path": "M187.5 359.4C265.2 359.4 328.1 422.3 328.1 500S265.2 640.6 187.5 640.6 46.9 577.7 46.9 500 109.8 359.4 187.5 359.4ZM46.9 156.3C46.9 234 109.8 296.9 187.5 296.9S328.1 234 328.1 156.3 265.2 15.6 187.5 15.6 46.9 78.5 46.9 156.3ZM46.9 843.8C46.9 921.5 109.8 984.4 187.5 984.4S328.1 921.5 328.1 843.8 265.2 703.1 187.5 703.1 46.9 766 46.9 843.8Z",
|
||||
"width": 375
|
||||
},
|
||||
"search": [
|
||||
"ellipsis-v"
|
||||
]
|
||||
},
|
||||
{
|
||||
"uid": "4f25b5bf13b487450dd239c13eb99862",
|
||||
"css": "users-cog",
|
||||
"code": 59457,
|
||||
"src": "custom_icons",
|
||||
"selected": true,
|
||||
"svg": {
|
||||
"path": "M1192.4 666.6C1197.5 639.1 1197.5 610.9 1192.4 583.4L1242.8 554.3C1248.6 551 1251.2 544.1 1249.2 537.7 1236.1 495.5 1213.7 457.2 1184.4 425.6 1179.9 420.7 1172.7 419.5 1166.8 422.9L1116.4 452C1095.1 433.8 1070.7 419.7 1044.3 410.4V352.1C1044.3 345.5 1039.6 339.6 1033.2 338.3 989.6 328.5 945.3 328.9 903.9 338.3 897.5 339.6 892.8 345.5 892.8 352.1V410.4C866.4 419.7 842 433.8 820.7 452L770.3 422.9C764.6 419.5 757.2 420.7 752.7 425.6 723.4 457.2 701 495.5 687.9 537.7 685.9 544.1 688.7 551 694.3 554.3L744.7 583.4C739.6 610.9 739.6 639.1 744.7 666.6L694.3 695.7C688.5 699 685.9 705.9 687.9 712.3 701 754.5 723.4 792.6 752.7 824.4 757.2 829.3 764.5 830.5 770.3 827.1L820.7 798C842 816.2 866.4 830.3 892.8 839.6V897.9C892.8 904.5 897.5 910.4 903.9 911.7 947.5 921.5 991.8 921.1 1033.2 911.7 1039.6 910.4 1044.3 904.5 1044.3 897.9V839.6C1070.7 830.3 1095.1 816.2 1116.4 798L1166.8 827.1C1172.5 830.5 1179.9 829.3 1184.4 824.4 1213.7 792.8 1236.1 754.5 1249.2 712.3 1251.2 705.9 1248.4 699 1242.8 695.7L1192.4 666.6ZM968.8 719.7C916.4 719.7 874 677.1 874 625S916.6 530.3 968.8 530.3 1063.5 572.9 1063.5 625 1021.1 719.7 968.8 719.7ZM187.5 437.5C256.4 437.5 312.5 381.4 312.5 312.5S256.4 187.5 187.5 187.5 62.5 243.6 62.5 312.5 118.6 437.5 187.5 437.5ZM625 500C628.7 500 632.2 499 635.9 498.8 652.1 456.4 676 416.6 706.8 383.2 721.3 367.6 741.8 358.6 763.3 358.6 776.8 358.6 790 362.1 801.6 368.9L817 377.9C818.6 377 820.1 376.2 821.7 375.2 835.4 346.7 843.6 315 843.6 281.4 843.6 160.5 745.7 62.7 624.8 62.7S406.3 160.4 406.3 281.3C406.3 402.1 504.1 500 625 500ZM830.5 879.9C826 877.5 821.5 874.8 817.2 872.3 801.2 881.6 787.3 891.4 763.5 891.4 742.2 891.4 721.7 882.4 707 866.8 671.3 828.1 643.9 781.1 628.5 730.9 607.6 663.5 677.1 633.8 678.9 632.6 678.7 627.5 678.7 622.5 678.9 617.4L663.5 608.4C656.1 604.1 649.8 598.6 644.3 592.6 637.9 593 631.6 593.8 625.2 593.8 577.1 593.8 532.2 582 491.4 562.5H475.2C350.8 562.5 250 663.3 250 787.5V843.8C250 895.5 292 937.5 343.8 937.5H842.6C835.4 925.8 830.5 912.5 830.5 897.9V879.9ZM338.1 536.3C315.4 513.9 284.4 500 250 500H125C56.1 500 0 556.1 0 625V687.5C0 722.1 27.9 750 62.5 750H191.2C203.5 657.4 259.4 579.5 338.1 536.3Z",
|
||||
"width": 1250
|
||||
},
|
||||
"search": [
|
||||
"users-cog"
|
||||
]
|
||||
},
|
||||
{
|
||||
"uid": "a2a74f5e7b7d9ba054897d8c795a326a",
|
||||
"css": "list-bullet",
|
||||
"code": 61642,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "c1b9e810202506fe4283cc98e8493677",
|
||||
"css": "trash-1",
|
||||
"code": 59458,
|
||||
"src": "custom_icons",
|
||||
"selected": true,
|
||||
"svg": {
|
||||
"path": "M843.8 62.5H609.4L591 26A46.9 46.9 0 0 0 549 0H325.8A46.3 46.3 0 0 0 284 26L265.6 62.5H31.3A31.3 31.3 0 0 0 0 93.8V156.3A31.3 31.3 0 0 0 31.3 187.5H843.8A31.3 31.3 0 0 0 875 156.3V93.8A31.3 31.3 0 0 0 843.8 62.5ZM103.9 912.1A93.8 93.8 0 0 0 197.5 1000H677.5A93.8 93.8 0 0 0 771.1 912.1L812.5 250H62.5Z",
|
||||
"width": 875
|
||||
},
|
||||
"search": [
|
||||
"trash"
|
||||
]
|
||||
},
|
||||
{
|
||||
"uid": "53d72bdf3f8e3c18f2f668af5649d7f5",
|
||||
"css": "user-1",
|
||||
"code": 59452,
|
||||
"src": "custom_icons",
|
||||
"selected": true,
|
||||
"svg": {
|
||||
"path": "M437.5 500C575.6 500 687.5 388.1 687.5 250S575.6 0 437.5 0 187.5 111.9 187.5 250 299.4 500 437.5 500ZM612.5 562.5H579.9C536.5 582.4 488.3 593.8 437.5 593.8S338.7 582.4 295.1 562.5H262.5C117.6 562.5 0 680.1 0 825V906.3C0 958 42 1000 93.8 1000H781.3C833 1000 875 958 875 906.3V825C875 680.1 757.4 562.5 612.5 562.5Z",
|
||||
"width": 875
|
||||
},
|
||||
"search": [
|
||||
"user"
|
||||
]
|
||||
},
|
||||
{
|
||||
"uid": "1bad022b39d6d7c7a1c8a81be5193b67",
|
||||
"css": "zoom-square",
|
||||
"code": 59459,
|
||||
"src": "custom_icons",
|
||||
"selected": true,
|
||||
"svg": {
|
||||
"path": "M142.9 642.9H0V1000H357.1V857.1H142.9V642.9ZM0 357.1H142.9V142.9H357.1V0H0V357.1ZM857.1 857.1H642.9V1000H1000V642.9H857.1V857.1ZM642.9 0V142.9H857.1V357.1H1000V0H642.9Z",
|
||||
"width": 1000
|
||||
},
|
||||
"search": [
|
||||
"full-screen"
|
||||
]
|
||||
},
|
||||
{
|
||||
"uid": "107ce08c7231097c7447d8f4d059b55f",
|
||||
"css": "ellipsis",
|
||||
"code": 61761,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "3c961c1a8d874815856fc6637dc5a13c",
|
||||
"css": "file-image",
|
||||
"code": 61893,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "2a4e6c99b732a57da40e32fa2a7800a4",
|
||||
"css": "toggle-off",
|
||||
"code": 61956,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "3256ef03b16e7ab51235bc7378b53bb5",
|
||||
"css": "toggle-on",
|
||||
"code": 61957,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "0044cf1c514969dfd8c27a4a0d9df7c8",
|
||||
"css": "grip-vertical-solid",
|
||||
"code": 59460,
|
||||
"src": "custom_icons",
|
||||
"selected": true,
|
||||
"svg": {
|
||||
"path": "M187.5 62.5H62.5C28 62.5 0 90.5 0 125V250C0 284.5 28 312.5 62.5 312.5H187.5C222 312.5 250 284.5 250 250V125C250 90.5 222 62.5 187.5 62.5ZM187.5 375H62.5C28 375 0 403 0 437.5V562.5C0 597 28 625 62.5 625H187.5C222 625 250 597 250 562.5V437.5C250 403 222 375 187.5 375ZM187.5 687.5H62.5C28 687.5 0 715.5 0 750V875C0 909.5 28 937.5 62.5 937.5H187.5C222 937.5 250 909.5 250 875V750C250 715.5 222 687.5 187.5 687.5ZM562.5 62.5H437.5C403 62.5 375 90.5 375 125V250C375 284.5 403 312.5 437.5 312.5H562.5C597 312.5 625 284.5 625 250V125C625 90.5 597 62.5 562.5 62.5ZM562.5 375H437.5C403 375 375 403 375 437.5V562.5C375 597 403 625 437.5 625H562.5C597 625 625 597 625 562.5V437.5C625 403 597 375 562.5 375ZM562.5 687.5H437.5C403 687.5 375 715.5 375 750V875C375 909.5 403 937.5 437.5 937.5H562.5C597 937.5 625 909.5 625 875V750C625 715.5 597 687.5 562.5 687.5Z",
|
||||
"width": 625
|
||||
},
|
||||
"search": [
|
||||
"grip-vertical-solid"
|
||||
]
|
||||
},
|
||||
{
|
||||
"uid": "a8cf4d1eb65bbd42341e14891db539a3",
|
||||
"css": "dice-solid",
|
||||
"code": 59461,
|
||||
"src": "custom_icons",
|
||||
"selected": true,
|
||||
"svg": {
|
||||
"path": "M1156.3 375H924.3C949.1 432.8 938.2 502.3 891.1 549.5L625 815.6V906.3C625 958 667 1000 718.8 1000H1156.3C1208 1000 1250 958 1250 906.3V468.8C1250 417 1208 375 1156.3 375ZM937.5 734.4C911.6 734.4 890.6 713.4 890.6 687.5 890.6 661.6 911.6 640.6 937.5 640.6S984.4 661.6 984.4 687.5C984.4 713.4 963.4 734.4 937.5 734.4ZM846.9 369.7L505.3 28.1C467.9-9.4 407.2-9.4 369.7 28.1L28.1 369.7C-9.4 407.1-9.4 467.8 28.1 505.3L369.7 846.9C407.1 884.4 467.8 884.4 505.3 846.9L846.9 505.3C884.4 467.8 884.4 407.1 846.9 369.7ZM187.5 484.4C161.6 484.4 140.6 463.4 140.6 437.5 140.6 411.6 161.6 390.6 187.5 390.6S234.4 411.6 234.4 437.5C234.4 463.4 213.4 484.4 187.5 484.4ZM437.5 734.4C411.6 734.4 390.6 713.4 390.6 687.5 390.6 661.6 411.6 640.6 437.5 640.6S484.4 661.6 484.4 687.5C484.4 713.4 463.4 734.4 437.5 734.4ZM437.5 484.4C411.6 484.4 390.6 463.4 390.6 437.5 390.6 411.6 411.6 390.6 437.5 390.6S484.4 411.6 484.4 437.5C484.4 463.4 463.4 484.4 437.5 484.4ZM437.5 234.4C411.6 234.4 390.6 213.4 390.6 187.5 390.6 161.6 411.6 140.6 437.5 140.6S484.4 161.6 484.4 187.5C484.4 213.4 463.4 234.4 437.5 234.4ZM687.5 484.4C661.6 484.4 640.6 463.4 640.6 437.5 640.6 411.6 661.6 390.6 687.5 390.6S734.4 411.6 734.4 437.5C734.4 463.4 713.4 484.4 687.5 484.4Z",
|
||||
"width": 1250
|
||||
},
|
||||
"search": [
|
||||
"dice-solid"
|
||||
]
|
||||
},
|
||||
{
|
||||
"uid": "7411608e7611ffd477aeec7d239f87e9",
|
||||
"css": "dice",
|
||||
"code": 59401,
|
||||
"src": "custom_icons",
|
||||
"selected": false,
|
||||
"svg": {
|
||||
"path": "M959 251.9V748.1C959 772.7 944.8 795.1 922.6 805.7L527.5 993.8C518.8 997.9 509.4 1000 500 1000S481.2 997.9 472.5 993.8L77.4 805.7C55.2 795.1 41 772.7 41 748.1V251.9C41 239.1 44.8 226.9 51.6 216.7 57.9 207.2 66.7 199.4 77.4 194.3L472.5 6.2C489.9-2.1 510.1-2.1 527.5 6.2L922.6 194.3C933.3 199.4 942.1 207.2 948.4 216.7 955.2 226.9 959 239.1 959 251.9ZM948.4 216.7C942.1 207.2 933.3 199.4 922.6 194.3L527.5 6.2C510.1-2.1 489.9-2.1 472.5 6.2L469.8 7.5 862.2 194.3C872.9 199.4 881.7 207.2 888 216.7 894.8 226.9 898.6 239.1 898.6 251.9V748.1C898.6 772.7 884.4 795.1 862.2 805.7L469.8 992.5 472.5 993.8C481.2 997.9 490.6 1000 500 1000S518.8 997.9 527.5 993.8L922.6 805.7C944.8 795.1 959 772.7 959 748.1V251.9C959 239.1 955.2 226.9 948.4 216.7ZM500 430.2V1000C490.6 1000 481.2 997.9 472.5 993.8L77.4 805.7C55.2 795.1 41 772.7 41 748.1V251.9C41 239.1 44.8 226.9 51.6 216.7ZM959 251.9V748.1C959 772.4 945.1 794.7 923.3 805.4 923 805.5 922.8 805.6 922.6 805.7L527.5 993.8C518.8 997.9 509.4 1000 500 1000V430.2L948.4 216.7C955.2 226.9 959 239.1 959 251.9ZM948.4 216.7L897.6 240.9C898.2 244.5 898.6 248.2 898.6 251.9V748.1C898.6 772.4 884.7 794.7 862.9 805.4 862.6 805.5 862.4 805.6 862.2 805.7L500 978.1V1000C509.4 1000 518.8 997.9 527.5 993.8L922.6 805.7C922.8 805.6 923 805.5 923.3 805.4 945.1 794.7 959 772.4 959 748.1V251.9C959 239.1 955.2 226.9 948.4 216.7Z",
|
||||
"width": 1000
|
||||
},
|
||||
"search": [
|
||||
"dice"
|
||||
]
|
||||
},
|
||||
{
|
||||
"uid": "2dcb438d02f429cbd49c94515bc39498",
|
||||
"css": "dice",
|
||||
"code": 59402,
|
||||
"src": "custom_icons",
|
||||
"selected": false,
|
||||
"svg": {
|
||||
"path": "M959 251.9V748.1C959 772.7 944.8 795.1 922.6 805.7L527.5 993.8C518.8 997.9 509.4 1000 500 1000S481.2 997.9 472.5 993.8L77.4 805.7C55.2 795.1 41 772.7 41 748.1V251.9C41 239.1 44.8 226.9 51.6 216.7 57.9 207.2 66.7 199.4 77.4 194.3L472.5 6.2C489.9-2.1 510.1-2.1 527.5 6.2L922.6 194.3C933.3 199.4 942.1 207.2 948.4 216.7 955.2 226.9 959 239.1 959 251.9ZM948.4 216.7C942.1 207.2 933.3 199.4 922.6 194.3L527.5 6.2C510.1-2.1 489.9-2.1 472.5 6.2L469.8 7.5 862.2 194.3C872.9 199.4 881.7 207.2 888 216.7 894.8 226.9 898.6 239.1 898.6 251.9V748.1C898.6 772.7 884.4 795.1 862.2 805.7L469.8 992.5 472.5 993.8C481.2 997.9 490.6 1000 500 1000S518.8 997.9 527.5 993.8L922.6 805.7C944.8 795.1 959 772.7 959 748.1V251.9C959 239.1 955.2 226.9 948.4 216.7ZM500 430.2V1000C490.6 1000 481.2 997.9 472.5 993.8L77.4 805.7C55.2 795.1 41 772.7 41 748.1V251.9C41 239.1 44.8 226.9 51.6 216.7ZM959 251.9V748.1C959 772.4 945.1 794.7 923.3 805.4 923 805.5 922.8 805.6 922.6 805.7L527.5 993.8C518.8 997.9 509.4 1000 500 1000V430.2L948.4 216.7C955.2 226.9 959 239.1 959 251.9ZM948.4 216.7L897.6 240.9C898.2 244.5 898.6 248.2 898.6 251.9V748.1C898.6 772.4 884.7 794.7 862.9 805.4 862.6 805.5 862.4 805.6 862.2 805.7L500 978.1V1000C509.4 1000 518.8 997.9 527.5 993.8L922.6 805.7C922.8 805.6 923 805.5 923.3 805.4 945.1 794.7 959 772.4 959 748.1V251.9C959 239.1 955.2 226.9 948.4 216.7Z",
|
||||
"width": 1000
|
||||
},
|
||||
"search": [
|
||||
"dice"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -74,20 +74,38 @@
|
||||
.icon-th-1:before { content: '\e838'; } /* '' */
|
||||
.icon-flow-tree:before { content: '\e839'; } /* '' */
|
||||
.icon-link-1:before { content: '\e83a'; } /* '' */
|
||||
.icon-user-minus:before { content: '\e83b'; } /* '' */
|
||||
.icon-user-1:before { content: '\e83c'; } /* '' */
|
||||
.icon-users-1:before { content: '\e83d'; } /* '' */
|
||||
.icon-clone:before { content: '\e83e'; } /* '' */
|
||||
.icon-object-group:before { content: '\e83f'; } /* '' */
|
||||
.icon-ellipsis-v:before { content: '\e840'; } /* '' */
|
||||
.icon-users-cog:before { content: '\e841'; } /* '' */
|
||||
.icon-trash-1:before { content: '\e842'; } /* '' */
|
||||
.icon-zoom-square:before { content: '\e843'; } /* '' */
|
||||
.icon-grip-vertical-solid:before { content: '\e844'; } /* '' */
|
||||
.icon-dice-solid:before { content: '\e845'; } /* '' */
|
||||
.icon-hdd:before { content: '\f0a0'; } /* '' */
|
||||
.icon-tasks:before { content: '\f0ae'; } /* '' */
|
||||
.icon-filter:before { content: '\f0b0'; } /* '' */
|
||||
.icon-docs:before { content: '\f0c5'; } /* '' */
|
||||
.icon-list-bullet:before { content: '\f0ca'; } /* '' */
|
||||
.icon-mail-alt:before { content: '\f0e0'; } /* '' */
|
||||
.icon-sitemap:before { content: '\f0e8'; } /* '' */
|
||||
.icon-circle-empty:before { content: '\f10c'; } /* '' */
|
||||
.icon-crop:before { content: '\f125'; } /* '' */
|
||||
.icon-ellipsis:before { content: '\f141'; } /* '' */
|
||||
.icon-ellipsis-vert:before { content: '\f142'; } /* '' */
|
||||
.icon-sort-name-up:before { content: '\f15d'; } /* '' */
|
||||
.icon-sort-alt-up:before { content: '\f160'; } /* '' */
|
||||
.icon-sort-alt-down:before { content: '\f161'; } /* '' */
|
||||
.icon-sort-number-up:before { content: '\f162'; } /* '' */
|
||||
.icon-right:before { content: '\f178'; } /* '' */
|
||||
.icon-dot-circled:before { content: '\f192'; } /* '' */
|
||||
.icon-file-image:before { content: '\f1c5'; } /* '' */
|
||||
.icon-lifebuoy:before { content: '\f1cd'; } /* '' */
|
||||
.icon-toggle-off:before { content: '\f204'; } /* '' */
|
||||
.icon-toggle-on:before { content: '\f205'; } /* '' */
|
||||
.icon-television:before { content: '\f26c'; } /* '' */
|
||||
.icon-picture:before { content: '🌄'; } /* '\1f304' */
|
||||
.icon-shuffle:before { content: '🔀'; } /* '\1f500' */
|
||||
|
||||
@@ -72,20 +72,38 @@
|
||||
.icon-th-1 { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-flow-tree { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-link-1 { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-user-minus { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-user-1 { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-users-1 { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-clone { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-object-group { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-ellipsis-v { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-users-cog { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-trash-1 { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-zoom-square { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-grip-vertical-solid { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-dice-solid { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-hdd { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-tasks { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-filter { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-docs { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-list-bullet { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-mail-alt { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-sitemap { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-circle-empty { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-crop { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-ellipsis { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-ellipsis-vert { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-sort-name-up { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-sort-alt-up { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-sort-alt-down { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-sort-number-up { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-right { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-dot-circled { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-file-image { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-lifebuoy { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-toggle-off { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-toggle-on { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-television { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-picture { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '🌄 '); }
|
||||
.icon-shuffle { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '🔀 '); }
|
||||
|
||||
@@ -83,20 +83,38 @@
|
||||
.icon-th-1 { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-flow-tree { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-link-1 { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-user-minus { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-user-1 { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-users-1 { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-clone { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-object-group { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-ellipsis-v { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-users-cog { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-trash-1 { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-zoom-square { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-grip-vertical-solid { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-dice-solid { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-hdd { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-tasks { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-filter { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-docs { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-list-bullet { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-mail-alt { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-sitemap { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-circle-empty { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-crop { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-ellipsis { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-ellipsis-vert { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-sort-name-up { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-sort-alt-up { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-sort-alt-down { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-sort-number-up { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-right { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-dot-circled { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-file-image { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-lifebuoy { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-toggle-off { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-toggle-on { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-television { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-picture { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '🌄 '); }
|
||||
.icon-shuffle { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '🔀 '); }
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
|
||||
@font-face {
|
||||
font-family: 'fontello';
|
||||
src: url('../font/fontello.eot?22756229');
|
||||
src: url('../font/fontello.eot?22756229#iefix') format('embedded-opentype'),
|
||||
url('../font/fontello.woff2?22756229') format('woff2'),
|
||||
url('../font/fontello.woff?22756229') format('woff'),
|
||||
url('../font/fontello.ttf?22756229') format('truetype'),
|
||||
url('../font/fontello.svg?22756229#fontello') format('svg');
|
||||
src: url('../font/fontello.eot?16615516');
|
||||
src: url('../font/fontello.eot?16615516#iefix') format('embedded-opentype'),
|
||||
url('../font/fontello.woff2?16615516') format('woff2'),
|
||||
url('../font/fontello.woff?16615516') format('woff'),
|
||||
url('../font/fontello.ttf?16615516') format('truetype'),
|
||||
url('../font/fontello.svg?16615516#fontello') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
@@ -17,7 +17,7 @@
|
||||
@media screen and (-webkit-min-device-pixel-ratio:0) {
|
||||
@font-face {
|
||||
font-family: 'fontello';
|
||||
src: url('../font/fontello.svg?22756229#fontello') format('svg');
|
||||
src: url('../font/fontello.svg?16615516#fontello') format('svg');
|
||||
}
|
||||
}
|
||||
*/
|
||||
@@ -26,7 +26,7 @@
|
||||
font-family: "fontello";
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
speak: none;
|
||||
speak: never;
|
||||
|
||||
display: inline-block;
|
||||
text-decoration: inherit;
|
||||
@@ -130,20 +130,38 @@
|
||||
.icon-th-1:before { content: '\e838'; } /* '' */
|
||||
.icon-flow-tree:before { content: '\e839'; } /* '' */
|
||||
.icon-link-1:before { content: '\e83a'; } /* '' */
|
||||
.icon-user-minus:before { content: '\e83b'; } /* '' */
|
||||
.icon-user-1:before { content: '\e83c'; } /* '' */
|
||||
.icon-users-1:before { content: '\e83d'; } /* '' */
|
||||
.icon-clone:before { content: '\e83e'; } /* '' */
|
||||
.icon-object-group:before { content: '\e83f'; } /* '' */
|
||||
.icon-ellipsis-v:before { content: '\e840'; } /* '' */
|
||||
.icon-users-cog:before { content: '\e841'; } /* '' */
|
||||
.icon-trash-1:before { content: '\e842'; } /* '' */
|
||||
.icon-zoom-square:before { content: '\e843'; } /* '' */
|
||||
.icon-grip-vertical-solid:before { content: '\e844'; } /* '' */
|
||||
.icon-dice-solid:before { content: '\e845'; } /* '' */
|
||||
.icon-hdd:before { content: '\f0a0'; } /* '' */
|
||||
.icon-tasks:before { content: '\f0ae'; } /* '' */
|
||||
.icon-filter:before { content: '\f0b0'; } /* '' */
|
||||
.icon-docs:before { content: '\f0c5'; } /* '' */
|
||||
.icon-list-bullet:before { content: '\f0ca'; } /* '' */
|
||||
.icon-mail-alt:before { content: '\f0e0'; } /* '' */
|
||||
.icon-sitemap:before { content: '\f0e8'; } /* '' */
|
||||
.icon-circle-empty:before { content: '\f10c'; } /* '' */
|
||||
.icon-crop:before { content: '\f125'; } /* '' */
|
||||
.icon-ellipsis:before { content: '\f141'; } /* '' */
|
||||
.icon-ellipsis-vert:before { content: '\f142'; } /* '' */
|
||||
.icon-sort-name-up:before { content: '\f15d'; } /* '' */
|
||||
.icon-sort-alt-up:before { content: '\f160'; } /* '' */
|
||||
.icon-sort-alt-down:before { content: '\f161'; } /* '' */
|
||||
.icon-sort-number-up:before { content: '\f162'; } /* '' */
|
||||
.icon-right:before { content: '\f178'; } /* '' */
|
||||
.icon-dot-circled:before { content: '\f192'; } /* '' */
|
||||
.icon-file-image:before { content: '\f1c5'; } /* '' */
|
||||
.icon-lifebuoy:before { content: '\f1cd'; } /* '' */
|
||||
.icon-toggle-off:before { content: '\f204'; } /* '' */
|
||||
.icon-toggle-on:before { content: '\f205'; } /* '' */
|
||||
.icon-television:before { content: '\f26c'; } /* '' */
|
||||
.icon-picture:before { content: '🌄'; } /* '\1f304' */
|
||||
.icon-shuffle:before { content: '🔀'; } /* '\1f500' */
|
||||
|
||||
@@ -229,11 +229,11 @@ body {
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'fontello';
|
||||
src: url('./font/fontello.eot?27953453');
|
||||
src: url('./font/fontello.eot?27953453#iefix') format('embedded-opentype'),
|
||||
url('./font/fontello.woff?27953453') format('woff'),
|
||||
url('./font/fontello.ttf?27953453') format('truetype'),
|
||||
url('./font/fontello.svg?27953453#fontello') format('svg');
|
||||
src: url('./font/fontello.eot?43967480');
|
||||
src: url('./font/fontello.eot?43967480#iefix') format('embedded-opentype'),
|
||||
url('./font/fontello.woff?43967480') format('woff'),
|
||||
url('./font/fontello.ttf?43967480') format('truetype'),
|
||||
url('./font/fontello.svg?43967480#fontello') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
@@ -244,7 +244,7 @@ body {
|
||||
font-family: "fontello";
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
speak: none;
|
||||
speak: never;
|
||||
|
||||
display: inline-block;
|
||||
text-decoration: inherit;
|
||||
@@ -407,37 +407,65 @@ body {
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="the-icons span3" title="Code: 0xe83a"><i class="demo-icon icon-link-1"></i> <span class="i-name">icon-link-1</span><span class="i-code">0xe83a</span></div>
|
||||
<div class="the-icons span3" title="Code: 0xe83b"><i class="demo-icon icon-user-minus"></i> <span class="i-name">icon-user-minus</span><span class="i-code">0xe83b</span></div>
|
||||
<div class="the-icons span3" title="Code: 0xe83c"><i class="demo-icon icon-user-1"></i> <span class="i-name">icon-user-1</span><span class="i-code">0xe83c</span></div>
|
||||
<div class="the-icons span3" title="Code: 0xe83d"><i class="demo-icon icon-users-1"></i> <span class="i-name">icon-users-1</span><span class="i-code">0xe83d</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="the-icons span3" title="Code: 0xe83e"><i class="demo-icon icon-clone"></i> <span class="i-name">icon-clone</span><span class="i-code">0xe83e</span></div>
|
||||
<div class="the-icons span3" title="Code: 0xe83f"><i class="demo-icon icon-object-group"></i> <span class="i-name">icon-object-group</span><span class="i-code">0xe83f</span></div>
|
||||
<div class="the-icons span3" title="Code: 0xe840"><i class="demo-icon icon-ellipsis-v"></i> <span class="i-name">icon-ellipsis-v</span><span class="i-code">0xe840</span></div>
|
||||
<div class="the-icons span3" title="Code: 0xe841"><i class="demo-icon icon-users-cog"></i> <span class="i-name">icon-users-cog</span><span class="i-code">0xe841</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="the-icons span3" title="Code: 0xe842"><i class="demo-icon icon-trash-1"></i> <span class="i-name">icon-trash-1</span><span class="i-code">0xe842</span></div>
|
||||
<div class="the-icons span3" title="Code: 0xe843"><i class="demo-icon icon-zoom-square"></i> <span class="i-name">icon-zoom-square</span><span class="i-code">0xe843</span></div>
|
||||
<div class="the-icons span3" title="Code: 0xe844"><i class="demo-icon icon-grip-vertical-solid"></i> <span class="i-name">icon-grip-vertical-solid</span><span class="i-code">0xe844</span></div>
|
||||
<div class="the-icons span3" title="Code: 0xe845"><i class="demo-icon icon-dice-solid"></i> <span class="i-name">icon-dice-solid</span><span class="i-code">0xe845</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="the-icons span3" title="Code: 0xf0a0"><i class="demo-icon icon-hdd"></i> <span class="i-name">icon-hdd</span><span class="i-code">0xf0a0</span></div>
|
||||
<div class="the-icons span3" title="Code: 0xf0ae"><i class="demo-icon icon-tasks"></i> <span class="i-name">icon-tasks</span><span class="i-code">0xf0ae</span></div>
|
||||
<div class="the-icons span3" title="Code: 0xf0b0"><i class="demo-icon icon-filter"></i> <span class="i-name">icon-filter</span><span class="i-code">0xf0b0</span></div>
|
||||
<div class="the-icons span3" title="Code: 0xf0c5"><i class="demo-icon icon-docs"></i> <span class="i-name">icon-docs</span><span class="i-code">0xf0c5</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="the-icons span3" title="Code: 0xf0ca"><i class="demo-icon icon-list-bullet"></i> <span class="i-name">icon-list-bullet</span><span class="i-code">0xf0ca</span></div>
|
||||
<div class="the-icons span3" title="Code: 0xf0e0"><i class="demo-icon icon-mail-alt"></i> <span class="i-name">icon-mail-alt</span><span class="i-code">0xf0e0</span></div>
|
||||
<div class="the-icons span3" title="Code: 0xf0e8"><i class="demo-icon icon-sitemap"></i> <span class="i-name">icon-sitemap</span><span class="i-code">0xf0e8</span></div>
|
||||
<div class="the-icons span3" title="Code: 0xf10c"><i class="demo-icon icon-circle-empty"></i> <span class="i-name">icon-circle-empty</span><span class="i-code">0xf10c</span></div>
|
||||
<div class="the-icons span3" title="Code: 0xf125"><i class="demo-icon icon-crop"></i> <span class="i-name">icon-crop</span><span class="i-code">0xf125</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="the-icons span3" title="Code: 0xf125"><i class="demo-icon icon-crop"></i> <span class="i-name">icon-crop</span><span class="i-code">0xf125</span></div>
|
||||
<div class="the-icons span3" title="Code: 0xf141"><i class="demo-icon icon-ellipsis"></i> <span class="i-name">icon-ellipsis</span><span class="i-code">0xf141</span></div>
|
||||
<div class="the-icons span3" title="Code: 0xf142"><i class="demo-icon icon-ellipsis-vert"></i> <span class="i-name">icon-ellipsis-vert</span><span class="i-code">0xf142</span></div>
|
||||
<div class="the-icons span3" title="Code: 0xf15d"><i class="demo-icon icon-sort-name-up"></i> <span class="i-name">icon-sort-name-up</span><span class="i-code">0xf15d</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="the-icons span3" title="Code: 0xf160"><i class="demo-icon icon-sort-alt-up"></i> <span class="i-name">icon-sort-alt-up</span><span class="i-code">0xf160</span></div>
|
||||
<div class="the-icons span3" title="Code: 0xf161"><i class="demo-icon icon-sort-alt-down"></i> <span class="i-name">icon-sort-alt-down</span><span class="i-code">0xf161</span></div>
|
||||
<div class="the-icons span3" title="Code: 0xf162"><i class="demo-icon icon-sort-number-up"></i> <span class="i-name">icon-sort-number-up</span><span class="i-code">0xf162</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="the-icons span3" title="Code: 0xf178"><i class="demo-icon icon-right"></i> <span class="i-name">icon-right</span><span class="i-code">0xf178</span></div>
|
||||
<div class="the-icons span3" title="Code: 0xf192"><i class="demo-icon icon-dot-circled"></i> <span class="i-name">icon-dot-circled</span><span class="i-code">0xf192</span></div>
|
||||
<div class="the-icons span3" title="Code: 0xf1cd"><i class="demo-icon icon-lifebuoy"></i> <span class="i-name">icon-lifebuoy</span><span class="i-code">0xf1cd</span></div>
|
||||
<div class="the-icons span3" title="Code: 0xf26c"><i class="demo-icon icon-television"></i> <span class="i-name">icon-television</span><span class="i-code">0xf26c</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="the-icons span3" title="Code: 0xf192"><i class="demo-icon icon-dot-circled"></i> <span class="i-name">icon-dot-circled</span><span class="i-code">0xf192</span></div>
|
||||
<div class="the-icons span3" title="Code: 0xf1c5"><i class="demo-icon icon-file-image"></i> <span class="i-name">icon-file-image</span><span class="i-code">0xf1c5</span></div>
|
||||
<div class="the-icons span3" title="Code: 0xf1cd"><i class="demo-icon icon-lifebuoy"></i> <span class="i-name">icon-lifebuoy</span><span class="i-code">0xf1cd</span></div>
|
||||
<div class="the-icons span3" title="Code: 0xf204"><i class="demo-icon icon-toggle-off"></i> <span class="i-name">icon-toggle-off</span><span class="i-code">0xf204</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="the-icons span3" title="Code: 0xf205"><i class="demo-icon icon-toggle-on"></i> <span class="i-name">icon-toggle-on</span><span class="i-code">0xf205</span></div>
|
||||
<div class="the-icons span3" title="Code: 0xf26c"><i class="demo-icon icon-television"></i> <span class="i-name">icon-television</span><span class="i-code">0xf26c</span></div>
|
||||
<div class="the-icons span3" title="Code: 0x1f304"><i class="demo-icon icon-picture">🌄</i> <span class="i-name">icon-picture</span><span class="i-code">0x1f304</span></div>
|
||||
<div class="the-icons span3" title="Code: 0x1f500"><i class="demo-icon icon-shuffle">🔀</i> <span class="i-name">icon-shuffle</span><span class="i-code">0x1f500</span></div>
|
||||
<div class="the-icons span3" title="Code: 0x1f512"><i class="demo-icon icon-lock">🔒</i> <span class="i-name">icon-lock</span><span class="i-code">0x1f512</span></div>
|
||||
<div class="the-icons span3" title="Code: 0x1f517"><i class="demo-icon icon-link">🔗</i> <span class="i-name">icon-link</span><span class="i-code">0x1f517</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="the-icons span3" title="Code: 0x1f512"><i class="demo-icon icon-lock">🔒</i> <span class="i-name">icon-lock</span><span class="i-code">0x1f512</span></div>
|
||||
<div class="the-icons span3" title="Code: 0x1f517"><i class="demo-icon icon-link">🔗</i> <span class="i-name">icon-link</span><span class="i-code">0x1f517</span></div>
|
||||
<div class="the-icons span3" title="Code: 0x1f527"><i class="demo-icon icon-wrench">🔧</i> <span class="i-name">icon-wrench</span><span class="i-code">0x1f527</span></div>
|
||||
<div class="the-icons span3" title="Code: 0x1f554"><i class="demo-icon icon-clock">🕔</i> <span class="i-name">icon-clock</span><span class="i-code">0x1f554</span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="the-icons span3" title="Code: 0x1f6ab"><i class="demo-icon icon-block">🚫</i> <span class="i-name">icon-block</span><span class="i-code">0x1f6ab</span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>Copyright (C) 2019 by original authors @ fontello.com</metadata>
|
||||
<metadata>Copyright (C) 2020 by original authors @ fontello.com</metadata>
|
||||
<defs>
|
||||
<font id="fontello" horiz-adv-x="1000" >
|
||||
<font-face font-family="fontello" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
|
||||
@@ -152,12 +152,38 @@
|
||||
|
||||
<glyph glyph-name="link-1" unicode="" d="M1000 583q0-112-78-188l-175-176q-78-78-189-78-97 0-171 63l115 115q26-17 56-17 44 0 75 31l175 176q31 29 31 74 0 44-30 75t-75 30q-25 0-49-12t-33-34h-238l132 129q80 78 188 78 110 0 188-78t78-188z m-387-89l-115-115q-26 17-56 17-44 0-75-31l-175-176q-31-29-31-74 0-44 31-74t74-31q25 0 50 12t32 34h238l-132-129q-80-78-188-78-110 0-188 78t-78 188q0 112 78 188l175 176q78 78 189 78 97 0 171-63z" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="user-minus" unicode="" d="M1219 444h-375c-17 0-31-14-31-31v-63c0-17 14-31 31-31h375c17 0 31 14 31 31v63c0 17-14 31-31 31z m-781-94c138 0 250 112 250 250s-112 250-250 250-250-112-250-250 111-250 250-250z m175-62h-33c-43-20-92-32-142-32s-99 12-143 32h-32c-145 0-263-118-263-263v-81c0-52 42-94 94-94h687c52 0 94 42 94 94v81c0 145-118 263-262 263z" horiz-adv-x="1250" />
|
||||
|
||||
<glyph glyph-name="user-1" unicode="" d="M438 350c138 0 250 112 250 250s-112 250-250 250-250-112-250-250 111-250 250-250z m175-62h-33c-43-20-92-32-142-32s-99 12-143 32h-32c-145 0-263-118-263-263v-81c0-52 42-94 94-94h687c52 0 94 42 94 94v81c0 145-118 263-262 263z" horiz-adv-x="875" />
|
||||
|
||||
<glyph glyph-name="users-1" unicode="" d="M331 350q-90-3-148-71h-75q-45 0-77 22t-31 66q0 197 69 197 4 0 25-11t54-24 66-12q38 0 75 13-3-21-3-37 0-78 45-143z m598-356q0-66-41-105t-108-39h-488q-68 0-108 39t-41 105q0 30 2 58t8 61 14 61 24 54 35 45 48 30 62 11q6 0 24-12t41-26 59-27 76-12 75 12 60 27 41 26 24 12q34 0 62-11t47-30 35-45 24-54 15-61 8-61 2-58z m-572 713q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m393-214q0-89-63-152t-151-62-152 62-63 152 63 151 152 63 151-63 63-151z m321-126q0-43-31-66t-77-22h-75q-57 68-147 71 45 65 45 143 0 16-3 37 37-13 74-13 33 0 67 12t54 24 24 11q69 0 69-197z m-71 340q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z" horiz-adv-x="1071.4" />
|
||||
|
||||
<glyph glyph-name="clone" unicode="" d="M906 850c52 0 94-42 94-94v-562c0-52-42-94-94-94h-562c-52 0-94 42-94 94v562c0 52 42 94 94 94h562m-562-812c-86 0-156 70-156 156v406h-94c-52 0-94-42-94-94v-562c0-52 42-94 94-94h562c52 0 94 42 94 94v94h-406z" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="object-group" unicode="" d="M938 600v63h39c13 0 23 10 23 23v78c0 13-10 24-23 24h-79c-12 0-23-11-23-24v-39h-750v39c0 13-10 24-23 24h-79c-12 0-23-11-23-24v-78c0-13 11-23 23-23h40v-625h-40c-12 0-23-11-23-24v-78c0-13 11-24 23-24h79c13 0 23 11 23 24v39h750v-39c0-13 11-24 23-24h79c13 0 23 11 23 24v78c0 13-10 24-23 24h-39v562z m-750-289v266c0 13 10 23 23 23h328c13 0 24-10 24-23v-266c0-13-11-23-24-23h-328c-13 0-23 10-23 23z m625-188c0-12-11-23-24-23h-328c-13 0-23 11-23 23v102h140c26 0 47 21 47 47v141h164c13 0 24-11 24-24v-266z" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="ellipsis-v" unicode="" d="M188 491c77 0 140-63 140-141s-63-141-140-141-141 63-141 141 63 141 141 141z m-141 203c0-78 63-141 141-141s140 63 140 141-63 140-140 140-141-62-141-140z m0-688c0-78 63-140 141-140s140 62 140 140-63 141-140 141-141-63-141-141z" horiz-adv-x="375" />
|
||||
|
||||
<glyph glyph-name="users-cog" unicode="" d="M1192 183c6 28 6 56 0 84l51 29c6 3 8 10 6 16-13 43-35 81-65 112-4 5-11 7-17 3l-51-29c-21 18-45 32-72 42v58c0 7-4 12-11 14-43 10-88 9-129 0-6-2-11-7-11-14v-58c-27-10-51-24-72-42l-51 29c-5 4-13 2-17-3-30-31-52-69-65-112-2-6 1-13 6-16l51-29c-5-28-5-56 0-84l-51-29c-5-3-8-10-6-16 13-42 35-81 65-112 4-5 12-6 17-3l51 29c21-18 45-32 72-42v-58c0-7 5-12 11-14 44-10 88-9 129 0 7 2 11 7 11 14v58c27 10 51 24 72 42l51-29c6-3 13-2 17 3 30 31 52 70 65 112 2 6-1 13-6 16l-51 29z m-223-53c-53 0-95 43-95 95s43 95 95 95 95-43 95-95-43-95-95-95z m-781 283c68 0 125 56 125 125s-57 125-125 125-125-57-125-125 56-125 125-125z m437-63c4 0 7 1 11 1 16 43 40 82 71 116 14 15 35 24 56 24 14 0 27-3 39-10l15-9c2 1 3 2 5 3 13 28 22 60 22 94 0 121-98 218-219 218s-219-97-219-218c0-121 98-219 219-219z m206-380c-5 2-9 5-14 8-16-10-30-19-53-19-22 0-42 9-57 24-36 39-63 86-78 136-21 68 48 97 50 98 0 6 0 11 0 16l-15 9c-8 4-14 9-20 15-6 0-12-1-19-1-48 0-93 12-134 32h-16c-124 0-225-101-225-225v-57c0-52 42-94 94-94h499c-8 12-12 25-12 40v18z m-493 344c-23 22-54 36-88 36h-125c-69 0-125-56-125-125v-62c0-35 28-63 63-63h128c13 93 68 171 147 214z" horiz-adv-x="1250" />
|
||||
|
||||
<glyph glyph-name="trash-1" unicode="" d="M844 788h-235l-18 36a47 47 0 0 1-42 26h-223a46 46 0 0 1-42-26l-18-36h-235a31 31 0 0 1-31-32v-62a31 31 0 0 1 31-31h813a31 31 0 0 1 31 31v62a31 31 0 0 1-31 32z m-740-850a94 94 0 0 1 94-88h480a94 94 0 0 1 93 88l42 662h-750z" horiz-adv-x="875" />
|
||||
|
||||
<glyph glyph-name="zoom-square" unicode="" d="M143 207h-143v-357h357v143h-214v214z m-143 286h143v214h214v143h-357v-357z m857-500h-214v-143h357v357h-143v-214z m-214 857v-143h214v-214h143v357h-357z" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="grip-vertical-solid" unicode="" d="M188 788h-125c-35 0-63-28-63-63v-125c0-34 28-62 63-62h125c34 0 62 28 62 62v125c0 35-28 63-62 63z m0-313h-125c-35 0-63-28-63-62v-125c0-35 28-63 63-63h125c34 0 62 28 62 63v125c0 34-28 62-62 62z m0-312h-125c-35 0-63-28-63-63v-125c0-35 28-63 63-63h125c34 0 62 28 62 63v125c0 35-28 63-62 63z m375 625h-125c-35 0-63-28-63-63v-125c0-34 28-62 63-62h125c34 0 62 28 62 62v125c0 35-28 63-62 63z m0-313h-125c-35 0-63-28-63-62v-125c0-35 28-63 63-63h125c34 0 62 28 62 63v125c0 34-28 62-62 62z m0-312h-125c-35 0-63-28-63-63v-125c0-35 28-63 63-63h125c34 0 62 28 62 63v125c0 35-28 63-62 63z" horiz-adv-x="625" />
|
||||
|
||||
<glyph glyph-name="dice-solid" unicode="" d="M1156 475h-232c25-58 14-127-33-174l-266-267v-90c0-52 42-94 94-94h437c52 0 94 42 94 94v437c0 52-42 94-94 94z m-218-359c-26 0-47 21-47 47 0 25 21 46 47 46s46-21 46-46c0-26-21-47-46-47z m-91 364l-342 342c-37 37-98 37-135 0l-342-342c-37-37-37-98 0-135l342-342c37-37 98-37 135 0l342 342c37 37 37 98 0 135z m-659-114c-26 0-47 21-47 47 0 25 21 46 47 46s46-21 46-46c0-26-21-47-46-47z m250-250c-26 0-47 21-47 47 0 25 21 46 47 46s46-21 46-46c0-26-21-47-46-47z m0 250c-26 0-47 21-47 47 0 25 21 46 47 46s46-21 46-46c0-26-21-47-46-47z m0 250c-26 0-47 21-47 47 0 25 21 46 47 46s46-21 46-46c0-26-21-47-46-47z m250-250c-26 0-47 21-47 47 0 25 21 46 47 46s46-21 46-46c0-26-21-47-46-47z" horiz-adv-x="1250" />
|
||||
|
||||
<glyph glyph-name="hdd" unicode="" d="M580 171q0-18-13-31t-31-13-32 13-13 31 13 32 32 13 31-13 13-32z m143 0q0-18-13-31t-31-13-32 13-13 31 13 32 32 13 31-13 13-32z m63-89v179q0 7-6 12t-12 6h-679q-7 0-12-6t-6-12v-179q0-7 6-12t12-6h679q7 0 12 6t6 12z m-687 268h659l-88 269q-2 7-9 12t-14 5h-437q-7 0-14-5t-9-12z m758-89v-179q0-37-26-63t-63-26h-679q-36 0-63 26t-26 63v179q0 14 9 42l110 338q9 29 35 48t56 18h437q31 0 56-18t35-48l110-338q9-28 9-42z" horiz-adv-x="857.1" />
|
||||
|
||||
<glyph glyph-name="tasks" unicode="" d="M571 64h358v72h-358v-72z m-214 286h572v71h-572v-71z m357 286h215v71h-215v-71z m286-465v-142q0-15-11-25t-25-11h-928q-15 0-25 11t-11 25v142q0 15 11 26t25 10h928q15 0 25-10t11-26z m0 286v-143q0-14-11-25t-25-10h-928q-15 0-25 10t-11 25v143q0 15 11 25t25 11h928q15 0 25-11t11-25z m0 286v-143q0-14-11-25t-25-11h-928q-15 0-25 11t-11 25v143q0 14 11 25t25 11h928q15 0 25-11t11-25z" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="filter" unicode="" d="M783 685q9-22-8-39l-275-275v-414q0-23-22-33-7-3-14-3-15 0-25 11l-143 143q-10 11-10 25v271l-275 275q-18 17-8 39 9 22 33 22h714q23 0 33-22z" horiz-adv-x="785.7" />
|
||||
|
||||
<glyph glyph-name="docs" unicode="" d="M946 636q23 0 38-16t16-38v-678q0-23-16-38t-38-16h-535q-23 0-38 16t-16 38v160h-303q-23 0-38 16t-16 38v375q0 22 11 49t27 42l228 228q15 16 42 27t49 11h232q23 0 38-16t16-38v-183q38 23 71 23h232z m-303-119l-167-167h167v167z m-357 214l-167-167h167v167z m109-361l176 176v233h-214v-233q0-22-15-37t-38-16h-233v-357h286v143q0 22 11 49t27 42z m534-449v643h-215v-232q0-22-15-38t-38-15h-232v-358h500z" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="list-bullet" unicode="" d="M214 64q0-44-31-76t-76-31-76 31-31 76 31 76 76 31 76-31 31-76z m0 286q0-45-31-76t-76-31-76 31-31 76 31 76 76 31 76-31 31-76z m786-232v-107q0-7-5-13t-13-5h-678q-8 0-13 5t-5 13v107q0 7 5 12t13 6h678q7 0 13-6t5-12z m-786 518q0-45-31-76t-76-31-76 31-31 76 31 76 76 31 76-31 31-76z m786-232v-108q0-7-5-12t-13-5h-678q-8 0-13 5t-5 12v108q0 7 5 12t13 5h678q7 0 13-5t5-12z m0 285v-107q0-7-5-12t-13-6h-678q-8 0-13 6t-5 12v107q0 8 5 13t13 5h678q7 0 13-5t5-13z" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="mail-alt" unicode="" d="M1000 454v-443q0-37-26-63t-63-27h-822q-36 0-63 27t-26 63v443q25-27 56-49 202-137 278-192 32-24 51-37t53-27 61-13h2q28 0 61 13t53 27 51 37q95 68 278 192 32 22 56 49z m0 164q0-44-27-84t-68-69q-210-146-262-181-5-4-23-17t-30-22-29-18-32-15-28-5h-2q-12 0-27 5t-32 15-30 18-30 22-23 17q-51 35-147 101t-114 80q-35 23-65 64t-31 77q0 43 23 72t66 29h822q36 0 63-26t26-63z" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="sitemap" unicode="" d="M1000 154v-179q0-22-16-38t-38-16h-178q-22 0-38 16t-16 38v179q0 22 16 38t38 15h53v107h-285v-107h53q23 0 38-15t16-38v-179q0-22-16-38t-38-16h-178q-23 0-38 16t-16 38v179q0 22 16 38t38 15h53v107h-285v-107h53q23 0 38-15t16-38v-179q0-22-16-38t-38-16h-178q-23 0-38 16t-16 38v179q0 22 16 38t38 15h53v107q0 29 21 51t51 21h285v107h-53q-23 0-38 16t-16 37v179q0 22 16 38t38 16h178q23 0 38-16t16-38v-179q0-22-16-37t-38-16h-53v-107h285q29 0 51-21t21-51v-107h53q23 0 38-15t16-38z" horiz-adv-x="1000" />
|
||||
@@ -166,6 +192,10 @@
|
||||
|
||||
<glyph glyph-name="crop" unicode="" d="M311 136h332v332z m-25 25l332 332h-332v-332z m643-43v-107q0-8-5-13t-13-5h-125v-125q0-8-5-13t-13-5h-107q-8 0-13 5t-5 13v125h-482q-8 0-13 5t-5 13v482h-125q-8 0-13 5t-5 13v107q0 8 5 13t13 5h125v125q0 8 5 13t13 5h107q8 0 13-5t5-13v-125h475l137 138q6 5 13 5t13-5q5-6 5-13t-5-13l-138-137v-475h125q8 0 13-5t5-13z" horiz-adv-x="928.6" />
|
||||
|
||||
<glyph glyph-name="ellipsis" unicode="" d="M214 439v-107q0-22-15-38t-38-15h-107q-23 0-38 15t-16 38v107q0 23 16 38t38 16h107q22 0 38-16t15-38z m286 0v-107q0-22-16-38t-38-15h-107q-22 0-38 15t-15 38v107q0 23 15 38t38 16h107q23 0 38-16t16-38z m286 0v-107q0-22-16-38t-38-15h-107q-22 0-38 15t-16 38v107q0 23 16 38t38 16h107q23 0 38-16t16-38z" horiz-adv-x="785.7" />
|
||||
|
||||
<glyph glyph-name="ellipsis-vert" unicode="" d="M214 154v-108q0-22-15-37t-38-16h-107q-23 0-38 16t-16 37v108q0 22 16 38t38 15h107q22 0 38-15t15-38z m0 285v-107q0-22-15-38t-38-15h-107q-23 0-38 15t-16 38v107q0 23 16 38t38 16h107q22 0 38-16t15-38z m0 286v-107q0-22-15-38t-38-16h-107q-23 0-38 16t-16 38v107q0 22 16 38t38 16h107q22 0 38-16t15-38z" horiz-adv-x="214.3" />
|
||||
|
||||
<glyph glyph-name="sort-name-up" unicode="" d="M665 622h98l-40 122-6 26q-2 9-2 11h-2l-1-11q0 0-2-10t-5-16z m-254-576q0-6-6-13l-178-178q-5-5-13-5-6 0-12 5l-179 179q-8 9-4 19 4 11 17 11h107v768q0 8 5 13t13 5h107q8 0 13-5t5-13v-768h107q8 0 13-5t5-13z m466-66v-130h-326v50l206 295q7 11 12 16l6 5v1q-1 0-3 0t-5 0q-6-2-16-2h-130v-64h-67v128h317v-50l-206-296q-4-4-12-14l-6-7v-1l8 1q5 2 16 2h139v66h67z m50 501v-60h-161v60h42l-26 80h-136l-26-80h42v-60h-160v60h39l128 369h91l128-369h39z" horiz-adv-x="928.6" />
|
||||
|
||||
<glyph glyph-name="sort-alt-up" unicode="" d="M411 46q0-6-6-13l-178-178q-5-5-13-5-6 0-12 5l-179 179q-8 9-4 19 4 11 17 11h107v768q0 8 5 13t13 5h107q8 0 13-5t5-13v-768h107q8 0 13-5t5-13z m589-71v-107q0-8-5-13t-13-5h-464q-8 0-13 5t-5 13v107q0 8 5 13t13 5h464q8 0 13-5t5-13z m-107 286v-107q0-8-5-13t-13-5h-357q-8 0-13 5t-5 13v107q0 8 5 13t13 5h357q8 0 13-5t5-13z m-107 285v-107q0-7-5-12t-13-6h-250q-8 0-13 6t-5 12v107q0 8 5 13t13 5h250q8 0 13-5t5-13z m-107 286v-107q0-8-5-13t-13-5h-143q-8 0-13 5t-5 13v107q0 8 5 13t13 5h143q8 0 13-5t5-13z" horiz-adv-x="1000" />
|
||||
@@ -178,8 +208,14 @@
|
||||
|
||||
<glyph glyph-name="dot-circled" unicode="" d="M571 350q0-59-41-101t-101-42-101 42-42 101 42 101 101 42 101-42 41-101z m-142 304q-83 0-153-41t-110-111-41-152 41-152 110-111 153-41 152 41 110 111 41 152-41 152-110 111-152 41z m428-304q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z" horiz-adv-x="857.1" />
|
||||
|
||||
<glyph glyph-name="file-image" unicode="" d="M819 638q16-16 27-42t11-50v-642q0-23-15-38t-38-16h-750q-23 0-38 16t-16 38v892q0 23 16 38t38 16h500q22 0 49-11t42-27z m-248 136v-210h210q-5 17-12 23l-175 175q-6 7-23 12z m215-853v572h-232q-23 0-38 16t-16 37v233h-429v-858h715z m-72 250v-178h-571v107l107 107 71-71 215 214z m-464 108q-45 0-76 31t-31 76 31 76 76 31 76-31 31-76-31-76-76-31z" horiz-adv-x="857.1" />
|
||||
|
||||
<glyph glyph-name="lifebuoy" unicode="" d="M500 850q102 0 194-40t160-106 106-160 40-194-40-194-106-160-160-106-194-40-194 40-160 106-106 160-40 194 40 194 106 160 160 106 194 40z m0-71q-106 0-201-51l108-108q46 16 93 16t93-16l109 108q-96 51-202 51z m-378-630l108 108q-16 46-16 93t16 93l-108 109q-51-96-51-202t51-201z m378-228q106 0 202 51l-109 108q-46-16-93-16t-93 16l-108-108q95-51 201-51z m0 215q89 0 152 63t62 151-62 152-152 62-151-62-63-152 63-151 151-63z m270 121l108-108q51 95 51 201t-51 202l-108-109q16-46 16-93t-16-93z" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="toggle-off" unicode="" d="M643 350q0 58-23 111t-61 91-91 61-111 23-111-23-91-61-61-91-23-111 23-111 61-91 91-61 111-23 111 23 91 61 61 91 23 111z m428 0q0 58-22 111t-61 91-91 61-111 23h-216q67-50 106-125t38-161-38-161-106-125h216q58 0 111 23t91 61 61 91 22 111z m72 0q0-72-29-139t-76-113-114-77-138-28h-429q-72 0-138 28t-114 77-76 113-29 139 29 139 76 114 114 76 138 28h429q72 0 138-28t114-76 76-114 29-139z" horiz-adv-x="1142.9" />
|
||||
|
||||
<glyph glyph-name="toggle-on" unicode="" d="M0 350q0 73 29 139t76 114 114 76 138 28h429q72 0 138-28t114-76 76-114 29-139-29-139-76-113-114-77-138-28h-429q-72 0-138 28t-114 77-76 113-29 139z m786-286q58 0 111 23t91 61 61 91 22 111-22 111-61 91-91 61-111 23-111-23-91-61-61-91-23-111 23-111 61-91 91-61 111-23z" horiz-adv-x="1142.9" />
|
||||
|
||||
<glyph glyph-name="television" unicode="" d="M1000 154v535q0 8-5 13t-13 5h-893q-7 0-12-5t-6-13v-535q0-8 6-13t12-5h893q7 0 13 5t5 13z m71 535v-535q0-37-26-63t-63-27h-411v-71h197q8 0 13-5t5-13v-36q0-8-5-13t-13-5h-464q-8 0-13 5t-5 13v36q0 8 5 13t13 5h196v71h-411q-36 0-63 27t-26 63v535q0 37 26 63t63 27h893q37 0 63-27t26-63z" horiz-adv-x="1142.9" />
|
||||
|
||||
<glyph glyph-name="picture" unicode="🌄" d="M357 529q0-45-31-76t-76-32-76 32-31 76 31 76 76 31 76-31 31-76z m572-215v-250h-786v107l178 179 90-89 285 285z m53 393h-893q-7 0-12-5t-6-13v-678q0-7 6-13t12-5h893q7 0 13 5t5 13v678q0 8-5 13t-13 5z m89-18v-678q0-37-26-63t-63-27h-893q-36 0-63 27t-26 63v678q0 37 26 63t63 27h893q37 0 63-27t26-63z" horiz-adv-x="1071.4" />
|
||||
|
||||
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 51 KiB |
|
After Width: | Height: | Size: 21 KiB |
@@ -8,7 +8,11 @@ function filter_enable(filter) {
|
||||
$("input[type=checkbox][name="+filter+"_use]").prop("checked", true);
|
||||
|
||||
/* forbid to select this filter in the addFilter list */
|
||||
$("#addFilter").children("option[value="+filter+"]").attr("disabled", "disabled");
|
||||
$("#addFilter").find("a[data-value="+filter+"]").addClass("disabled", "disabled");
|
||||
|
||||
/* hide the no filter message */
|
||||
$('.noFilter').hide();
|
||||
$('.addFilter-button').removeClass('highlight');
|
||||
}
|
||||
|
||||
function filter_disable(filter) {
|
||||
@@ -19,7 +23,14 @@ function filter_disable(filter) {
|
||||
$("input[name="+filter+"_use]").prop("checked", false);
|
||||
|
||||
/* give the possibility to show it again */
|
||||
$("#addFilter").children("option[value="+filter+"]").removeAttr("disabled");
|
||||
$("#addFilter").find("a[data-value="+filter+"]").removeClass("disabled");
|
||||
|
||||
/* show the no filter message if no filter selected */
|
||||
if ($('#filterList li:visible').length == 0) {
|
||||
$('.noFilter').show();
|
||||
$('.addFilter-button').addClass('highlight');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$(".removeFilter").addClass("icon-cancel-circled");
|
||||
@@ -31,10 +42,9 @@ $(".removeFilter").click(function () {
|
||||
return false;
|
||||
});
|
||||
|
||||
$("#addFilter").change(function () {
|
||||
var filter = $(this).prop("value");
|
||||
$("#addFilter a").on('click', function () {
|
||||
var filter = $(this).attr("data-value");
|
||||
filter_enable(filter);
|
||||
$(this).prop("value", -1);
|
||||
});
|
||||
|
||||
$("#removeFilters").click(function() {
|
||||
@@ -51,6 +61,13 @@ $('[data-slider=ratios]').pwgDoubleSlider(sliders.ratios);
|
||||
$('[data-slider=filesizes]').pwgDoubleSlider(sliders.filesizes);
|
||||
|
||||
|
||||
$(document).mouseup(function (e) {
|
||||
e.stopPropagation();
|
||||
if (!$(event.target).hasClass('addFilter-button')) {
|
||||
$('.addFilter-dropdown').slideUp();
|
||||
}
|
||||
});
|
||||
|
||||
/* ********** Thumbs */
|
||||
|
||||
/* Shift-click: select all photos between the click and the shift+click */
|
||||
@@ -152,13 +169,19 @@ var derivatives = {
|
||||
}
|
||||
};
|
||||
|
||||
function progress_start() {
|
||||
jQuery('#uploadingActions').show();
|
||||
jQuery('#uploadingActions .progress-bar').width("0%");
|
||||
}
|
||||
|
||||
function progress_end() {
|
||||
jQuery('#uploadingActions').hide();
|
||||
}
|
||||
|
||||
function progress(success) {
|
||||
jQuery('#progressBar').progressBar(derivatives.done, {
|
||||
max: derivatives.total,
|
||||
textFormat: 'fraction',
|
||||
boxImage: 'themes/default/images/progressbar.gif',
|
||||
barImage: 'themes/default/images/progressbg_orange.gif'
|
||||
});
|
||||
|
||||
percent = parseInt(derivatives.done / derivatives.total * 100);
|
||||
jQuery('#uploadingActions .progressbar').width(percent.toString()+'%');
|
||||
if (success !== undefined) {
|
||||
var type = success ? 'regenerateSuccess': 'regenerateError',
|
||||
s = jQuery('[name="'+type+'"]').val();
|
||||
@@ -166,6 +189,7 @@ function progress(success) {
|
||||
}
|
||||
|
||||
if (derivatives.finished()) {
|
||||
progress_end();
|
||||
jQuery('#applyAction').click();
|
||||
}
|
||||
}
|
||||
@@ -176,8 +200,13 @@ function getDerivativeUrls() {
|
||||
jQuery("#action_generate_derivatives input").each( function(i, t) {
|
||||
if ($(t).is(":checked"))
|
||||
params.types.push( t.value );
|
||||
} );
|
||||
|
||||
} );
|
||||
jQuery('#applyActionBlock').hide();
|
||||
jQuery('.permitActionListButton').hide();
|
||||
jQuery('#confirmDel').hide();
|
||||
jQuery('#regenerationMsg').show();
|
||||
jQuery('#regenerationText').html(lang.generateMsg);
|
||||
progress_start();
|
||||
jQuery.ajax( {
|
||||
type: "POST",
|
||||
url: 'ws.php?format=json&method=pwg.getMissingDerivatives',
|
||||
@@ -187,15 +216,24 @@ function getDerivativeUrls() {
|
||||
if (!data.stat || data.stat != "ok") {
|
||||
return;
|
||||
}
|
||||
derivatives.total += data.result.urls.length;
|
||||
derivatives.total += data.result.urls.length;
|
||||
jQuery('#regenerationStatus .badge-number').html(derivatives.done.toString() + "/" + derivatives.total.toString());
|
||||
progress();
|
||||
for (var i=0; i < data.result.urls.length; i++) {
|
||||
jQuery.manageAjax.add("queued", {
|
||||
type: 'GET',
|
||||
url: data.result.urls[i] + "&ajaxload=true",
|
||||
dataType: 'json',
|
||||
success: ( function(data) { derivatives.done++; progress(true) }),
|
||||
error: ( function(data) { derivatives.done++; progress(false) })
|
||||
success: ( function(data) {
|
||||
derivatives.done++;
|
||||
jQuery('#regenerationStatus .badge-number').html(derivatives.done.toString() + "/" + derivatives.total.toString());
|
||||
progress(true)
|
||||
}),
|
||||
error: ( function(data) {
|
||||
derivatives.done++;
|
||||
jQuery('#regenerationStatus .badge-number').html(derivatives.done.toString() + "/" + derivatives.total.toString());
|
||||
progress(false)
|
||||
})
|
||||
});
|
||||
}
|
||||
if (derivatives.elements.length)
|
||||
@@ -205,17 +243,17 @@ function getDerivativeUrls() {
|
||||
}
|
||||
|
||||
function selectGenerateDerivAll() {
|
||||
$("#action_generate_derivatives input[type=checkbox]").prop("checked", true);
|
||||
$("#action_generate_derivatives input[type=checkbox]").prop("checked", true).trigger("change");
|
||||
}
|
||||
function selectGenerateDerivNone() {
|
||||
$("#action_generate_derivatives input[type=checkbox]").prop("checked", false);
|
||||
$("#action_generate_derivatives input[type=checkbox]").prop("checked", false).trigger("change");
|
||||
}
|
||||
|
||||
function selectDelDerivAll() {
|
||||
$("#action_delete_derivatives input[type=checkbox]").prop("checked", true);
|
||||
$('#action_delete_derivatives input[name="del_derivatives_type[]"]').prop("checked", true).trigger("change");
|
||||
}
|
||||
function selectDelDerivNone() {
|
||||
$("#action_delete_derivatives input[type=checkbox]").prop("checked", false);
|
||||
$('#action_delete_derivatives input[name="del_derivatives_type[]"]').prop("checked", false).trigger("change");
|
||||
}
|
||||
|
||||
/* sync metadatas or delete photos by blocks, with progress bar */
|
||||
@@ -228,7 +266,6 @@ jQuery('#applyAction').click(function(e) {
|
||||
e.stopPropagation();
|
||||
jQuery('.bulkAction').hide();
|
||||
jQuery('#regenerationText').html(lang.syncProgressMessage);
|
||||
|
||||
elements = Array();
|
||||
|
||||
if (jQuery('input[name=setSelected]').is(':checked')) {
|
||||
@@ -249,14 +286,10 @@ jQuery('#applyAction').click(function(e) {
|
||||
var image_ids = Array();
|
||||
|
||||
jQuery('#applyActionBlock').hide();
|
||||
jQuery('select[name="selectAction"]').hide();
|
||||
jQuery('.permitActionListButton').hide();
|
||||
jQuery('#confirmDel').hide();
|
||||
jQuery('#regenerationMsg').show();
|
||||
jQuery('#progressBar').progressBar(0, {
|
||||
max: progressBar_max,
|
||||
textFormat: 'fraction',
|
||||
boxImage: 'themes/default/images/progressbar.gif',
|
||||
barImage: 'themes/default/images/progressbg_orange.gif'
|
||||
});
|
||||
progress_bar_start();
|
||||
for (i=0;i<elements.length;i++) {
|
||||
image_ids.push(elements[i]);
|
||||
if (i % syncBlockSize != syncBlockSize - 1 && i != elements.length - 1) {
|
||||
@@ -279,23 +312,24 @@ jQuery('#applyAction').click(function(e) {
|
||||
if (isOk && data.result.nb_synchronized != thisBatchSize)
|
||||
/*TODO: user feedback only data.nb_synchronized images out of thisBatchSize were sync*/;
|
||||
/*TODO: user feedback if isError*/
|
||||
progressionBar(todo, progressBar_max, isOk);
|
||||
jQuery('#regenerationStatus .badge-number').html(todo.toString() + "/" + progressBar_max.toString());
|
||||
progress_bar(todo, progressBar_max, false);
|
||||
},
|
||||
error: function(data) {
|
||||
todo += thisBatchSize;
|
||||
/*TODO: user feedback*/
|
||||
progressionBar(todo, progressBar_max, false);
|
||||
jQuery('#regenerationStatus .badge-number').html(todo.toString() + "/" + progressBar_max.toString());
|
||||
progress_bar(todo, progressBar_max, false);
|
||||
}
|
||||
});
|
||||
} )(image_ids);
|
||||
|
||||
image_ids = Array();
|
||||
}
|
||||
}
|
||||
|
||||
if (jQuery('[name="selectAction"]').val() == 'delete') {
|
||||
if (!jQuery("#action_delete input[name=confirm_deletion]").is(':checked')) {
|
||||
jQuery("#action_delete span.errors").show();
|
||||
if (!jQuery("#confirmDel input[name=confirm_deletion]").is(':checked')) {
|
||||
jQuery("#confirmDel span.errors").css("visibility", "visible");
|
||||
return false;
|
||||
}
|
||||
e.stopPropagation();
|
||||
@@ -305,7 +339,6 @@ jQuery('#applyAction').click(function(e) {
|
||||
}
|
||||
|
||||
jQuery('.bulkAction').hide();
|
||||
jQuery('#regenerationText').html(lang.deleteProgressMessage);
|
||||
var maxRequests=1;
|
||||
|
||||
var queuedManager = jQuery.manageAjax.create('queued', {
|
||||
@@ -334,15 +367,11 @@ jQuery('#applyAction').click(function(e) {
|
||||
var image_ids = Array();
|
||||
|
||||
jQuery('#applyActionBlock').hide();
|
||||
jQuery('select[name="selectAction"]').hide();
|
||||
jQuery('.permitActionListButton').hide();
|
||||
jQuery('#confirmDel').hide();
|
||||
jQuery('#regenerationText').html(lang.deleteProgressMessage);
|
||||
jQuery('#regenerationMsg').show();
|
||||
jQuery('#progressBar').progressBar(0, {
|
||||
max: progressBar_max,
|
||||
textFormat: 'fraction',
|
||||
boxImage: 'themes/default/images/progressbar.gif',
|
||||
barImage: 'themes/default/images/progressbg_orange.gif'
|
||||
});
|
||||
|
||||
progress_bar_start();
|
||||
for (i=0;i<elements.length;i++) {
|
||||
image_ids.push(elements[i]);
|
||||
if (i % deleteBlockSize != deleteBlockSize - 1 && i != elements.length - 1) {
|
||||
@@ -363,15 +392,17 @@ jQuery('#applyAction').click(function(e) {
|
||||
success: function(data) {
|
||||
todo += thisBatchSize;
|
||||
var isOk = data.stat && "ok" == data.stat;
|
||||
if (isOk && data.result != thisBatchSize)
|
||||
if (isOk && data.result != thisBatchSize);
|
||||
/*TODO: user feedback only data.result images out of thisBatchSize were deleted*/;
|
||||
/*TODO: user feedback if isError*/
|
||||
progressionBar(todo, progressBar_max, isOk);
|
||||
jQuery('#regenerationStatus .badge-number').html(todo.toString() + "/" + progressBar_max.toString());
|
||||
progress_bar(todo, progressBar_max, false);
|
||||
},
|
||||
error: function(data) {
|
||||
todo += thisBatchSize;
|
||||
/*TODO: user feedback*/
|
||||
progressionBar(todo, progressBar_max, false);
|
||||
jQuery('#regenerationStatus .badge-number').html(todo.toString() + "/" + progressBar_max.toString());
|
||||
progress_bar(todo, progressBar_max, false);
|
||||
}
|
||||
});
|
||||
} )(image_ids);
|
||||
@@ -385,21 +416,24 @@ jQuery('#applyAction').click(function(e) {
|
||||
return false;
|
||||
});
|
||||
|
||||
function progressionBar(val, max, success) {
|
||||
jQuery('#progressBar').progressBar(val, {
|
||||
max: max,
|
||||
textFormat: 'fraction',
|
||||
boxImage: 'themes/default/images/progressbar.gif',
|
||||
barImage: 'themes/default/images/progressbg_orange.gif'
|
||||
});
|
||||
|
||||
if (val == max) {
|
||||
jQuery('#applyAction').click();
|
||||
}
|
||||
function progress_bar_start() {
|
||||
jQuery('#uploadingActions').show();
|
||||
jQuery('#uploadingActions .progress-bar').width("0%");
|
||||
}
|
||||
|
||||
jQuery("#action_delete input[name=confirm_deletion]").change(function() {
|
||||
jQuery("#action_delete span.errors").hide();
|
||||
function progress_bar_end() {
|
||||
jQuery('#uploadingActions').hide();
|
||||
}
|
||||
|
||||
function progress_bar(val, max, success) {
|
||||
percent = parseInt(val / max * 100);
|
||||
jQuery('#uploadingActions .progressbar').width(percent.toString()+'%');
|
||||
if (val == max)
|
||||
jQuery('#applyAction').click();
|
||||
}
|
||||
|
||||
jQuery("#confirmDel input[name=confirm_deletion]").change(function() {
|
||||
jQuery("#confirmDel span.errors").css("visiblity", "hidden");
|
||||
});
|
||||
|
||||
jQuery('#sync_md5sum').click(function(e) {
|
||||
|
||||
@@ -0,0 +1,285 @@
|
||||
$(document).ready(() => {
|
||||
|
||||
formatedData = data;
|
||||
|
||||
$('.tree').tree({
|
||||
data: formatedData,
|
||||
autoOpen : false,
|
||||
dragAndDrop: true,
|
||||
onCreateLi : createAlbumNode,
|
||||
onCanSelectNode: function(node) {return false}
|
||||
});
|
||||
|
||||
function createAlbumNode(node, li) {
|
||||
icon = "<span class='%icon%'></span>";
|
||||
title = "<p class='move-cat-title' title='%name%'>%name%</p>";
|
||||
toggler_cont = "<div class='move-cat-toogler' data-id=%id%>%content%</div>";
|
||||
toggler_close = "<span class='icon-left-open'></span> <p>"+str_show_sub+"</p>";
|
||||
toggler_open = "<span class='icon-down-open'></span> <p>"+str_hide_sub+"</p>";
|
||||
actions = '<div class="move-cat-action-cont">'
|
||||
+"<div class='move-cat-action'>"
|
||||
+"<a class='move-cat-edit icon-pencil' href='admin.php?page=album-"+node.id+"'>"+str_edit+"</a>"
|
||||
+"</div>"
|
||||
+'</div>';
|
||||
action_order = "<a data-id='"+node.id+"' class='move-cat-order icon-sort-alt-up'>"+str_apply_order+"</a>";
|
||||
|
||||
cont = li.find('.jqtree-element');
|
||||
cont.addClass('move-cat-container');
|
||||
cont.attr('id', 'cat-'+node.id)
|
||||
cont.html('');
|
||||
cont.append($(icon.replace(/%icon%/g, 'icon-grip-vertical-solid')));
|
||||
|
||||
if (node.children.length != 0) {
|
||||
cont.append($(icon.replace(/%icon%/g, 'icon-sitemap')));
|
||||
} else {
|
||||
cont.append($(icon.replace(/%icon%/g, 'icon-folder-open')));
|
||||
}
|
||||
|
||||
cont.append($(title.replace(/%name%/g, node.name)));
|
||||
|
||||
if (node.status == 'private') {
|
||||
cont.find(".move-cat-title").addClass('icon-lock');
|
||||
}
|
||||
|
||||
cont.append(actions);
|
||||
|
||||
if (node.children.length != 0) {
|
||||
open_nodes = $('.tree').tree('getState').open_nodes;
|
||||
if (open_nodes.includes(node.id)) {
|
||||
toggler = toggler_open;
|
||||
} else {
|
||||
toggler = toggler_close;
|
||||
}
|
||||
cont.append($(toggler_cont
|
||||
.replace(/%content%/g, toggler)
|
||||
.replace(/%id%/g, node.id)));
|
||||
|
||||
cont.find('.move-cat-action').append(action_order);
|
||||
}
|
||||
|
||||
var colors = ["icon-red", "icon-blue", "icon-yellow", "icon-purple", "icon-green"];
|
||||
var colorId = Number(node.id)%5;
|
||||
cont.find(".icon-folder-open, .icon-sitemap").addClass(colors[colorId]);
|
||||
}
|
||||
|
||||
$('.tree').on( 'click', '.move-cat-toogler', function(e) {
|
||||
var node_id = $(this).attr('data-id');
|
||||
var node = $('.tree').tree('getNodeById', node_id);
|
||||
if (node) {
|
||||
open_nodes = $('.tree').tree('getState').open_nodes;
|
||||
if (!open_nodes.includes(node_id)) {
|
||||
$(this).html(toggler_open);
|
||||
$('.tree').tree('openNode', node);
|
||||
} else {
|
||||
$(this).html(toggler_close);
|
||||
$('.tree').tree('closeNode', node);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('.tree').on(
|
||||
'tree.open',
|
||||
function(e) {
|
||||
$('.move-cat-toogler[data-id='+e.node.id+']').html(toggler_open);
|
||||
}
|
||||
);
|
||||
|
||||
$('.tree').on(
|
||||
'tree.close',
|
||||
function(e) {
|
||||
$('.move-cat-toogler[data-id='+e.node.id+']').html(toggler_close);
|
||||
}
|
||||
);
|
||||
|
||||
$('.tree').on(
|
||||
'tree.move',
|
||||
function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
if (event.move_info.moved_node.status != 'private') {
|
||||
parentIsPrivate = false;
|
||||
if (event.move_info.position == 'after') {
|
||||
parentIsPrivate = (event.move_info.target_node.parent.status == 'private');
|
||||
} else if (event.move_info.position == 'inside') {
|
||||
parentIsPrivate = (event.move_info.target_node.status == 'private');
|
||||
}
|
||||
|
||||
if (parentIsPrivate) {
|
||||
$.confirm({
|
||||
title: str_are_you_sure.replace(/%s/g, event.move_info.moved_node.name),
|
||||
buttons: {
|
||||
confirm: {
|
||||
text: str_yes_change_parent,
|
||||
btnClass: 'btn-red',
|
||||
action: function () {
|
||||
makePrivateHierarchy(event.move_info.moved_node);
|
||||
applyMove(event);
|
||||
},
|
||||
},
|
||||
cancel: {
|
||||
text: str_no_change_parent
|
||||
}
|
||||
},
|
||||
...jConfirm_confirm_options
|
||||
})
|
||||
} else {
|
||||
applyMove(event);
|
||||
}
|
||||
} else {
|
||||
applyMove(event);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
$('.tree').on( 'click', '.move-cat-order', function(e) {
|
||||
var node_id = $(this).attr('data-id');
|
||||
var node = $('.tree').tree('getNodeById', node_id);
|
||||
if (node) {
|
||||
$('.cat-move-order-popin').fadeIn();
|
||||
$('.cat-move-order-popin .album-name').html(getPathNode(node));
|
||||
$('.cat-move-order-popin input[name=id]').val(node_id);
|
||||
}
|
||||
});
|
||||
|
||||
$('.order-root').on( 'click', function() {
|
||||
$('.cat-move-order-popin').fadeIn();
|
||||
$('.cat-move-order-popin .album-name').html(str_root);
|
||||
$('.cat-move-order-popin input[name=id]').val(-1);
|
||||
});
|
||||
|
||||
if (openCat != -1) {
|
||||
var node = $('.tree').tree('getNodeById', openCat);
|
||||
$('.tree').tree('openNode', node);
|
||||
$([document.documentElement, document.body]).animate({
|
||||
scrollTop: $("#cat-"+openCat).offset().top
|
||||
}, 500);
|
||||
}
|
||||
});
|
||||
|
||||
function getId(parent) {
|
||||
if (parent.getLevel() == 0) {
|
||||
return 0;
|
||||
} else {
|
||||
return parent.id;
|
||||
}
|
||||
}
|
||||
|
||||
function getRank(node, ignoreId = null) {
|
||||
if (node.getPreviousSibling() != null) {
|
||||
if (node.id != ignoreId) {
|
||||
return 1 + getRank(node.getPreviousSibling(), ignoreId);
|
||||
} else {
|
||||
return getRank(node.getPreviousSibling(), ignoreId);
|
||||
}
|
||||
} else {
|
||||
if (node.id != ignoreId) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function applyMove(event) {
|
||||
waitingTimeout = setTimeout(() => {
|
||||
$('.waiting-message').addClass('visible');
|
||||
}, 500);
|
||||
id = event.move_info.moved_node.id;
|
||||
moveParent = null;
|
||||
moveRank = null;
|
||||
previous_parent = event.move_info.previous_parent;
|
||||
target = event.move_info.target_node;
|
||||
if (event.move_info.position == 'after') {
|
||||
if (getId(previous_parent) != getId(target.parent)) {
|
||||
moveParent = getId(target.parent);
|
||||
}
|
||||
moveRank = getRank(target, id) + 1;
|
||||
} else if (event.move_info.position == 'inside') {
|
||||
if (getId(previous_parent) != getId(target)) {
|
||||
moveParent = getId(target);
|
||||
}
|
||||
moveRank = 1;
|
||||
} else if (event.move_info.position == 'before') {
|
||||
moveRank = 1;
|
||||
}
|
||||
moveNode(id, moveRank, moveParent).then(() => {
|
||||
event.move_info.do_move();
|
||||
clearTimeout(waitingTimeout);
|
||||
$('.waiting-message').removeClass('visible');
|
||||
})
|
||||
.catch((message) => console.log('An error has occured : ' + message ));
|
||||
}
|
||||
|
||||
function moveNode(node, rank, parent) {
|
||||
return new Promise ((res, rej) => {
|
||||
if (parent != null) {
|
||||
changeParent(node, parent).then(changeRank(node, rank)).then(() => res()).catch(() => rej())
|
||||
} else if (rank != null) {
|
||||
changeRank(node, rank).then(() => res()).catch(() => rej())
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function changeParent(node, parent) {
|
||||
return new Promise((res, rej) => {
|
||||
jQuery.ajax({
|
||||
url: "ws.php?format=json&method=pwg.categories.move",
|
||||
type: "POST",
|
||||
data: {
|
||||
category_id : node,
|
||||
parent : parent,
|
||||
pwg_token : pwg_token
|
||||
},
|
||||
success: function (raw_data) {
|
||||
data = jQuery.parseJSON(raw_data);
|
||||
if (data.stat === "ok") {
|
||||
res();
|
||||
} else {
|
||||
rej(raw_data);
|
||||
}
|
||||
},
|
||||
error: function(message) {
|
||||
rej(message);
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
function changeRank(node, rank) {
|
||||
return new Promise((res, rej) => {
|
||||
jQuery.ajax({
|
||||
url: "ws.php?format=json&method=pwg.categories.setRank",
|
||||
type: "POST",
|
||||
data: {
|
||||
category_id : node,
|
||||
rank : rank
|
||||
},
|
||||
success: function (raw_data) {
|
||||
data = jQuery.parseJSON(raw_data);
|
||||
if (data.stat === "ok") {
|
||||
res();
|
||||
} else {
|
||||
rej(raw_data);
|
||||
}
|
||||
},
|
||||
error: function(message) {
|
||||
rej(message);
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
function makePrivateHierarchy (node) {
|
||||
node.status = 'private';
|
||||
node.children.forEach(node => {
|
||||
makePrivateHierarchy(node);
|
||||
});
|
||||
}
|
||||
|
||||
function getPathNode(node) {
|
||||
if (node.parent.getLevel() != 0) {
|
||||
return getPathNode(node.parent) + ' / ' + node.name;
|
||||
} else {
|
||||
return node.name;
|
||||
}
|
||||
}
|
||||
@@ -125,4 +125,193 @@ function sprintf() {
|
||||
}
|
||||
|
||||
return o.join('');
|
||||
}
|
||||
|
||||
$('.search-cancel').on('click', function () {
|
||||
$('.search-input').val('');
|
||||
$('.search-input').trigger ("input");
|
||||
})
|
||||
|
||||
$('.search-input').on('input', function() {
|
||||
if ($('.search-input').val() == '') {
|
||||
$('.search-cancel').hide();
|
||||
} else {
|
||||
$('.search-cancel').show();
|
||||
}
|
||||
})
|
||||
|
||||
// Class to implement a temporary state and reverse it
|
||||
class TemporaryState {
|
||||
//Arrays to reverse changes
|
||||
attrChanges = []; //Attribute changes : {object(s), attribute, value}
|
||||
classChanges = []; //Class changes : {object(s), state(add:true/remove:false), class}
|
||||
htmlChanges = []; //Html changes : {object(s), html}
|
||||
|
||||
/**
|
||||
* Change temporaly an attribute of an object
|
||||
* @param {Jquery Object(s)} obj HTML Object(s)
|
||||
* @param {String} attr Attribute
|
||||
* @param {String} tempVal Temporary value of the attribute
|
||||
*/
|
||||
changeAttribute(obj, attr, tempVal) {
|
||||
for (let i = 0; i < obj.length; i++) {
|
||||
this.attrChanges.push({
|
||||
object: $(obj[i]),
|
||||
attribute: attr,
|
||||
value: $(obj[i]).attr(attr)
|
||||
})
|
||||
}
|
||||
obj.attr(attr, tempVal)
|
||||
}
|
||||
|
||||
/**
|
||||
* Add/remove a class temporarily
|
||||
* @param {Jquery Object(s)} obj HTML Object
|
||||
* @param {Boolean} st Add (true) or Remove (false) the class
|
||||
* @param {String} loadclass Class Name
|
||||
*/
|
||||
changeClass(obj, st, tempclass) {
|
||||
for (let i = 0; i < obj.length; i++) {
|
||||
if (!($(obj[i]).hasClass(tempclass) && st)) {
|
||||
this.classChanges.push({
|
||||
object: $(obj[i]),
|
||||
state: !st,
|
||||
class: tempclass
|
||||
})
|
||||
if (st)
|
||||
$(obj[i]).addClass(tempclass)
|
||||
else
|
||||
$(obj[i]).removeClass(tempclass)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add temporarily a class to the object
|
||||
* @param {Jquery Object(s)} obj
|
||||
* @param {string} tempclass
|
||||
*/
|
||||
addClass(obj, tempclass) {
|
||||
this.changeClass(obj, true, tempclass);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove temporarily a class to the object
|
||||
* @param {Jquery Object(s)} obj
|
||||
* @param {string} tempclass
|
||||
*/
|
||||
removeClass(obj, tempclass) {
|
||||
this.changeClass(obj, false, tempclass);
|
||||
}
|
||||
|
||||
/**
|
||||
* Change temporaly the html of objects (remove event handlers on the actual content)
|
||||
* @param {Jquery Object(s)} obj
|
||||
* @param {string} temphtml
|
||||
*/
|
||||
changeHTML(obj, temphtml) {
|
||||
for (let i = 0; i < obj.length; i++) {
|
||||
this.htmlChanges.push({
|
||||
object:$(obj[i]),
|
||||
html:$(obj[i]).html()
|
||||
})
|
||||
}
|
||||
obj.html(temphtml);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse all the changes and clear the history
|
||||
*/
|
||||
reverse() {
|
||||
this.attrChanges.forEach(function(change) {
|
||||
if (change.value == undefined) {
|
||||
change.object.removeAttr(change.attribute);
|
||||
} else {
|
||||
change.object.attr(change.attribute, change.value)
|
||||
}
|
||||
})
|
||||
this.classChanges.forEach(function(change) {
|
||||
if (change.state)
|
||||
change.object.addClass(change.class)
|
||||
else
|
||||
change.object.removeClass(change.class)
|
||||
})
|
||||
this.htmlChanges.forEach(function(change) {
|
||||
change.object.html(change.html);
|
||||
})
|
||||
this.attrChanges = [];
|
||||
this.classChanges = [];
|
||||
this.htmlChanges = [];
|
||||
}
|
||||
}
|
||||
|
||||
const jConfirm_alert_options = {
|
||||
icon: 'icon-ok',
|
||||
titleClass: "jconfirmAlert",
|
||||
theme:"modern",
|
||||
closeIcon: true,
|
||||
draggable: false,
|
||||
animation: "zoom",
|
||||
boxWidth: '20%',
|
||||
useBootstrap: false,
|
||||
backgroundDismiss: true,
|
||||
animateFromElement: false,
|
||||
typeAnimated: false,
|
||||
}
|
||||
|
||||
const jConfirm_confirm_options = {
|
||||
draggable: false,
|
||||
titleClass: "jconfirmDeleteConfirm",
|
||||
theme: "modern",
|
||||
animation: "zoom",
|
||||
boxWidth: '40%',
|
||||
useBootstrap: false,
|
||||
type: 'red',
|
||||
animateFromElement: false,
|
||||
backgroundDismiss: true,
|
||||
typeAnimated: false,
|
||||
}
|
||||
|
||||
const jConfirm_confirm_with_content_options = {
|
||||
draggable: false,
|
||||
theme: "modern",
|
||||
animation: "zoom",
|
||||
boxWidth: '40%',
|
||||
useBootstrap: false,
|
||||
type: 'red',
|
||||
animateFromElement: false,
|
||||
backgroundDismiss: true,
|
||||
typeAnimated: false,
|
||||
}
|
||||
|
||||
|
||||
|
||||
jQuery.fn.pwg_jconfirm_follow_href = function({
|
||||
alert_title = "TITLE",
|
||||
alert_confirm = "CONFIRM",
|
||||
alert_cancel = "CANCEL",
|
||||
alert_content = ""
|
||||
} = {}) {
|
||||
let button_href = $(this).attr('href');
|
||||
const options = alert_content === "" ? jConfirm_confirm_options : jConfirm_confirm_with_content_options
|
||||
$(this).click(function() {
|
||||
$.confirm({
|
||||
content: alert_content,
|
||||
title: alert_title,
|
||||
buttons: {
|
||||
confirm: {
|
||||
text: alert_confirm,
|
||||
btnClass: 'btn-red',
|
||||
action: function () {
|
||||
window.location.href = button_href;
|
||||
}
|
||||
},
|
||||
cancel: {
|
||||
text: alert_cancel
|
||||
}
|
||||
},
|
||||
...options
|
||||
});
|
||||
return (false);
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,942 @@
|
||||
const DELAY_FEEDBACK = 3000;
|
||||
/*-------
|
||||
Group Popin
|
||||
-------*/
|
||||
|
||||
$(".group_details_popup_trigger").click(function () {
|
||||
$(".Group_details-popup-container").show();
|
||||
});
|
||||
|
||||
$(".CloseGroupPopup").click(function () {
|
||||
$(".Group_details-popup-container").hide();
|
||||
});
|
||||
|
||||
//Number On Badge
|
||||
function updateBadge() {
|
||||
$('.badge-number').html($('.GroupContainer').length - 2) //Less the add group div and the template
|
||||
}
|
||||
|
||||
/*-------
|
||||
Add User toggle and reduces height of user list when add user form is visible
|
||||
-------*/
|
||||
|
||||
$("#form-btn").click(function () {
|
||||
$("#cancel").show();
|
||||
$("#addUserLabel").show();
|
||||
$(".UserSearch").show();
|
||||
$("#UserSubmit").show();
|
||||
$("#form-btn").hide();
|
||||
$(".groups .list_user").css("max-height", "100px");
|
||||
});
|
||||
|
||||
$("#cancel").click(function () {
|
||||
$("#cancel").hide();
|
||||
$("#addUserLabel").hide();
|
||||
$(".UserSearch").hide();
|
||||
$("#UserSubmit").hide();
|
||||
$("#form-btn").show();
|
||||
$(".groups .list_user").css("max-height", "200px");
|
||||
});
|
||||
|
||||
/*-------
|
||||
Add Group toggle
|
||||
-------*/
|
||||
var isToggle = true;
|
||||
$(".addGroupBlock").on("click", function() {
|
||||
if (isToggle) deployAddGroupForm()
|
||||
else hideAddGroupForm();
|
||||
})
|
||||
|
||||
var deployAddGroupForm = function () {
|
||||
$(".addGroupBlock").animate({
|
||||
top: "20%",
|
||||
padding: "0px"
|
||||
}, 400, complete=function(){
|
||||
$("#addGroupForm form").fadeIn();
|
||||
});
|
||||
isToggle = false;
|
||||
}
|
||||
|
||||
var hideAddGroupForm = function () {
|
||||
$("#addGroupForm form").fadeOut(function(){
|
||||
$(".addGroupBlock").animate({
|
||||
top: "50%",
|
||||
padding: "100px 0"
|
||||
}, 400)
|
||||
});
|
||||
isToggle = true;
|
||||
}
|
||||
|
||||
/*-------
|
||||
Add Group Submit
|
||||
-------*/
|
||||
|
||||
jQuery(document).ready(function () {
|
||||
$("#addGroupForm form").on("submit", function (e) {
|
||||
e.preventDefault();
|
||||
let name = $("#addGroupForm input[type=text]").val();
|
||||
let loadState = new TemporaryState();
|
||||
loadState.changeHTML($(".actionButtons button"), "<i class='icon-spin6 animate-spin'> </i>");
|
||||
loadState.changeAttribute($(".actionButtons button"), "style", "pointer-events: none");
|
||||
loadState.changeAttribute($(".actionButtons a"), "style", "pointer-events: none");
|
||||
jQuery.ajax({
|
||||
url: "ws.php?format=json&method=pwg.groups.add",
|
||||
type: "POST",
|
||||
data: "name=" + name + "&pwg_token=" + pwg_token,
|
||||
success: function (raw_data) {
|
||||
loadState.reverse();
|
||||
data = jQuery.parseJSON(raw_data);
|
||||
if (data.stat === "ok") {
|
||||
$(".addGroupFormLabelAndInput input").val('');
|
||||
group = data.result.groups[0];
|
||||
groupBox = createGroup(group)
|
||||
groupBox.prependTo(".groups")
|
||||
setupGroupBox(groupBox);
|
||||
updateBadge();
|
||||
} else {
|
||||
$("#addGroupForm .groupError").html(str_name_taken);
|
||||
$("#addGroupForm .groupError").fadeIn();
|
||||
$("#addGroupForm .groupError").delay(DELAY_FEEDBACK).fadeOut();
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
console.log(err);
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
var createGroup = function(group) {
|
||||
//Setup the group
|
||||
newgroup = $("#group-template").clone().attr("id", "group-" + group.id);
|
||||
newgroup.attr("data-id", group.id);
|
||||
newgroup.find("#group_name").html(group.name);
|
||||
newgroup.find(".group_name-editable").val(group.name);
|
||||
newgroup.find(".Group-checkbox label").attr("for", "Group-Checkbox-selection-" + group.id);
|
||||
newgroup.find(".Group-checkbox input").attr("id", "Group-Checkbox-selection-" + group.id);
|
||||
newgroup.find(".input-edit-group-name").attr("placeholder", group.name);
|
||||
newgroup.find(".group_number_users").html(group.nb_users+" " + ((group.nb_users > 1)? str_members_default:str_member_default));
|
||||
newgroup.find(".group_name-editable").html(group.name);
|
||||
newgroup.find(".manage-permissions").attr("href", "admin.php?page=group_perm&group_id="+group.id)
|
||||
hideAddGroupForm();
|
||||
|
||||
//Setup the icon color
|
||||
var colors = ["icon-red", "icon-blue", "icon-yellow", "icon-purple", "icon-green"];
|
||||
var colorId = Number(group.id)%5;
|
||||
newgroup.find(".icon-users-1").addClass(colors[colorId]);
|
||||
|
||||
//Place group in first Place
|
||||
newgroup.find(".groupMessage").html(str_group_created);
|
||||
newgroup.find(".groupMessage").fadeIn();
|
||||
newgroup.find(".groupMessage").delay(DELAY_FEEDBACK).fadeOut();
|
||||
return newgroup;
|
||||
}
|
||||
|
||||
/*-------
|
||||
SETUP JS ON GROUP BOX
|
||||
-------*/
|
||||
jQuery(document).ready(function () {
|
||||
$(".GroupContainer").each(function () {
|
||||
if ($(this).attr("id") != "group-template")
|
||||
setupGroupBox($(this));
|
||||
});
|
||||
});
|
||||
var setupGroupBox = function (groupBox) {
|
||||
var id = groupBox.data("id");
|
||||
|
||||
/* Change background color of group block if checked in selection mode */
|
||||
groupBox.find(".Group-checkbox input[type='checkbox']").change(function () {
|
||||
toogleSelection(id, groupBox.find(".Group-checkbox input[type='checkbox']").is(":checked"));
|
||||
});
|
||||
groupBox.find(".Group-checkbox input[type='checkbox']").attr("checked", false)
|
||||
|
||||
/* Display the option on the click on "..." */
|
||||
groupBox.find(".group-dropdown-options").click(function GroupOptions() {
|
||||
$(this).find("#GroupOptions").toggle();
|
||||
});
|
||||
|
||||
/* Set the delete action */
|
||||
groupBox.find("#GroupDelete").on("click", function () {
|
||||
deleteGroup(id);
|
||||
});
|
||||
|
||||
/* Set the rename action */
|
||||
groupBox.find(".Group-name .icon-pencil, #GroupEdit").on("click", function () {
|
||||
displayRenameForm(true, id);
|
||||
setTimeout(() => {groupBox.find("#GroupOptions").hide()}, 10)
|
||||
});
|
||||
|
||||
groupBox.find(".group-rename .validate").on("click", function () {
|
||||
groupBox.find(".group-rename form").trigger("submit");
|
||||
});
|
||||
|
||||
groupBox.find(".group-rename form").on("submit", function (e) {
|
||||
e.preventDefault();
|
||||
renameGroup(id, groupBox.find(".group_name-editable").val())
|
||||
});
|
||||
|
||||
groupBox.find(".group-rename .icon-cancel").on('click', function() {
|
||||
displayRenameForm(false, id)
|
||||
groupBox.find(".group_name-editable").val(groupBox.find(".Group-name-container p").html());
|
||||
})
|
||||
|
||||
/* Hide group options and rename field on click on the screen */
|
||||
|
||||
$(document).mouseup(function (e) {
|
||||
e.stopPropagation();
|
||||
let option_is_clicked = false
|
||||
$("#GroupOptions div").each(function () {
|
||||
if (!($(this).has(e.target).length === 0)) {
|
||||
option_is_clicked = true;
|
||||
}
|
||||
})
|
||||
if (!option_is_clicked) {
|
||||
groupBox.find("#GroupOptions").hide();
|
||||
}
|
||||
});
|
||||
|
||||
/* Setup the default action */
|
||||
if (groupBox.data("default") == 1) {
|
||||
setupDefaultActions(id, true);
|
||||
} else if (groupBox.data("default") == 0) {
|
||||
setupDefaultActions(id, false);
|
||||
}
|
||||
|
||||
groupBox.find(".manage-users").on("click", function(){openUserManager(id)});
|
||||
|
||||
groupBox.find("#GroupDuplicate").on("click", function(){duplicateAction(id)})
|
||||
|
||||
};
|
||||
|
||||
var toogleSelection = function(group_id, toggle) {
|
||||
groupBox = $("#group-"+group_id);
|
||||
if (toggle) {
|
||||
groupBox.find(".Group-checkbox input").attr("checked", true);
|
||||
groupBox.addClass("GroupBackgroudSelected");
|
||||
groupBox.find(".icon-users-1").addClass("OrangeIcon");
|
||||
groupBox.find(".group_number_users").addClass("OrangeFont");
|
||||
|
||||
//Display item selection on selection panel
|
||||
item = $(
|
||||
"<div data-id=" +
|
||||
group_id +
|
||||
">" +
|
||||
"<a class='icon-cancel'></a>" +
|
||||
"<p>" +
|
||||
groupBox.find("#group_name").html() +
|
||||
"</p> </div>"
|
||||
);
|
||||
item.appendTo(".DeleteGroupList");
|
||||
item.find("a").on("click", function () {
|
||||
groupBox.find(".Group-checkbox input").attr("checked", false);
|
||||
toogleSelection(group_id);
|
||||
});
|
||||
updateSelectionPanel();
|
||||
option = $('<option value="'+group_id+'">'+groupBox.find("#group_name").html()+'</option>')
|
||||
option.appendTo("#MergeOptionsChoices");
|
||||
} else {
|
||||
groupBox.find(".Group-checkbox input").attr("checked", false);
|
||||
groupBox.removeClass("GroupBackgroudSelected");
|
||||
groupBox.find(".icon-users-1").removeClass("OrangeIcon");
|
||||
groupBox.find(".group_number_users").removeClass("OrangeFont");
|
||||
$(".DeleteGroupList div").each(function () {
|
||||
if ($(this).data("id") == group_id) {
|
||||
$(this).remove();
|
||||
}
|
||||
});
|
||||
updateSelectionPanel();
|
||||
$("#MergeOptionsChoices option").each(function () {
|
||||
if ($(this).attr("value") == group_id) {
|
||||
$(this).remove();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/* Group Ajax and Display Functions */
|
||||
var deleteGroup = function (id) {
|
||||
$.confirm({
|
||||
title: str_delete.replace("%s",$("#group-"+id+" #group_name").html()),
|
||||
draggable: false,
|
||||
titleClass: "jconfirmDeleteConfirm",
|
||||
theme: "modern",
|
||||
content: "",
|
||||
animation: "zoom",
|
||||
boxWidth: '30%',
|
||||
useBootstrap: false,
|
||||
type: 'red',
|
||||
animateFromElement: false,
|
||||
backgroundDismiss: true,
|
||||
typeAnimated: false,
|
||||
buttons: {
|
||||
confirm: {
|
||||
text: str_yes_delete_confirmation,
|
||||
btnClass: 'btn-red',
|
||||
action: function () {
|
||||
let groupName = $("#group-"+id+" .Group-name-container p").html()
|
||||
$.alert({
|
||||
...{title : str_group_deleted.replace("%s",groupName),
|
||||
content: function() {
|
||||
return jQuery.ajax({
|
||||
url: "ws.php?format=json&method=pwg.groups.delete",
|
||||
type: "POST",
|
||||
data: "group_id=" + id + "&pwg_token=" + pwg_token,
|
||||
success: function (raw_data) {
|
||||
data = jQuery.parseJSON(raw_data);
|
||||
if (data.stat === "ok") {
|
||||
$("#group-" + id).remove();
|
||||
$(".DeleteGroupList div[data-id="+id+"]").remove()
|
||||
$("#MergeOptionsChoices option[value="+ id +"]").remove()
|
||||
}
|
||||
updateBadge();
|
||||
},
|
||||
error: function (err) {
|
||||
console.log(err);
|
||||
},
|
||||
})
|
||||
}},
|
||||
...jConfirm_alert_options
|
||||
});
|
||||
}
|
||||
},
|
||||
cancel: {
|
||||
text: str_no_delete_confirmation
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var renameGroup = function(id, newName) {
|
||||
let loadState = new TemporaryState();
|
||||
loadState.changeHTML($("#group-" + id + " .group-rename .validate"), "<i class='animate-spin icon-spin6'></i>")
|
||||
loadState.removeClass($("#group-" + id + " .group-rename .validate"), "icon-ok")
|
||||
loadState.changeAttribute($("#group-" + id + " .group-rename span"), "style", "pointer-events: none");
|
||||
jQuery.ajax({
|
||||
url: "ws.php?format=json&method=pwg.groups.setInfo",
|
||||
type: "POST",
|
||||
data: "group_id=" + id + "&pwg_token=" + pwg_token + "&name="+newName,
|
||||
success: function (raw_data) {
|
||||
data = jQuery.parseJSON(raw_data);
|
||||
loadState.reverse();
|
||||
if (data.stat === "ok") {
|
||||
newName = data.result.groups[0].name;
|
||||
//Display message
|
||||
$("#group-" + id).find(".groupMessage").html(str_renaming_done);
|
||||
$("#group-" + id).find(".groupMessage").fadeIn();
|
||||
$("#group-" + id).find(".groupMessage").delay(DELAY_FEEDBACK).fadeOut();
|
||||
$("#group-" + id).find("#group_name").html(newName);
|
||||
|
||||
//Hide editable field
|
||||
displayRenameForm(false, id);
|
||||
} else {
|
||||
//Display error message
|
||||
$("#group-" + id).find(".groupError").html(str_name_taken);
|
||||
$("#group-" + id).find(".groupError").fadeIn();
|
||||
$("#group-" + id).find(".groupError").delay(DELAY_FEEDBACK).fadeOut();
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
console.log(err);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
// Hide or display rename form
|
||||
var displayRenameForm = function(doDisplay, grp_id) {
|
||||
if (doDisplay) {
|
||||
$("#group-" + grp_id).find(".group-rename").css("display", "flex");
|
||||
$("#group-" + grp_id).find(".Group-name-container .icon-pencil").hide();
|
||||
$("#group-" + grp_id).find(".Group-name-container p").css("opacity", 0)
|
||||
} else {
|
||||
$("#group-" + grp_id).find(".group-rename").hide();
|
||||
$("#group-" + grp_id).find(".Group-name-container .icon-pencil").removeAttr("style");
|
||||
$("#group-" + grp_id).find(".Group-name-container p").css("opacity", 1);
|
||||
}
|
||||
}
|
||||
|
||||
var setDefaultGroup = function (id, is_default) {
|
||||
$("#group-" + id + " #GroupDefault").css("width", $("#group-" + id + " #GroupDefault").width())
|
||||
$("#group-" + id + " #GroupDefault").html("<i class='icon-spin6 animate-spin'> </i>")
|
||||
$("#group-" + id + " #GroupDefault").removeClass("icon-star");
|
||||
$("#group-" + id + " #GroupDefault").attr("style", "pointer-events: none; text-align: center;")
|
||||
$("#group-" + id).find(".is-default-token").addClass("icon-spin6").addClass("animate-spin").removeClass("icon-star")
|
||||
jQuery.ajax({
|
||||
url: "ws.php?format=json&method=pwg.groups.setInfo",
|
||||
type: "POST",
|
||||
data: "group_id=" + id + "&pwg_token=" + pwg_token + "&is_default="+is_default,
|
||||
success: function (raw_data) {
|
||||
data = jQuery.parseJSON(raw_data);
|
||||
$("#group-"+id+" #GroupOptions").hide();
|
||||
if (data.stat === "ok") {
|
||||
if (is_default) {
|
||||
setupDefaultActions(id,true)
|
||||
} else {
|
||||
setupDefaultActions(id,false)
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
console.log(err);
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
var setupDefaultActions = function(id, is_default) {
|
||||
$("#group-" + id + " #GroupDefault").attr("style", "");
|
||||
$("#group-" + id + " #GroupDefault").addClass("icon-star")
|
||||
$("#group-" + id).find(".is-default-token").removeClass("icon-spin6").removeClass("animate-spin").addClass("icon-star")
|
||||
if (is_default) {
|
||||
$("#group-" + id).find("#GroupDefault").html(str_unset_default);
|
||||
$("#group-" + id).find(".is-default-token").attr("title",str_unset_default)
|
||||
$("#group-" + id).find("#GroupDefault").unbind("click");
|
||||
$("#group-" + id).find(".is-default-token").removeClass("deactivate");
|
||||
$("#group-" + id).find("#GroupDefault").on("click", function(){setDefaultGroup(id, false)})
|
||||
$("#group-" + id).find(".is-default-token").on("click", function(){setDefaultGroup(id, false)})
|
||||
} else {
|
||||
$("#group-" + id).find("#GroupDefault").html(str_set_default);
|
||||
$("#group-" + id).find(".is-default-token").attr("title",str_set_default)
|
||||
$("#group-" + id).find(".is-default-token").addClass("deactivate");
|
||||
$("#group-" + id).find("#GroupDefault").on("click", function(){setDefaultGroup(id, true)})
|
||||
$("#group-" + id).find(".is-default-token").unbind("click");
|
||||
}
|
||||
}
|
||||
|
||||
var duplicateAction = function(id) {
|
||||
let loadState = new TemporaryState();
|
||||
loadState.changeHTML($("#group-" + id + " #GroupDuplicate"), "<i class='icon-spin6 animate-spin'> </i>")
|
||||
loadState.removeClass($("#group-" + id + " #GroupDuplicate"), "icon-docs");
|
||||
loadState.changeAttribute($("#group-" + id + " #GroupDuplicate"), "style", "pointer-events: none; text-align: center;")
|
||||
copy_name = $("#group-" + id + " #group_name").html() + str_copy;
|
||||
|
||||
let name_exist = function(name) {
|
||||
exist = false;
|
||||
$(".Group-name-container p").each(function () {
|
||||
if ($(this).html() === name)
|
||||
exist = true
|
||||
})
|
||||
return exist;
|
||||
}
|
||||
|
||||
let i = 1;
|
||||
while (name_exist(copy_name))
|
||||
{
|
||||
copy_name = $("#group-" + id + " #group_name").html() + str_other_copy.replace("%s", i++)
|
||||
}
|
||||
|
||||
jQuery.ajax({
|
||||
url: "ws.php?format=json&method=pwg.groups.duplicate",
|
||||
type: "POST",
|
||||
data: "group_id=" + id + "&pwg_token=" + pwg_token + "©_name=" + copy_name,
|
||||
success: function (raw_data) {
|
||||
data = jQuery.parseJSON(raw_data);
|
||||
loadState.reverse();
|
||||
if (data.stat === "ok") {
|
||||
$("#group-"+id+" #GroupOptions").hide();
|
||||
group = data.result.groups[0];
|
||||
let groupbox = createGroup(group)
|
||||
groupbox.insertAfter($("#group-"+id));
|
||||
setupGroupBox(groupbox);
|
||||
updateBadge();
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
console.log(err);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/*-------
|
||||
Selection mode toggle actions,
|
||||
changes "..." in group block to checkbox,
|
||||
disables group actions in selection mode
|
||||
-------*/
|
||||
|
||||
$(function () {
|
||||
$("#toggleSelectionMode").attr("checked", false)
|
||||
$("#toggleSelectionMode").click(function () {
|
||||
if ($(this).is(":checked")) {
|
||||
$(".in-selection-mode").show();
|
||||
$(".not-in-selection-mode").hide();
|
||||
$(".GroupManagerButtons").removeClass("visible");
|
||||
} else {
|
||||
$(".in-selection-mode").hide();
|
||||
$(".not-in-selection-mode").removeAttr("style");
|
||||
$(".Group-checkbox input").attr("checked", false);
|
||||
$(".Group-checkbox input[type='checkbox']").trigger("change");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
/*-------
|
||||
Update Selection Panel
|
||||
-------*/
|
||||
var state = "NoSelection";
|
||||
|
||||
var updateSelectionPanel = function (changedState = "") {
|
||||
let numSelect = $(".DeleteGroupList div").length;
|
||||
|
||||
if (numSelect == 0) {
|
||||
updateStatePanel("NoSelection")
|
||||
} else if (changedState == "") {
|
||||
if (numSelect == 1 && state != "ConfirmDeletion")
|
||||
updateStatePanel("OneSelected")
|
||||
if (numSelect > 1 && state == "OneSelected")
|
||||
updateStatePanel("Selection");
|
||||
} else {
|
||||
if (changedState == "Selection" && numSelect == 1)
|
||||
updateStatePanel("OneSelected")
|
||||
else
|
||||
updateStatePanel(changedState)
|
||||
}
|
||||
|
||||
$(".number-Selected").html(numSelect + "");
|
||||
};
|
||||
|
||||
/*Update the state of the panel in 5 states :
|
||||
NoSelection, OneSelected, ConfirmDeletion, Selection, OptionMerge
|
||||
*/
|
||||
var updateStatePanel = function (newState = "Selection") {
|
||||
state = newState;
|
||||
switch (newState) {
|
||||
case "OneSelected":
|
||||
$("#DeleteSelectionMode").show();
|
||||
$("#MergeSelectionMode").show();
|
||||
buttonUnavailable($("#MergeSelectionMode"));
|
||||
buttonAvailable($("#DeleteSelectionMode"), "updateSelectionPanel('ConfirmDeletion')");
|
||||
$("#MergeOptionsBlock").hide();
|
||||
$("#ConfirmGroupAction").hide();
|
||||
break;
|
||||
case "ConfirmDeletion":
|
||||
$("#DeleteSelectionMode").hide();
|
||||
$("#MergeSelectionMode").hide();
|
||||
$("#MergeOptionsBlock").hide();
|
||||
$("#ConfirmGroupAction").show();
|
||||
break;
|
||||
case "Selection":
|
||||
$("#DeleteSelectionMode").show();
|
||||
$("#MergeSelectionMode").show();
|
||||
buttonAvailable($("#MergeSelectionMode"), "updateSelectionPanel('OptionMerge')");
|
||||
buttonAvailable($("#DeleteSelectionMode"), "updateSelectionPanel('ConfirmDeletion')");
|
||||
$("#MergeOptionsBlock").hide();
|
||||
$("#ConfirmGroupAction").hide();
|
||||
break;
|
||||
case "OptionMerge":
|
||||
$("#DeleteSelectionMode").hide();
|
||||
$("#MergeSelectionMode").hide();
|
||||
$("#MergeOptionsBlock").show();
|
||||
$("#ConfirmGroupAction").hide();
|
||||
break;
|
||||
}
|
||||
if (newState == "NoSelection") {
|
||||
$("#DeleteSelectionMode").show();
|
||||
$("#MergeSelectionMode").show();
|
||||
buttonUnavailable($("#MergeSelectionMode"));
|
||||
buttonUnavailable($("#DeleteSelectionMode"));
|
||||
$(".SelectionModeGroup").hide();
|
||||
$("#nothing-selected").show();
|
||||
$("#MergeOptionsBlock").hide();
|
||||
$("#ConfirmGroupAction").hide();
|
||||
} else {
|
||||
$(".SelectionModeGroup").show();
|
||||
$("#nothing-selected").hide();
|
||||
}
|
||||
};
|
||||
|
||||
var buttonAvailable = function(button, onClick) {
|
||||
button.removeClass("unavailable");
|
||||
button.attr("OnClick", onClick);
|
||||
}
|
||||
|
||||
var buttonUnavailable = function(button) {
|
||||
button.addClass("unavailable");
|
||||
button.removeAttr("OnClick");
|
||||
}
|
||||
|
||||
/*-------
|
||||
Merge function on button's pannel
|
||||
-------*/
|
||||
|
||||
$('.ConfirmMergeButton').on("click", function() {
|
||||
let loadState = new TemporaryState();
|
||||
loadState.changeAttribute($('.ConfirmMergeButton'), "style", "pointer-events: none");
|
||||
loadState.changeHTML($('.ConfirmMergeButton'), "<i class='icon-spin6 animate-spin'> </i>");
|
||||
loadState.removeClass($('.ConfirmMergeButton'), "icon-ok");
|
||||
merge_group = [];
|
||||
str_merge_group = "";
|
||||
name_merge = [];
|
||||
name_dest = [];
|
||||
dest_grp = $("#MergeOptionsChoices").val();
|
||||
|
||||
$(".DeleteGroupList div").each(function () {
|
||||
if (dest_grp != $(this).attr("data-id"))
|
||||
{
|
||||
str_merge_group += "&merge_group_id[]="+$(this).attr("data-id");
|
||||
merge_group.push($(this).attr("data-id"));
|
||||
name_merge.push($(this).find("p").html())
|
||||
} else {
|
||||
name_dest = $(this).find("p").html();
|
||||
}
|
||||
})
|
||||
|
||||
jQuery.ajax({
|
||||
url: "ws.php?format=json&method=pwg.groups.merge",
|
||||
type: "POST",
|
||||
data: "destination_group_id=" + dest_grp + str_merge_group + "&pwg_token=" + pwg_token,
|
||||
success: function (raw_data) {
|
||||
loadState.reverse();
|
||||
data = jQuery.parseJSON(raw_data);
|
||||
if (data.stat === "ok") {
|
||||
updateSelectionPanel('Selection');
|
||||
merge_group.forEach(function(id) {
|
||||
($("#group-"+id).fadeOut(complete=function(){
|
||||
$(this).remove();
|
||||
}))
|
||||
})
|
||||
toogleSelection(dest_grp, false)
|
||||
$(".DeleteGroupList").html("");
|
||||
$("#MergeOptionsChoices").html("");
|
||||
|
||||
$.alert({
|
||||
...{title: str_merged_into
|
||||
.replace("%s1",name_merge.toString())
|
||||
.replace("%s2",name_dest),
|
||||
content: "",},
|
||||
...jConfirm_alert_options
|
||||
});
|
||||
|
||||
$("#group-"+dest_grp + " .group_number_users").html("<i class='icon-spin6 animate-spin'> </i>");
|
||||
jQuery.ajax({
|
||||
url: "ws.php?format=json&method=pwg.users.getList",
|
||||
type: "POST",
|
||||
data: "group_id=" + dest_grp,
|
||||
success: function (raw_data) {
|
||||
data = jQuery.parseJSON(raw_data);
|
||||
let number = data.result.users.length;
|
||||
$("#group-"+dest_grp + " .group_number_users").html(
|
||||
number + " " + ((number > 1)? str_members_default:str_member_default)
|
||||
);
|
||||
updateBadge();
|
||||
}
|
||||
})
|
||||
};
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
/*-------
|
||||
Delete function on button's pannel
|
||||
-------*/
|
||||
|
||||
$('.ConfirmDeleteButton').on("click", function() {
|
||||
let names = [];
|
||||
let ids = [];
|
||||
$('.DeleteGroupList div').each(function () {
|
||||
let id = $(this).data('id');
|
||||
names.push($("#group-"+id+" #group_name").html());
|
||||
ids.push(id);
|
||||
});
|
||||
|
||||
let loadState = new TemporaryState;
|
||||
loadState.changeAttribute($('.ConfirmDeleteButton'), "style", "pointer-events: none");
|
||||
loadState.changeHTML($('.ConfirmDeleteButton'), "<i class='icon-spin6 animate-spin'> </i>");
|
||||
loadState.removeClass($('.ConfirmDeleteButton'),"icon-ok");
|
||||
|
||||
str_id = ""
|
||||
ids.forEach(function(id) {
|
||||
str_id += "group_id[]=" + id + "&"
|
||||
})
|
||||
|
||||
jQuery.ajax({
|
||||
url: "ws.php?format=json&method=pwg.groups.delete",
|
||||
type: "POST",
|
||||
data: str_id + "pwg_token=" + pwg_token,
|
||||
success: function (raw_data) {
|
||||
data = jQuery.parseJSON(raw_data);
|
||||
if (data.stat === "ok") {
|
||||
$(".DeleteGroupList div").each(function() {
|
||||
$(this).remove();
|
||||
$("#group-" + $(this).attr("data-id")).remove();
|
||||
$("#MergeOptionsChoices option[value="+ $(this).attr("data-id") +"]").remove()
|
||||
})
|
||||
|
||||
loadState.reverse();
|
||||
updateSelectionPanel("NoSelection");
|
||||
$.alert({
|
||||
...{title: str_groups_deleted.replace("%s",names.toString()),
|
||||
content: "",
|
||||
},
|
||||
...jConfirm_alert_options
|
||||
});
|
||||
updateBadge();
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
console.log(err);
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
/*-------
|
||||
Manage User Part
|
||||
-------*/
|
||||
|
||||
// Initialize the research user bar
|
||||
var selectize;
|
||||
|
||||
// Initialize the cache
|
||||
var usersCache = {};
|
||||
|
||||
var usersInGroup = [];
|
||||
|
||||
// Max offset of the user container (322 = 6 lines)
|
||||
var maxOffsetUserCont = 322;
|
||||
|
||||
var dissociateUserInfo = $("<div class='ValidationUserDissociated'>"
|
||||
+ "<p class='icon-ok'></p>"
|
||||
+ "</div>").appendTo(".group-name-block").hide();
|
||||
|
||||
var associateUserInfo = $("<div class='ValidationUserAssociated'>"
|
||||
+ "<p class='icon-ok'></p>"
|
||||
+ "</div>");
|
||||
|
||||
// Setup the user research bar
|
||||
$(function() {
|
||||
|
||||
// initialize the Selectize control
|
||||
$select = $('.AddUserBlock select').selectize({});
|
||||
|
||||
// fetch the instance
|
||||
selectize = $select[0].selectize;
|
||||
|
||||
|
||||
var idSearch = "";
|
||||
$('.UserSearch input').on("focus", function() {
|
||||
if (idSearch != $("#UserList").attr("data-group_id")) {
|
||||
updateUserSearch();
|
||||
}
|
||||
});
|
||||
|
||||
// Update User search bar (remove group users in selection)
|
||||
updateUserSearch = function () {
|
||||
selectize.clear();
|
||||
if (usersCache = {}) {
|
||||
usersCache = new UsersCache({
|
||||
serverKey: serverKey,
|
||||
serverId: serverId,
|
||||
rootUrl: rootUrl
|
||||
});
|
||||
}
|
||||
JSON.parse(usersCache.storage[usersCache.key]).data.forEach(function(u){
|
||||
selectize.addOption({value:u.id, text:u.username})
|
||||
})
|
||||
idSearch = $("#UserList").attr("data-group_id");
|
||||
$('.UsernameBlock').each(function(){
|
||||
selectize.removeOption($(this).data("id"));
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
// Display the user manager for a specific group
|
||||
var openUserManager = function(grp_id) {
|
||||
let loadState = new TemporaryState();
|
||||
loadState.removeClass($("#group-" + grp_id + " #UserListTrigger"),'icon-user-1')
|
||||
loadState.changeAttribute($("#group-" + grp_id + " #UserListTrigger"), "style", "pointer-events: none");
|
||||
loadState.changeHTML($("#group-" + grp_id + " #UserListTrigger"), "<i class='icon-spin6 animate-spin'> </i>");
|
||||
jQuery.ajax({
|
||||
url: "ws.php?format=json&method=pwg.users.getList",
|
||||
type: "POST",
|
||||
data: "group_id=" + grp_id,
|
||||
success: function (raw_data) {
|
||||
loadState.reverse();
|
||||
data = jQuery.parseJSON(raw_data);
|
||||
if (data.stat === "ok") {
|
||||
//Set the popin name
|
||||
$(".group-name-block p").html(
|
||||
$("#group-" + grp_id + " #group_name").html() + " / " + str_user_list
|
||||
)
|
||||
$(".UsersInGroupList").html("");
|
||||
|
||||
//Display the popin
|
||||
$('#UserList').fadeIn();
|
||||
|
||||
//Fill with user blocks
|
||||
usersInGroup = data.result.users;
|
||||
// Sort in alphabetic order
|
||||
usersInGroup.sort(function( a, b ) {
|
||||
if ( a.username.toLowerCase() < b.username.toLowerCase() ){
|
||||
return -1;
|
||||
} else return 1
|
||||
});
|
||||
let i = 0;
|
||||
while ($(".UsersInGroupList").outerHeight() <= maxOffsetUserCont && usersInGroup[i] != undefined){
|
||||
getUserDisplay(usersInGroup[i].username, usersInGroup[i].id, grp_id).appendTo(".UsersInGroupList");
|
||||
i++;
|
||||
};
|
||||
while ($(".UsersInGroupList").height() > maxOffsetUserCont) {
|
||||
$(".UsernameBlock").last().remove();
|
||||
}
|
||||
updateMembernumber(usersInGroup.length, grp_id);
|
||||
//Attribute the group id to the div
|
||||
$("#UserList").attr("data-group_id", grp_id);
|
||||
|
||||
$(".LinkUserManager a").attr("href","admin.php?page=user_list&group="+grp_id)
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
console.log(err);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
//Add a user block
|
||||
var getUserDisplay = function(username, user_id, grp_id) {
|
||||
let userBlock = $('<div class="UsernameBlock" data-id='+user_id+'>'+
|
||||
'<span class="icon-user-1"></span>'+
|
||||
'<p>'+username+'</p>'+
|
||||
'<div class="Tooltip">'+
|
||||
'<span class="icon-cancel"></span>'+
|
||||
'<p class="TooltipText">Dissociate user from this group</p>'+
|
||||
'</div>'+
|
||||
'</div>');
|
||||
|
||||
while ($(".UsersInGroupList")[0].offsetHeight > maxOffsetUserCont) {
|
||||
$(".UsernameBlock").last().remove();
|
||||
}
|
||||
|
||||
//Setup the delete action
|
||||
userBlock.find(".icon-cancel").on("click", function () {
|
||||
userBlock.find(".icon-cancel").addClass("icon-spin6")
|
||||
userBlock.find(".icon-cancel").addClass("animate-spin")
|
||||
userBlock.find(".icon-cancel").css("pointer-events", "none")
|
||||
userBlock.find(".icon-cancel").removeClass("icon-cancel")
|
||||
jQuery.ajax({
|
||||
url: "ws.php?format=json&method=pwg.groups.deleteUser",
|
||||
type: "POST",
|
||||
data: "group_id=" + grp_id + "&user_id=" + user_id + "&pwg_token=" + pwg_token,
|
||||
success: function (raw_data) {
|
||||
data = jQuery.parseJSON(raw_data);
|
||||
if (data.stat === "ok") {
|
||||
let str = str_user_dissociated.replace("%s", username)
|
||||
associateUserInfo.fadeOut();
|
||||
dissociateUserInfo.find("p").html(str);
|
||||
dissociateUserInfo.fadeIn()
|
||||
|
||||
$(".UsernameBlock").css("margin-right", "10px").css("border", "none");
|
||||
userBlock.remove()
|
||||
|
||||
updateUserSearch();
|
||||
|
||||
while ($(".UsersInGroupList").height() > maxOffsetUserCont) {
|
||||
$(".UsernameBlock").last().remove();
|
||||
}
|
||||
|
||||
usersInGroup = usersInGroup.filter(u => u.id != user_id)
|
||||
|
||||
//Update member number
|
||||
updateMembernumber(parseInt($(".UserNumberBadge").html()) -1, grp_id);
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
return userBlock;
|
||||
}
|
||||
|
||||
//Update member number function
|
||||
function updateMembernumber(number, grp_id) {
|
||||
$(".GroupContainer[data-id="+grp_id+"] .group_number_users")
|
||||
.html(number + " " + ((number > 1)? str_members_default:str_member_default));
|
||||
$(".UserNumberBadge").html(number);
|
||||
$(".AmountOfUsersShown strong:nth-child(2)").html(number)
|
||||
$(".AmountOfUsersShown strong:nth-child(1)").html($(".UsernameBlock").length)
|
||||
}
|
||||
|
||||
// Close pop-up on cross click
|
||||
$(".CloseUserList").on("click", function() {$('#UserList').fadeOut();})
|
||||
|
||||
// Adding Group Action
|
||||
$(".AddUserBlock button").on("click", function () {
|
||||
let grp_id = $("#UserList").attr("data-group_id");
|
||||
let usersString = ""
|
||||
// Get selected ids
|
||||
let id = selectize.getValue();
|
||||
|
||||
if (id != "") {
|
||||
let loadState = new TemporaryState();
|
||||
loadState.changeHTML($("#UserSubmit"),"<i class='icon-spin6 animate-spin'> </i>");
|
||||
loadState.removeClass($("#UserSubmit"),"icon-user-add");
|
||||
loadState.changeAttribute($("#UserSubmit"),"css","pointer-events:none")
|
||||
jQuery.ajax({
|
||||
url: "ws.php?format=json&method=pwg.groups.addUser",
|
||||
type: "POST",
|
||||
data: "group_id=" + grp_id+ "&user_id=" + id + "&pwg_token=" + pwg_token,
|
||||
success: function (raw_data) {
|
||||
loadState.reverse()
|
||||
data = jQuery.parseJSON(raw_data);
|
||||
|
||||
if (data.stat === "ok") {
|
||||
// Get the username
|
||||
let username = "undefined";
|
||||
JSON.parse(usersCache.storage[usersCache.key]).data.forEach(function(u) {
|
||||
if (u.id == id) {
|
||||
username = u.username;
|
||||
}
|
||||
})
|
||||
let userBlock = getUserDisplay(username, id, grp_id).prependTo(".UsersInGroupList");
|
||||
|
||||
dissociateUserInfo.fadeOut()
|
||||
|
||||
$(".UsernameBlock:first").css("margin-right", "0px").css("border", "2px solid #c2f5c2");
|
||||
$(".UsernameBlock").slice(1).css("margin-right", "10px").css("border", "none");
|
||||
associateUserInfo.remove()
|
||||
associateUserInfo.insertAfter(userBlock);
|
||||
associateUserInfo.find("p").html(str_user_associated);
|
||||
associateUserInfo.fadeIn()
|
||||
|
||||
updateUserSearch();
|
||||
|
||||
usersInGroup.push({username: username, id:id});
|
||||
|
||||
while ($(".UsersInGroupList").height() > maxOffsetUserCont) {
|
||||
$(".UsernameBlock").last().remove();
|
||||
}
|
||||
|
||||
//Update member number
|
||||
updateMembernumber(parseInt($(".UserNumberBadge").html()) + 1, grp_id);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$(".input-user-name").on("input", function() {
|
||||
searchString = $(this).val().toLowerCase();
|
||||
grp_id = $(".UserListPopIn").data("group_id");
|
||||
if (searchString != "") {
|
||||
$(".UsersInGroupListContainer").css("min-height", $(".UsersInGroupListContainer").height())
|
||||
usersInGroup.forEach(function(u) {
|
||||
let isSearched = u.username.toLowerCase().includes(searchString)
|
||||
if ($(".UsernameBlock[data-id="+u.id+"]").length != 0) {
|
||||
if (!isSearched) {
|
||||
$(".UsernameBlock[data-id="+u.id+"]").remove();
|
||||
}
|
||||
} else if (isSearched) {
|
||||
getUserDisplay(u.username, u.id, grp_id)
|
||||
.prependTo(".UsersInGroupList");
|
||||
}
|
||||
})
|
||||
} else {
|
||||
$(".UsersInGroupListContainer").css("min-height", "")
|
||||
$(".UsersInGroupList").html("");
|
||||
let i = 0;
|
||||
while ($(".UsersInGroupList").outerHeight() <= maxOffsetUserCont && usersInGroup[i] != undefined){
|
||||
getUserDisplay(usersInGroup[i].username, usersInGroup[i].id, grp_id)
|
||||
.appendTo(".UsersInGroupList");
|
||||
i++;
|
||||
}
|
||||
}
|
||||
$(".AmountOfUsersShown strong:nth-child(1)").html($(".UsernameBlock").length)
|
||||
while ($(".UsersInGroupList").height() > maxOffsetUserCont) {
|
||||
$(".UsernameBlock").last().remove();
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,259 @@
|
||||
/*-------
|
||||
Data Get
|
||||
-------*/
|
||||
data = {};
|
||||
data["hours"] = $("#data").data("hours");
|
||||
data["days"] = $("#data").data("days");
|
||||
data["months"] = $("#data").data("months");
|
||||
data["years"] = $("#data").data("years");
|
||||
data["compare-years"] = $("#data").data("compare-years");
|
||||
data["month-stats"] = $("#data").data("month-stats");
|
||||
|
||||
data_unit = {
|
||||
"hours":"day",
|
||||
"days":"month",
|
||||
"months": "year",
|
||||
"years": "year"
|
||||
}
|
||||
|
||||
compareMode = false;
|
||||
|
||||
/*-------
|
||||
Creating graph
|
||||
-------*/
|
||||
var ctx = document.getElementById('stat-graph').getContext('2d');
|
||||
//Create the gradient under the curve
|
||||
function gradient(r, g, b) {
|
||||
let gradient = ctx.createLinearGradient(0,400, 0,0);
|
||||
gradient.addColorStop(0, 'rgba('+r+','+g+','+b+',0)');
|
||||
gradient.addColorStop(1, 'rgba('+r+','+g+','+b+',1)');
|
||||
return gradient;
|
||||
}
|
||||
|
||||
//Setup the graph
|
||||
Chart.defaults.global.elements.point.radius = 0.1;
|
||||
Chart.defaults.global.elements.point.hitRadius = 10
|
||||
Chart.defaults.global.defaultFontSize = 14;
|
||||
Chart.defaults.global.defaultFontColor = '#888';
|
||||
Chart.defaults.global.tooltips.intersect = false;
|
||||
Chart.defaults.global.legend.onClick = null;
|
||||
|
||||
var statGraph = new Chart(ctx, {
|
||||
type: 'line',
|
||||
maintainAspectRatio: false,
|
||||
});
|
||||
|
||||
//Line options
|
||||
var displayOptions = {
|
||||
backgroundColor: gradient(255, 119, 0),
|
||||
borderColor: 'rgba(255,119,0,1)',
|
||||
lineTension : 0.2
|
||||
}
|
||||
|
||||
function changeData(dataType, options = displayOptions) {
|
||||
if (!compareMode) {
|
||||
statGraph.data = {
|
||||
datasets: [{
|
||||
label: str_number_page_visited,
|
||||
data: getValues(data[dataType]),
|
||||
...options
|
||||
}]
|
||||
}
|
||||
statGraph.options = {
|
||||
scales: {
|
||||
xAxes: [{
|
||||
type: 'time',
|
||||
time: {
|
||||
tooltipFormat: 'll'
|
||||
},
|
||||
gridLines: {
|
||||
display: false
|
||||
}
|
||||
}],
|
||||
yAxes: [{
|
||||
ticks: {
|
||||
min: 0
|
||||
}
|
||||
}]
|
||||
},
|
||||
legend: {
|
||||
display:false
|
||||
},
|
||||
tooltips: {
|
||||
mode: 'index'
|
||||
},
|
||||
hover :
|
||||
{
|
||||
intersect : false,
|
||||
}
|
||||
}
|
||||
statGraph.options.scales.xAxes.forEach(axe => {
|
||||
axe.time.tooltipFormat = str_tooltip_format[dataType];
|
||||
axe.time.unit = data_unit[dataType];
|
||||
axe.time.displayFormats = str_unit_format;
|
||||
})
|
||||
statGraph.update();
|
||||
} else {
|
||||
statGraph.options.legend.display = true;
|
||||
statGraph.options.hover = {
|
||||
intersect : true
|
||||
}
|
||||
statGraph.options.tooltips = {
|
||||
mode : 'nearest'
|
||||
}
|
||||
if (dataType == "years") {
|
||||
statGraph.data = {
|
||||
datasets: getComparedYearDataset()
|
||||
}
|
||||
statGraph.options.scales = {
|
||||
xAxes: [{
|
||||
type: 'category',
|
||||
labels: str_months,
|
||||
gridLines: {
|
||||
display: false
|
||||
}
|
||||
}],
|
||||
yAxes: [{
|
||||
scaleLabel: {
|
||||
display: true,
|
||||
labelString: 'Page visited'
|
||||
},
|
||||
tick: {
|
||||
min: 0
|
||||
}
|
||||
}]
|
||||
}
|
||||
} else if (dataType == "months") {
|
||||
days = [];
|
||||
for (let i = 1; i<=31; i++) {
|
||||
days.push(i);
|
||||
}
|
||||
statGraph.data = {
|
||||
datasets: getMonthStatsDataset()
|
||||
}
|
||||
statGraph.options.scales = {
|
||||
xAxes: [{
|
||||
type: 'category',
|
||||
labels : days,
|
||||
gridLines: {
|
||||
display: false
|
||||
}
|
||||
}],
|
||||
yAxes: [{
|
||||
scaleLabel: {
|
||||
display: true,
|
||||
labelString: 'Page visited'
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
statGraph.update();
|
||||
}
|
||||
}
|
||||
|
||||
//Make Data readable by Chart.js
|
||||
function getValues(data) {
|
||||
values = [];
|
||||
Object.keys(data).forEach(function(key) {
|
||||
var newPoint = {
|
||||
x:new Date(key),
|
||||
y:data[key]
|
||||
}
|
||||
values.push(newPoint)
|
||||
});
|
||||
return values;
|
||||
}
|
||||
|
||||
function getComparedYearDataset() {
|
||||
colors = ["#ffa744", "#ff5252", "#896af3", "#2883c3", "#6ece5e"]
|
||||
values = {};
|
||||
dataset = [];
|
||||
|
||||
Object.keys(data["compare-years"]).forEach(function(key) {
|
||||
date = new Date(key)
|
||||
if (values[date.getFullYear()] == undefined) {
|
||||
values[date.getFullYear()] = [];
|
||||
}
|
||||
values[date.getFullYear()][parseInt(date.getMonth())] = data["compare-years"][key];
|
||||
});
|
||||
|
||||
Object.keys(values).forEach(function(key) {
|
||||
dataset.push({
|
||||
label : key,
|
||||
data : values[key],
|
||||
lineTension : 0.2,
|
||||
borderColor : colors[parseInt(key) % colors.length],
|
||||
backgroundColor: "rgba(0,0,0,0)"
|
||||
})
|
||||
});
|
||||
|
||||
return dataset;
|
||||
}
|
||||
|
||||
function getMonthStatsDataset() {
|
||||
colors = ["#ffa744", "#ff5252", "#896af3", "#2883c3", "#6ece5e"]
|
||||
dataset = [];
|
||||
colorIndice = 0;
|
||||
let date;
|
||||
|
||||
data["month-stats"]["month"].forEach(values => {
|
||||
let days_data = [];
|
||||
Object.keys(values).forEach(function(key) {
|
||||
date = new Date(key)
|
||||
days_data[parseInt(date.getUTCDate()) - 1] = values[key];
|
||||
});
|
||||
dataset.push({
|
||||
label : str_months[date.getMonth()]+" "+date.getFullYear(),
|
||||
data : days_data,
|
||||
lineTension : 0.2,
|
||||
borderColor : colors[colorIndice % colors.length],
|
||||
backgroundColor: "rgba(0,0,0,0)"
|
||||
})
|
||||
colorIndice++
|
||||
});
|
||||
|
||||
averageTab = [];
|
||||
for (let i = 0; i < 31; i++) {
|
||||
averageTab[i] = data["month-stats"]["avg"];
|
||||
}
|
||||
dataset.push({
|
||||
label : str_avg,
|
||||
data : averageTab,
|
||||
lineTension : 0.2,
|
||||
borderColor : colors[4],
|
||||
backgroundColor: "rgba(0,0,0,0)"
|
||||
})
|
||||
|
||||
return dataset;
|
||||
}
|
||||
|
||||
//Event listener
|
||||
$(".stat-data-selector label").on("click", function(){
|
||||
dataType = $(this).data("value");
|
||||
changeData(dataType);
|
||||
})
|
||||
|
||||
$(".stat-compare-mode input").on("change", function(){
|
||||
compareMode = $(this)[0].checked;
|
||||
|
||||
if (compareMode) {
|
||||
$("#hours-selector + label, #days-selector + label").addClass('unavailable');
|
||||
if ($("#hours-selector").prop('checked')||$("#days-selector").prop('checked')) {
|
||||
$("#years-selector").prop('checked', true);
|
||||
$("#hours-selector, #days-selector").prop('checked', false);
|
||||
changeData("years");
|
||||
} else {
|
||||
changeData($(".stat-data-selector input:checked + label").data("value"))
|
||||
}
|
||||
} else {
|
||||
$("#hours-selector + label, #days-selector + label").removeClass('unavailable');
|
||||
changeData($(".stat-data-selector input:checked + label").data("value"));
|
||||
}
|
||||
})
|
||||
|
||||
/*-------
|
||||
Initialize the page
|
||||
-------*/
|
||||
$(function() {
|
||||
changeData($(".stat-data-selector input:checked + label").data("value"));
|
||||
})
|
||||
@@ -1,4 +1,3 @@
|
||||
#menubar, .content .navigationBar,
|
||||
.navThumb, #addComment {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ jQuery(document).ready(function() {
|
||||
{/footer_script}
|
||||
|
||||
<div id="menubar">
|
||||
<div id="adminHome"><a href="{$U_ADMIN}"><i class="icon-television"></i> {'Dashboard'|@translate}</a></div>
|
||||
<div id="adminHome"><a href="{$U_ADMIN}" class="admin-main"><i class="icon-television"></i> {'Dashboard'|@translate}</a></div>
|
||||
|
||||
<dl>
|
||||
<dt><i class="icon-picture"> </i><span>{'Photos'|@translate} </span><i class="icon-down-open open-menu"></i></dt>
|
||||
@@ -56,7 +56,7 @@ jQuery(document).ready(function() {
|
||||
<li><a href="{$U_RATING}"><i class="icon-star"></i>{'Rating'|@translate}</a></li>
|
||||
<li><a href="{$U_TAGS}"><i class="icon-tags"></i>{'Tags'|@translate}</a></li>
|
||||
<li><a href="{$U_RECENT_SET}"><i class="icon-clock"></i>{'Recent photos'|@translate}</a></li>
|
||||
<li><a href="{$U_BATCH}"><i class="icon-pencil"></i>{'Batch Manager'|@translate}</a></li>
|
||||
<li><a href="{$U_BATCH}"><i class="icon-th"></i>{'Batch Manager'|@translate}</a></li>
|
||||
{if $NB_PHOTOS_IN_CADDIE > 0}
|
||||
<li><a href="{$U_CADDIE}"><i class="icon-flag"></i>{'Caddie'|@translate}<span class="adminMenubarCounter">{$NB_PHOTOS_IN_CADDIE}</span></a></li>
|
||||
{/if}
|
||||
@@ -71,6 +71,7 @@ jQuery(document).ready(function() {
|
||||
<dd>
|
||||
<ul>
|
||||
<li><a href="{$U_CATEGORIES}"><i class="icon-folder-open"></i>{'Manage'|@translate}</a></li>
|
||||
<li><a href="{$U_CAT_MOVE}"><i class="icon-move"></i>{'Move'|@translate}</a></li>
|
||||
<li><a href="{$U_CAT_OPTIONS}"><i class="icon-pencil"></i>{'Properties'|@translate}</a></li>
|
||||
</ul>
|
||||
</dd>
|
||||
@@ -86,20 +87,7 @@ jQuery(document).ready(function() {
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><i class="icon-puzzle"> </i><span>{'Plugins'|@translate} </span><i class="icon-down-open open-menu"></i></dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li><a href="{$U_PLUGINS}"><i class="icon-equalizer"></i>{'Manage'|@translate}</a></li>
|
||||
</ul>
|
||||
{if !empty($plugin_menu_items)}
|
||||
<div id="pluginsMenuSeparator"></div>
|
||||
<ul class="scroll">
|
||||
{foreach from=$plugin_menu_items item=menu_item}
|
||||
<li><a href="{$menu_item.URL}">{$menu_item.NAME}</a></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
</dd>
|
||||
<dt><a href="{$U_PLUGINS}" class="admin-main"><i class="icon-puzzle"> </i><span>{'Plugins'|@translate} </span></a></dt>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><i class="icon-wrench"> </i><span>{'Tools'|@translate} </span><i class="icon-down-open open-menu"></i></dt>
|
||||
@@ -143,9 +131,12 @@ jQuery(document).ready(function() {
|
||||
{$TABSHEET}
|
||||
{/if}
|
||||
{if isset($U_HELP)}
|
||||
{combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'}
|
||||
{include file='include/colorbox.inc.tpl'}
|
||||
{footer_script}
|
||||
jQuery('.help-popin').colorbox({ width:"500px" });
|
||||
{/footer_script}
|
||||
<ul class="HelpActions">
|
||||
<li><a href="{$U_HELP}" onclick="popuphelp(this.href); return false;" title="{'Help'|@translate}"><img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/help.png" alt="(?)"></a></li>
|
||||
<li><a href="{$U_HELP}&output=content_only" title="{'Help'|@translate}" class="help-popin"><span class="icon-help-circled"></span></a></li>
|
||||
</ul>
|
||||
{/if}
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ span.errors {
|
||||
<form action="{$F_ACTION}" method="post" id="categoryNotify">
|
||||
|
||||
<fieldset id="emailCatInfo">
|
||||
<legend>{'Send mail to users'|@translate}</legend>
|
||||
<legend><span class="icon-mail-1 icon-green"></span>{'Send mail to users'|@translate}</legend>
|
||||
|
||||
<p>
|
||||
<strong>{'Recipients'|@translate}</strong>
|
||||
|
||||
@@ -23,7 +23,8 @@ var lang = {
|
||||
Cancel: '{'Cancel'|translate|escape:'javascript'}',
|
||||
deleteProgressMessage: "{'Deletion in progress'|translate|escape:'javascript'}",
|
||||
syncProgressMessage: "{'Synchronization in progress'|translate|escape:'javascript'}",
|
||||
AreYouSure: "{'Are you sure?'|translate|escape:'javascript'}"
|
||||
AreYouSure: "{'Are you sure?'|translate|escape:'javascript'}",
|
||||
generateMsg: "{'Generate multiple size images'|@translate}"
|
||||
};
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
@@ -132,6 +133,8 @@ $(document).ready(function() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$("[id^=action_]").hide();
|
||||
|
||||
$("select[name=selectAction]").change(function () {
|
||||
@@ -150,6 +153,11 @@ $(document).ready(function() {
|
||||
else {
|
||||
$("#applyActionBlock").hide();
|
||||
}
|
||||
if ($(this).val() == "delete" || $(this).val() == "delete_derivatives") {
|
||||
$("#confirmDel").css("visibility", "visible");
|
||||
} else {
|
||||
$("#confirmDel").css("visibility", "hidden");
|
||||
}
|
||||
});
|
||||
|
||||
$(".wrap1 label").click(function (event) {
|
||||
@@ -228,14 +236,23 @@ $(document).ready(function() {
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
jQuery("input[name=confirm_deletion]").change(function() {
|
||||
jQuery("#confirmDel span.errors").css("visibility", "hidden");
|
||||
});
|
||||
|
||||
jQuery('#applyAction').click(function() {
|
||||
var action = jQuery('[name="selectAction"]').val();
|
||||
if (action == 'delete_derivatives') {
|
||||
var d_count = $('#action_delete_derivatives input[type=checkbox]').filter(':checked').length
|
||||
, e_count = $('input[name="setSelected"]').is(':checked') ? nb_thumbs_set : $('.thumbnails input[type=checkbox]').filter(':checked').length;
|
||||
if (d_count*e_count > 500)
|
||||
return confirm(lang.AreYouSure);
|
||||
}
|
||||
let d_count = $('#confirmDel input[type=checkbox]').filter(':checked').length
|
||||
let e_count = $('input[name="setSelected"]').is(':checked') ? nb_thumbs_set : $('.thumbnails input[type=checkbox]').filter(':checked').length;
|
||||
if (!jQuery("#confirmDel input[name=confirm_deletion]").is(':checked')) {
|
||||
jQuery("#confirmDel span.errors").css("visibility", "visible");
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (action != 'generate_derivatives'
|
||||
|| derivatives.finished() )
|
||||
@@ -263,9 +280,11 @@ $(document).ready(function() {
|
||||
|
||||
jQuery('#applyActionBlock').hide();
|
||||
jQuery('select[name="selectAction"]').hide();
|
||||
jQuery('.permitActionListButton div').addClass('hidden');
|
||||
jQuery('#regenerationMsg').show();
|
||||
|
||||
progress();
|
||||
progress_start();
|
||||
progress();
|
||||
getDerivativeUrls();
|
||||
return false;
|
||||
});
|
||||
@@ -321,6 +340,10 @@ var sliders = {
|
||||
|
||||
{/footer_script}
|
||||
|
||||
{combine_script id='jquery.confirm' load='footer' require='jquery' path='themes/default/js/plugins/jquery-confirm.min.js'}
|
||||
{combine_css path="themes/default/js/plugins/jquery-confirm.min.css"}
|
||||
{combine_css path="admin/themes/default/fontello/css/animation.css"}
|
||||
|
||||
<div id="batchManagerGlobal">
|
||||
|
||||
<h2>{'Batch Manager'|@translate}</h2>
|
||||
@@ -330,200 +353,218 @@ var sliders = {
|
||||
<input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
|
||||
|
||||
<fieldset>
|
||||
<legend><i class="icon-filter"></i>{'Filter'|@translate}</legend>
|
||||
<legend><span class='icon-filter icon-green'></span>{'Filter'|@translate}</legend>
|
||||
|
||||
<ul id="filterList">
|
||||
<li id="filter_prefilter" {if !isset($filter.prefilter)}style="display:none"{/if}>
|
||||
<a href="#" class="removeFilter" title="{'remove this filter'|@translate}"><span>[x]</span></a>
|
||||
<input type="checkbox" name="filter_prefilter_use" class="useFilterCheckbox" {if isset($filter.prefilter)}checked="checked"{/if}>
|
||||
{'Predefined filter'|@translate}
|
||||
<select name="filter_prefilter">
|
||||
{foreach from=$prefilters item=prefilter}
|
||||
{assign 'optionClass' ''}
|
||||
{if $prefilter.ID eq 'no_album'}{assign 'optionClass' 'icon-heart-broken'}{/if}
|
||||
{if $prefilter.ID eq 'caddie'}{assign 'optionClass' 'icon-flag'}{/if}
|
||||
<div class="filterBlock">
|
||||
<ul id="filterList">
|
||||
<li id="filter_prefilter" {if !isset($filter.prefilter)}style="display:none"{/if}>
|
||||
<input type="checkbox" name="filter_prefilter_use" class="useFilterCheckbox" {if isset($filter.prefilter)}checked="checked"{/if}>
|
||||
<p>{'Predefined filter'|@translate}</p>
|
||||
<a href="#" class="removeFilter" title="{'remove this filter'|@translate}"><span>[x]</span></a>
|
||||
<select name="filter_prefilter">
|
||||
{foreach from=$prefilters item=prefilter}
|
||||
{assign 'optionClass' ''}
|
||||
{if $prefilter.ID eq 'no_album'}{assign 'optionClass' 'icon-heart-broken'}{/if}
|
||||
{if $prefilter.ID eq 'caddie'}{assign 'optionClass' 'icon-flag'}{/if}
|
||||
|
||||
<option value="{$prefilter.ID}" class="{$optionClass}" {if isset($filter.prefilter) && $filter.prefilter eq $prefilter.ID}selected="selected"{/if}>{$prefilter.NAME}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
<a id="empty_caddie" href="admin.php?page=batch_manager&action=empty_caddie" style="{if !isset($filter.prefilter) or $filter.prefilter ne 'caddie'}display:none{/if}">{'Empty caddie'|translate}</a>
|
||||
{if $NB_ORPHANS > 0}
|
||||
<a id="delete_orphans" href="#" style="{if !isset($filter.prefilter) or $filter.prefilter ne 'no_album'}display:none{/if}" class="icon-trash">{'Delete %d orphan photos'|translate:$NB_ORPHANS}</a>
|
||||
{/if}
|
||||
{if $NB_NO_MD5SUM > 0}
|
||||
<a id="sync_md5sum" href="#" style="{if !isset($filter.prefilter) or $filter.prefilter ne 'no_sync_md5sum'}display:none{/if}" class="icon-arrows-cw">{'Compute %d missing checksums'|translate:{$NB_NO_MD5SUM}}</a>
|
||||
{/if}
|
||||
<option value="{$prefilter.ID}" class="{$optionClass}" {if isset($filter.prefilter) && $filter.prefilter eq $prefilter.ID}selected="selected"{/if}>{$prefilter.NAME}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
<a id="empty_caddie" href="admin.php?page=batch_manager&action=empty_caddie" style="{if !isset($filter.prefilter) or $filter.prefilter ne 'caddie'}display:none{/if}">{'Empty caddie'|translate}</a>
|
||||
{if $NB_ORPHANS > 0}
|
||||
<a id="delete_orphans" href="#" style="{if !isset($filter.prefilter) or $filter.prefilter ne 'no_album'}display:none{/if}" class="icon-trash">{'Delete %d orphan photos'|translate:$NB_ORPHANS}</a>
|
||||
{/if}
|
||||
{if $NB_NO_MD5SUM > 0}
|
||||
<a id="sync_md5sum" href="#" style="{if !isset($filter.prefilter) or $filter.prefilter ne 'no_sync_md5sum'}display:none{/if}" class="icon-arrows-cw">{'Compute %d missing checksums'|translate:{$NB_NO_MD5SUM}}</a>
|
||||
{/if}
|
||||
|
||||
<span id="add_md5sum" style="display:none">
|
||||
<img class="loading" src="themes/default/images/ajax-loader-small.gif">
|
||||
<span id="md5sum_added">0</span>% -
|
||||
<span id="md5sum_to_add" data-origin="{$NB_NO_MD5SUM}">{$NB_NO_MD5SUM}</span>
|
||||
{'checksums to add'|translate}
|
||||
</span>
|
||||
<span id="add_md5sum" style="display:none">
|
||||
<img class="loading" src="themes/default/images/ajax-loader-small.gif">
|
||||
<span id="md5sum_added">0</span>% -
|
||||
<span id="md5sum_to_add" data-origin="{$NB_NO_MD5SUM}">{$NB_NO_MD5SUM}</span>
|
||||
{'checksums to add'|translate}
|
||||
</span>
|
||||
|
||||
<span id="add_md5sum_error" class="errors" style="display:none"></span>
|
||||
<span id="add_md5sum_error" class="errors" style="display:none"></span>
|
||||
|
||||
<span id="orphans_deletion" style="display:none">
|
||||
<img class="loading" src="themes/default/images/ajax-loader-small.gif">
|
||||
<span id="orphans_deleted">0</span>% -
|
||||
<span id="orphans_to_delete" data-origin="{$NB_ORPHANS}">{$NB_ORPHANS}</span>
|
||||
{'orphans to delete'|translate}
|
||||
</span>
|
||||
<span id="orphans_deletion" style="display:none">
|
||||
<img class="loading" src="themes/default/images/ajax-loader-small.gif">
|
||||
<span id="orphans_deleted">0</span>% -
|
||||
<span id="orphans_to_delete" data-origin="{$NB_ORPHANS}">{$NB_ORPHANS}</span>
|
||||
{'orphans to delete'|translate}
|
||||
</span>
|
||||
|
||||
<span id="orphans_deletion_error" class="errors" style="display:none"></span>
|
||||
<span id="orphans_deletion_error" class="errors" style="display:none"></span>
|
||||
|
||||
<span id="duplicates_options" style="{if !isset($filter.prefilter) or $filter.prefilter ne 'duplicates'}display:none{/if}">
|
||||
{'based on'|translate}
|
||||
<label class="font-checkbox"><span class="icon-check"></span><input type="checkbox" name="filter_duplicates_filename" {if isset($filter.duplicates_filename)}checked="checked"{/if}> {'file name'|translate}</label>
|
||||
<label class="font-checkbox" title="md5sum"><span class="icon-check"></span><input type="checkbox" name="filter_duplicates_checksum" {if isset($filter.duplicates_checksum)}checked="checked"{/if}> {'checksum'|translate}</label>
|
||||
<label class="font-checkbox"><span class="icon-check"></span><input type="checkbox" name="filter_duplicates_date" {if isset($filter.duplicates_date) or (isset($filter.prefilter) and $filter.prefilter ne 'duplicates')}checked="checked"{/if}> {'date & time'|translate}</label>
|
||||
<label class="font-checkbox"><span class="icon-check"></span><input type="checkbox" name="filter_duplicates_dimensions" {if isset($filter.duplicates_dimensions)}checked="checked"{/if}> {'width & height'|translate}</label>
|
||||
</span>
|
||||
</li>
|
||||
<span id="duplicates_options" style="{if !isset($filter.prefilter) or $filter.prefilter ne 'duplicates'}display:none{/if}">
|
||||
{'based on'|translate}
|
||||
<label class="font-checkbox"><span class="icon-check"></span><input type="checkbox" name="filter_duplicates_filename" {if isset($filter.duplicates_filename)}checked="checked"{/if}> {'file name'|translate}</label>
|
||||
<label class="font-checkbox" title="md5sum"><span class="icon-check"></span><input type="checkbox" name="filter_duplicates_checksum" {if isset($filter.duplicates_checksum)}checked="checked"{/if}> {'checksum'|translate}</label>
|
||||
<label class="font-checkbox"><span class="icon-check"></span><input type="checkbox" name="filter_duplicates_date" {if isset($filter.duplicates_date) or (isset($filter.prefilter) and $filter.prefilter ne 'duplicates')}checked="checked"{/if}> {'date & time'|translate}</label>
|
||||
<label class="font-checkbox"><span class="icon-check"></span><input type="checkbox" name="filter_duplicates_dimensions" {if isset($filter.duplicates_dimensions)}checked="checked"{/if}> {'width & height'|translate}</label>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
<li id="filter_category" {if !isset($filter.category)}style="display:none"{/if}>
|
||||
<a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a>
|
||||
<input type="checkbox" name="filter_category_use" class="useFilterCheckbox" {if isset($filter.category)}checked="checked"{/if}>
|
||||
{'Album'|@translate}
|
||||
<select data-selectize="categories" data-value="{$filter_category_selected|@json_encode|escape:html}"
|
||||
data-default="first" name="filter_category" style="width:600px"></select>
|
||||
<label><input type="checkbox" name="filter_category_recursive" {if isset($filter.category_recursive)}checked="checked"{/if}> {'include child albums'|@translate}</label>
|
||||
</li>
|
||||
<li id="filter_category" {if !isset($filter.category)}style="display:none"{/if}>
|
||||
<input type="checkbox" name="filter_category_use" class="useFilterCheckbox" {if isset($filter.category)}checked="checked"{/if}>
|
||||
<p>{'Album'|@translate}</p>
|
||||
<a href="#" class="removeFilter" title="{'remove this filter'|translate}"><span>[x]</span></a>
|
||||
<select data-selectize="categories" data-value="{$filter_category_selected|@json_encode|escape:html}"
|
||||
data-default="first" name="filter_category"></select>
|
||||
<label class="font-checkbox"><span class="icon-check"></span><input type="checkbox" name="filter_category_recursive" {if isset($filter.category_recursive)}checked="checked"{/if}> {'include child albums'|@translate}</label>
|
||||
</li>
|
||||
|
||||
<li id="filter_tags" {if !isset($filter.tags)}style="display:none"{/if}>
|
||||
<a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a>
|
||||
<input type="checkbox" name="filter_tags_use" class="useFilterCheckbox" {if isset($filter.tags)}checked="checked"{/if}>
|
||||
{'Tags'|@translate}
|
||||
<select data-selectize="tags" data-value="{$filter_tags|@json_encode|escape:html}"
|
||||
placeholder="{'Type in a search term'|translate}"
|
||||
name="filter_tags[]" multiple style="width:600px;"></select>
|
||||
<label><span><input type="radio" name="tag_mode" value="AND" {if !isset($filter.tag_mode) or $filter.tag_mode eq 'AND'}checked="checked"{/if}> {'All tags'|@translate}</span></label>
|
||||
<label><span><input type="radio" name="tag_mode" value="OR" {if isset($filter.tag_mode) and $filter.tag_mode eq 'OR'}checked="checked"{/if}> {'Any tag'|@translate}</span></label>
|
||||
</li>
|
||||
<li id="filter_tags" {if !isset($filter.tags)}style="display:none"{/if}>
|
||||
<input type="checkbox" name="filter_tags_use" class="useFilterCheckbox" {if isset($filter.tags)}checked="checked"{/if}>
|
||||
<p>{'Tags'|@translate}</p>
|
||||
<a href="#" class="removeFilter" title="{'remove this filter'|translate}"><span>[x]</span></a>
|
||||
<select data-selectize="tags" data-value="{$filter_tags|@json_encode|escape:html}"
|
||||
placeholder="{'Type in a search term'|translate}"
|
||||
name="filter_tags[]" multiple style="width:600px;"></select>
|
||||
<label class="font-checkbox"><span class="icon-circle-empty"></span><span><input type="radio" name="tag_mode" value="AND" {if !isset($filter.tag_mode) or $filter.tag_mode eq 'AND'}checked="checked"{/if}> {'All tags'|@translate}</span></label>
|
||||
<label class="font-checkbox"><span class="icon-circle-empty"></span><span><input type="radio" name="tag_mode" value="OR" {if isset($filter.tag_mode) and $filter.tag_mode eq 'OR'}checked="checked"{/if}> {'Any tag'|@translate}</span></label>
|
||||
</li>
|
||||
|
||||
<li id="filter_level" {if !isset($filter.level)}style="display:none"{/if}>
|
||||
<a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a>
|
||||
<input type="checkbox" name="filter_level_use" class="useFilterCheckbox" {if isset($filter.level)}checked="checked"{/if}>
|
||||
{'Privacy level'|@translate}
|
||||
<select name="filter_level" size="1">
|
||||
{html_options options=$filter_level_options selected=$filter_level_options_selected}
|
||||
</select>
|
||||
<label><input type="checkbox" name="filter_level_include_lower" {if isset($filter.level_include_lower)}checked="checked"{/if}> {'include photos with lower privacy level'|@translate}</label>
|
||||
</li>
|
||||
<li id="filter_level" {if !isset($filter.level)}style="display:none"{/if}>
|
||||
<input type="checkbox" name="filter_level_use" class="useFilterCheckbox" {if isset($filter.level)}checked="checked"{/if}>
|
||||
<p>{'Privacy level'|@translate}</p>
|
||||
<a href="#" class="removeFilter" title="{'remove this filter'|translate}"><span>[x]</span></a>
|
||||
<select name="filter_level" size="1">
|
||||
{html_options options=$filter_level_options selected=$filter_level_options_selected}
|
||||
</select>
|
||||
<label class="font-checkbox"><span class="icon-check"></span><input type="checkbox" name="filter_level_include_lower" {if isset($filter.level_include_lower)}checked="checked"{/if}> {'include photos with lower privacy level'|@translate}</label>
|
||||
</li>
|
||||
|
||||
<li id="filter_dimension" {if !isset($filter.dimension)}style="display:none"{/if}>
|
||||
<a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a>
|
||||
<input type="checkbox" name="filter_dimension_use" class="useFilterCheckbox" {if isset($filter.dimension)}checked="checked"{/if}>
|
||||
{'Dimensions'|translate}
|
||||
<li id="filter_dimension" {if !isset($filter.dimension)}style="display:none"{/if}>
|
||||
<input type="checkbox" name="filter_dimension_use" class="useFilterCheckbox" {if isset($filter.dimension)}checked="checked"{/if}>
|
||||
<p>{'Dimensions'|translate}</p>
|
||||
<a href="#" class="removeFilter" title="{'remove this filter'|translate}"><span>[x]</span></a>
|
||||
<blockquote>
|
||||
<div data-slider="widths" class="dimensionSlidersBlocks">
|
||||
<div class="dimensionSlidersTitleButtons">
|
||||
<div>
|
||||
{'Width'|translate} <span class="slider-info">{'between %d and %d pixels'|translate:$dimensions.selected.min_width:$dimensions.selected.max_width}</span>
|
||||
</div>
|
||||
<a class="slider-choice dimension-cancel" data-min="{$dimensions.bounds.min_width}" data-max="{$dimensions.bounds.max_width}">{'Reset'|translate}</a>
|
||||
</div>
|
||||
<div class="slider-slider"></div>
|
||||
|
||||
<blockquote>
|
||||
<div data-slider="widths">
|
||||
{'Width'|translate} <span class="slider-info">{'between %d and %d pixels'|translate:$dimensions.selected.min_width:$dimensions.selected.max_width}</span>
|
||||
| <a class="slider-choice" data-min="{$dimensions.bounds.min_width}" data-max="{$dimensions.bounds.max_width}">{'Reset'|translate}</a>
|
||||
<div class="slider-slider"></div>
|
||||
<input type="hidden" data-input="min" name="filter_dimension_min_width" value="{$dimensions.selected.min_width}">
|
||||
<input type="hidden" data-input="max" name="filter_dimension_max_width" value="{$dimensions.selected.max_width}">
|
||||
</div>
|
||||
|
||||
<input type="hidden" data-input="min" name="filter_dimension_min_width" value="{$dimensions.selected.min_width}">
|
||||
<input type="hidden" data-input="max" name="filter_dimension_max_width" value="{$dimensions.selected.max_width}">
|
||||
<div data-slider="heights" class="dimensionSlidersBlocks">
|
||||
<div class="dimensionSlidersTitleButtons">
|
||||
<div>
|
||||
{'Height'|translate} <span class="slider-info">{'between %d and %d pixels'|translate:$dimensions.selected.min_height:$dimensions.selected.max_height}</span>
|
||||
</div>
|
||||
<a class="slider-choice dimension-cancel" data-min="{$dimensions.bounds.min_height}" data-max="{$dimensions.bounds.max_height}">{'Reset'|translate}</a>
|
||||
</div>
|
||||
<div class="slider-slider"></div>
|
||||
|
||||
<input type="hidden" data-input="min" name="filter_dimension_min_height" value="{$dimensions.selected.min_height}">
|
||||
<input type="hidden" data-input="max" name="filter_dimension_max_height" value="{$dimensions.selected.max_height}">
|
||||
</div>
|
||||
|
||||
<div data-slider="ratios" class="dimensionSlidersBlocks">
|
||||
<div style="margin-bottom: 11px;">
|
||||
<span>{'Ratio'|translate} ({'Width'|@translate}/{'Height'|@translate})</span>
|
||||
<span class="slider-info">{'between %.2f and %.2f'|translate:$dimensions.selected.min_ratio:$dimensions.selected.max_ratio}</span>
|
||||
</div>
|
||||
<div class="dimensionSlidersRatioButtons">
|
||||
<div>
|
||||
{if isset($dimensions.ratio_portrait)} <a class="slider-choice" data-min="{$dimensions.ratio_portrait.min}" data-max="{$dimensions.ratio_portrait.max}">{'Portrait'|translate}</a>{/if}
|
||||
{if isset($dimensions.ratio_square)} <a class="slider-choice" data-min="{$dimensions.ratio_square.min}" data-max="
|
||||
{$dimensions.ratio_square.max}">{'square'|translate}</a>{/if}
|
||||
{if isset($dimensions.ratio_landscape)} <a class="slider-choice" data-min="{$dimensions.ratio_landscape.min}" data-max="{$dimensions.ratio_landscape.max}">{'Landscape'|translate}</a>{/if}
|
||||
{if isset($dimensions.ratio_panorama)} <a class="slider-choice" data-min="{$dimensions.ratio_panorama.min}" data-max="{$dimensions.ratio_panorama.max}">{'Panorama'|translate}</a>{/if}
|
||||
</div>
|
||||
<div>
|
||||
<a class="slider-choice dimension-cancel" data-min="{$dimensions.bounds.min_ratio}" data-max="{$dimensions.bounds.max_ratio}">{'Reset'|translate}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="slider-slider"></div>
|
||||
|
||||
<input type="hidden" data-input="min" name="filter_dimension_min_ratio" value="{$dimensions.selected.min_ratio}">
|
||||
<input type="hidden" data-input="max" name="filter_dimension_max_ratio" value="{$dimensions.selected.max_ratio}">
|
||||
</div>
|
||||
</blockquote>
|
||||
</li>
|
||||
|
||||
<li id="filter_search"{if !isset($filter.search)} style="display:none"{/if}>
|
||||
<input type="checkbox" name="filter_search_use" class="useFilterCheckbox"{if isset($filter.search)} checked="checked"{/if}>
|
||||
<p>{'Search'|@translate}</p>
|
||||
<a href="#" class="removeFilter" title="{'remove this filter'|translate}"><span>[x]</span></a>
|
||||
<input name="q" size=40 value="{$filter.search.q|stripslashes|htmlspecialchars}">
|
||||
<a href="admin/popuphelp.php?page=quick_search" onclick="popuphelp(this.href);return false;" title="{'Help'|@translate}"><span class="icon-help-circled">{'Search tips'|translate}</span></a>
|
||||
{combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'}
|
||||
{if (isset($no_search_results))}
|
||||
<div>{'No results for'|@translate} :
|
||||
<em><strong>
|
||||
{foreach $no_search_results as $res}
|
||||
{if !$res@first} — {/if}
|
||||
{$res}
|
||||
{/foreach}
|
||||
</strong></em>
|
||||
</div>
|
||||
{/if}
|
||||
</li>
|
||||
|
||||
<li id="filter_filesize" {if !isset($filter.filesize)}style="display:none"{/if}>
|
||||
<input type="checkbox" name="filter_filesize_use" class="useFilterCheckbox" {if isset($filter.filesize)}checked="checked"{/if}>
|
||||
<p>{'Filesize'|translate}</p>
|
||||
<a href="#" class="removeFilter" title="{'remove this filter'|translate}"><span>[x]</span></a>
|
||||
<blockquote>
|
||||
<div data-slider="filesizes">
|
||||
<span class="slider-info">{'between %s and %s MB'|translate:$filesize.selected.min:$filesize.selected.max}</span>
|
||||
<a class="slider-choice dimension-cancel" data-min="{$filesize.bounds.min}" data-max="{$filesize.bounds.max}">{'Reset'|translate}</a>
|
||||
<div class="slider-slider"></div>
|
||||
|
||||
<input type="hidden" data-input="min" name="filter_filesize_min" value="{$filesize.selected.min}">
|
||||
<input type="hidden" data-input="max" name="filter_filesize_max" value="{$filesize.selected.max}">
|
||||
</div>
|
||||
</blockquote>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class='noFilter'>{'No filter, add one'|@translate}</div>
|
||||
|
||||
<div class="filterActions">
|
||||
<div id="addFilter">
|
||||
<div class="addFilter-button icon-plus" onclick="$('.addFilter-dropdown').slideToggle()">{'Add a filter'|@translate}</div>
|
||||
<div class="addFilter-dropdown">
|
||||
<a data-value="filter_prefilter" {if isset($filter.prefilter)}class="disabled"{/if}>{'Predefined filter'|@translate}</a>
|
||||
<a data-value="filter_category" {if isset($filter.category)}class="disabled"{/if}>{'Album'|@translate}</a>
|
||||
<a data-value="filter_tags" {if isset($filter.tags)}class="disabled"{/if}>{'Tags'|@translate}</a>
|
||||
<a data-value="filter_level" {if isset($filter.level)}class="disabled"{/if}>{'Privacy level'|@translate}</a>
|
||||
<a data-value="filter_dimension" {if isset($filter.dimension)}class="disabled"{/if}>{'Dimensions'|@translate}</a>
|
||||
<a data-value="filter_filesize" {if isset($filter.filesize)}class="disabled"{/if}>{'Filesize'|@translate}</a>
|
||||
<a data-value="filter_search"{if isset($filter.search)} class="disabled"{/if}>{'Search'|@translate}</a>
|
||||
</div>
|
||||
<a id="removeFilters" class="icon-cancel" style="display: none;">{'Remove all filters'|@translate}</a>
|
||||
</div>
|
||||
|
||||
<div data-slider="heights">
|
||||
{'Height'|translate} <span class="slider-info">{'between %d and %d pixels'|translate:$dimensions.selected.min_height:$dimensions.selected.max_height}</span>
|
||||
| <a class="slider-choice" data-min="{$dimensions.bounds.min_height}" data-max="{$dimensions.bounds.max_height}">{'Reset'|translate}</a>
|
||||
<div class="slider-slider"></div>
|
||||
|
||||
<input type="hidden" data-input="min" name="filter_dimension_min_height" value="{$dimensions.selected.min_height}">
|
||||
<input type="hidden" data-input="max" name="filter_dimension_max_height" value="{$dimensions.selected.max_height}">
|
||||
</div>
|
||||
|
||||
<div data-slider="ratios">
|
||||
{'Ratio'|translate} ({'Width'|@translate}/{'Height'|@translate}) <span class="slider-info">{'between %.2f and %.2f'|translate:$dimensions.selected.min_ratio:$dimensions.selected.max_ratio}</span>
|
||||
{if isset($dimensions.ratio_portrait)}| <a class="slider-choice" data-min="{$dimensions.ratio_portrait.min}" data-max="{$dimensions.ratio_portrait.max}">{'Portrait'|translate}</a>{/if}
|
||||
{if isset($dimensions.ratio_square)}| <a class="slider-choice" data-min="{$dimensions.ratio_square.min}" data-max="{$dimensions.ratio_square.max}">{'square'|translate}</a>{/if}
|
||||
{if isset($dimensions.ratio_landscape)}| <a class="slider-choice" data-min="{$dimensions.ratio_landscape.min}" data-max="{$dimensions.ratio_landscape.max}">{'Landscape'|translate}</a>{/if}
|
||||
{if isset($dimensions.ratio_panorama)}| <a class="slider-choice" data-min="{$dimensions.ratio_panorama.min}" data-max="{$dimensions.ratio_panorama.max}">{'Panorama'|translate}</a>{/if}
|
||||
| <a class="slider-choice" data-min="{$dimensions.bounds.min_ratio}" data-max="{$dimensions.bounds.max_ratio}">{'Reset'|translate}</a>
|
||||
<div class="slider-slider"></div>
|
||||
|
||||
<input type="hidden" data-input="min" name="filter_dimension_min_ratio" value="{$dimensions.selected.min_ratio}">
|
||||
<input type="hidden" data-input="max" name="filter_dimension_max_ratio" value="{$dimensions.selected.max_ratio}">
|
||||
</div>
|
||||
</blockquote>
|
||||
</li>
|
||||
|
||||
<li id="filter_search"{if !isset($filter.search)} style="display:none"{/if}>
|
||||
<a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a>
|
||||
<input type="checkbox" name="filter_search_use" class="useFilterCheckbox"{if isset($filter.search)} checked="checked"{/if}>
|
||||
{'Search'|@translate}
|
||||
<input name="q" size=40 value="{$filter.search.q|stripslashes|htmlspecialchars}">
|
||||
{combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'}
|
||||
<a href="admin/popuphelp.php?page=quick_search" onclick="popuphelp(this.href);return false;" title="{'Help'|@translate}"><span class="icon-help-circled"></span></a>
|
||||
{if (isset($no_search_results))}
|
||||
<div>{'No results for'|@translate} :
|
||||
<em><strong>
|
||||
{foreach $no_search_results as $res}
|
||||
{if !$res@first} — {/if}
|
||||
{$res}
|
||||
{/foreach}
|
||||
</strong></em>
|
||||
</div>
|
||||
{/if}
|
||||
</li>
|
||||
|
||||
<li id="filter_filesize" {if !isset($filter.filesize)}style="display:none"{/if}>
|
||||
<a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a>
|
||||
<input type="checkbox" name="filter_filesize_use" class="useFilterCheckbox" {if isset($filter.filesize)}checked="checked"{/if}>
|
||||
{'Filesize'|translate}
|
||||
|
||||
<blockquote>
|
||||
<div data-slider="filesizes">
|
||||
<span class="slider-info">{'between %s and %s MB'|translate:$filesize.selected.min:$filesize.selected.max}</span>
|
||||
| <a class="slider-choice" data-min="{$filesize.bounds.min}" data-max="{$filesize.bounds.max}">{'Reset'|translate}</a>
|
||||
<div class="slider-slider"></div>
|
||||
|
||||
<input type="hidden" data-input="min" name="filter_filesize_min" value="{$filesize.selected.min}">
|
||||
<input type="hidden" data-input="max" name="filter_filesize_max" value="{$filesize.selected.max}">
|
||||
</div>
|
||||
</blockquote>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p class="actionButtons">
|
||||
<select id="addFilter">
|
||||
<option value="-1">{'Add a filter'|@translate}</option>
|
||||
<option disabled="disabled">------------------</option>
|
||||
<option value="filter_prefilter" {if isset($filter.prefilter)}disabled="disabled"{/if}>{'Predefined filter'|@translate}</option>
|
||||
<option value="filter_category" {if isset($filter.category)}disabled="disabled"{/if}>{'Album'|@translate}</option>
|
||||
<option value="filter_tags" {if isset($filter.tags)}disabled="disabled"{/if}>{'Tags'|@translate}</option>
|
||||
<option value="filter_level" {if isset($filter.level)}disabled="disabled"{/if}>{'Privacy level'|@translate}</option>
|
||||
<option value="filter_dimension" {if isset($filter.dimension)}disabled="disabled"{/if}>{'Dimensions'|@translate}</option>
|
||||
<option value="filter_filesize" {if isset($filter.filesize)}disabled="disabled"{/if}>{'Filesize'|@translate}</option>
|
||||
<option value="filter_search"{if isset($filter.search)} disabled="disabled"{/if}>{'Search'|@translate}</option>
|
||||
</select>
|
||||
<a id="removeFilters" class="icon-cancel">{'Remove all filters'|@translate}</a>
|
||||
</p>
|
||||
|
||||
<p class="actionButtons" id="applyFilterBlock">
|
||||
<button id="applyFilter" name="submitFilter" type="submit" class="buttonLike">
|
||||
<i class="icon-arrows-cw"></i> {'Refresh photo set'|@translate}
|
||||
</button>
|
||||
</p>
|
||||
<button id="applyFilter" name="submitFilter" type="submit">
|
||||
<i class="icon-arrows-cw"></i> {'Refresh photo set'|@translate}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
|
||||
<legend><i class="icon-check"></i>{'Selection'|@translate}</legend>
|
||||
<legend><span class='icon-check icon-blue '></span>{'Selection'|@translate}</legend>
|
||||
|
||||
{if !empty($thumbnails)}
|
||||
<p id="checkActions">
|
||||
{'Select:'|@translate}
|
||||
{if $nb_thumbs_set > $nb_thumbs_page}
|
||||
<a href="#" id="selectAll">{'The whole page'|@translate}</a>,
|
||||
<a href="#" id="selectSet">{'The whole set'|@translate}</a>,
|
||||
<a href="#" id="selectAll">{'The whole page'|@translate}</a>
|
||||
<a href="#" id="selectSet">{'The whole set'|@translate}</a>
|
||||
{else}
|
||||
<a href="#" id="selectAll">{'All'|@translate}</a>,
|
||||
<a href="#" id="selectAll">{'All'|@translate}</a>
|
||||
{/if}
|
||||
<a href="#" id="selectNone">{'None'|@translate}</a>,
|
||||
<a href="#" id="selectNone">{'None'|@translate}</a>
|
||||
<a href="#" id="selectInvert">{'Invert'|@translate}</a>
|
||||
|
||||
<span id="selectedMessage"></span>
|
||||
@@ -547,9 +588,11 @@ UL.thumbnails SPAN.wrap2 {ldelim}
|
||||
<label class="font-checkbox">
|
||||
<span class="icon-check"></span><input type="checkbox" name="selection[]" value="{$thumbnail.id}" {if $isSelected}checked="checked"{/if}>
|
||||
<span class="wrap2">
|
||||
<div class="actions"><a href="{$thumbnail.FILE_SRC}" class="preview-box">{'Zoom'|@translate}</a> · <a href="{$thumbnail.U_EDIT}" target="_blank">{'Edit'|@translate}</a></div>
|
||||
<div class="actions">
|
||||
<a href="{$thumbnail.U_EDIT}" target="_blank" class="icon-pencil" title="{'Edit photo'|@translate}"></a>
|
||||
<a href="{$thumbnail.FILE_SRC}" class="preview-box icon-zoom-square" title="{'Zoom'|@translate}"></a>
|
||||
</div>
|
||||
{if $thumbnail.level > 0}
|
||||
<em class="levelIndicatorB">{'Level %d'|@sprintf:$thumbnail.level|@translate}</em>
|
||||
<em class="levelIndicatorF" title="{'Who can see these photos?'|@translate} : ">{'Level %d'|@sprintf:$thumbnail.level|@translate}</em>
|
||||
{/if}
|
||||
<img src="{$thumbnail.thumb->get_url()}" alt="{$thumbnail.file}" title="{$thumbnail.TITLE|@escape:'html'}" {$thumbnail.thumb->get_size_htm()}>
|
||||
@@ -561,183 +604,198 @@ UL.thumbnails SPAN.wrap2 {ldelim}
|
||||
</ul>
|
||||
|
||||
{if !empty($navbar) }
|
||||
<div style="clear:both;">
|
||||
|
||||
<div style="float:left">
|
||||
{include file='navigation_bar.tpl'|@get_extent:'navbar'}
|
||||
</div>
|
||||
|
||||
<div style="float:right;margin-top:10px;">{'display'|@translate}
|
||||
<div class="batchManager-pagination">
|
||||
<div class="pagination-per-page">
|
||||
<span>{'display'|@translate}</span>
|
||||
<a href="{$U_DISPLAY}&display=20">20</a>
|
||||
· <a href="{$U_DISPLAY}&display=50">50</a>
|
||||
· <a href="{$U_DISPLAY}&display=100">100</a>
|
||||
· <a href="{$U_DISPLAY}&display=all">{'all'|@translate}</a>
|
||||
{'photos per page'|@translate}
|
||||
<a href="{$U_DISPLAY}&display=50">50</a>
|
||||
<a href="{$U_DISPLAY}&display=100">100</a>
|
||||
<a href="{$U_DISPLAY}&display=all">{'all'|@translate}</a>
|
||||
</div>
|
||||
|
||||
{include file='navigation_bar.tpl'|@get_extent:'navbar'}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{else}
|
||||
<div>{'No photo in the current set.'|@translate}</div>
|
||||
<div class="selectionEmptyBlock">{'No photo in the current set.'|@translate}</div>
|
||||
{/if}
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="action">
|
||||
|
||||
<legend><i class="icon-cog"></i>{'Action'|@translate}</legend>
|
||||
<div id="forbidAction"{if count($selection) != 0} style="display:none"{/if}>{'No photo selected, no action possible.'|@translate}</div>
|
||||
<legend><span class='icon-cog icon-red'></span>{'Action'|@translate}</legend>
|
||||
<div id="forbidAction"{if count($selection) != 0} style="display:none"{/if}>{'No photos selected, no actions possible.'|@translate}</div>
|
||||
<div id="permitAction"{if count($selection) == 0} style="display:none"{/if}>
|
||||
|
||||
<div class="permitActionListButton">
|
||||
<div>
|
||||
<select name="selectAction">
|
||||
<option value="-1">{'Choose an action'|@translate}</option>
|
||||
<option disabled="disabled">------------------</option>
|
||||
<option value="delete" class="icon-trash">{'Delete selected photos'|@translate}</option>
|
||||
<option value="associate">{'Associate to album'|@translate}</option>
|
||||
<option value="move">{'Move to album'|@translate}</option>
|
||||
{if !empty($associated_categories)}
|
||||
<option value="dissociate">{'Dissociate from album'|@translate}</option>
|
||||
{/if}
|
||||
<option value="add_tags">{'Add tags'|@translate}</option>
|
||||
{if !empty($associated_tags)}
|
||||
<option value="del_tags">{'remove tags'|@translate}</option>
|
||||
{/if}
|
||||
<option value="author">{'Set author'|@translate}</option>
|
||||
<option value="title">{'Set title'|@translate}</option>
|
||||
<option value="date_creation">{'Set creation date'|@translate}</option>
|
||||
<option value="level" class="icon-lock">{'Who can see these photos?'|@translate}</option>
|
||||
<option value="metadata">{'Synchronize metadata'|@translate}</option>
|
||||
{if ($IN_CADDIE)}
|
||||
<option value="remove_from_caddie">{'Remove from caddie'|@translate}</option>
|
||||
{else}
|
||||
<option value="add_to_caddie">{'Add to caddie'|@translate}</option>
|
||||
{/if}
|
||||
<option value="delete_derivatives">{'Delete multiple size images'|@translate}</option>
|
||||
<option value="generate_derivatives">{'Generate multiple size images'|@translate}</option>
|
||||
{if !empty($element_set_global_plugins_actions)}
|
||||
{foreach from=$element_set_global_plugins_actions item=action}
|
||||
<option value="{$action.ID}">{$action.NAME}</option>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</select>
|
||||
</div>
|
||||
<p id="confirmDel" style="visibility:hidden">
|
||||
<label class="font-checkbox">
|
||||
<span class="icon-check"></span>
|
||||
<input type="checkbox" name="confirm_deletion" value="1"> {'Are you sure?'|@translate}</input>
|
||||
</label><br/><br/>
|
||||
<span class="errors" style="visibility:hidden;margin:0;">{"You need to confirm deletion"|translate}</span>
|
||||
</p>
|
||||
<p id="applyActionBlock" style="display:none;margin:1em 0 0 0;" class="actionButtons">
|
||||
<button id="applyAction" name="submit" type="submit" class="buttonLike">
|
||||
<i class="icon-cog-alt"></i> {'Apply action'|translate}
|
||||
</button>
|
||||
|
||||
<select name="selectAction">
|
||||
<option value="-1">{'Choose an action'|@translate}</option>
|
||||
<option disabled="disabled">------------------</option>
|
||||
<option value="delete" class="icon-trash">{'Delete selected photos'|@translate}</option>
|
||||
<option value="associate">{'Associate to album'|@translate}</option>
|
||||
<option value="move">{'Move to album'|@translate}</option>
|
||||
{if !empty($associated_categories)}
|
||||
<option value="dissociate">{'Dissociate from album'|@translate}</option>
|
||||
{/if}
|
||||
<option value="add_tags">{'Add tags'|@translate}</option>
|
||||
<span id="applyOnDetails"></span>
|
||||
</p>
|
||||
</div>
|
||||
<div class="permitActionItem">
|
||||
<!-- delete -->
|
||||
<div id="action_delete" class="bulkAction">
|
||||
</div>
|
||||
|
||||
<!-- associate -->{* also used for "move" action *}
|
||||
<div id="action_associate" class="bulkAction">
|
||||
<select data-selectize="categories" data-default="first" name="associate" style="width:600px"></select>
|
||||
<a href="#" data-add-album="associate" title="{'create a new album'|@translate}" class="icon-plus"></a>
|
||||
</div>
|
||||
|
||||
<!-- dissociate -->
|
||||
<div id="action_dissociate" class="bulkAction">
|
||||
<select data-selectize="categories" placeholder="{'Type in a search term'|translate}"
|
||||
name="dissociate" style="width:600px"></select>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- add_tags -->
|
||||
<div id="action_add_tags" class="bulkAction">
|
||||
<select data-selectize="tags" data-create="true" placeholder="{'Type in a search term'|translate}"
|
||||
name="add_tags[]" multiple style="width:400px;"></select>
|
||||
</div>
|
||||
|
||||
<!-- del_tags -->
|
||||
<div id="action_del_tags" class="bulkAction">
|
||||
{if !empty($associated_tags)}
|
||||
<option value="del_tags">{'remove tags'|@translate}</option>
|
||||
<select data-selectize="tags" name="del_tags[]" multiple style="width:400px;"
|
||||
placeholder="{'Type in a search term'|translate}">
|
||||
{foreach from=$associated_tags item=tag}
|
||||
<option value="{$tag.id}">{$tag.name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
{/if}
|
||||
<option value="author">{'Set author'|@translate}</option>
|
||||
<option value="title">{'Set title'|@translate}</option>
|
||||
<option value="date_creation">{'Set creation date'|@translate}</option>
|
||||
<option value="level" class="icon-lock">{'Who can see these photos?'|@translate}</option>
|
||||
<option value="metadata">{'Synchronize metadata'|@translate}</option>
|
||||
{if ($IN_CADDIE)}
|
||||
<option value="remove_from_caddie">{'Remove from caddie'|@translate}</option>
|
||||
{else}
|
||||
<option value="add_to_caddie">{'Add to caddie'|@translate}</option>
|
||||
{/if}
|
||||
<option value="delete_derivatives">{'Delete multiple size images'|@translate}</option>
|
||||
<option value="generate_derivatives">{'Generate multiple size images'|@translate}</option>
|
||||
</div>
|
||||
|
||||
<!-- author -->
|
||||
<div id="action_author" class="bulkAction">
|
||||
<input type="text" class="large" name="author" placeholder="{'Type here the author name'|@translate}">
|
||||
<label class="font-checkbox"><span class="icon-check"></span><input type="checkbox" name="remove_author"> {'remove author'|@translate}</label>
|
||||
</div>
|
||||
|
||||
<!-- title -->
|
||||
<div id="action_title" class="bulkAction">
|
||||
<input type="text" class="large" name="title" placeholder="{'Type here the title'|@translate}">
|
||||
<label class="font-checkbox"><span class="icon-check"></span><input type="checkbox" name="remove_title"> {'remove title'|@translate}</label>
|
||||
</div>
|
||||
|
||||
<!-- date_creation -->
|
||||
<div id="action_date_creation" class="bulkAction">
|
||||
<label class="font-checkbox"><span class="icon-check"></span><input type="checkbox" name="remove_date_creation"> {'remove creation date'|@translate}</label><br>
|
||||
<div id="set_date_creation">
|
||||
<input type="hidden" name="date_creation" value="{$DATE_CREATION}">
|
||||
<label>
|
||||
<i class="icon-calendar"></i>
|
||||
<input type="text" data-datepicker="date_creation" readonly>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- level -->
|
||||
<div id="action_level" class="bulkAction">
|
||||
<select name="level" size="1">
|
||||
{html_options options=$level_options selected=$level_options_selected}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- metadata -->
|
||||
<div id="action_metadata" class="bulkAction">
|
||||
</div>
|
||||
|
||||
<!-- generate derivatives -->
|
||||
<div id="action_generate_derivatives" class="bulkAction">
|
||||
<div class="deleteDerivButtons">
|
||||
<a href="javascript:selectGenerateDerivAll()">{'All'|@translate}</a>
|
||||
<a href="javascript:selectGenerateDerivNone()">{'None'|@translate}</a>
|
||||
</div>
|
||||
<br>
|
||||
{foreach from=$generate_derivatives_types key=type item=disp}
|
||||
<label class="font-checkbox"><span class="icon-check"></span><input type="checkbox" name="generate_derivatives_type[]" value="{$type}"> {$disp}</label>
|
||||
{/foreach}
|
||||
</div>
|
||||
|
||||
<!-- delete derivatives -->
|
||||
<div id="action_delete_derivatives" class="bulkAction">
|
||||
<div class="deleteDerivButtons">
|
||||
<a href="javascript:selectDelDerivAll()">{'All'|@translate}</a>
|
||||
<a href="javascript:selectDelDerivNone()">{'None'|@translate}</a>
|
||||
</div>
|
||||
<br>
|
||||
{foreach from=$del_derivatives_types key=type item=disp}
|
||||
<label class="font-checkbox"><span class="icon-check"></span><input type="checkbox" name="del_derivatives_type[]" value="{$type}"> {$disp}</label>
|
||||
{/foreach}
|
||||
</div>
|
||||
|
||||
<!-- plugins -->
|
||||
{if !empty($element_set_global_plugins_actions)}
|
||||
{foreach from=$element_set_global_plugins_actions item=action}
|
||||
<option value="{$action.ID}">{$action.NAME}</option>
|
||||
<div id="action_{$action.ID}" class="bulkAction">
|
||||
{if !empty($action.CONTENT)}{$action.CONTENT}{/if}
|
||||
</div>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</select>
|
||||
|
||||
<!-- delete -->
|
||||
<div id="action_delete" class="bulkAction">
|
||||
<p><label><input type="checkbox" name="confirm_deletion" value="1"> {'Are you sure?'|@translate}</label><span class="errors" style="display:none">{"You need to confirm deletion"|translate}</span></p>
|
||||
</div>
|
||||
|
||||
<!-- associate -->{* also used for "move" action *}
|
||||
<div id="action_associate" class="bulkAction">
|
||||
<select data-selectize="categories" data-default="first" name="associate" style="width:600px"></select>
|
||||
<br>{'... or '|@translate}
|
||||
<a href="#" data-add-album="associate" title="{'create a new album'|@translate}">{'create a new album'|@translate}</a>
|
||||
</div>
|
||||
|
||||
<!-- dissociate -->
|
||||
<div id="action_dissociate" class="bulkAction">
|
||||
<select data-selectize="categories" placeholder="{'Type in a search term'|translate}"
|
||||
name="dissociate" style="width:600px"></select>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- add_tags -->
|
||||
<div id="action_add_tags" class="bulkAction">
|
||||
<select data-selectize="tags" data-create="true" placeholder="{'Type in a search term'|translate}"
|
||||
name="add_tags[]" multiple style="width:400px;"></select>
|
||||
</div>
|
||||
|
||||
<!-- del_tags -->
|
||||
<div id="action_del_tags" class="bulkAction">
|
||||
{if !empty($associated_tags)}
|
||||
<select data-selectize="tags" name="del_tags[]" multiple style="width:400px;"
|
||||
placeholder="{'Type in a search term'|translate}">
|
||||
{foreach from=$associated_tags item=tag}
|
||||
<option value="{$tag.id}">{$tag.name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<!-- author -->
|
||||
<div id="action_author" class="bulkAction">
|
||||
<label><input type="checkbox" name="remove_author"> {'remove author'|@translate}</label><br>
|
||||
<input type="text" class="large" name="author" placeholder="{'Type here the author name'|@translate}">
|
||||
</div>
|
||||
|
||||
<!-- title -->
|
||||
<div id="action_title" class="bulkAction">
|
||||
<label><input type="checkbox" name="remove_title"> {'remove title'|@translate}</label><br>
|
||||
<input type="text" class="large" name="title" placeholder="{'Type here the title'|@translate}">
|
||||
</div>
|
||||
|
||||
<!-- date_creation -->
|
||||
<div id="action_date_creation" class="bulkAction">
|
||||
<label><input type="checkbox" name="remove_date_creation"> {'remove creation date'|@translate}</label><br>
|
||||
<div id="set_date_creation">
|
||||
<input type="hidden" name="date_creation" value="{$DATE_CREATION}">
|
||||
<label>
|
||||
<i class="icon-calendar"></i>
|
||||
<input type="text" data-datepicker="date_creation" readonly>
|
||||
</label>
|
||||
</div>
|
||||
</div> <!-- #permitAction -->
|
||||
<div id="regenerationMsg" class="bulkAction" style="display:none;margin-left:0;">
|
||||
<div id="regenerationStatus" style="margin-bottom:10px;">
|
||||
<span id="regenerationText">{'Generate multiple size images'|@translate}</span>
|
||||
<span class="badge-number" style="font-size:12.8px"></span>
|
||||
</div>
|
||||
<input type="hidden" name="regenerateSuccess" value="0">
|
||||
<input type="hidden" name="regenerateError" value="0">
|
||||
</div>
|
||||
<!-- progress bar -->
|
||||
<div id="uploadingActions" style="display:none">
|
||||
<div class="big-progressbar" style="max-width:100%;margin-bottom: 10px;">
|
||||
<div class="progressbar" style="width:0%"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- level -->
|
||||
<div id="action_level" class="bulkAction">
|
||||
<select name="level" size="1">
|
||||
{html_options options=$level_options selected=$level_options_selected}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- metadata -->
|
||||
<div id="action_metadata" class="bulkAction">
|
||||
</div>
|
||||
|
||||
<!-- generate derivatives -->
|
||||
<div id="action_generate_derivatives" class="bulkAction">
|
||||
<a href="javascript:selectGenerateDerivAll()">{'All'|@translate}</a>,
|
||||
<a href="javascript:selectGenerateDerivNone()">{'None'|@translate}</a>
|
||||
<br>
|
||||
{foreach from=$generate_derivatives_types key=type item=disp}
|
||||
<label><input type="checkbox" name="generate_derivatives_type[]" value="{$type}"> {$disp}</label>
|
||||
{/foreach}
|
||||
</div>
|
||||
|
||||
<!-- delete derivatives -->
|
||||
<div id="action_delete_derivatives" class="bulkAction">
|
||||
<a href="javascript:selectDelDerivAll()">{'All'|@translate}</a>,
|
||||
<a href="javascript:selectDelDerivNone()">{'None'|@translate}</a>
|
||||
<br>
|
||||
{foreach from=$del_derivatives_types key=type item=disp}
|
||||
<label><input type="checkbox" name="del_derivatives_type[]" value="{$type}"> {$disp}</label>
|
||||
{/foreach}
|
||||
</div>
|
||||
|
||||
<!-- progress bar -->
|
||||
<div id="regenerationMsg" class="bulkAction" style="display:none">
|
||||
<p id="regenerationText" style="margin-bottom:10px;">{'Generate multiple size images'|@translate}</p>
|
||||
<span class="progressBar" id="progressBar"></span>
|
||||
<input type="hidden" name="regenerateSuccess" value="0">
|
||||
<input type="hidden" name="regenerateError" value="0">
|
||||
</div>
|
||||
|
||||
<!-- plugins -->
|
||||
{if !empty($element_set_global_plugins_actions)}
|
||||
{foreach from=$element_set_global_plugins_actions item=action}
|
||||
<div id="action_{$action.ID}" class="bulkAction">
|
||||
{if !empty($action.CONTENT)}{$action.CONTENT}{/if}
|
||||
</div>
|
||||
{/foreach}
|
||||
{/if}
|
||||
|
||||
<p id="applyActionBlock" style="display:none" class="actionButtons">
|
||||
<button id="applyAction" name="submit" type="submit" class="buttonLike">
|
||||
<i class="icon-cog-alt"></i> {'Apply action'|translate}
|
||||
</button>
|
||||
|
||||
<span id="applyOnDetails"></span>
|
||||
</p>
|
||||
|
||||
</div> <!-- #permitAction -->
|
||||
</fieldset>
|
||||
|
||||
</form>
|
||||
|
||||
@@ -38,17 +38,18 @@ jQuery("a.preview-box").colorbox( {
|
||||
<h2>{'Batch Manager'|@translate}</h2>
|
||||
|
||||
<form action="{$F_ACTION}" method="POST">
|
||||
<fieldset>
|
||||
<legend>{'Display options'|@translate}</legend>
|
||||
<p>{'photos per page'|@translate} :
|
||||
<div style="margin: 30px 0; display: flex; justify-content: space-between;">
|
||||
<div style="margin-left: 22px;">
|
||||
{if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
|
||||
</div>
|
||||
<div style="margin-right: 21px;" class="pagination-per-page">
|
||||
<span style="font-weight: bold;color: unset;">{'photos per page'|@translate} :</span>
|
||||
<a href="{$U_ELEMENTS_PAGE}&display=5">5</a>
|
||||
| <a href="{$U_ELEMENTS_PAGE}&display=10">10</a>
|
||||
| <a href="{$U_ELEMENTS_PAGE}&display=50">50</a>
|
||||
</p>
|
||||
|
||||
</fieldset>
|
||||
|
||||
{if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
|
||||
<a href="{$U_ELEMENTS_PAGE}&display=10">10</a>
|
||||
<a href="{$U_ELEMENTS_PAGE}&display=50">50</a>
|
||||
</div>
|
||||
</div>
|
||||
<div style="clear:both"></div>
|
||||
|
||||
{if !empty($elements) }
|
||||
<div><input type="hidden" name="element_ids" value="{$ELEMENT_IDS}"></div>
|
||||
|
||||
@@ -2,158 +2,57 @@
|
||||
|
||||
{footer_script require='jquery.ui.sortable'}{literal}
|
||||
jQuery(document).ready(function(){
|
||||
jQuery(".drag_button").show();
|
||||
jQuery(".categoryLi").css("cursor","move");
|
||||
jQuery(".categoryUl").sortable({
|
||||
axis: "y",
|
||||
opacity: 0.8,
|
||||
update : function() {
|
||||
jQuery("#manualOrder").show();
|
||||
jQuery("#notManualOrder").hide();
|
||||
jQuery("#formAutoOrder").hide();
|
||||
jQuery("#formCreateAlbum").hide();
|
||||
}
|
||||
});
|
||||
|
||||
jQuery("#categoryOrdering").submit(function(){
|
||||
ar = jQuery('.categoryUl').sortable('toArray');
|
||||
for(i=0;i<ar.length;i++) {
|
||||
cat = ar[i].split('cat_');
|
||||
document.getElementsByName('catOrd[' + cat[1] + ']')[0].value = i;
|
||||
}
|
||||
});
|
||||
|
||||
jQuery("input[name=order_type]").click(function () {
|
||||
jQuery("#automatic_order_params").hide();
|
||||
if (jQuery("input[name=order_type]:checked").val() == "automatic") {
|
||||
jQuery("#automatic_order_params").show();
|
||||
}
|
||||
});
|
||||
|
||||
jQuery("#addAlbumOpen").click(function(){
|
||||
jQuery("#formCreateAlbum").toggle();
|
||||
jQuery("input[name=virtual_name]").focus();
|
||||
jQuery("#formAutoOrder").hide();
|
||||
});
|
||||
|
||||
jQuery("#addAlbumClose").click(function(){
|
||||
jQuery("#formCreateAlbum").hide();
|
||||
});
|
||||
|
||||
|
||||
jQuery("#autoOrderOpen").click(function(){
|
||||
jQuery("#formAutoOrder").toggle();
|
||||
jQuery("#formCreateAlbum").hide();
|
||||
});
|
||||
|
||||
jQuery("#autoOrderClose").click(function(){
|
||||
jQuery("#formAutoOrder").hide();
|
||||
});
|
||||
|
||||
jQuery("#cancelManualOrder").click(function(){
|
||||
jQuery(".categoryUl").sortable("cancel");
|
||||
jQuery("#manualOrder").hide();
|
||||
jQuery("#notManualOrder").show();
|
||||
});
|
||||
$(".addAlbumHead").click(function () {
|
||||
$(".addAlbum input[name=virtual_name]").focus();
|
||||
})
|
||||
});
|
||||
{/literal}{/footer_script}
|
||||
|
||||
<div class="selectedAlbum cat-list-album-path"><span class="icon-sitemap">{$CATEGORIES_NAV}</span></div>
|
||||
<p class="showCreateAlbum" id="notManualOrder">
|
||||
<a href="#" id="addAlbumOpen" class="icon-plus">{'create a new album'|@translate}</a>
|
||||
{if count($categories)}<span class="userSeparator">·</span><a href="#" id="autoOrderOpen" class="icon-sort-alt-down">{'apply automatic sort order'|@translate}</a>{/if}
|
||||
{if ($PARENT_EDIT)}<span class="userSeparator">·</span><a href="{$PARENT_EDIT}" class="icon-pencil"></span>{'edit'|@translate}</a>{/if}
|
||||
</p>
|
||||
<form id="formCreateAlbum" action="{$F_ACTION}" method="post" style="display:none;">
|
||||
<fieldset class="with-border">
|
||||
<legend>{'create a new album'|@translate}</legend>
|
||||
{assign var='color_tab' value=["icon-red", "icon-blue", "icon-yellow", "icon-purple", "icon-green"]}
|
||||
<div class="categoryContainer">
|
||||
<div class="addAlbum">
|
||||
<div class="addAlbumHead" onclick="$('.addAlbum').addClass('input-mode');">
|
||||
<span class="icon-plus-circled icon-blue"></span>
|
||||
<p>{"Add Album"|@translate}
|
||||
</div>
|
||||
<form action="{$F_ACTION}" method="post">
|
||||
<input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
|
||||
|
||||
<p>
|
||||
<strong>{'Album name'|@translate}</strong><br>
|
||||
<input type="text" name="virtual_name" maxlength="255">
|
||||
</p>
|
||||
|
||||
<p class="actionButtons">
|
||||
<button name="submitAdd" type="submit" class="buttonLike">
|
||||
<i class="icon-plus-circled"></i> {'Create'|translate}
|
||||
<label for="virtual_name">{"Album Name"|@translate}</label>
|
||||
<input type="text" name="virtual_name" placeholder="{"Portraits..."|@translate}">
|
||||
<button name="submitAdd" type="submit" class="buttonLike">
|
||||
<i class="icon-plus"></i> {"Create"|@translate}
|
||||
</button>
|
||||
|
||||
<a href="#" id="addAlbumClose" class="icon-cancel-circled">{'Cancel'|@translate}</a>
|
||||
</p>
|
||||
</fieldset>
|
||||
</form>
|
||||
{if count($categories)}
|
||||
<form id="formAutoOrder" action="{$F_ACTION}" method="post" style="display:none;">
|
||||
<fieldset class="with-border">
|
||||
<legend>{'Automatic sort order'|@translate}</legend>
|
||||
<input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
|
||||
<a onclick="$('.addAlbum').removeClass('input-mode');">{"Cancel"|@translate}</a>
|
||||
</form>
|
||||
</div>
|
||||
{if count($categories)}
|
||||
{foreach from=$categories item=category}
|
||||
<div class="categoryBox{if $category.IS_VIRTUAL} virtual_cat{/if}" id="cat_{$category.ID}">
|
||||
|
||||
<p><strong>{'Sort order'|@translate}</strong>
|
||||
{foreach from=$sort_orders key=sort_code item=sort_label}
|
||||
<br>
|
||||
<label class="font-checkbox">
|
||||
<span class="icon-dot-circled"></span>
|
||||
<input type="radio" value="{$sort_code}" name="order_by" {if $sort_code eq $sort_order_checked}checked="checked"{/if}> {$sort_label}
|
||||
</label>
|
||||
{/foreach}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label class="font-checkbox">
|
||||
<span class="icon-check"></span>
|
||||
<input type="checkbox" name="recursive"> <strong>{'Apply to sub-albums'|@translate}</strong>
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<p class="actionButtons">
|
||||
<button name="submitAutoOrder" type="submit" class="buttonLike">
|
||||
<i class="icon-floppy"></i> {'Save order'|translate}
|
||||
</button>
|
||||
<a href="#" id="autoOrderClose" class="icon-cancel-circled">{'Cancel'|@translate}</a>
|
||||
</p>
|
||||
</fieldset>
|
||||
</form>
|
||||
{/if}
|
||||
<div class="albumIcon">
|
||||
<span class="
|
||||
{if $category.NB_SUB_ALBUMS == 0}icon-folder-open{else}icon-sitemap{/if}
|
||||
{$color_tab[$category.ID % 5]}
|
||||
"> </span>
|
||||
</div>
|
||||
|
||||
<div class="albumTitle">
|
||||
{$category.NAME}
|
||||
</div>
|
||||
<span class="albumInfos"><p>{$category.NB_PHOTOS|translate_dec:'%d photo':'%d photos'}</p> <p>{$category.NB_SUB_PHOTOS|translate_dec:'%d photo':'%d photos'} {$category.NB_SUB_ALBUMS|translate_dec:'in %d sub-album':'in %d sub-albums'}</p></span>
|
||||
|
||||
<form id="categoryOrdering" action="{$F_ACTION}" method="post">
|
||||
<input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
|
||||
<p id="manualOrder" style="display:none">
|
||||
<input class="submit" name="submitManualOrder" type="submit" value="{'Save manual order'|@translate}">
|
||||
{'... or '|@translate} <a href="#" id="cancelManualOrder">{'cancel manual order'|@translate}</a>
|
||||
</p>
|
||||
|
||||
{if count($categories)}
|
||||
<ul class="categoryUl">
|
||||
{foreach from=$categories item=category}
|
||||
<li class="categoryLi{if $category.IS_VIRTUAL} virtual_cat{/if}" id="cat_{$category.ID}">
|
||||
<!-- category {$category.ID} -->
|
||||
<div class="albumBlock">
|
||||
<div class="albumLineBlock">
|
||||
<p class="albumTitle">
|
||||
<i class="icon-arrow-combo" title="{'Drag to re-order'|translate}"></i>
|
||||
<strong>{$category.NAME}</strong>
|
||||
</p>
|
||||
<span class="albumInfos"><span class="userSeparator">·</span> {$category.NB_PHOTOS|translate_dec:'%d photo':'%d photos'} <span class="userSeparator">·</span> {$category.NB_SUB_PHOTOS|translate_dec:'%d photo':'%d photos'} {$category.NB_SUB_ALBUMS|translate_dec:'in %d sub-album':'in %d sub-albums'}</span>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="catOrd[{$category.ID}]" value="{$category.RANK}">
|
||||
|
||||
<p class="albumActions">
|
||||
<a href="{$category.U_EDIT}"><span class="icon-pencil"></span>{'Edit'|@translate}</a>
|
||||
<a href="{$category.U_CHILDREN}" class="actionTitle"><span class="icon-flow-tree"></span><span>{'sub-albums'|@translate}</span></a>
|
||||
{if isset($category.U_SYNC) }
|
||||
<a href="{$category.U_SYNC}"><span class="icon-exchange"></span>{'Synchronize'|@translate}</a>
|
||||
{/if}
|
||||
{if cat_admin_access($category.ID)}
|
||||
<a href="{$category.U_JUMPTO}"><span class="icon-eye">{'Visit Gallery'|@translate} </a>
|
||||
{/if}
|
||||
<a href="{$category.U_ADD_PHOTOS_ALBUM}"><span class="icon-plus">{'Add Photos'|@translate} </a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
<div class="albumActions">
|
||||
<a href="{$category.U_EDIT}" title="{'Edit'|@translate}"><span class="icon-pencil"></span>{'Edit'|@translate}</a>
|
||||
<a href="{$category.U_CHILDREN}" class="actionTitle" title="{'sub-albums'|@translate}"><span class="icon-sitemap"></span>{'sub-albums'|@translate}</a>
|
||||
{if cat_admin_access($category.ID)}
|
||||
<a href="{$category.U_JUMPTO}" title="{'Visit Gallery'|@translate}"><span class="icon-eye"></span>{'Visit Gallery'|@translate} </a>
|
||||
{else}
|
||||
<span href="{$category.U_JUMPTO}" title="{'This album is private'|@translate}"><span class="icon-eye"></span>{'Visit Gallery'|@translate} </span>
|
||||
{/if}
|
||||
<a href="{$category.U_ADD_PHOTOS_ALBUM}" title="{'Add Photos'|@translate}"><span class="icon-plus"></span>{'Add Photos'|@translate}</a>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
</form>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -45,11 +45,16 @@ jQuery(document).ready(function() {
|
||||
success:function(data) {
|
||||
var data = jQuery.parseJSON(data);
|
||||
if (data.stat == 'ok') {
|
||||
jQuery(".albumThumbnailImage")
|
||||
.attr('href', data.result.url)
|
||||
.find("img").attr('src', data.result.src)
|
||||
.end().show();
|
||||
jQuery(".deleteRepresentative").show();
|
||||
|
||||
jQuery(".albumThumbailImage, .albumThumbnailRandom").on('load', function () {
|
||||
cropImage();
|
||||
})
|
||||
|
||||
jQuery(".albumThumbailImage, .albumThumbnailRandom")
|
||||
.attr('src', data.result.src)
|
||||
.end().show();
|
||||
|
||||
jQuery(".albumThumbnailRandom").hide();
|
||||
}
|
||||
else {
|
||||
@@ -77,12 +82,9 @@ jQuery(document).ready(function() {
|
||||
success:function(data) {
|
||||
var data = jQuery.parseJSON(data);
|
||||
if (data.stat == 'ok') {
|
||||
jQuery(".deleteRepresentative").hide();
|
||||
jQuery(".albumThumbnailImage").hide();
|
||||
if (jQuery(".albumThumbnailActions").data('random_allowed') == '') {
|
||||
jQuery(".deleteRepresentative").hide();
|
||||
} else {
|
||||
jQuery(".albumThumbnailRandom").show();
|
||||
}
|
||||
jQuery(".albumThumbnailRandom").show();
|
||||
}
|
||||
else {
|
||||
alert("error on "+method);
|
||||
@@ -132,6 +134,29 @@ jQuery(document).ready(function() {
|
||||
});
|
||||
});
|
||||
|
||||
$(window).bind("load", function() {
|
||||
cropImage();
|
||||
});
|
||||
|
||||
$(window).resize(function() {
|
||||
cropImage();
|
||||
});
|
||||
|
||||
function cropImage() {
|
||||
let image = $(".albumThumbailImage");
|
||||
let imageW = image[0].naturalWidth;
|
||||
let imageH = image[0].naturalHeight;
|
||||
let size = $('.catThumbnail').innerWidth();
|
||||
|
||||
if (imageW > imageH) {
|
||||
image.css('height', size+'px');
|
||||
image.css('width', (imageW * size / imageH)+'px');
|
||||
} else {
|
||||
image.css('width', size+'px');
|
||||
image.css('heigth', (imageH * size / imageW)+'px');
|
||||
}
|
||||
}
|
||||
|
||||
{/footer_script}
|
||||
|
||||
{html_style}
|
||||
@@ -165,69 +190,126 @@ jQuery(document).ready(function() {
|
||||
|
||||
|
||||
<div class="titrePage">
|
||||
<h2><span style="letter-spacing:0">{$CATEGORIES_NAV}</span> › {'Edit album'|@translate} {$TABSHEET_TITLE}</h2>
|
||||
<h2>{'Edit album'|@translate} <span title="{'Numeric identifier'|@translate}">#{$CAT_ID}</span> <span style="letter-spacing:0">{$CATEGORIES_NAV}</span></h2>
|
||||
</div>
|
||||
|
||||
<div id="catModify">
|
||||
|
||||
<form action="{$F_ACTION}" method="POST">
|
||||
|
||||
<fieldset>
|
||||
<legend>{'Informations'|@translate}</legend>
|
||||
<legend><span class="icon-info-circled-1 icon-blue"></span>{'Informations'|@translate}</legend>
|
||||
|
||||
<table style="width:100%">
|
||||
<tr>
|
||||
<td id="albumThumbnail">
|
||||
{if isset($representant) }
|
||||
<a class="albumThumbnailImage" style="{if !isset($representant.picture)}display:none{/if}" href="{$representant.picture.url}"><img src="{$representant.picture.src}"></a>
|
||||
<img class="albumThumbnailRandom" style="{if isset($representant.picture)}display:none{/if}" src="{$ROOT_URL}{$themeconf.admin_icon_dir}/category_representant_random.png" alt="{'Random photo'|@translate}">
|
||||
<div id="catHeader">
|
||||
|
||||
<p class="albumThumbnailActions" data-random_allowed="{$representant.ALLOW_SET_RANDOM}">
|
||||
{assign var="action_separator" value=""}
|
||||
{if $representant.ALLOW_SET_RANDOM }
|
||||
<a href="#refresh" data-category_id="{$CAT_ID}" class="refreshRepresentative" title="{'Find a new representant by random'|@translate}">{'Refresh'|@translate}</a>
|
||||
{assign var="action_separator" value="|"}
|
||||
{/if}
|
||||
|
||||
<div class="catThumbnail">
|
||||
<div class="thumbnailContainer">
|
||||
{if isset($representant) }
|
||||
<img class="albumThumbailImage" src="{$representant.picture.src}">
|
||||
<div class="albumThumbnailRandom" style="{if isset($representant.picture)}display:none{/if}"><span class="icon-dice-solid"></span></div>
|
||||
|
||||
{if isset($representant.ALLOW_DELETE) }
|
||||
{$action_separator}
|
||||
<a href="#delete" data-category_id="{$CAT_ID}" class="deleteRepresentative" title="{'Delete Representant'|@translate}">{'Delete'|translate}</a>
|
||||
{/if}
|
||||
</p>
|
||||
{/if}
|
||||
</td>
|
||||
<div class="albumThumbnailActions" data-random_allowed="{$representant.ALLOW_SET_RANDOM}">
|
||||
<div class="albumThumbnailActionContainer">
|
||||
{if $representant.ALLOW_SET_RANDOM }
|
||||
<a href="#refresh" data-category_id="{$CAT_ID}" class="refreshRepresentative icon-ccw" title="{'Find a new representant by random'|@translate}">{'Refresh thumbnail'|@translate}</a>
|
||||
{/if}
|
||||
{if isset($representant.ALLOW_DELETE)}
|
||||
<a href="#delete" data-category_id="{$CAT_ID}" class="deleteRepresentative icon-cancel" title="{'Delete Representant'|@translate}" style="{if !isset($representant.picture)}display:none{/if}">{'Remove thumbnail'|translate}</a>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{else}
|
||||
<div class="albumThumbnailNoPhoto" title="{'No photos in the current album, no thumbnail available'|@translate}"><span class="icon-file-image"></span></div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<td id="albumLinks">
|
||||
<p>{$INTRO}</p>
|
||||
<ul>
|
||||
{if cat_admin_access($CAT_ID)}
|
||||
<li><a class="icon-eye" href="{$U_JUMPTO}">{'jump to album'|@translate} →</a></li>
|
||||
{/if}
|
||||
<div class="catInfo">
|
||||
<div class="container">
|
||||
{if isset($INFO_CREATION)}
|
||||
<span class="icon-yellow">{$INFO_CREATION}</span>
|
||||
{/if}
|
||||
<span class="icon-red">{$INFO_LAST_MODIFIED}</span>
|
||||
{if isset($INFO_PHOTO)}
|
||||
<span class="icon-purple" title="{$INFO_TITLE}">{$INFO_PHOTO}</span>
|
||||
{/if}
|
||||
{if isset($INFO_DIRECT_SUB)}
|
||||
<span class="icon-blue">{$INFO_DIRECT_SUB}</span>
|
||||
{/if}
|
||||
{if isset($U_SYNC) }
|
||||
<span class="icon-green" >{'Directory'|@translate} : {$CAT_FULL_DIR}</span>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{if isset($U_MANAGE_ELEMENTS) }
|
||||
<li><a class="icon-picture" href="{$U_MANAGE_ELEMENTS}">{'manage album photos'|@translate}</a></li>
|
||||
{/if}
|
||||
<div class="catAction">
|
||||
<div class="container">
|
||||
<strong>{"Actions"|@translate}</strong>
|
||||
{if cat_admin_access($CAT_ID)}
|
||||
<a class="icon-eye" href="{$U_JUMPTO}">{'Open in gallery'|@translate}</a>
|
||||
{/if}
|
||||
|
||||
<li style="text-transform:lowercase;"><a class="icon-plus-circled" href="{$U_ADD_PHOTOS_ALBUM}">{'Add Photos'|translate}</a></li>
|
||||
{if isset($U_MANAGE_ELEMENTS) }
|
||||
<a class="icon-picture" href="{$U_MANAGE_ELEMENTS}">{'Manage album photos'|@translate}</a>
|
||||
{/if}
|
||||
|
||||
<li><a class="icon-sitemap" href="{$U_CHILDREN}">{'manage sub-albums'|@translate}</a></li>
|
||||
<a class="icon-plus-circled" href="{$U_ADD_PHOTOS_ALBUM}">{'Add Photos'|translate}</a>
|
||||
|
||||
{if isset($U_SYNC) }
|
||||
<li><a class="icon-exchange" href="{$U_SYNC}">{'Synchronize'|@translate}</a> ({'Directory'|@translate} = {$CAT_FULL_DIR})</li>
|
||||
{/if}
|
||||
<a class="icon-sitemap" href="{$U_CHILDREN}">{'Manage sub-albums'|@translate}</a>
|
||||
|
||||
{if isset($U_DELETE) }
|
||||
<li><a class="icon-trash deleteAlbum" href="#">{'delete album'|@translate}</a></li>
|
||||
{/if}
|
||||
{if isset($U_SYNC) }
|
||||
<a class="icon-exchange" href="{$U_SYNC}">{'Synchronize'|@translate}</a>
|
||||
{/if}
|
||||
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{if isset($U_DELETE) }
|
||||
<a class="icon-trash deleteAlbum" href="#">{'Delete album'|@translate}</a>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="catLock">
|
||||
<div class="container">
|
||||
<div>
|
||||
<strong>
|
||||
{'Publication'|@translate}
|
||||
<span class="icon-help-circled" title="{'Locked albums are disabled for maintenance. Only administrators can view them in the gallery. Lock this album will also lock his Sub-albums'|@translate}" style="cursor:help"></span>
|
||||
</strong>
|
||||
<div class="switch-input">
|
||||
<span class="label">{'Unlocked'|@translate}</span>
|
||||
<label class="switch">
|
||||
<input type="checkbox" name="locked" id="toggleSelectionMode" value="true" {if $IS_LOCKED}checked{/if}>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
<span class="label">{'Locked'|@translate}</span>
|
||||
</div>
|
||||
</div>
|
||||
{if isset($CAT_COMMENTABLE)}
|
||||
<div>
|
||||
<strong>{'Comments'|@translate} <span class="icon-help-circled" title="{'A photo can receive comments from your visitors if it belongs to an album with comments activated.'|@translate}" style="cursor:help"></span></strong>
|
||||
<div class="switch-input">
|
||||
<span class="label">{'Forbidden'|@translate}</span>
|
||||
<label class="switch">
|
||||
<input type="checkbox" name="commentable" id="commentable" value="true" {if $CAT_COMMENTABLE == "true"}checked{/if}>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
<span class="label">{'Authorized'|@translate}</span>
|
||||
<div>
|
||||
<label id="applytoSubAction">
|
||||
{if isset($INFO_DIRECT_SUB)}
|
||||
<label class="font-checkbox"><span class="icon-check"></span><input type="checkbox" name="apply_commentable_on_sub"></label>
|
||||
{'Apply to sub-albums'|@translate}
|
||||
</label>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<form action="{$F_ACTION}" method="POST">
|
||||
<fieldset>
|
||||
<legend>{'Properties'|@translate}</legend>
|
||||
<legend><span class="icon-tools icon-red"></span>{'Properties'|@translate}</legend>
|
||||
<p>
|
||||
<strong>{'Name'|@translate}</strong>
|
||||
<br>
|
||||
@@ -245,33 +327,12 @@ jQuery(document).ready(function() {
|
||||
<strong>{'Parent album'|@translate}</strong>
|
||||
<br>
|
||||
<select data-selectize="categories" data-value="{$parent_category|@json_encode|escape:html}"
|
||||
name="parent" style="width:600px"></select>
|
||||
name="parent" style="width:100%"></select>
|
||||
</p>
|
||||
{/if}
|
||||
|
||||
<p>
|
||||
<strong>{'Lock'|@translate}</strong>
|
||||
<br>
|
||||
<label class="font-checkbox"><span class="icon-dot-circled"></span><input type="radio" name="visible" value="true"{if $CAT_VISIBLE == "true"} checked="checked"{/if}>{'No'|translate}</label>
|
||||
<label class="font-checkbox"><span class="icon-dot-circled"></span><input type="radio" name="visible" value="true_sub">{'No and unlock sub-albums'|translate}</label>
|
||||
<label class="font-checkbox"><span class="icon-dot-circled"></span><input type="radio" name="visible" value="false"{if $CAT_VISIBLE == "false"} checked="checked"{/if}>{'Yes'|translate}</label>
|
||||
</p>
|
||||
|
||||
{if isset($CAT_COMMENTABLE)}
|
||||
<p>
|
||||
<strong>{'Comments'|@translate}</strong>
|
||||
<br>
|
||||
<label class="font-checkbox"><span class="icon-dot-circled"></span><input type="radio" name="commentable" value="false"{if $CAT_COMMENTABLE == "false"} checked="checked"{/if}>{'No'|translate}</label>
|
||||
<label class="font-checkbox"><span class="icon-dot-circled"></span><input type="radio" name="commentable" value="true"{if $CAT_COMMENTABLE == "true"} checked="checked"{/if}>{'Yes'|translate}</label>
|
||||
<label id="applytoSubAction">
|
||||
<label class="font-checkbox"><span class="icon-check"></span><input type="checkbox" name="apply_commentable_on_sub"></label>
|
||||
{'Apply to sub-albums'|@translate}
|
||||
</label>
|
||||
</p>
|
||||
{/if}
|
||||
|
||||
<p style="margin:0">
|
||||
<button name="submit" type="submit" class="buttonLike">
|
||||
<button name="submit" type="submit" class="buttonGradient">
|
||||
<i class="icon-floppy"></i> {'Save Settings'|@translate}
|
||||
</button>
|
||||
</p>
|
||||
|
||||
@@ -1,32 +1,84 @@
|
||||
{footer_script}
|
||||
var data = {json_encode($album_data)};
|
||||
var pwg_token = "{$PWG_TOKEN}";
|
||||
var str_show_sub = "{'Show sub-albums'|@translate}";
|
||||
var str_hide_sub = "{'Hide sub-albums'|@translate}";
|
||||
var str_manage_sub_album = "{'Manage sub-albums'|@translate}";
|
||||
var str_apply_order = "{'Apply an automatic order to sub-albums'|@translate}";
|
||||
var str_edit = "{'Edit album'|@translate}";
|
||||
var str_are_you_sure = "{'The status of the album \'%s\' and its sub-albums will change to private. Are you sure?'|@translate}";
|
||||
var str_yes_change_parent = "{'Yes change parent anyway'|@translate}"
|
||||
var str_no_change_parent = "{'No, don\'t move this album here'|@translate}"
|
||||
var str_root = "{'Root'|@translate}"
|
||||
var openCat = {$open_cat};
|
||||
{/footer_script}
|
||||
|
||||
{combine_script id='jquery.confirm' load='footer' require='jquery' path='themes/default/js/plugins/jquery-confirm.min.js'}
|
||||
{combine_css path="themes/default/js/plugins/jquery-confirm.min.css"}
|
||||
{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'}
|
||||
{combine_css path="themes/default/js/plugins/jqtree.css"}
|
||||
{combine_script id='jtree' load='footer' path='themes/default/js/plugins/tree.jquery.js'}
|
||||
{combine_css path="admin/themes/default/fontello/css/animation.css"}
|
||||
|
||||
{combine_script id='cat_move' load='footer' path='admin/themes/default/js/cat_move.js'}
|
||||
|
||||
<div class="titrePage">
|
||||
<h2>{'Move albums'|@translate}</h2>
|
||||
</div>
|
||||
|
||||
<form method="post" action="{$F_ACTION}" class="filter" id="catMove">
|
||||
<fieldset>
|
||||
<legend>{'Move albums'|@translate}</legend>
|
||||
<div class="cat-move-order-popin">
|
||||
<div class="order-popin-container">
|
||||
<a class="close-popin icon-cancel" onClick="$('.cat-move-order-popin').fadeOut()"> </a>
|
||||
<div class="popin-title"><span class="icon-sort-name-up icon-purple"></span>{"Apply an automatic order"|@translate}</div>
|
||||
<div class="album-name icon-sitemap"></div>
|
||||
<form action="{$F_ACTION}" method="post">
|
||||
<input type="hidden" name="id" value="-1">
|
||||
<div class="choice-container">
|
||||
<label class="font-checkbox">
|
||||
<span class="icon-dot-circled"> </span>
|
||||
<input type="radio" value="name ASC" name="order" checked>
|
||||
{'Album name, A → Z'|@translate}
|
||||
</label>
|
||||
|
||||
<label>
|
||||
{'Virtual albums to move'|@translate}
|
||||
<label class="font-checkbox">
|
||||
<span class="icon-dot-circled"> </span>
|
||||
<input type="radio" value="name DESC" name="order">
|
||||
{'Album name, Z → A'|@translate}
|
||||
</label>
|
||||
|
||||
<select class="categoryList" name="selection[]" multiple="multiple">
|
||||
{html_options options=$category_to_move_options}
|
||||
</select>
|
||||
</label>
|
||||
<label class="font-checkbox">
|
||||
<span class="icon-dot-circled"> </span>
|
||||
<input type="radio" value="date_creation DESC" name="order">
|
||||
{'Date created, new → old'|@translate}
|
||||
</label>
|
||||
|
||||
<label>
|
||||
{'New parent album'|@translate}
|
||||
<label class="font-checkbox">
|
||||
<span class="icon-dot-circled"> </span>
|
||||
<input type="radio" value="date_creation ASC" name="order">
|
||||
{'Date created, old → new'|@translate}
|
||||
</label>
|
||||
|
||||
<select class="categoryDropDown" name="parent">
|
||||
<option value="0">------------</option>
|
||||
{html_options options=$category_parent_options}
|
||||
</select>
|
||||
</label>
|
||||
<label class="font-checkbox">
|
||||
<span class="icon-dot-circled"> </span>
|
||||
<input type="radio" value="date_available DESC" name="order">
|
||||
{'Date posted, new → old'|@translate}
|
||||
</label>
|
||||
|
||||
</fieldset>
|
||||
<label class="font-checkbox">
|
||||
<span class="icon-dot-circled"> </span>
|
||||
<input type="radio" value="date_available ASC" name="order">
|
||||
{'Date posted, old → new'|@translate}
|
||||
</label>
|
||||
</div>
|
||||
<input type="submit" name="simpleAutoOrder" value="{'Apply to direct sub-albums'|@translate}"/>
|
||||
<input type="submit" name="recursiveAutoOrder" value="{'Apply to the whole hierarchy'|@translate}"/>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p style="text-align:left;">
|
||||
<input class="submit" type="submit" name="submit" value="{'Submit'|@translate}">
|
||||
</p>
|
||||
<div class="cat-move-header">
|
||||
<div class="cat-move-info icon-help-circled"> {'Drag and drop to reorder albums'|@translate}</div>
|
||||
<a class="order-root icon-sitemap"> {'Apply an automatic order to root albums'|@translate} </a>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<div class='tree'> </div>
|
||||
@@ -56,7 +56,7 @@ jQuery("#selectStatus").change(function() {
|
||||
<form action="{$F_ACTION}" method="post" id="categoryPermissions">
|
||||
|
||||
<fieldset>
|
||||
<legend>{'Access type'|@translate}</legend>
|
||||
<legend><span class="icon-lock icon-yellow"></span>{'Access type'|@translate}</legend>
|
||||
|
||||
<p id="selectStatus">
|
||||
<label class="font-checkbox">
|
||||
|
||||
@@ -0,0 +1,171 @@
|
||||
{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'}
|
||||
|
||||
{footer_script}
|
||||
var data = {json_encode($data_cat)};
|
||||
/*
|
||||
Here data is an associative array id => category under this form
|
||||
[0] : name
|
||||
[1] : array of id, path to find this album (root to album)
|
||||
[2] : 1 = private or 0 = public
|
||||
*/
|
||||
|
||||
// Numeric array of all categories
|
||||
var categories = Object.values(data);
|
||||
|
||||
var str_albums_found = '{"<b>%d</b> albums found"}';
|
||||
var str_album_found = '{"<b>1</b> album found"}';
|
||||
{literal}
|
||||
var editLink = "admin.php?page=album-";
|
||||
var colors = ["icon-red", "icon-blue", "icon-yellow", "icon-purple", "icon-green"];
|
||||
|
||||
$('.search-input').on('input', () => {
|
||||
updateSearch();
|
||||
})
|
||||
|
||||
// Update the page according to the search field
|
||||
function updateSearch () {
|
||||
string = $('.search-input').val();
|
||||
$('.search-album-result').html("");
|
||||
$('.search-album-noresult').hide();
|
||||
if (string == '') {
|
||||
// help button unnecessary so do not show
|
||||
// $('.search-album-help').show();
|
||||
$('.search-album-ghost').show();
|
||||
$('.search-album-num-result').hide();
|
||||
} else {
|
||||
$('.search-album-ghost').hide();
|
||||
$('.search-album-help').hide();
|
||||
$('.search-album-num-result').show();
|
||||
|
||||
nbResult = 0;
|
||||
categories.forEach((c) => {
|
||||
if (c[0].toString().toLowerCase().search(string.toLowerCase()) != -1) {
|
||||
addAlbumResult(c);
|
||||
nbResult++;
|
||||
}
|
||||
})
|
||||
|
||||
if (nbResult != 1) {
|
||||
$('.search-album-num-result').html(str_albums_found.replace('%d', nbResult));
|
||||
} else {
|
||||
$('.search-album-num-result').html(str_album_found);
|
||||
}
|
||||
|
||||
if (nbResult != 0) {
|
||||
resultAppear($('.search-album-result .search-album-elem').first());
|
||||
} else {
|
||||
$('.search-album-noresult').show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add an album as a result in the page
|
||||
function addAlbumResult (cat) {
|
||||
id = cat[1][cat[1].length - 1];
|
||||
template = $('.search-album-elem-template').html();
|
||||
newCatNode = $(template);
|
||||
|
||||
hasChildren = false;
|
||||
categories.forEach((c) => {
|
||||
for (let i = 0; i < c[1].length - 1; i++) {
|
||||
if (c[1][i] == id) {
|
||||
hasChildren = true;
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
if (hasChildren) {
|
||||
newCatNode.find('.search-album-icon').addClass('icon-sitemap');
|
||||
} else {
|
||||
newCatNode.find('.search-album-icon').addClass('icon-folder-open');
|
||||
}
|
||||
|
||||
colorId = id%5;
|
||||
newCatNode.find('.search-album-icon').addClass(colors[colorId]);
|
||||
|
||||
newCatNode.find('.search-album-name').html(getHtmlPath(cat));
|
||||
|
||||
href = "admin.php?page=album-" + id;
|
||||
newCatNode.find('.search-album-edit').attr('href', href);
|
||||
|
||||
$('.search-album-result').append(newCatNode);
|
||||
}
|
||||
|
||||
// Get the path "PARENT / parent / album" with link to the edition of all albums
|
||||
function getHtmlPath (cat) {
|
||||
html = '';
|
||||
for (let i = 0; i < cat[1].length - 1; i++) {
|
||||
id = cat[1][i];
|
||||
c = data[id];
|
||||
html += '<a href="' + editLink + id + '">' + c[0] + '</a> <b>/</b> '
|
||||
}
|
||||
html += '<a href="' + editLink + cat[1][cat[1].length - 1] + '">' + cat[0] + '</a>';
|
||||
|
||||
return html
|
||||
}
|
||||
|
||||
// Make the results appear one after one
|
||||
function resultAppear(result) {
|
||||
result.fadeIn();
|
||||
if (result.next().length != 0) {
|
||||
setTimeout(() => {resultAppear(result.next().first())}, 50);
|
||||
}
|
||||
}
|
||||
|
||||
function prepare_skeleton() {
|
||||
while (!($(document).height() > $(window).height())) {
|
||||
$(".search-album-ghost").append("<div></div>");
|
||||
}
|
||||
$(".search-album-ghost div:last").remove();
|
||||
};
|
||||
|
||||
prepare_skeleton();
|
||||
|
||||
updateSearch();
|
||||
$('.search-input').focus();
|
||||
{/literal}
|
||||
{/footer_script}
|
||||
|
||||
<div class="titrePage">
|
||||
<h2>{'Album search tool'|@translate}</h2>
|
||||
</div>
|
||||
|
||||
<div class="search-album">
|
||||
<div class="search-album-cont">
|
||||
<div class="search-album-label">{'Search albums'|@translate}</div>
|
||||
<div class="search-album-input-container" style="position:relative">
|
||||
<span class="icon-search search-icon"></span>
|
||||
<span class="icon-cancel search-cancel"></span>
|
||||
<input class='search-input' type="text" placeholder="{'Portraits'|@translate}">
|
||||
</div>
|
||||
<span class="search-album-help icon-help-circled" title="{'Enter a term to search for album'|@translate}"></span>
|
||||
<span class="search-album-num-result"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-album-ghost">
|
||||
<div></div>
|
||||
<div></div>
|
||||
<div></div>
|
||||
</div>
|
||||
|
||||
<div class="search-album-elem-template" style="display:none">
|
||||
<div class="search-album-elem" style="display:none">
|
||||
<span class='search-album-icon'></span>
|
||||
<p class='search-album-name'></p>
|
||||
<div class="search-album-action-cont">
|
||||
<div class="search-album-action">
|
||||
<a class="icon-pencil search-album-edit">Edit album</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-album-result">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="search-album-noresult">
|
||||
{"No album found"|@translate}
|
||||
</div>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<div id="configContent">
|
||||
|
||||
<fieldset id="indexDisplayConf">
|
||||
<legend>{'Main Page'|translate}</legend>
|
||||
<legend><span class="icon-television icon-green"></span>{'Main Page'|translate}</legend>
|
||||
<ul>
|
||||
<li>
|
||||
<label class="font-checkbox">
|
||||
@@ -124,7 +124,7 @@
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="pictureDisplayConf">
|
||||
<legend>{'Photo Page'|translate}</legend>
|
||||
<legend><span class="icon-picture icon-blue"></span>{'Photo Page'|translate}</legend>
|
||||
<ul>
|
||||
<li>
|
||||
<label class="font-checkbox">
|
||||
@@ -217,7 +217,7 @@
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="pictureInfoConf">
|
||||
<legend>{'Photo Properties'|translate}</legend>
|
||||
<legend><span class="icon-cog icon-red"></span>{'Photo Properties'|translate}</legend>
|
||||
<ul>
|
||||
<li>
|
||||
<label class="font-checkbox">
|
||||
|
||||
@@ -19,6 +19,13 @@
|
||||
});
|
||||
})(target);
|
||||
};
|
||||
|
||||
jQuery('.tiptip-with-img').tipTip({
|
||||
maxWidth: "300px",
|
||||
delay: 0,
|
||||
fadeIn: 200,
|
||||
fadeOut: 200
|
||||
});
|
||||
}());
|
||||
|
||||
{if !isset($ORDER_BY_IS_CUSTOM)}
|
||||
@@ -57,8 +64,8 @@
|
||||
jQuery(".themeBoxes a").colorbox();
|
||||
|
||||
jQuery("input[name='mail_theme']").change(function() {
|
||||
jQuery("input[name='mail_theme']").parents(".themeBox").removeClass("themeDefault");
|
||||
jQuery(this).parents(".themeBox").addClass("themeDefault");
|
||||
jQuery("input[name='mail_theme']").parents(".themeSelect").removeClass("themeDefault");
|
||||
jQuery(this).parents(".themeSelect").addClass("themeDefault");
|
||||
});
|
||||
{/footer_script}
|
||||
|
||||
@@ -69,7 +76,7 @@ jQuery("input[name='mail_theme']").change(function() {
|
||||
<div id="configContent">
|
||||
|
||||
<fieldset class="mainConf">
|
||||
<legend>{'Basic settings'|translate}</legend>
|
||||
<legend><span class="icon-cog icon-purple"></span>{'Basic settings'|translate}</legend>
|
||||
<ul>
|
||||
<li>
|
||||
<label for="gallery_title">{'Gallery title'|translate}</label>
|
||||
@@ -105,7 +112,7 @@ jQuery("input[name='mail_theme']").change(function() {
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="mainConf">
|
||||
<legend>{'Permissions'|translate}</legend>
|
||||
<legend><span class="icon-lock icon-yellow"></span>{'Permissions'|translate}</legend>
|
||||
<ul>
|
||||
<li>
|
||||
<label class="font-checkbox">
|
||||
@@ -154,7 +161,7 @@ jQuery("input[name='mail_theme']").change(function() {
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="mainConf">
|
||||
<legend>{'Miscellaneous'|translate}</legend>
|
||||
<legend><span class="icon-wrench icon-blue"></span>{'Miscellaneous'|translate}</legend>
|
||||
<ul>
|
||||
<li>
|
||||
<label>{'Week starts on'|translate}
|
||||
@@ -183,12 +190,30 @@ jQuery("input[name='mail_theme']").change(function() {
|
||||
</label>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<strong>{'Promote mobile app on mobile devices'|translate}</strong>
|
||||
|
||||
<label class="font-checkbox no-bold">
|
||||
<span class="icon-check"></span>
|
||||
<input type="checkbox" name="show_mobile_app_banner_in_gallery" {if ($main.show_mobile_app_banner_in_gallery)}checked="checked"{/if}>
|
||||
{'in gallery'|translate}
|
||||
</label>
|
||||
|
||||
<label class="font-checkbox no-bold">
|
||||
<span class="icon-check"></span>
|
||||
<input type="checkbox" name="show_mobile_app_banner_in_admin" {if ($main.show_mobile_app_banner_in_admin)}checked="checked"{/if}>
|
||||
{'in administration'|translate}
|
||||
</label>
|
||||
|
||||
<span class="icon-help-circled tiptip-with-img show-mobile-app-banner-tooltip" title="{'Displays a banner to install or open the official Piwigo app'|translate}<br><img src='admin/themes/default/images/piwigo_app_banner.jpg' style='width:100%;margin-top:5px;'>" style="cursor:help"></span>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label>{'Mail theme'|translate}</label>
|
||||
|
||||
<div class="themeBoxes font-checkbox">
|
||||
{foreach from=$main.mail_theme_options item=name key=theme}
|
||||
<div class="themeBox {if $main.mail_theme==$theme}themeDefault{/if}">
|
||||
<div class="themeSelect {if $main.mail_theme==$theme}themeDefault{/if}">
|
||||
<label class="font-checkbox">
|
||||
<div class="themeName">
|
||||
<span class="icon-dot-circled"></span>
|
||||
@@ -204,6 +229,7 @@ jQuery("input[name='mail_theme']").change(function() {
|
||||
{/foreach}
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</fieldset>
|
||||
|
||||
|
||||
@@ -1,6 +1,21 @@
|
||||
{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'}
|
||||
|
||||
{combine_script id='jquery.confirm' load='footer' require='jquery' path='themes/default/js/plugins/jquery-confirm.min.js'}
|
||||
{combine_css path="themes/default/js/plugins/jquery-confirm.min.css"}
|
||||
{footer_script}
|
||||
|
||||
|
||||
const title_msg = '{'Are you sure you want to restore to default settings?'|@translate|@escape}';
|
||||
const confirm_msg = '{'Yes, I am sure'|@translate|@escape}';
|
||||
const cancel_msg = '{'No, I have changed my mind'|@translate|@escape}';
|
||||
|
||||
$(".restore-settings-button").each(function() {
|
||||
$(this).pwg_jconfirm_follow_href({
|
||||
alert_title: title_msg,
|
||||
alert_confirm: confirm_msg,
|
||||
alert_cancel: cancel_msg
|
||||
});
|
||||
});
|
||||
|
||||
(function(){
|
||||
var labelMaxWidth = "{'Maximum width'|translate}",
|
||||
labelWidth = "{'Width'|translate}",
|
||||
@@ -50,7 +65,7 @@
|
||||
jQuery(this).css("visibility", "hidden");
|
||||
return false;
|
||||
});
|
||||
}());
|
||||
})();
|
||||
{/footer_script}
|
||||
|
||||
{html_style}
|
||||
@@ -71,7 +86,7 @@
|
||||
<div id="configContent">
|
||||
|
||||
<fieldset id="sizesConf">
|
||||
<legend>{'Original Size'|translate}</legend>
|
||||
<legend><span class="icon-picture icon-red"></span>{'Original Size'|translate}</legend>
|
||||
{if $is_gd}
|
||||
<div>
|
||||
{'Resize after upload disabled due to the use of GD as graphic library'|translate}
|
||||
@@ -116,7 +131,7 @@
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="multiSizesConf">
|
||||
<legend>{'Multiple Size'|translate}</legend>
|
||||
<legend><span class="icon-th icon-purple"></span>{'Multiple Size'|translate}</legend>
|
||||
|
||||
<div class="showDetails">
|
||||
<a href="#" id="showDetails"{if isset($ferrors)} style="display:none"{/if}>{'show details'|translate}</a>
|
||||
@@ -201,7 +216,7 @@
|
||||
{if isset($ferrors.resize_quality)}<span class="dErrorDesc" title="{$ferrors.resize_quality}">!</span>{/if}
|
||||
</p>
|
||||
<p style="margin:10px 0 0 0;{if isset($ferrors)} display:block;{/if}" class="sizeDetails">
|
||||
<a href="{$F_ACTION}&action=restore_settings" onclick="return confirm('{'Are you sure?'|translate|@escape:javascript}');">{'Reset to default values'|translate}</a>
|
||||
<a href="{$F_ACTION}&action=restore_settings" class="restore-settings-button">{'Reset to default values'|translate}</a>
|
||||
</p>
|
||||
|
||||
{if !empty($custom_derivatives)}
|
||||
|
||||
@@ -47,7 +47,7 @@ jQuery('.thumbnail').tipTip({
|
||||
{if !empty($thumbnails)}
|
||||
<p><input type="submit" value="{'Submit'|@translate}" name="submit"></p>
|
||||
<fieldset>
|
||||
<legend>{'Manual order'|@translate}</legend>
|
||||
<legend><span class="icon-sort-alt-down icon-blue"></span>{'Manual order'|@translate}</legend>
|
||||
{if !empty($thumbnails)}
|
||||
<p>{'Drag to re-order'|@translate}</p>
|
||||
<ul class="thumbnails">
|
||||
@@ -63,7 +63,7 @@ jQuery('.thumbnail').tipTip({
|
||||
{/if}
|
||||
|
||||
<fieldset>
|
||||
<legend>{'Sort order'|@translate}</legend>
|
||||
<legend><span class="icon-sort-name-up icon-red"></span>{'Sort order'|@translate}</legend>
|
||||
<p class="field">
|
||||
<label class="font-checkbox">
|
||||
<span class="icon-dot-circled"></span>
|
||||
|
||||
@@ -1,189 +1,254 @@
|
||||
{include file='include/colorbox.inc.tpl'}
|
||||
{footer_script}
|
||||
{literal}
|
||||
$(document).ready(function() {
|
||||
/**
|
||||
* Add group
|
||||
*/
|
||||
jQuery("#addGroup").click(function() {
|
||||
jQuery("#addGroupForm").toggle();
|
||||
jQuery("input[name=groupname]").focus();
|
||||
return false;
|
||||
});
|
||||
var pwg_token = "{$PWG_TOKEN}";
|
||||
var str_member_default = "{'member'|@translate}"
|
||||
var str_members_default = "{'members'|@translate}"
|
||||
var str_group_created = "{'Group added'|@translate}"
|
||||
var str_renaming_done = "{'Group renamed'|@translate}"
|
||||
var str_name_taken = "{'Name is already taken'|@translate}"
|
||||
var str_group_deleted = '{'Group "%s" succesfully deleted'|@translate}'
|
||||
var str_groups_deleted = '{'Groups \{%s\} succesfully deleted'|@translate}'
|
||||
var str_set_default = "{'Set as group for new users'|@translate}"
|
||||
var str_unset_default = "{'Unset as group for new users'|@translate}"
|
||||
var str_delete = '{'Delete group "%s"?'|@translate}'
|
||||
var str_yes_delete_confirmation = "{'Yes, delete'|@translate}"
|
||||
var str_no_delete_confirmation = "{"No, I have changed my mind"|@translate}"
|
||||
var str_user_associated = "{"User associated"|@translate}"
|
||||
var str_user_dissociated = '{'User "%s" dissociated from this group'|@translate}'
|
||||
var str_user_list = "{"User List"|@translate}"
|
||||
var str_merged_into = '{'Group(s) \{%s1\} succesfully merged into "%s2"'|@translate}'
|
||||
var str_copy = '{' (copy)'|@translate}'
|
||||
var str_other_copy = '{' (copy %s)'|@translate}'
|
||||
|
||||
jQuery("#addGroupClose").click(function() {
|
||||
jQuery("#addGroupForm").hide();
|
||||
return false;
|
||||
});
|
||||
var serverKey = '{$CACHE_KEYS.users}'
|
||||
var serverId = '{$CACHE_KEYS._hash}'
|
||||
var rootUrl = '{$ROOT_URL}'
|
||||
|
||||
$('.groups input').change(function () { $(this).parent('p').toggleClass('group_select'); });
|
||||
$(".grp_action").hide();
|
||||
$("input.group_selection").click(function() {
|
||||
|
||||
var nbSelected = 0;
|
||||
nbSelected = $("input.group_selection").filter(':checked').length;
|
||||
|
||||
if (nbSelected == 0) {
|
||||
$("#permitAction").hide();
|
||||
$("#forbidAction").show();
|
||||
}
|
||||
else {
|
||||
$("#permitAction").show();
|
||||
$("#forbidAction").hide();
|
||||
}
|
||||
$("p[group_id="+$(this).prop("value")+"]").each(function () {
|
||||
$(this).toggle();
|
||||
});
|
||||
|
||||
if (nbSelected<2) {
|
||||
$("#two_to_select").show();
|
||||
$("#two_atleast").hide();
|
||||
}
|
||||
else {
|
||||
$("#two_to_select").hide();
|
||||
$("#two_atleast").show();
|
||||
}
|
||||
});
|
||||
$("[id^=action_]").hide();
|
||||
$("select[name=selectAction]").change(function () {
|
||||
$("[id^=action_]").hide();
|
||||
$("#action_"+$(this).prop("value")).show();
|
||||
if ($(this).val() != -1 ) {
|
||||
$("#applyActionBlock").show();
|
||||
}
|
||||
else {
|
||||
$("#applyActionBlock").hide();
|
||||
}
|
||||
});
|
||||
$(document).on('keydown', function (e) {
|
||||
if ( e.keyCode === 27) { // ESC button
|
||||
$("#UserList").fadeOut();
|
||||
}
|
||||
})
|
||||
$(document).on('click', function (e) {
|
||||
if ($(e.target).closest(".UserListPopInContainer").length === 0) {
|
||||
$("#UserList").fadeOut();
|
||||
}
|
||||
});
|
||||
|
||||
{/literal}
|
||||
{/footer_script}
|
||||
|
||||
{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'}
|
||||
{combine_script id='group_list' load='footer' path='admin/themes/default/js/group_list.js'}
|
||||
|
||||
{combine_script id='jquery.selectize' load='footer' path='themes/default/js/plugins/selectize.min.js'}
|
||||
{combine_css path="themes/default/js/plugins/selectize.{$themeconf.colorscheme}.css"}
|
||||
|
||||
{combine_script id='LocalStorageCache' load='footer' path='admin/themes/default/js/LocalStorageCache.js'}
|
||||
|
||||
{combine_script id='jquery.confirm' load='footer' require='jquery' path='themes/default/js/plugins/jquery-confirm.min.js'}
|
||||
{combine_css path="themes/default/js/plugins/jquery-confirm.min.css"}
|
||||
{combine_css path="admin/themes/default/fontello/css/animation.css"}
|
||||
|
||||
{* Define template function for the content of Groups*}
|
||||
{function name=groupContent}
|
||||
{function groupContent}
|
||||
<div id="group-{$grp_id}" class="GroupContainer" data-id={$grp_id} {if $grp_is_default}data-default=1 {else}data-default=0 {/if}>
|
||||
<div class="Group-checkbox in-selection-mode">
|
||||
<label class="Group-checkbox-label" for="Group-Checkbox-selection-{$grp_id}"></label>
|
||||
<input type="checkbox" id="Group-Checkbox-selection-{$grp_id}">
|
||||
<span class="group-checkmark"></span>
|
||||
</div>
|
||||
<div class="groupHeader">
|
||||
<div class="groupIcon">
|
||||
<div class="icon-users-1 {$grp_color}"></div>
|
||||
<div class="groupMessage icon-ok"></div>
|
||||
<div class="groupError icon-cancel"></div>
|
||||
</div>
|
||||
|
||||
<div class="icon-star not-in-selection-mode is-default-token{if !$grp_is_default} deactivate{/if}" ></div>
|
||||
|
||||
<div class="icon-ellipsis-vert group-dropdown-options not-in-selection-mode">
|
||||
<div id="GroupOptions" class="dropdown">
|
||||
<option class="icon-docs dropdown-option" id="GroupDuplicate" value="duplicate">{'Duplicate'|@translate}</option>
|
||||
<option class="icon-trash dropdown-option" id="GroupDelete" value="delete">{'Delete'|@translate}</option>
|
||||
<option class="icon-star dropdown-option" id="GroupDefault" value="delete"></option>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Group-name">
|
||||
<div class="Group-name-container">
|
||||
<p id="group_name">{$grp_name}</p>
|
||||
<span class="icon-pencil"></span>
|
||||
</div>
|
||||
<div class="group-rename">
|
||||
<form>
|
||||
<input type="text" class="group_name-editable" value="{$grp_name}">
|
||||
<input type="submit" hidden>
|
||||
</form>
|
||||
<span class="icon-ok validate"></span>
|
||||
<span class="icon-cancel"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="EditGroupName">
|
||||
<input class="input-edit-group-name" type="text" name="username" maxlength="50" size="20" placeholder="{$grp_name}">
|
||||
<button class="icon-ok submit" name="submit_add" id="EditGroupNameSubmit" type="submit">Change group name</button>
|
||||
<a id="EditGroupcancel">{'Cancel'|@translate}</a>
|
||||
</div>
|
||||
|
||||
<p class="group_number_users">{$grp_members}</p>
|
||||
</div>
|
||||
|
||||
<a id="UserListTrigger" class="icon-user-1 manage-users not-in-selection-mode GroupManagerButtons">Manage users</a>
|
||||
<a class="icon-lock manage-permissions not-in-selection-mode GroupManagerButtons" href="admin.php?page=group_perm&group_id={$grp_id}">Manage permissions</a>
|
||||
</div>
|
||||
{/function}
|
||||
{/function}
|
||||
|
||||
|
||||
<div class="titrePage">
|
||||
<h2>{'Group management'|@translate}</h2>
|
||||
<h2>{'Group management'|@translate} <span class="badge-number">{(empty($groups)) ? 0 :count($groups)}</span></h2>
|
||||
</div>
|
||||
|
||||
<p class="showCreateAlbum" id="showAddGroup">
|
||||
<a class="icon-plus-circled" href="#" id="addGroup">{'Add group'|translate}</a>
|
||||
</p>
|
||||
<div class="selection-mode-group-manager">
|
||||
<label class="switch">
|
||||
<input type="checkbox" id="toggleSelectionMode">
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
<p>{'Selection mode'|@translate}</p>
|
||||
</div>
|
||||
|
||||
<form method="post" style="display:none" id="addGroupForm" name="add_user" action="{$F_ADD_ACTION}" class="properties">
|
||||
<fieldset class="with-border">
|
||||
<legend>{'Add group'|@translate}</legend>
|
||||
<div id="selection-mode-block" class="in-selection-mode">
|
||||
<div class="Selection-mode-content">
|
||||
<p id="nothing-selected">{'No groups selected, no actions possible.'|@translate}</p>
|
||||
<div class="SelectionModeGroup">
|
||||
<p>{'Your selection'|@translate}</p>
|
||||
<div class="SelectionModeGroupList">
|
||||
|
||||
<p>
|
||||
<strong>{'Group name'|translate}</strong><br>
|
||||
<input type="text" name="groupname" maxlength="50" size="20">
|
||||
</p>
|
||||
<div class="DeleteGroupList">
|
||||
|
||||
</div>
|
||||
|
||||
<p class="actionButtons">
|
||||
<input class="submit" name="submit_add" type="submit" value="{'Add'|translate}">
|
||||
<a href="#" id="addGroupClose">{'Cancel'|@translate}</a>
|
||||
</p>
|
||||
</div>
|
||||
<button id="MergeSelectionMode" class="icon-object-group unavailable" title="{'At least 2 selected groups are needed to merge'|@translate}">{'Merge'|@translate}</button>
|
||||
<button id="DeleteSelectionMode" class="icon-trash-1 unavailable">{'Delete'|@translate}</button>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
|
||||
<div id="MergeOptionsBlock">
|
||||
<p>{'Choose which group to merge these groups into'|@translate}</p>
|
||||
<p class="ItalicTextInfo">{'The other groups will be removed'|@translate}</p>
|
||||
<div class="MergeOptionsContainer">
|
||||
<select id="MergeOptionsChoices">
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<button class="icon-ok ConfirmMergeButton">Confirm merge</button>
|
||||
<a id="CancelMerge" onclick="updateSelectionPanel('Selection')">Cancel</a>
|
||||
</div>
|
||||
|
||||
|
||||
</fieldset>
|
||||
</form>
|
||||
<div id="ConfirmGroupAction">
|
||||
<p>You are about to delete <span class="number-Selected">0</span> groups, are you sure?</p>
|
||||
<button class="icon-ok ConfirmDeleteButton">{'Yes, delete'|@translate}</button>
|
||||
<a id="CancelDelete" onclick="updateSelectionPanel('Selection')">{"No, I have changed my mind"|@translate}</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form method="post" name="add_user" action="{$F_ADD_ACTION}" class="properties">
|
||||
<input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
|
||||
<div class="group-manager">
|
||||
|
||||
<div class="groups">
|
||||
|
||||
<div id="addGroupForm" class="GroupContainer">
|
||||
<div class="groupError icon-cancel"></div>
|
||||
<div class="addGroupBlock">
|
||||
<div class="icon-plus-circled icon-blue"></div>
|
||||
<p id="addGroup">{'Add group'|translate}</p>
|
||||
</div>
|
||||
<form>
|
||||
<fieldset>
|
||||
<div class="addGroupFormLabelAndInput">
|
||||
<label class="addGroupLabel" for="addGroupNameInput">{'Group name'|translate}</label>
|
||||
<input type="text" id="addGroupNameInput" name="groupname" maxlength="50" size="20" placeholder="Photographers...">
|
||||
</div>
|
||||
<div class="actionButtons">
|
||||
<button name="submit" type="submit" class="buttonLike">
|
||||
<i class='icon-plus'> </i> {'Add'|translate}
|
||||
</button>
|
||||
<br/>
|
||||
<a id="addGroupClose" onclick="hideAddGroupForm()">{'Cancel'|@translate}</a>
|
||||
</div>
|
||||
<input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{* Template Group (for js application) *}
|
||||
{groupContent grp_id="template" grp_name="Template" grp_members=0 grp_is_default=false}
|
||||
|
||||
{assign var='color_tab' value=["icon-red", "icon-blue", "icon-yellow", "icon-purple", "icon-green"]}
|
||||
|
||||
<ul class="groups">
|
||||
{if not empty($groups)}
|
||||
{foreach from=$groups item=group name=group_loop}
|
||||
<li>
|
||||
<label><p>{$group.NAME}<i><small>{$group.IS_DEFAULT}</small></i><input class="group_selection" name="group_selection[]" type="checkbox" value="{$group.ID}"></p></label>
|
||||
<p class="list_user">{if $group.MEMBERS>0}{$group.MEMBERS}<br>{$group.L_MEMBERS}{else}{$group.MEMBERS}{/if}</p>
|
||||
<a class="icon-lock group_perm" href="{$group.U_PERM}" title="{'Permissions'|@translate}">{'Permissions'|translate}</a>
|
||||
</li>
|
||||
{assign var='color_id' value=$group.ID%5}
|
||||
{groupContent
|
||||
grp_id=$group.ID
|
||||
grp_name=$group.NAME
|
||||
grp_members=$group.MEMBERS
|
||||
grp_color=$color_tab[$color_id]
|
||||
grp_is_default=$group.IS_DEFAULT
|
||||
}
|
||||
|
||||
{/foreach}
|
||||
{/if}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<fieldset id="action">
|
||||
<legend>{'Action'|@translate}</legend>
|
||||
<div id="forbidAction">{'No group selected, no action possible.'|@translate}</div>
|
||||
<div id="permitAction" style="display:none">
|
||||
<div id="UserList" class="UserListPopIn">
|
||||
|
||||
<select name="selectAction">
|
||||
<option value="-1">{'Choose an action'|@translate}</option>
|
||||
<option disabled="disabled">------------------</option>
|
||||
<option value="rename">{'Rename'|@translate}</option>
|
||||
<option value="delete">{'Delete'|@translate}</option>
|
||||
<option value="merge">{'Merge selected groups'|@translate}</option>
|
||||
<option value="duplicate">{'Duplicate'|@translate}</option>
|
||||
<option value="toggle_default">{'Toggle \'default group\' property'|@translate}</option>
|
||||
{if !empty($element_set_groupe_plugins_actions)}
|
||||
{foreach from=$element_set_groupe_plugins_actions item=action}
|
||||
<option value="{$action.ID}">{$action.NAME}</option>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</select>
|
||||
<div class="UserListPopInContainer">
|
||||
|
||||
<!-- rename -->
|
||||
<div id="action_rename" class="bulkAction">
|
||||
{if not empty($groups)}
|
||||
{foreach from=$groups item=group}
|
||||
<p group_id="{$group.ID}" class="grp_action">
|
||||
<input type="text" class="large" name="rename_{$group.ID}" value="{$group.NAME}" onfocus="this.value=(this.value=='{$group.NAME}') ? '' : this.value;" onblur="this.value=(this.value=='') ? '{$group.NAME}' : this.value;">
|
||||
</p>
|
||||
{/foreach}
|
||||
{/if}
|
||||
<a class="icon-cancel CloseUserList"></a>
|
||||
|
||||
<div class="group-name-block">
|
||||
<span class="icon-list-bullet"></span>
|
||||
<p></p>
|
||||
<span class="UserNumberBadge">25</span>
|
||||
</div>
|
||||
|
||||
<div class="UserListAddFilterUsers">
|
||||
<div class="AddUserBlock">
|
||||
<p>Associate User</p>
|
||||
<select class="UserSearch" placeholder="John Doe"></select>
|
||||
<button class="icon-user-add submit" name="submit_add" id="UserSubmit" type="submit"></button>
|
||||
</div>
|
||||
<div class="FilterUserBlock">
|
||||
<div class="AmountOfUsersShown">
|
||||
<p>Showing <strong>39</strong> users out of <strong>251</strong></p>
|
||||
</div>
|
||||
|
||||
<!-- merge -->
|
||||
<div id="action_merge" class="bulkAction">
|
||||
<p id="two_to_select">{'Please select at least two groups'|@translate}</p>
|
||||
{assign var='mergeDefaultValue' value='Type here the name of the new group'|@translate}
|
||||
<p id="two_atleast">
|
||||
<input type="text" class="large" name="merge" value="{$mergeDefaultValue}" onfocus="this.value=(this.value=='{$mergeDefaultValue}') ? '' : this.value;" onblur="this.value=(this.value=='') ? '{$mergeDefaultValue}' : this.value;">
|
||||
</p>
|
||||
<div class='search-user'>
|
||||
<span class="icon-filter search-icon"></span>
|
||||
<span class="icon-cancel search-cancel"></span>
|
||||
<input class="input-user-name search-input" type="text" name="username" maxlength="50" size="20" placeholder="{'Filter'|@translate}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- delete -->
|
||||
<div id="action_delete" class="bulkAction">
|
||||
<p><label><input type="checkbox" name="confirm_deletion" value="1"> {'Are you sure?'|@translate}</label></p>
|
||||
</div>
|
||||
<div class="UsersInGroupListContainer">
|
||||
|
||||
<div class="UsersInGroupList row">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- duplicate -->
|
||||
<div id="action_duplicate" class="bulkAction">
|
||||
{assign var='duplicateDefaultValue' value='Type here the name of the new group'|@translate}
|
||||
{if not empty($groups)}
|
||||
{foreach from=$groups item=group}
|
||||
<p group_id="{$group.ID}" class="grp_action">
|
||||
{$group.NAME} > <input type="text" class="large" name="duplicate_{$group.ID}" value="{$duplicateDefaultValue}" onfocus="this.value=(this.value=='{$duplicateDefaultValue}') ? '' : this.value;" onblur="this.value=(this.value=='') ? '{$duplicateDefaultValue}' : this.value;">
|
||||
</p>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<div class="LinkUserManager">
|
||||
<a>
|
||||
<span class="icon-users-cog"></span>
|
||||
Manage users with user manager</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- toggle_default -->
|
||||
<div id="action_toggle_default" class="bulkAction">
|
||||
{if not empty($groups)}
|
||||
{foreach from=$groups item=group}
|
||||
<p group_id="{$group.ID}" class="grp_action">
|
||||
{$group.NAME} > {if empty($group.IS_DEFAULT)}{'This group will be set to default'|@translate}{else}{'This group will be unset to default'|@translate}{/if}
|
||||
</p>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
|
||||
<!-- plugins -->
|
||||
{if !empty($element_set_groupe_plugins_actions)}
|
||||
{foreach from=$element_set_groupe_plugins_actions item=action}
|
||||
<div id="action_{$action.ID}" class="bulkAction">
|
||||
{if !empty($action.CONTENT)}{$action.CONTENT}{/if}
|
||||
</div>
|
||||
{/foreach}
|
||||
{/if}
|
||||
|
||||
<p id="applyActionBlock" style="display:none" class="actionButtons">
|
||||
<input id="applyAction" class="submit" type="submit" value="{'Apply action'|@translate}" name="submit"> <span id="applyOnDetails"></span></p>
|
||||
</div> <!-- #permitAction -->
|
||||
</fieldset>
|
||||
</form>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
<form method="post" action="{$F_ACTION}">
|
||||
{$DOUBLE_SELECT}
|
||||
<input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
|
||||
</form>
|
||||
|
||||
<p>{'Only private albums are listed'|@translate}</p>
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{$lang_info.code}" dir="{$lang_info.direction}">
|
||||
<head>
|
||||
{if $SHOW_MOBILE_APP_BANNER}
|
||||
<meta name="apple-itunes-app" content="app-id=472225196">
|
||||
{/if}
|
||||
<meta charset="{$CONTENT_ENCODING}">
|
||||
<title>{$GALLERY_TITLE} :: {$PAGE_TITLE}</title>
|
||||
<link rel="shortcut icon" type="image/x-icon" href="{$ROOT_URL}{$themeconf.icon_dir}/favicon.ico">
|
||||
@@ -57,7 +60,7 @@
|
||||
<div class="pwgHead-gallery-title">{$GALLERY_TITLE}</div>
|
||||
|
||||
<div id="headActions">
|
||||
<i class="icon-user"></i>{$USERNAME}
|
||||
<span class="admin-head-username"><i class="icon-user"></i>{$USERNAME}</span>
|
||||
{*
|
||||
<a href="{$U_RETURN}" title="{'Visit Gallery'|translate}"><i class="icon-eye"></i><span>{'Visit Gallery'|translate}</span></a>
|
||||
*}
|
||||
|
||||
@@ -11,7 +11,7 @@ jQuery(function(){ {* <!-- onLoad needed to wait localization loads --> *}
|
||||
|
||||
<form class="filter" method="post" name="filter" action="{$F_ACTION}">
|
||||
<fieldset class="with-border">
|
||||
<legend>{'Filter'|@translate}</legend>
|
||||
<legend><span class="icon-filter icon-green"></span>{'Filter'|@translate}</legend>
|
||||
<ul>
|
||||
<li><label>{'Date'|@translate}</label></li>
|
||||
<li>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
{combine_script id='jquery.selectize' load='footer' path='themes/default/js/plugins/selectize.min.js'}
|
||||
{combine_css id='jquery.selectize' path="themes/default/js/plugins/selectize.{$themeconf.colorscheme}.css"}
|
||||
{combine_css path="admin/themes/default/fontello/css/animation.css"}
|
||||
{combine_css path="admin/themes/default/fontello/css/animation.css" order=10}
|
||||
|
||||
{combine_script id='addAlbum' load=$load_mode path='admin/themes/default/js/addAlbum.js'}
|
||||
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
{* was used in double_select.tpl until Piwigo 2.8, no longer used in Piwigo core *}
|
||||
{footer_script require='jquery.ui.resizable'}{literal}
|
||||
jQuery(document).ready(function(){
|
||||
// Resize possible for double select list
|
||||
jQuery(".doubleSelect select.categoryList").resizable({
|
||||
handles: "w,e",
|
||||
animate: true,
|
||||
animateDuration: "slow",
|
||||
animateEasing: "swing",
|
||||
preventDefault: true,
|
||||
preserveCursor: true,
|
||||
autoHide: true,
|
||||
ghost: true
|
||||
});
|
||||
});
|
||||
{/literal}{/footer_script}
|
||||
@@ -1,16 +0,0 @@
|
||||
{* Resize possible *}
|
||||
{footer_script require='jquery.ui.resizable'}{literal}
|
||||
jQuery().ready(function(){
|
||||
// Resize possible for list
|
||||
jQuery(".categoryList").resizable({
|
||||
handles: "all",
|
||||
animate: true,
|
||||
animateDuration: "slow",
|
||||
animateEasing: "swing",
|
||||
preventDefault: true,
|
||||
preserveCursor: true,
|
||||
autoHide: true,
|
||||
ghost: true
|
||||
});
|
||||
});
|
||||
{/literal}{/footer_script}
|
||||
@@ -1,15 +0,0 @@
|
||||
{footer_script require='jquery'}{literal}
|
||||
jQuery(document).ready(function(){
|
||||
jQuery(".tagSelection").on("click", "label", function () {
|
||||
var parent = jQuery(this).parent('li');
|
||||
var checkbox = jQuery(this).children("input[type=checkbox]");
|
||||
|
||||
if (jQuery(checkbox).is(':checked')) {
|
||||
parent.addClass("tagSelected");
|
||||
}
|
||||
else {
|
||||
parent.removeClass('tagSelected');
|
||||
}
|
||||
});
|
||||
});
|
||||
{/literal}{/footer_script}
|
||||
@@ -282,7 +282,7 @@ jQuery().ready(function(){ldelim}
|
||||
</label>
|
||||
<br>
|
||||
<label>
|
||||
<input type="checkbox" name="send_password_by_mail" checked="checked">
|
||||
<input type="checkbox" name="send_credentials_by_mail" checked="checked">
|
||||
{'Send my connection settings by email'|@translate}
|
||||
</label>
|
||||
</td>
|
||||
|
||||
@@ -5,7 +5,9 @@
|
||||
{footer_script require='jquery.cluetip'}
|
||||
var piwigo_need_update_msg = '<a href="admin.php?page=updates">{'A new version of Piwigo is available.'|@translate|@escape:"javascript"} <i class="icon-right"></i></a>';
|
||||
var ext_need_update_msg = '<a href="admin.php?page=updates&tab=ext">{'Some upgrades are available for extensions.'|@translate|@escape:"javascript"} <i class="icon-right"></i></a>';
|
||||
|
||||
const str_gb_used = "{'%s GB used'|translate}";
|
||||
const str_mb_used = "{'%s MB used'|translate}";
|
||||
const storage_total = {$STORAGE_TOTAL};
|
||||
{literal}
|
||||
jQuery().ready(function(){
|
||||
jQuery('.cluetip').cluetip({
|
||||
@@ -45,8 +47,41 @@ jQuery().ready(function(){
|
||||
return false;
|
||||
}
|
||||
});
|
||||
let size_info = storage_total > 1000000 ? str_gb_used : str_mb_used;
|
||||
let size_nb = storage_total > 1000000 ? (storage_total / 1000000).toFixed(2) : (storage_total / 1000).toFixed(0);
|
||||
$(".chart-title-infos").html(size_info.replace("%s", size_nb));
|
||||
});
|
||||
|
||||
//Tooltip for the storage chart
|
||||
$('.storage-chart span').each(function () {
|
||||
let tooltip = $('.storage-tooltips #'+$(this).data('type'));
|
||||
let left = $(this).position().left + $(this).width()/2 - tooltip.innerWidth()/2;
|
||||
tooltip.css('left', left+"px")
|
||||
$(this).hover(function() {
|
||||
tooltip.toggle();
|
||||
});
|
||||
});
|
||||
|
||||
$(window).on('resize', function(){
|
||||
$('.storage-chart span').each(function () {
|
||||
let tooltip = $('.storage-tooltips #'+$(this).data('type'));
|
||||
let left = $(this).position().left + $(this).width()/2 - tooltip.innerWidth()/2;
|
||||
tooltip.css('left', left+"px")
|
||||
});
|
||||
});
|
||||
let size = 0;
|
||||
let str_size_type = "MB";
|
||||
let size_nb = 0;
|
||||
let str_size = "";
|
||||
{/literal}
|
||||
{foreach from=$STORAGE_CHART_DATA key=type item=value}
|
||||
size = {$value};
|
||||
str_size_type = size > 1000000 ? "GB" : "MB";
|
||||
size_nb = size > 1000000 ? (size / 1000000).toFixed(2) : (size / 1000).toFixed(0);
|
||||
str_size = " : " + size_nb.toString() + " " + str_size_type;
|
||||
$("#storage-{$type}").html("<b></b>" + str_size);
|
||||
$("#storage-{$type} b").html("{$type}");
|
||||
{/foreach}
|
||||
{/footer_script}
|
||||
|
||||
{html_style}
|
||||
@@ -61,85 +96,164 @@ jQuery().ready(function(){
|
||||
|
||||
<h2>{'Piwigo Administration'|@translate}</h2>
|
||||
|
||||
<div class="intro-page-container">
|
||||
<div class="stat-boxes">
|
||||
|
||||
{if $NB_PHOTOS > 1}
|
||||
<a class="stat-box stat-box-yellow" href="{$U_ADD_PHOTOS}">
|
||||
<i class="icon-picture"></i>
|
||||
<a class="stat-box" href="{$U_ADD_PHOTOS}">
|
||||
<i class="icon-picture icon-yellow"></i>
|
||||
<span class="number">{$NB_PHOTOS|number_format}</span><span class="caption">{'Photos'|translate}</span>
|
||||
</a>
|
||||
{/if}
|
||||
|
||||
{if $NB_ALBUMS > 1}
|
||||
<a class="stat-box stat-box-red" href="{$U_CATEGORIES}">
|
||||
<i class="icon-sitemap"></i>
|
||||
<a class="stat-box" href="{$U_CATEGORIES}">
|
||||
<i class="icon-sitemap icon-red"></i>
|
||||
<span class="number">{$NB_ALBUMS}</span><span class="caption">{'Albums'|translate}</span>
|
||||
</a>
|
||||
{/if}
|
||||
|
||||
{if $NB_TAGS > 1}
|
||||
<a class="stat-box stat-box-yellow" href="{$U_TAGS}">
|
||||
<i class="icon-tags"></i>
|
||||
<a class="stat-box" href="{$U_TAGS}">
|
||||
<i class="icon-tags icon-yellow"></i>
|
||||
<span class="number">{$NB_TAGS}</span><span class="caption" title="{'%d associations'|translate:$NB_IMAGE_TAG}">{'Tags'|translate}</span>
|
||||
</a>
|
||||
{/if}
|
||||
|
||||
{if $NB_USERS > 2}
|
||||
<a class="stat-box stat-box-purple" href="{$U_USERS}">
|
||||
<i class="icon-users"></i>
|
||||
<a class="stat-box" href="{$U_USERS}">
|
||||
<i class="icon-users icon-purple"></i>
|
||||
<span class="number">{$NB_USERS}</span><span class="caption">{'Users'|translate}</span>
|
||||
</a>
|
||||
{/if}
|
||||
|
||||
{if $NB_GROUPS > 0}
|
||||
<a class="stat-box stat-box-purple" href="{$U_GROUPS}">
|
||||
<i class="icon-group"></i>
|
||||
<a class="stat-box" href="{$U_GROUPS}">
|
||||
<i class="icon-group icon-purple"></i>
|
||||
<span class="number">{$NB_GROUPS}</span><span class="caption">{'Groups'|translate}</span>
|
||||
</a>
|
||||
{/if}
|
||||
|
||||
{if $NB_COMMENTS > 1}
|
||||
<a class="stat-box stat-box-blue" href="{$U_COMMENTS}">
|
||||
<i class="icon-chat"></i>
|
||||
<a class="stat-box" href="{$U_COMMENTS}">
|
||||
<i class="icon-chat icon-blue"></i>
|
||||
<span class="number">{$NB_COMMENTS}</span><span class="caption">{'Comments'|translate}</span>
|
||||
</a>
|
||||
{/if}
|
||||
|
||||
{if $NB_RATES > 0}
|
||||
<a class="stat-box stat-box-yellow" href="{$U_RATING}">
|
||||
<i class="icon-star"></i>
|
||||
<a class="stat-box" href="{$U_RATING}">
|
||||
<i class="icon-star icon-yellow"></i>
|
||||
<span class="number">{$NB_RATES}</span><span class="caption">{'Rating'|translate}</span>
|
||||
</a>
|
||||
{/if}
|
||||
|
||||
{if $NB_VIEWS > 0}
|
||||
<a class="stat-box stat-box-blue" href="{$U_HISTORY_STAT}">
|
||||
<i class="icon-signal"></i>
|
||||
<a class="stat-box" href="{$U_HISTORY_STAT}">
|
||||
<i class="icon-signal icon-blue"></i>
|
||||
<span class="number">{$NB_VIEWS}</span><span class="caption">{'Pages seen'|translate}</span>
|
||||
</a>
|
||||
{/if}
|
||||
|
||||
{if $NB_PLUGINS > 0}
|
||||
<a class="stat-box stat-box-green" href="{$U_PLUGINS}">
|
||||
<i class="icon-puzzle"></i>
|
||||
<a class="stat-box" href="{$U_PLUGINS}">
|
||||
<i class="icon-puzzle icon-green"></i>
|
||||
<span class="number">{$NB_PLUGINS}</span><span class="caption">{'Plugins'|translate}</span>
|
||||
</a>
|
||||
{/if}
|
||||
|
||||
<div class="stat-box stat-box-blue">
|
||||
<i class="icon-hdd"></i>
|
||||
<div class="stat-box">
|
||||
<i class="icon-hdd icon-blue"></i>
|
||||
<span class="number">{$STORAGE_USED}</span><span class="caption">{'Storage used'|translate}</span>
|
||||
</div>
|
||||
|
||||
{if $NB_PHOTOS > 1}
|
||||
<div class="stat-box stat-box-yellow">
|
||||
<i class="icon-back-in-time"></i>
|
||||
<div class="stat-box">
|
||||
<i class="icon-back-in-time icon-yellow"></i>
|
||||
<span class="number">{$first_added_age}</span><span class="caption" title="{'first photo added on %s'|translate:$first_added_date}">{'First photo added'|translate}</span>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
</div> {* .stat-boxes *}
|
||||
|
||||
<div class="intro-charts">
|
||||
|
||||
<div class="chart-title"> {"Activity peak in the last weeks"|@translate}</div>
|
||||
<div class="activity-chart" style="grid-template-rows: repeat({count($ACTIVITY_CHART_DATA) + 1}, 5vw);">
|
||||
{foreach from=$ACTIVITY_CHART_DATA item=WEEK_ACTIVITY key=WEEK_NUMBER}
|
||||
<div id="week-{$WEEK_NUMBER}-legend" class="row-legend"><div>{"Week %s"|@translate:$ACTIVITY_WEEK_NUMBER[$WEEK_NUMBER]}</div></div>
|
||||
{foreach from=$WEEK_ACTIVITY item=SIZE key=DAY_NUMBER}
|
||||
<span>
|
||||
{if $SIZE != 0}
|
||||
{assign var='SIZE_IN_UNIT' value=$SIZE/$ACTIVITY_CHART_NUMBER_SIZES * 5 + 1}
|
||||
{assign var='OPACITY_IN_UNIT' value=$SIZE/$ACTIVITY_CHART_NUMBER_SIZES * 0.6 + 0.2}
|
||||
<div id="day{$WEEK_NUMBER}-{$DAY_NUMBER}" style="height:{$SIZE_IN_UNIT}vw;width:{$SIZE_IN_UNIT}vw;opacity:{$OPACITY_IN_UNIT}"></div>
|
||||
{if $ACTIVITY_LAST_WEEKS[$WEEK_NUMBER][$DAY_NUMBER]["number"] != 0}
|
||||
<p class="tooltip" style="transform: translate(-50%,{$SIZE_IN_UNIT/2}vw);">
|
||||
<span class="tooltip-header">
|
||||
<span class="tooltip-title">{if $ACTIVITY_LAST_WEEKS[$WEEK_NUMBER][$DAY_NUMBER]["number"] > 1}{"%s Activities"|@translate:$ACTIVITY_LAST_WEEKS[$WEEK_NUMBER][$DAY_NUMBER]["number"]}{else}{"%s Activity"|@translate:$ACTIVITY_LAST_WEEKS[$WEEK_NUMBER][$DAY_NUMBER]["number"]}{/if}</span>
|
||||
<span class="tooltip-date">{$ACTIVITY_LAST_WEEKS[$WEEK_NUMBER][$DAY_NUMBER]["date"]}</span>
|
||||
</span>
|
||||
<span class="tooltip-details">
|
||||
{foreach from=$ACTIVITY_LAST_WEEKS[$WEEK_NUMBER][$DAY_NUMBER]["details"] item=actions key=cat}
|
||||
<span class="tooltip-details-cont">
|
||||
{if $cat == "Group"} <span class="icon-group icon-purple tooltip-details-title">{$cat|@translate}</span>
|
||||
{elseif $cat == "User"} <span class="icon-users icon-purple tooltip-details-title"> {$cat|@translate}</span>
|
||||
{elseif $cat == "Album"} <span class="icon-sitemap icon-red tooltip-details-title">{$cat|@translate}</span>
|
||||
{elseif $cat == "Photo"} <span class="icon-picture icon-yellow tooltip-details-title">{$cat|@translate} </span>
|
||||
{elseif $cat == "Tag"} <span class="icon-tags icon-green tooltip-details-title">{$cat|@translate} </span>
|
||||
{else} <span class="tooltip-details-title"> {$cat|@translate} </span> {/if}
|
||||
|
||||
{foreach from=$actions item=number key=action}
|
||||
{if $action == "Edit"} <span class="icon-pencil tooltip-detail" title="{"%s editions"|@translate:$number}">{$number}</span>
|
||||
{elseif $action == "Add"} <span class="icon-plus tooltip-detail" title="{"%s additions"|@translate:$number}">{$number}</span>
|
||||
{elseif $action == "Delete"} <span class="icon-trash tooltip-detail" title="{"%s deletions"|@translate:$number}">{$number}</span>
|
||||
{elseif $action == "Login"} <span class="icon-key tooltip-detail" title="{"%s login"|@translate:$number}">{$number}</span>
|
||||
{elseif $action == "Logout"} <span class="icon-logout tooltip-detail" title="{"%s logout"|@translate:$number}">{$number} </span>
|
||||
{elseif $action == "Move"} <span class="icon-move tooltip-detail" title="{"%s movement"|@translate:$number}">{$number} </span>
|
||||
{else} <span> ({$action|@translate}) {$number} </span>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</span>
|
||||
{/foreach}
|
||||
</p>
|
||||
{/if}
|
||||
{/if}
|
||||
</span>
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
<div></div>
|
||||
{foreach from=array('Mon'|translate, 'Tue'|translate, 'Wed'|translate, 'Thu'|translate, 'Fri'|translate, 'Sat'|translate, 'Sun'|translate) item=day}
|
||||
<div class="col-legend">{$day} <div class="line-vertical" style="height: {count($ACTIVITY_CHART_DATA)*100 - 50}%;"></div></div>
|
||||
{/foreach}
|
||||
</div>
|
||||
|
||||
<div class="chart-title"> {"Storage"|@translate} <span class="chart-title-infos"> {'%s MB used'|translate:(round($STORAGE_TOTAL/1000, 0))} </span></div>
|
||||
|
||||
<div class="storage-chart">
|
||||
{foreach from=$STORAGE_CHART_DATA key=type item=value}
|
||||
<span data-type="storage-{$type}" style="width:{$value/$STORAGE_TOTAL*100}%">
|
||||
<p>{round($value/$STORAGE_TOTAL*100)}%</p>
|
||||
</span>
|
||||
{/foreach}
|
||||
</div>
|
||||
|
||||
<div class="storage-tooltips">
|
||||
{foreach from=$STORAGE_CHART_DATA key=type item=value}
|
||||
<p id="storage-{$type}" class="tooltip"><b>{$type}</b></p>
|
||||
{/foreach}
|
||||
</div>
|
||||
|
||||
<div class="storage-chart-legend">
|
||||
{foreach from=$STORAGE_CHART_DATA item=i key=type}
|
||||
<div><span></span> <p>{$type|translate}</p></div>
|
||||
{/foreach}
|
||||
</div>
|
||||
|
||||
</div> {* .intro-chart *}
|
||||
|
||||
</div> {* .intro-page-container *}
|
||||
|
||||
<p class="showCreateAlbum">
|
||||
{if $ENABLE_SYNCHRONIZATION}
|
||||
<a href="{$U_QUICK_SYNC}" class="icon-exchange">{'Quick Local Synchronization'|translate}</a>
|
||||
@@ -149,4 +263,4 @@ jQuery().ready(function(){
|
||||
{if isset($SUBSCRIBE_BASE_URL)}
|
||||
<br><span class="newsletter-subscription"><a href="{$SUBSCRIBE_BASE_URL}{$EMAIL}" id="newsletterSubscribe" class="externalLink cluetip icon-mail-alt" title="{'Piwigo Announcements Newsletter'|@translate}|{'Keep in touch with Piwigo project, subscribe to Piwigo Announcement Newsletter. You will receive emails when a new release is available (sometimes including a security bug fix, it\'s important to know and upgrade) and when major events happen to the project. Only a few emails a year.'|@translate|@htmlspecialchars|@nl2br}">{'Subscribe %s to Piwigo Announcements Newsletter'|@translate:$EMAIL}</a> <a href="#" class="newsletter-hide">{'... or hide this link'|translate}</a></span>
|
||||
{/if}
|
||||
</p>
|
||||
</p>
|
||||
@@ -1,3 +1,20 @@
|
||||
{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'}
|
||||
{combine_script id='jquery.confirm' load='footer' require='jquery' path='themes/default/js/plugins/jquery-confirm.min.js'}
|
||||
{combine_css path="themes/default/js/plugins/jquery-confirm.min.css"}
|
||||
{footer_script}
|
||||
$(".delete-lang-button").each(function() {
|
||||
let title_msg = '{'Are you sure you want to delete the language "%s"?'|@translate|@escape:'javascript'}';
|
||||
const confirm_msg = '{"Yes, I am sure"|@translate}';
|
||||
const cancel_msg = '{"No, I have changed my mind"|@translate|@escape:'javascript'}';
|
||||
let lang_name = $(this).closest(".languageBox").find('.languageName').html();
|
||||
$(this).pwg_jconfirm_follow_href({
|
||||
alert_title: title_msg.replace("%s", lang_name),
|
||||
alert_confirm: confirm_msg,
|
||||
alert_cancel: cancel_msg
|
||||
});
|
||||
});
|
||||
{/footer_script}
|
||||
|
||||
<div class="titrePage">
|
||||
<h2>{'Installed Languages'|@translate}</h2>
|
||||
</div>
|
||||
@@ -34,7 +51,7 @@
|
||||
|
||||
{if $language_state == 'inactive'}
|
||||
<a href="{$language.u_action}&action=activate" class="tiptip" title="{'Make this language available to users'|@translate}">{'Activate'|@translate}</a>
|
||||
| <a href="{$language.u_action}&action=delete" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');" class="tiptip" title="{'Delete this language'|@translate}">{'Delete'|@translate}</a>
|
||||
| <a href="{$language.u_action}&action=delete" class="tiptip delete-lang-button" title="{'Delete this language'|@translate}">{'Delete'|@translate}</a>
|
||||
{/if}
|
||||
</div>
|
||||
</div> <!-- languageActions -->
|
||||
|
||||
@@ -1,10 +1,61 @@
|
||||
{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'}
|
||||
{combine_script id='jquery.confirm' load='footer' require='jquery' path='themes/default/js/plugins/jquery-confirm.min.js'}
|
||||
{combine_css path="themes/default/js/plugins/jquery-confirm.min.css"}
|
||||
{footer_script}
|
||||
const confirm_msg = '{"Yes, I am sure"|@translate}';
|
||||
const cancel_msg = "{"No, I have changed my mind"|@translate}";
|
||||
$(".lock-gallery-button").each(function() {
|
||||
const gallery_tip = '{"A locked gallery is only visible to administrators"|@translate|@escape:'javascript'}';
|
||||
let title = '{"Are you sure you want to lock the gallery?"|@translate}';
|
||||
let confirm_msg_gallery = '{"Yes, I want to lock the gallery"|@translate}';
|
||||
let cancel_msg_gallery = '{"Keep it unlocked"|@translate}';
|
||||
$(this).pwg_jconfirm_follow_href({
|
||||
alert_title: title,
|
||||
alert_confirm: confirm_msg,
|
||||
alert_cancel: cancel_msg,
|
||||
alert_content: gallery_tip
|
||||
});
|
||||
});
|
||||
$(".purge-history-detail-button").each(function() {
|
||||
const title = '{"Purge history detail"|@translate|@escape:'javascript'}';
|
||||
$(this).pwg_jconfirm_follow_href({
|
||||
alert_title: title,
|
||||
alert_confirm: confirm_msg,
|
||||
alert_cancel: cancel_msg
|
||||
});
|
||||
});
|
||||
$(".purge-history-summary-button").each(function() {
|
||||
const title = '{"Purge history summary"|@translate|@escape:'javascript'}';
|
||||
$(this).pwg_jconfirm_follow_href({
|
||||
alert_title: title,
|
||||
alert_confirm: confirm_msg,
|
||||
alert_cancel: cancel_msg
|
||||
});
|
||||
});
|
||||
$(".purge-search-history-button").each(function() {
|
||||
const title = '{"Purge search history"|@translate|@escape:'javascript'}';
|
||||
$(this).pwg_jconfirm_follow_href({
|
||||
alert_title: title,
|
||||
alert_confirm: confirm_msg,
|
||||
alert_cancel: cancel_msg
|
||||
});
|
||||
});
|
||||
$(".delete-all-sizes-button").each(function() {
|
||||
const title = '{"Are you sure you want to delete all sizes?"|@translate|@escape:'javascript'}';
|
||||
$(this).pwg_jconfirm_follow_href({
|
||||
alert_title: title,
|
||||
alert_confirm: confirm_msg,
|
||||
alert_cancel: cancel_msg
|
||||
});
|
||||
});
|
||||
{/footer_script}
|
||||
<div class="titrePage">
|
||||
<h2>{'Maintenance'|@translate}</h2>
|
||||
</div>
|
||||
|
||||
<ul>
|
||||
{if (isset($U_MAINT_LOCK_GALLERY))}
|
||||
<li><a href="{$U_MAINT_LOCK_GALLERY}" onclick="return confirm('{'A locked gallery is only visible to administrators'|@translate|@escape:'javascript'}');">{'Lock gallery'|@translate}</a></li>
|
||||
<li><a href="{$U_MAINT_LOCK_GALLERY}" class="lock-gallery-button">{'Lock gallery'|@translate}</a></li>
|
||||
{else}
|
||||
<li><a href="{$U_MAINT_UNLOCK_GALLERY}">{'Unlock gallery'|@translate}</a></li>
|
||||
{/if}
|
||||
@@ -29,14 +80,15 @@
|
||||
<ul>
|
||||
<li><a href="{$U_MAINT_USER_CACHE}">{'Purge user cache'|@translate}</a></li>
|
||||
<li><a href="{$U_MAINT_ORPHAN_TAGS}">{'Delete orphan tags'|@translate}</a></li>
|
||||
<li><a href="{$U_MAINT_HISTORY_DETAIL}" onclick="return confirm('{'Purge history detail'|@translate|@escape:'javascript'}');">{'Purge history detail'|@translate}</a></li>
|
||||
<li><a href="{$U_MAINT_HISTORY_SUMMARY}" onclick="return confirm('{'Purge history summary'|@translate|@escape:'javascript'}');">{'Purge history summary'|@translate}</a></li>
|
||||
<li><a href="{$U_MAINT_HISTORY_DETAIL}" class="purge-history-detail-button">{'Purge history detail'|@translate}</a></li>
|
||||
<li><a href="{$U_MAINT_HISTORY_SUMMARY}" class="purge-history-summary-button">{'Purge history summary'|@translate}</a></li>
|
||||
<li><a href="{$U_MAINT_SESSIONS}">{'Purge sessions'|@translate}</a></li>
|
||||
<li><a href="{$U_MAINT_FEEDS}">{'Purge never used notification feeds'|@translate}</a></li>
|
||||
<li><a href="{$U_MAINT_SEARCH}"onclick="return confirm('{'Purge search history'|@translate|@escape:'javascript'}');">{'Purge search history'|@translate}</a></li>
|
||||
<li><a href="{$U_MAINT_SEARCH}" class="purge-search-history-button">{'Purge search history'|@translate}</a></li>
|
||||
<li><a href="{$U_MAINT_COMPILED_TEMPLATES}">{'Purge compiled templates'|@translate}</a></li>
|
||||
<li>{'Delete multiple size images'|@translate}:
|
||||
{foreach from=$purge_derivatives key=name item=url name=loop}{if !$smarty.foreach.loop.first}, {/if}<a href="{$url}"{if $smarty.foreach.loop.first} onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');"{/if}>{$name}</a>{/foreach}
|
||||
{foreach from=$purge_derivatives key=name item=url name=loop}
|
||||
<a href="{$url}"{if $smarty.foreach.loop.first} class="delete-all-sizes-button"{/if}>{$name}</a>{if !$smarty.foreach.loop.last}, {/if}{/foreach}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -1,28 +1,34 @@
|
||||
<div class="navigationBar">
|
||||
<div class="pagination-container">
|
||||
{if isset($navbar.URL_FIRST)}
|
||||
<a href="{$navbar.URL_FIRST}" rel="first">{'First'|@translate}</a> |
|
||||
<a href="{$navbar.URL_PREV}" rel="prev">{'Previous'|@translate}</a> |
|
||||
<a href="{$navbar.URL_PREV}" class='pagination-arrow left' rel="prev">
|
||||
<span class="icon-left-open"></span>
|
||||
</a>
|
||||
{else}
|
||||
{'First'|@translate} |
|
||||
{'Previous'|@translate} |
|
||||
<a class='pagination-arrow left unavailable'>
|
||||
<span class="icon-left-open"></span>
|
||||
</a>
|
||||
{/if}
|
||||
|
||||
{assign var='prev_page' value=0}
|
||||
<div class="pagination-item-container">
|
||||
{foreach from=$navbar.pages key=page item=url}
|
||||
{if $page > $prev_page+1}...{/if}
|
||||
{if $page > $prev_page+1}<span>...</span>{/if}
|
||||
{if $page == $navbar.CURRENT_PAGE}
|
||||
<span class="pageNumberSelected">{$page}</span>
|
||||
<a class="actual">{$page}</a>
|
||||
{else}
|
||||
<a href="{$url}">{$page}</a>
|
||||
{/if}
|
||||
{assign var='prev_page' value=$page}
|
||||
{/foreach}
|
||||
</div>
|
||||
|
||||
{if isset($navbar.URL_NEXT)}
|
||||
| <a href="{$navbar.URL_NEXT}" rel="next">{'Next'|@translate}</a>
|
||||
| <a href="{$navbar.URL_LAST}" rel="last">{'Last'|@translate}</a>
|
||||
<a href="{$navbar.URL_NEXT}" class='pagination-arrow rigth' rel="next">
|
||||
<span class="icon-left-open"></span>
|
||||
</a>
|
||||
{else}
|
||||
| {'Next'|@translate}
|
||||
| {'Last'|@translate}
|
||||
<a class='pagination-arrow rigth unavailable'>
|
||||
<span class="icon-left-open"></span>
|
||||
</a>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -21,6 +21,8 @@ jQuery(document).ready(function(){
|
||||
</div>
|
||||
|
||||
<form method="post" name="notification_by_mail" id="notification_by_mail" action="{$F_ACTION}">
|
||||
<input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
|
||||
|
||||
{if isset($REPOST_SUBMIT_NAME)}
|
||||
<fieldset>
|
||||
<div class="infos">
|
||||
@@ -37,7 +39,7 @@ jQuery(document).ready(function(){
|
||||
<td><label>{'Send mail on HTML format'|@translate}</label></td>
|
||||
<td>
|
||||
<label><input type="radio" name="nbm_send_html_mail" value="true" {if $param.SEND_HTML_MAIL}checked="checked"{/if}>{'Yes'|@translate}</label>
|
||||
<label><input type="radio" name="nbm_send_html_mail" value="false" {if not $param.SEND_HTML_MAIL}checked="checked"{/if}>{'No'|@translate}</label>
|
||||
<label><input type="radio" name="nbm_send_html_mail" value="false" {if $param.SEND_HTML_MAIL === "false" || !$param.SEND_HTML_MAIL}checked="checked"{/if}>{'No'|@translate}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -51,7 +53,7 @@ jQuery(document).ready(function(){
|
||||
<td><label>{'Add detailed content'|@translate}</label></td>
|
||||
<td>
|
||||
<label><input type="radio" name="nbm_send_detailed_content" value="true" {if $param.SEND_DETAILED_CONTENT}checked="checked"{/if}>{'Yes'|@translate}</label>
|
||||
<label><input type="radio" name="nbm_send_detailed_content" value="false" {if not $param.SEND_DETAILED_CONTENT}checked="checked"{/if}>{'No'|@translate}</label>
|
||||
<label><input type="radio" name="nbm_send_detailed_content" value="false" {if !$param.SEND_DETAILED_CONTENT || $param.SEND_DETAILED_CONTENT === "false"}checked="checked"{/if}>{'No'|@translate}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -65,7 +67,7 @@ jQuery(document).ready(function(){
|
||||
</td>
|
||||
<td>
|
||||
<label><input type="radio" name="nbm_send_recent_post_dates" value="true" {if $param.SEND_RECENT_POST_DATES}checked="checked"{/if}>{'Yes'|@translate}</label>
|
||||
<label><input type="radio" name="nbm_send_recent_post_dates" value="false" {if not $param.SEND_RECENT_POST_DATES}checked="checked"{/if}>{'No'|@translate}</label>
|
||||
<label><input type="radio" name="nbm_send_recent_post_dates" value="false" {if !$param.SEND_RECENT_POST_DATES || $param.SEND_RECENT_POST_DATES === "false"}checked="checked"{/if}>{'No'|@translate}</label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -129,7 +131,7 @@ jQuery(document).ready(function(){
|
||||
|
||||
{if isset($auth_key_duration)}
|
||||
<fieldset>
|
||||
<legend>{'Informations'|@translate}</legend>
|
||||
<legend><span class="icon-info-circled-1 icon-blue"></span>{'Informations'|@translate}</legend>
|
||||
<p>
|
||||
{'Each email sent will contain its own automatic authentication key on links, valid for %s.'|translate:$auth_key_duration}
|
||||
<br>{'For security reason, authentication keys do not work for administrators.'|translate}
|
||||
|
||||
@@ -63,7 +63,7 @@ form fieldset p.actionButtons {margin-bottom:0}
|
||||
</form>
|
||||
|
||||
<fieldset>
|
||||
<legend>{'Permalinks'|@translate}</legend>
|
||||
<legend><span class="icon-lock icon-blue"></span>{'Permalinks'|@translate}</legend>
|
||||
<table class="table2" style="margin:0">
|
||||
<tr class="throw">
|
||||
<td>Id {$SORT_ID}</td>
|
||||
@@ -81,7 +81,7 @@ form fieldset p.actionButtons {margin-bottom:0}
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{'Permalink history'|@translate} <a name="old_permalinks"></a></legend>
|
||||
<legend><span class="icon-lock icon-red"></span>{'Permalink history'|@translate} <a name="old_permalinks"></a></legend>
|
||||
<table class="table2" style="margin:0">
|
||||
<tr class="throw">
|
||||
<td>Id {$SORT_OLD_CAT_ID}</td>
|
||||
|
||||
@@ -37,6 +37,16 @@ fieldset p {text-align:left;margin-top:0}
|
||||
</p>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{'Piwigo for Android'|@translate}</legend>
|
||||
<div class="illustration"><a href="https://piwigo.org/screenshots/applications/piwigo-android.png" title="{'Piwigo for Android'|@translate}"><img src="https://piwigo.org/screenshots/applications/thumbnail/piwigo-android.png"></a></div>
|
||||
<p>{'<em>Piwigo for Android</em> application empowers you to connect your Android phone or table to your Piwigo gallery, create some albums and upload several photos at once.'|@translate}</p>
|
||||
|
||||
<p>
|
||||
{'Available on'|@translate} <a target="_blank" href="https://play.google.com/store/apps/details?id=org.piwigo.android">Google Play</a>
|
||||
</p>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>Lightroom</legend>
|
||||
|
||||
@@ -128,4 +138,4 @@ fieldset p {text-align:left;margin-top:0}
|
||||
{'Available on'|@translate} <a target="_blank" href="https://play.google.com/store/apps/details?id=net.dahanne.android.regalandroid">Google Play</a>
|
||||
</p>
|
||||
</fieldset>
|
||||
*}
|
||||
*}
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'}
|
||||
|
||||
{combine_script id='jquery.jgrowl' load='footer' require='jquery' path='themes/default/js/plugins/jquery.jgrowl_minimized.js'}
|
||||
|
||||
{combine_script id='jquery.plupload' load='footer' require='jquery' path='themes/default/js/plugins/plupload/plupload.full.min.js'}
|
||||
{combine_script id='jquery.plupload.queue' load='footer' require='jquery' path='themes/default/js/plugins/plupload/jquery.plupload.queue/jquery.plupload.queue.min.js'}
|
||||
|
||||
{combine_css path="themes/default/js/plugins/jquery.jgrowl.css"}
|
||||
{combine_css path="themes/default/js/plugins/plupload/jquery.plupload.queue/css/jquery.plupload.queue.css"}
|
||||
|
||||
{assign var="plupload_i18n" value="themes/default/js/plugins/plupload/i18n/`$lang_info.plupload_code`.js"}
|
||||
@@ -138,6 +134,7 @@ jQuery(document).ready(function(){
|
||||
QueueChanged : function(up) {
|
||||
jQuery('#addFiles').addClass("addFilesButtonChanged");
|
||||
jQuery('#startUpload').prop('disabled', up.files.length == 0);
|
||||
jQuery("#addFiles").removeClass('buttonGradient').addClass('buttonLike');
|
||||
|
||||
if (up.files.length > 0) {
|
||||
jQuery('.plupload_filelist_footer').show();
|
||||
@@ -146,6 +143,7 @@ jQuery(document).ready(function(){
|
||||
|
||||
if (up.files.length == 0) {
|
||||
jQuery('#addFiles').removeClass("addFilesButtonChanged");
|
||||
jQuery("#addFiles").removeClass('buttonLike').addClass('buttonGradient');
|
||||
jQuery('.plupload_filelist_footer').hide();
|
||||
jQuery('.plupload_filelist').css("overflow-y", "hidden");
|
||||
}
|
||||
@@ -262,7 +260,7 @@ jQuery(document).ready(function(){
|
||||
<div class="addAlbumEmpty"{if $NB_ALBUMS > 0} style="display:none;"{/if}>
|
||||
<div class="addAlbumEmptyTitle">{'Welcome!'|translate}</div>
|
||||
<p class="addAlbumEmptyInfos">{'Piwigo requires an album to add photos.'|translate}</p>
|
||||
<a href="#" data-add-album="category" title="{'Create a first album'|translate}">{'Create a first album'|translate}</a>
|
||||
<a href="#" data-add-album="category" class="buttonLike">{'Create a first album'|translate}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -294,8 +292,8 @@ jQuery(document).ready(function(){
|
||||
|
||||
<form id="uploadForm" enctype="multipart/form-data" method="post" action="{$form_action}"{if $NB_ALBUMS == 0} style="display:none;"{/if}>
|
||||
<fieldset class="selectAlbum">
|
||||
<legend>{'Drop into album'|@translate}</legend>
|
||||
<div class="selectedAlbum"{if !isset($ADD_TO_ALBUM)} style="display: none"{/if}><span class="icon-sitemap">{$ADD_TO_ALBUM}</span></div>
|
||||
<legend><span class="icon-folder-open icon-red"></span>{'Drop into album'|@translate}</legend>
|
||||
<div class="selectedAlbum"{if !isset($ADD_TO_ALBUM)} style="display: none"{/if}><span class="icon-sitemap" style="background-color:#f5f5f5">{$ADD_TO_ALBUM}</span></div>
|
||||
<div class="selectAlbumBlock"{if isset($ADD_TO_ALBUM)} style="display: none"{/if}>
|
||||
<a href="#" data-add-album="category" title="{'create a new album'|@translate}" class="icon-plus"></a>
|
||||
<span id="albumSelection">
|
||||
@@ -316,9 +314,9 @@ jQuery(document).ready(function(){
|
||||
</fieldset>
|
||||
*}
|
||||
<fieldset class="selectFiles">
|
||||
<legend>{'Select files'|@translate}</legend>
|
||||
<legend><span class="icon-file-image icon-yellow"></span>{'Select files'|@translate}</legend>
|
||||
<div class="selectFilesButtonBlock">
|
||||
<button id="addFiles" class="buttonLike">{'Add Photos'|translate}<i class="icon-plus-circled"></i></button>
|
||||
<button id="addFiles" class="buttonGradient">{'Add Photos'|translate}<i class="icon-plus-circled"></i></button>
|
||||
<div class="selectFilesinfo">
|
||||
{if isset($original_resize_maxheight)}
|
||||
<p class="uploadInfo">{'The picture dimensions will be reduced to %dx%d pixels.'|@translate:$original_resize_maxwidth:$original_resize_maxheight}</p>
|
||||
@@ -338,14 +336,13 @@ jQuery(document).ready(function(){
|
||||
</fieldset>
|
||||
|
||||
<div id="uploadingActions" style="display:none">
|
||||
<button id="cancelUpload" class="buttonLike icon-cancel-circled">{'Cancel'|translate}</button>
|
||||
|
||||
<div class="big-progressbar">
|
||||
<div class="big-progressbar" style="max-width:98%;margin-bottom: 10px;">
|
||||
<div class="progressbar" style="width:0%"></div>
|
||||
</div>
|
||||
<button id="cancelUpload" class="buttonLike icon-cancel-circled">{'Cancel'|translate}</button>
|
||||
</div>
|
||||
|
||||
<button id="startUpload" class="buttonLike icon-upload" disabled>{'Start Upload'|translate}</button>
|
||||
<button id="startUpload" class="buttonGradient icon-upload" disabled>{'Start Upload'|translate}</button>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
{combine_script id='jquery.selectize' load='footer' path='themes/default/js/plugins/selectize.min.js'}
|
||||
{combine_css id='jquery.selectize' path="themes/default/js/plugins/selectize.{$themeconf.colorscheme}.css"}
|
||||
|
||||
{combine_script id='jquery.confirm' load='footer' require='jquery' path='themes/default/js/plugins/jquery-confirm.min.js'}
|
||||
{combine_css path="themes/default/js/plugins/jquery-confirm.min.css"}
|
||||
|
||||
{footer_script}
|
||||
(function(){
|
||||
{* <!-- CATEGORIES --> *}
|
||||
@@ -41,53 +44,91 @@ jQuery(function(){ {* <!-- onLoad needed to wait localization loads --> *}
|
||||
jQuery("a.preview-box").colorbox({
|
||||
photo: true
|
||||
});
|
||||
|
||||
str_are_you_sure = '{'Are you sure?'|translate}';
|
||||
str_yes = '{'Yes, delete'|translate}';
|
||||
str_no = '{'No, I have changed my mind'|translate|@escape:'javascript'}';
|
||||
url_delete = '{$U_DELETE}';
|
||||
|
||||
{literal}
|
||||
$('#action-delete-picture').on('click', function() {
|
||||
$.confirm({
|
||||
title: str_are_you_sure,
|
||||
draggable: false,
|
||||
titleClass: "groupDeleteConfirm",
|
||||
theme: "modern",
|
||||
content: "",
|
||||
animation: "zoom",
|
||||
boxWidth: '30%',
|
||||
useBootstrap: false,
|
||||
type: 'red',
|
||||
animateFromElement: false,
|
||||
backgroundDismiss: true,
|
||||
typeAnimated: false,
|
||||
buttons: {
|
||||
confirm: {
|
||||
text: str_yes,
|
||||
btnClass: 'btn-red',
|
||||
action: function () {
|
||||
window.location.href = url_delete.replaceAll('amp;', '');
|
||||
}
|
||||
},
|
||||
cancel: {
|
||||
text: str_no
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
{/literal}
|
||||
|
||||
}());
|
||||
{/footer_script}
|
||||
|
||||
<h2>{$TITLE} › {'Edit photo'|@translate} {$TABSHEET_TITLE}</h2>
|
||||
<h2>{'Edit photo #%s'|@translate:$INTRO.id}</h2>
|
||||
|
||||
<form action="{$F_ACTION}" method="post" id="catModify">
|
||||
<form action="{$F_ACTION}" method="post" id="pictureModify">
|
||||
<div id='picture-preview'>
|
||||
<div class='picture-preview-actions'>
|
||||
{if isset($U_JUMPTO)}
|
||||
<a class="icon-eye" href="{$U_JUMPTO}" title="{'Open in gallery'|@translate}"></a>
|
||||
{else}
|
||||
<a class="icon-eye unavailable" title="{'Photo is in a private album'|@translate}"></a>
|
||||
{/if}
|
||||
<a class="icon-download" href="{$U_DOWNLOAD}" title="{'Download'|translate}"></a>
|
||||
<a class="icon-arrows-cw" href="{$U_SYNC}" title="{'Synchronize metadata'|@translate}"></a>
|
||||
<a class="icon-trash" title="{'delete photo'|@translate}" id='action-delete-picture'></a>
|
||||
</div>
|
||||
<a href="{$FILE_SRC}" class="preview-box icon-zoom-in" title="{$TITLE|htmlspecialchars}" style="{if $FORMAT}width{else}height{/if}:35vw">
|
||||
<img src="{$TN_SRC}" alt="{'Thumbnail'|translate}" style="{if $FORMAT}width{else}height{/if}:100%">
|
||||
</a>
|
||||
</div>
|
||||
<div id='picture-content'>
|
||||
<div id='picture-infos'>
|
||||
<div class='picture-infos-category'>
|
||||
<div class='picture-infos-icon'>
|
||||
<span class='icon-picture'></span>
|
||||
</div>
|
||||
<div class='picture-infos-container'>
|
||||
<div class='picture-infos-title'>{$INTRO.file}</div>
|
||||
<div>{$INTRO.size}</div>
|
||||
<div>{$INTRO.formats}</div>
|
||||
<div>{$INTRO.ext}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<fieldset>
|
||||
<legend>{'Informations'|@translate}</legend>
|
||||
<div class='picture-infos-category'>
|
||||
<div class='picture-infos-icon'>
|
||||
<span class='icon-calendar'></span>
|
||||
</div>
|
||||
<div class='picture-infos-container'>
|
||||
<div class='picture-infos-title'>{$INTRO.date}</div>
|
||||
<div>{$INTRO.age}</div>
|
||||
<div>{$INTRO.added_by}</div>
|
||||
<div>{$INTRO.stats}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table>
|
||||
|
||||
<tr>
|
||||
<td id="albumThumbnail">
|
||||
<a href="{$FILE_SRC}" class="preview-box icon-zoom-in" title="{$TITLE|htmlspecialchars}"><img src="{$TN_SRC}" alt="{'Thumbnail'|translate}"></a>
|
||||
</td>
|
||||
<td id="albumLinks" style="width:400px;vertical-align:top;">
|
||||
<ul style="padding-left:15px;margin:0;">
|
||||
<li>{$INTRO.file}</li>
|
||||
<li>{$INTRO.add_date}</li>
|
||||
<li>{$INTRO.added_by}</li>
|
||||
<li>{$INTRO.size}</li>
|
||||
<li>{$INTRO.formats}</li>
|
||||
<li>{$INTRO.stats}</li>
|
||||
<li>{$INTRO.id}</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td class="photoLinks">
|
||||
<ul>
|
||||
{if isset($U_JUMPTO) }
|
||||
<li><a class="icon-eye" href="{$U_JUMPTO}">{'jump to photo'|@translate} →</a></li>
|
||||
{/if}
|
||||
<li><a class="icon-download" href="{$U_DOWNLOAD}">{'Download'|translate}</a></li>
|
||||
{if !url_is_remote($PATH)}
|
||||
<li><a class="icon-arrows-cw" href="{$U_SYNC}">{'Synchronize metadata'|@translate}</a></li>
|
||||
|
||||
<li><a class="icon-trash" href="{$U_DELETE}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');">{'delete photo'|@translate}</a></li>
|
||||
{/if}
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{'Properties'|@translate}</legend>
|
||||
|
||||
<p>
|
||||
<strong>{'Title'|@translate}</strong>
|
||||
@@ -105,7 +146,7 @@ jQuery("a.preview-box").colorbox({
|
||||
<strong>{'Creation date'|@translate}</strong>
|
||||
<br>
|
||||
<input type="hidden" name="date_creation" value="{$DATE_CREATION}">
|
||||
<label>
|
||||
<label class="date-input">
|
||||
<i class="icon-calendar"></i>
|
||||
<input type="text" data-datepicker="date_creation" data-datepicker-unset="date_creation_unset" readonly>
|
||||
</label>
|
||||
@@ -117,7 +158,7 @@ jQuery("a.preview-box").colorbox({
|
||||
<br>
|
||||
<select data-selectize="categories" data-value="{$associated_albums|@json_encode|escape:html}"
|
||||
placeholder="{'Type in a search term'|translate}"
|
||||
data-default="{$STORAGE_ALBUM}" name="associate[]" multiple style="width:600px;"></select>
|
||||
data-default="{$STORAGE_ALBUM}" name="associate[]" multiple style="width:calc(100% + 2px);"></select>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -125,7 +166,7 @@ jQuery("a.preview-box").colorbox({
|
||||
<br>
|
||||
<select data-selectize="categories" data-value="{$represented_albums|@json_encode|escape:html}"
|
||||
placeholder="{'Type in a search term'|translate}"
|
||||
name="represent[]" multiple style="width:600px;"></select>
|
||||
name="represent[]" multiple style="width:calc(100% + 2px);"></select>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -133,7 +174,7 @@ jQuery("a.preview-box").colorbox({
|
||||
<br>
|
||||
<select data-selectize="tags" data-value="{$tag_selection|@json_encode|escape:html}"
|
||||
placeholder="{'Type in a search term'|translate}"
|
||||
data-create="true" name="tags[]" multiple style="width:600px;"></select>
|
||||
data-create="true" name="tags[]" multiple style="width:calc(100% + 2px);"></select>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -145,15 +186,16 @@ jQuery("a.preview-box").colorbox({
|
||||
<p>
|
||||
<strong>{'Who can see this photo?'|@translate}</strong>
|
||||
<br>
|
||||
<div class='select-icon icon-down-open'> </div>
|
||||
<select name="level" size="1">
|
||||
{html_options options=$level_options selected=$level_options_selected}
|
||||
</select>
|
||||
</p>
|
||||
|
||||
<p style="margin:40px 0 0 0">
|
||||
<input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
|
||||
<input class="submit" type="submit" value="{'Save Settings'|@translate}" name="submit">
|
||||
</p>
|
||||
</fieldset>
|
||||
<p>
|
||||
<input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
|
||||
<input class="submit" type="submit" value="{'Save Settings'|@translate}" name="submit">
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
@@ -1,13 +1,26 @@
|
||||
{combine_script id='jquery.ajaxmanager' load='footer' require='jquery' path='themes/default/js/plugins/jquery.ajaxmanager.js' }
|
||||
{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'}
|
||||
|
||||
{footer_script require='jquery.ajaxmanager'}
|
||||
/* incompatible message */
|
||||
var incompatible_msg = '{'WARNING! This plugin does not seem to be compatible with this version of Piwigo.'|@translate|@escape:'javascript'}';
|
||||
var activate_msg = '\n{'Do you want to activate anyway?'|@translate|@escape:'javascript'}';
|
||||
var deactivate_all_msg = '{'Deactivate all'|@translate}';
|
||||
|
||||
var showInactivePlugins = function() {
|
||||
jQuery(".showInactivePlugins").fadeOut(complete=function(){
|
||||
jQuery(".plugin-inactive").fadeIn();
|
||||
})
|
||||
}
|
||||
|
||||
/* group action */
|
||||
var pwg_token = '{$PWG_TOKEN}';
|
||||
var confirmMsg = '{'Are you sure?'|@translate|@escape:'javascript'}';
|
||||
const pwg_token = '{$PWG_TOKEN}';
|
||||
const are_you_sure_msg = '{'Are you sure?'|@translate|@escape:'javascript'}';
|
||||
const confirm_msg = '{"Yes, I am sure"|@translate}';
|
||||
const cancel_msg = "{"No, I have changed my mind"|@translate}";
|
||||
let delete_plugin_msg = '{'Are you sure you want to delete the plugin "%s"?'|@translate|@escape:'javascript'}';
|
||||
let restore_plugin_msg = '{'Are you sure you want to restore the plugin "%s"?'|@translate|@escape:'javascript'}';
|
||||
const restore_tip_msg = "{'Restore default configuration. You will lose your plugin settings!'|@translate}";
|
||||
{literal}
|
||||
var queuedManager = jQuery.manageAjax.create('queued', {
|
||||
queue: true,
|
||||
@@ -15,18 +28,56 @@ var queuedManager = jQuery.manageAjax.create('queued', {
|
||||
});
|
||||
var nb_plugins = jQuery('div.active').size();
|
||||
var done = 0;
|
||||
/* group action */
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
/* group action */
|
||||
jQuery('div.deactivate_all a').click(function() {
|
||||
if (confirm(confirmMsg)) {
|
||||
jQuery('div.active').each(function() {
|
||||
performPluginDeactivate(jQuery(this).attr('id'));
|
||||
});
|
||||
}
|
||||
$(".delete-plugin-button").each(function() {
|
||||
let plugin_name = $(this).closest(".pluginContent").find(".pluginMiniBoxNameCell").html().trim();
|
||||
$(this).pwg_jconfirm_follow_href({
|
||||
alert_title: delete_plugin_msg.replace('%s', plugin_name),
|
||||
alert_confirm: confirm_msg,
|
||||
alert_cancel: cancel_msg
|
||||
});
|
||||
});
|
||||
$(".plugin-restore").each(function() {
|
||||
let plugin_name = $(this).closest(".pluginContent").find(".pluginMiniBoxNameCell").html().trim();
|
||||
$(this).pwg_jconfirm_follow_href({
|
||||
alert_title: restore_plugin_msg.replace('%s', plugin_name),
|
||||
alert_confirm: confirm_msg,
|
||||
alert_cancel: cancel_msg,
|
||||
alert_content: restore_tip_msg,
|
||||
});
|
||||
});
|
||||
$(".uninstall-plugin-button").each(function() {
|
||||
$(this).pwg_jconfirm_follow_href({
|
||||
alert_title: are_you_sure_msg,
|
||||
alert_confirm: confirm_msg,
|
||||
alert_cancel: cancel_msg
|
||||
});
|
||||
});
|
||||
jQuery('div.deactivate_all a').click(function() {
|
||||
$.confirm({
|
||||
title: deactivate_all_msg,
|
||||
buttons: {
|
||||
confirm: {
|
||||
text: confirm_msg,
|
||||
btnClass: 'btn-red',
|
||||
action: function () {
|
||||
jQuery('div.active').each(function() {
|
||||
performPluginDeactivate(jQuery(this).attr('id'));
|
||||
})
|
||||
}
|
||||
},
|
||||
cancel: {
|
||||
text: cancel_msg
|
||||
}
|
||||
},
|
||||
...jConfirm_confirm_options
|
||||
});
|
||||
});
|
||||
|
||||
function performPluginDeactivate(id) {
|
||||
queuedManager.add({
|
||||
queuedManager.add({
|
||||
type: 'GET',
|
||||
dataType: 'json',
|
||||
url: 'ws.php',
|
||||
@@ -56,7 +107,13 @@ jQuery(document).ready(function() {
|
||||
{/if}
|
||||
{literal}
|
||||
jQuery('#'+data[i]).addClass('incompatible');
|
||||
jQuery('#'+data[i]+' .activate').attr('onClick', 'return confirm(incompatible_msg + activate_msg);');
|
||||
jQuery('#'+data[i]+' .activate').each(function () {
|
||||
$(this).pwg_jconfirm_follow_href({
|
||||
alert_title: incompatible_msg + activate_msg,
|
||||
alert_confirm: confirm_msg,
|
||||
alert_cancel: cancel_msg
|
||||
});
|
||||
});
|
||||
}
|
||||
jQuery('.warning').tipTip({
|
||||
'delay' : 0,
|
||||
@@ -67,61 +124,150 @@ jQuery(document).ready(function() {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
/* TipTips */
|
||||
jQuery('.plugin-restore').tipTip({
|
||||
'delay' : 0,
|
||||
'fadeIn' : 200,
|
||||
'fadeOut' : 200
|
||||
});
|
||||
jQuery('.showInfo').tipTip({
|
||||
'delay' : 0,
|
||||
jQuery('.fullInfo').tipTip({
|
||||
'delay' : 500,
|
||||
'fadeIn' : 200,
|
||||
'fadeOut' : 200,
|
||||
'maxWidth':'300px',
|
||||
'keepAlive':true,
|
||||
'activation':'click'
|
||||
'keepAlive':false,
|
||||
});
|
||||
|
||||
/* Add the '...' for the overflow of the description line*/
|
||||
jQuery( document ).ready(function () {
|
||||
jQuery('.pluginDesc').each(function () {
|
||||
var el = jQuery(this).context;
|
||||
var wordArray = el.innerHTML.split(' ');
|
||||
if (el.scrollHeight > el.offsetHeight) {
|
||||
jQuery(this).attr('title', jQuery(this).html())
|
||||
}
|
||||
while(el.scrollHeight > el.offsetHeight) {
|
||||
wordArray.pop();
|
||||
el.innerHTML = wordArray.join(' ') + '...';
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
/*Add the filter research*/
|
||||
jQuery( document ).ready(function () {
|
||||
jQuery(".pluginFilter input").on("input", function() {
|
||||
let text = jQuery(this).val().toLowerCase();
|
||||
var searchNumber = 0;
|
||||
jQuery('.pluginBoxes').each(function () {
|
||||
let searchNumberInBox = 0;
|
||||
let pluginBoxes = jQuery(this);
|
||||
pluginBoxes.find(".pluginMiniBox").each(function() {
|
||||
if (text == "") {
|
||||
jQuery(this).fadeIn()
|
||||
searchNumberInBox++;
|
||||
} else {
|
||||
let name = jQuery(this).find(".pluginMiniBoxNameCell").text().toLowerCase();
|
||||
let description = jQuery(this).find(".pluginDesc").text().toLowerCase();
|
||||
if (name.search(text) != -1 || description.search(text) != -1){
|
||||
jQuery(this).fadeIn()
|
||||
searchNumberInBox++;
|
||||
} else {
|
||||
jQuery(this).fadeOut()
|
||||
}
|
||||
}
|
||||
})
|
||||
if (searchNumberInBox == 0) {
|
||||
pluginBoxes.fadeOut();
|
||||
} else {
|
||||
if (pluginBoxes.hasClass("plugin-inactive")) {
|
||||
showInactivePlugins()
|
||||
} else {
|
||||
pluginBoxes.fadeIn();
|
||||
}
|
||||
}
|
||||
searchNumber += searchNumberInBox;
|
||||
});
|
||||
if (searchNumber == 0) {
|
||||
jQuery(".emptyResearch").fadeIn();
|
||||
} else {
|
||||
jQuery(".emptyResearch").fadeOut();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
/* Show Inactive plugins or button to show them*/
|
||||
jQuery( document ).ready(function () {
|
||||
jQuery(".showInactivePlugins button").on('click', showInactivePlugins)
|
||||
});
|
||||
});
|
||||
|
||||
$(document).mouseup(function (e) {
|
||||
e.stopPropagation();
|
||||
$(".pluginMiniBox").each(function() {
|
||||
if ($(this).find(".showOptions").has(e.target).length === 0) {
|
||||
$(this).find(".PluginOptionsBlock").hide();
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
jQuery(".pluginMiniBox").each(function(index){
|
||||
let myplugin = jQuery(this);
|
||||
myplugin.find(".showOptions").click(function(){
|
||||
myplugin.find(".PluginOptionsBlock").toggle();
|
||||
});
|
||||
})
|
||||
|
||||
{/literal}
|
||||
{/footer_script}
|
||||
|
||||
{combine_script id='jquery.confirm' load='footer' require='jquery' path='themes/default/js/plugins/jquery-confirm.min.js'}
|
||||
{combine_css path="themes/default/js/plugins/jquery-confirm.min.css"}
|
||||
{combine_script id='tiptip' load='header' path='themes/default/js/plugins/jquery.tipTip.minified.js'}
|
||||
|
||||
<div class="titrePage">
|
||||
<h2>{'Plugins'|@translate}</h2>
|
||||
</div>
|
||||
|
||||
<div class="showDetails">
|
||||
{if $show_details}
|
||||
<a href="{$base_url}&show_details=0">{'hide details'|@translate}</a>
|
||||
{else}
|
||||
<a href="{$base_url}&show_details=1">{'show details'|@translate}</a>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{if isset($plugins)}
|
||||
|
||||
{assign var='field_name' value='null'} {* <!-- 'counter' for fieldset management --> *}
|
||||
{counter start=0 assign=i} {* <!-- counter for 'deactivate all' link --> *}
|
||||
|
||||
<div class="pluginFilter">
|
||||
<span class="icon-filter search-icon"></span>
|
||||
<span class="icon-cancel search-cancel"></span>
|
||||
<input class='search-input' type="text" placeholder="{'Filter'|@translate}">
|
||||
</div>
|
||||
|
||||
<div class="emptyResearch"> {'No plugins found'|@translate} </div>
|
||||
|
||||
{foreach from=$plugins item=plugin name=plugins_loop}
|
||||
|
||||
{if $field_name != $plugin.STATE}
|
||||
{if $field_name != 'null'}
|
||||
</fieldset>
|
||||
{/if}
|
||||
|
||||
<fieldset class="pluginBoxes">
|
||||
<legend>
|
||||
{if $plugin.STATE == 'active'}
|
||||
{'Active Plugins'|@translate}
|
||||
{elseif $plugin.STATE == 'inactive'}
|
||||
{'Inactive Plugins'|@translate}
|
||||
{elseif $plugin.STATE == 'missing'}
|
||||
{'Missing Plugins'|@translate}
|
||||
{elseif $plugin.STATE == 'merged'}
|
||||
{'Obsolete Plugins'|@translate}
|
||||
{/if}
|
||||
</legend>
|
||||
</div> {* PluginBoxes Container*}
|
||||
</div> {* PluginBoxes*}
|
||||
{/if}
|
||||
|
||||
<div class="pluginBoxes plugin-{$plugin.STATE}" {if $plugin.STATE == 'inactive'}{if $count_types_plugins["inactive"]>8}style="display:none"{/if}{/if}>
|
||||
{assign var='field_name' value=$plugin.STATE}
|
||||
|
||||
<div class="pluginBoxesHead">
|
||||
<div class="pluginBoxesTitle">
|
||||
<p>
|
||||
{if $plugin.STATE == 'active'}
|
||||
<span class="icon-purple icon-toggle-on"></span>{'Active Plugins'|@translate}
|
||||
{elseif $plugin.STATE == 'inactive'}
|
||||
<span class="icon-red icon-toggle-off"></span>{'Inactive Plugins'|@translate}
|
||||
{elseif $plugin.STATE == 'missing'}
|
||||
<span class="icon-green icon-toggle-off"></span>{'Missing Plugins'|@translate}
|
||||
{elseif $plugin.STATE == 'merged'}
|
||||
<span class="icon-yellow icon-toggle-off"></span>{'Obsolete Plugins'|@translate}
|
||||
{/if}
|
||||
</p>
|
||||
<div class="pluginBoxesCount">{$count_types_plugins[$plugin.STATE]}</div>
|
||||
</div>
|
||||
|
||||
{if $plugin.STATE == 'active'}
|
||||
<div class="deactivate_all"><a>{'Deactivate all'|@translate}</a></div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<div class="pluginBoxesContainer">
|
||||
{/if}
|
||||
|
||||
{if not empty($plugin.AUTHOR)}
|
||||
@@ -131,91 +277,67 @@ jQuery(document).ready(function() {
|
||||
{assign var='author' value='<u>'|cat:$plugin.AUTHOR|cat:'</u>'}
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
{if $show_details}
|
||||
<div id="{$plugin.ID}" class="pluginBox {$plugin.STATE}">
|
||||
<table>
|
||||
<tr>
|
||||
<td class="pluginBoxNameCell">
|
||||
{$plugin.NAME}
|
||||
</td>
|
||||
<td>{$plugin.DESC}</td>
|
||||
</tr>
|
||||
<tr class="pluginActions">
|
||||
<td>
|
||||
{if $plugin.STATE == 'active'}
|
||||
<a href="{$plugin.U_ACTION}&action=deactivate">{'Deactivate'|@translate}</a>
|
||||
| <a href="{$plugin.U_ACTION}&action=restore" class="plugin-restore" title="{'Restore default configuration. You will lose your plugin settings!'|@translate}" onclick="return confirm(confirmMsg);">{'Restore'|@translate}</a>
|
||||
|
||||
{elseif $plugin.STATE == 'inactive'}
|
||||
<a href="{$plugin.U_ACTION}&action=activate" class="activate">{'Activate'|@translate}</a>
|
||||
| <a href="{$plugin.U_ACTION}&action=delete" onclick="return confirm(confirmMsg);">{'Delete'|@translate}</a>
|
||||
|
||||
{elseif $plugin.STATE == 'missing'}
|
||||
<a href="{$plugin.U_ACTION}&action=uninstall" onclick="return confirm(confirmMsg);">{'Uninstall'|@translate}</a>
|
||||
|
||||
{elseif $plugin.STATE == 'merged'}
|
||||
<a href="{$plugin.U_ACTION}&action=delete">{'Delete'|@translate}</a>
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
{'Version'|@translate} {$plugin.VERSION}
|
||||
|
||||
{if not empty($author)}
|
||||
| {'By %s'|@translate:$author}
|
||||
{/if}
|
||||
|
||||
{if not empty($plugin.VISIT_URL)}
|
||||
| <a class="externalLink" href="{$plugin.VISIT_URL}">{'Visit plugin site'|@translate}</a>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div> {*<!-- pluginBox -->*}
|
||||
|
||||
{if not empty($plugin.VISIT_URL)}
|
||||
{assign var='version' value="<a class='externalLink' href='"|cat:$plugin.VISIT_URL|cat:"'>"|cat:$plugin.VERSION|cat:"</a>"}
|
||||
{else}
|
||||
{if not empty($plugin.VISIT_URL)}
|
||||
{assign var='version' value="<a class='externalLink' href='"|cat:$plugin.VISIT_URL|cat:"'>"|cat:$plugin.VERSION|cat:"</a>"}
|
||||
{else}
|
||||
{assign var='version' value=$plugin.VERSION}
|
||||
{/if}
|
||||
|
||||
<div id="{$plugin.ID}" class="pluginMiniBox {$plugin.STATE}">
|
||||
{assign var='version' value=$plugin.VERSION}
|
||||
{/if}
|
||||
|
||||
<div id="{$plugin.ID}" class="pluginMiniBox {$plugin.STATE}">
|
||||
<div class="pluginContent">
|
||||
<div class="PluginOptionsIcons">
|
||||
{if $plugin.STATE == 'active' || $plugin.STATE == 'inactive'}
|
||||
<a class="icon-ellipsis-vert showOptions showInfo" ></a>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<div class="PluginOptionsBlock dropdown">
|
||||
<div class="dropdown-option-content"> {if !empty($author)}{'By %s'|@translate:$author}<br>{/if}{'Version'|@translate} {$version}</div>
|
||||
{if $plugin.STATE == 'active'}
|
||||
<a class="dropdown-option icon-cancel-circled" href="{$plugin.U_ACTION}&action=deactivate">{'Deactivate'|@translate}</a>
|
||||
<a class="dropdown-option icon-back-in-time plugin-restore" href="{$plugin.U_ACTION}&action=restore">{'Restore'|@translate}</a>
|
||||
{elseif $plugin.STATE == 'inactive'}
|
||||
<a class="dropdown-option icon-trash delete-plugin-button" href="{$plugin.U_ACTION}&action=delete">{'Delete'|@translate}</a>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="pluginMiniBoxNameCell">
|
||||
{$plugin.NAME}
|
||||
<a class="icon-info-circled-1 showInfo" title="{if !empty($author)}{'By %s'|@translate:$author} | {/if}{'Version'|@translate} {$version}<br/>{$plugin.DESC|@escape:'html'}"></a>
|
||||
</div>
|
||||
<div class="pluginDesc">
|
||||
{$plugin.DESC}
|
||||
</div>
|
||||
<div class="pluginActions">
|
||||
<div>
|
||||
{if $plugin.STATE == 'active'}
|
||||
<a href="{$plugin.U_ACTION}&action=deactivate">{'Deactivate'|@translate}</a>
|
||||
| <a href="{$plugin.U_ACTION}&action=restore" class="plugin-restore" title="{'Restore default configuration. You will lose your plugin settings!'|@translate}" onclick="return confirm(confirmMsg);">{'Restore'|@translate}</a>
|
||||
|
||||
{if $plugin.SETTINGS_URL != ''}
|
||||
<a href="{$plugin.SETTINGS_URL}" class="pluginActionLevel1 icon-cog">{'Settings'|@translate}</a>
|
||||
{else}
|
||||
<div class="pluginUnavailableAction icon-cog">{'Settings'|@translate}</div>
|
||||
{/if}
|
||||
{elseif $plugin.STATE == 'inactive'}
|
||||
<a href="{$plugin.U_ACTION}&action=activate" class="activate">{'Activate'|@translate}</a>
|
||||
| <a href="{$plugin.U_ACTION}&action=delete" onclick="return confirm(confirmMsg);">{'Delete'|@translate}</a>
|
||||
|
||||
<a class="pluginActionLevel1 icon-plus" href="{$plugin.U_ACTION}&action=activate" class="activate">{'Activate'|@translate}</a>
|
||||
{elseif $plugin.STATE == 'missing'}
|
||||
<a href="{$plugin.U_ACTION}&action=uninstall" onclick="return confirm(confirmMsg);">{'Uninstall'|@translate}</a>
|
||||
|
||||
<a class="pluginActionLevel3 uninstall-plugin-button" href="{$plugin.U_ACTION}&action=uninstall">{'Uninstall'|@translate}</a>
|
||||
{elseif $plugin.STATE == 'merged'}
|
||||
<a href="{$plugin.U_ACTION}&action=delete">{'Delete'|@translate}</a>
|
||||
{/if}
|
||||
</div>
|
||||
<a class="pluginActionLevel3" href="{$plugin.U_ACTION}&action=delete">{'Delete'|@translate}</a>
|
||||
{/if}
|
||||
</div>
|
||||
</div> {*<!-- pluginMiniBox -->*}
|
||||
</div>
|
||||
|
||||
{/if}
|
||||
|
||||
{if $plugin.STATE == 'active'}
|
||||
{counter}
|
||||
{if $active_plugins == $i}
|
||||
<div class="deactivate_all"><a>{'Deactivate all'|@translate}</a></div>
|
||||
{counter}
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
{/foreach}
|
||||
</fieldset>
|
||||
</div> {*<!-- pluginMiniBox -->*}
|
||||
|
||||
|
||||
|
||||
{/foreach}
|
||||
</div> {* PluginBoxes Container*}
|
||||
</div> {* PluginBoxes*}
|
||||
|
||||
<div class="showInactivePlugins" {if $count_types_plugins["inactive"]<=8}style="display:none"{/if} >
|
||||
<div class="showInactivePluginsInfo">
|
||||
{assign var='badge_inactive' value='<span class="pluginBoxesCount">%s</span>'|@sprintf:$count_types_plugins["inactive"]}
|
||||
<div>{'You have %s inactive plugins'|translate:$badge_inactive}</div>
|
||||
</div>
|
||||
<button class="buttonLike" id="showInactivePluginsAction">{'Show inactive plugins'|@translate}</button>
|
||||
</div>
|
||||
|
||||
{/if}
|
||||
|
||||
@@ -1,6 +1,15 @@
|
||||
{combine_script id='jquery.sort' load='footer' path='themes/default/js/plugins/jquery.sort.js'}
|
||||
|
||||
{footer_script require='jquery.ui.effect-blind,jquery.sort'}{literal}
|
||||
{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'}
|
||||
{combine_script id='jquery.confirm' load='footer' require='jquery' path='themes/default/js/plugins/jquery-confirm.min.js'}
|
||||
{combine_css path="themes/default/js/plugins/jquery-confirm.min.css"}
|
||||
|
||||
{footer_script require='jquery.ui.effect-blind,jquery.sort'}
|
||||
const install_title = '{'Are you sure you want to install this plugin?'|@translate|@escape:'javascript'}';
|
||||
const confirm_msg = '{"Yes, I am sure"|@translate}';
|
||||
const cancel_msg = "{"No, I have changed my mind"|@translate}";
|
||||
let title = '{'Are you sure you want to install the plugin "%s"?'|@translate|@escape:'javascript'}';
|
||||
{literal}
|
||||
var sortOrder = 'date';
|
||||
var sortPlugins = (function(a, b) {
|
||||
if (sortOrder == 'downloads' || sortOrder == 'revision' || sortOrder == 'date')
|
||||
@@ -33,32 +42,34 @@ jQuery(document).ready(function(){
|
||||
});
|
||||
|
||||
jQuery('#filter').keyup(function(){
|
||||
var filter = $(this).val();
|
||||
if (filter.length>2) {
|
||||
$('.pluginBox').hide();
|
||||
$('#availablePlugins .pluginBox input[name="name"]').each(function(){
|
||||
if ($(this).val().toUpperCase().indexOf(filter.toUpperCase()) != -1) {
|
||||
$(this).parents('div').show();
|
||||
}
|
||||
var filter = $(this).val();
|
||||
if (filter.length>2) {
|
||||
$('.pluginBox').hide();
|
||||
$('#availablePlugins .pluginBox input[name="name"]').each(function(){
|
||||
if ($(this).val().toUpperCase().indexOf(filter.toUpperCase()) != -1) {
|
||||
$(this).parents('div').show();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$('.pluginBox').show();
|
||||
}
|
||||
jQuery("#filter").focus();
|
||||
});
|
||||
$(".install-plugin-button").each(function() {
|
||||
let plugin_name = $(this).closest(".pluginBox").find("input[name=\"name\"]").val();
|
||||
$(this).pwg_jconfirm_follow_href({
|
||||
alert_title: title.replace("%s", plugin_name),
|
||||
alert_confirm: confirm_msg,
|
||||
alert_cancel: cancel_msg
|
||||
});
|
||||
}
|
||||
else {
|
||||
$('.pluginBox').show();
|
||||
}
|
||||
});
|
||||
jQuery("#filter").focus();
|
||||
jQuery(".titrePage input[name='Clear']").click(function(){
|
||||
$("#filter").val('');
|
||||
$(".pluginBox").show();
|
||||
});
|
||||
});
|
||||
});
|
||||
{/literal}{/footer_script}
|
||||
|
||||
<div class="titrePage">
|
||||
<span class="sort">
|
||||
{'Filter'|@translate} : <input type="text" id="filter">
|
||||
<input type="button" name="Clear" Value="{'Cancel'|@translate}"> |
|
||||
{'Sort order'|@translate} :
|
||||
<i class="icon-filter"></i> {'Filter'|@translate} <input type="text" id="filter">
|
||||
<i class="icon-sort-number-up"></i> {'Sort order'|@translate}
|
||||
{html_options name="selectOrder" options=$order_options selected=$order_selected}
|
||||
</span>
|
||||
<h2>{'Plugins'|@translate}</h2>
|
||||
@@ -93,7 +104,7 @@ jQuery(document).ready(function(){
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{$plugin.URL_INSTALL}" onclick="return confirm('{'Are you sure you want to install this plugin?'|@translate|@escape:javascript}');">{'Install'|@translate}</a>
|
||||
<a href="{$plugin.URL_INSTALL}" class="install-plugin-button">{'Install'|@translate}</a>
|
||||
| <a href="{$plugin.URL_DOWNLOAD}">{'Download'|@translate}</a>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
@@ -38,7 +38,7 @@ jQuery("select[name=cat]").change(function(){
|
||||
|
||||
<form action="{$F_ACTION}" method="GET" class="filter">
|
||||
<fieldset>
|
||||
<legend>{'Filter'|@translate}</legend>
|
||||
<legend><span class="icon-filter icon-green"></span>{'Filter'|@translate}</legend>
|
||||
|
||||
<label>
|
||||
{'Sort by'|@translate}
|
||||
|
||||
@@ -67,7 +67,9 @@ body .ui-tooltip {
|
||||
<input type="hidden" name="page" value="rating_user">
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'}
|
||||
{combine_script id='jquery.confirm' load='footer' require='jquery' path='themes/default/js/plugins/jquery-confirm.min.js'}
|
||||
{combine_css path="themes/default/js/plugins/jquery-confirm.min.css"}
|
||||
{combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'}
|
||||
{combine_script id='jquery.geoip' load='async' path='admin/themes/default/js/jquery.geoip.js'}
|
||||
{footer_script}
|
||||
@@ -126,29 +128,43 @@ function uidFromCell(cell){
|
||||
$(document).ready( function(){
|
||||
$("#rateTable").on( "click", ".del", function(e) {
|
||||
e.preventDefault();
|
||||
if (!confirm('{'Are you sure?'|@translate|@escape:'javascript'}'))
|
||||
return;
|
||||
var cell = e.target.parentNode,
|
||||
tr = cell;
|
||||
while ( tr.nodeName != "TR") tr = tr.parentNode;
|
||||
tr = jQuery(tr).fadeTo(1000, 0.4);
|
||||
|
||||
var data=uidFromCell(cell);
|
||||
|
||||
(new PwgWS('{$ROOT_URL|@escape:javascript}')).callService(
|
||||
'pwg.rates.delete', { user_id:data.uid, anonymous_id:data.aid},
|
||||
{
|
||||
method: 'POST',
|
||||
onFailure: function(num, text) { tr.stop(); tr.fadeTo(0,1); alert(num + " " + text); },
|
||||
onSuccess: function(result){
|
||||
if (result)
|
||||
oTable.row(tr[0]).remove().draw();
|
||||
else
|
||||
alert(result);
|
||||
const title_msg = '{'Are you sure you want to delete the ratings of the user "%s"?'|@translate|@escape:'javascript'}';
|
||||
const confirm_msg = '{"Yes, I am sure"|@translate}';
|
||||
const cancel_msg = "{"No, I have changed my mind"|@translate}";
|
||||
let usr_name = $(this).closest("tr").find(".usr").html();
|
||||
$.confirm({
|
||||
title: title_msg.replace("%s", usr_name),
|
||||
buttons: {
|
||||
confirm: {
|
||||
text: confirm_msg,
|
||||
btnClass: 'btn-red',
|
||||
action: function () {
|
||||
var cell = e.target.parentNode,
|
||||
tr = cell;
|
||||
while ( tr.nodeName != "TR") tr = tr.parentNode;
|
||||
tr = jQuery(tr).fadeTo(1000, 0.4);
|
||||
var data=uidFromCell(cell);
|
||||
(new PwgWS('{$ROOT_URL|@escape:javascript}')).callService(
|
||||
'pwg.rates.delete', { user_id:data.uid, anonymous_id:data.aid},
|
||||
{
|
||||
method: 'POST',
|
||||
onFailure: function(num, text) { tr.stop(); tr.fadeTo(0,1); alert(num + " " + text); },
|
||||
onSuccess: function(result){
|
||||
if (result)
|
||||
oTable.row(tr[0]).remove().draw();
|
||||
else
|
||||
alert(result);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
},
|
||||
cancel: {
|
||||
text: cancel_msg
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
},
|
||||
...jConfirm_confirm_options
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -6,8 +6,21 @@ jQuery(document).ready(function(){
|
||||
});
|
||||
});
|
||||
{/literal}{/footer_script}
|
||||
|
||||
|
||||
{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'}
|
||||
{combine_script id='jquery.confirm' load='footer' require='jquery' path='themes/default/js/plugins/jquery-confirm.min.js'}
|
||||
{combine_css path="themes/default/js/plugins/jquery-confirm.min.css"}
|
||||
{footer_script}
|
||||
const title_msg = '{'Are you sure you want to delete this site?'|@translate|@escape:'javascript'}';
|
||||
const confirm_msg = '{"Yes, I am sure"|@translate}';
|
||||
const cancel_msg = "{"No, I have changed my mind"|@translate}";
|
||||
$(".delete-site-button").each(function() {
|
||||
$(this).pwg_jconfirm_follow_href({
|
||||
alert_title: title_msg,
|
||||
alert_confirm: confirm_msg,
|
||||
alert_cancel: cancel_msg
|
||||
});
|
||||
});
|
||||
{/footer_script}
|
||||
<div class="titrePage">
|
||||
<h2>{'Site manager'|@translate}</h2>
|
||||
</div>
|
||||
@@ -34,8 +47,7 @@ jQuery(document).ready(function(){
|
||||
</td><td>
|
||||
[<a href="{$site.U_SYNCHRONIZE}" title="{'update the database from files'|@translate}">{'Synchronize'|@translate}</a>]
|
||||
{if isset($site.U_DELETE)}
|
||||
[<a href="{$site.U_DELETE}" onclick="return confirm('{'Are you sure?'|@translate|escape:'javascript'}');"
|
||||
title="{'delete this site and all its attached elements'|@translate}">{'delete'|@translate}</a>]
|
||||
[<a class="delete-site-button" href="{$site.U_DELETE}" title="{'delete this site and all its attached elements'|@translate}">{'delete'|@translate}</a>]
|
||||
{/if}
|
||||
{if not empty($site.plugin_links)}
|
||||
<br>
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
{footer_script}
|
||||
$('#syncFiles label').click(function () {
|
||||
if ($("input[value='files']:checked").val()) {
|
||||
$("input[value='files']").closest("li").find("ul").show();
|
||||
} else {
|
||||
$("input[value='files']").closest("li").find("ul").hide();
|
||||
}
|
||||
})
|
||||
|
||||
{include file='include/resize.inc.tpl'}
|
||||
{/footer_script}
|
||||
|
||||
<div class="titrePage">
|
||||
<h2>{'Database synchronization with files'|@translate}: <a href="{$SITE_URL}">{$SITE_URL}</a></h2>
|
||||
<h2>{'Synchronize'|@translate}<a href="{$SITE_URL}"><span class="badge-number">{$SITE_URL}</span></a></h2>
|
||||
</div>
|
||||
|
||||
{if isset($update_result)}
|
||||
@@ -60,13 +68,13 @@
|
||||
<form action="" method="post" id="update">
|
||||
|
||||
<fieldset id="syncFiles">
|
||||
<legend>{'synchronize files structure with database'|@translate}</legend>
|
||||
<legend><span class="icon-docs icon-blue"></span>{'synchronize files structure with database'|@translate}</legend>
|
||||
<ul>
|
||||
<li><label><input type="radio" name="sync" value="" {if empty($introduction.sync)}checked="checked"{/if}> {'nothing'|@translate}</label></li>
|
||||
<li><label><input type="radio" name="sync" value="dirs" {if 'dirs'==$introduction.sync}checked="checked"{/if}> {'only directories'|@translate}</label></li>
|
||||
|
||||
<li><label><input type="radio" name="sync" value="files" {if 'files'==$introduction.sync}checked="checked"{/if}> {'directories + files'|@translate}</label>
|
||||
<ul style="padding-left:3em">
|
||||
<ul style="display:none;padding-left:3em">
|
||||
<li><label><input type="checkbox" name="display_info" value="1" {if $introduction.display_info}checked="checked"{/if}> {'display maximum informations (added albums and photos, deleted albums and photos)'|@translate}</label></li>
|
||||
<li><label><input type="checkbox" name="add_to_caddie" value="1" {if $introduction.add_to_caddie}checked="checked"{/if}> {'add new photos to caddie'|@translate}</label></li>
|
||||
<li><label>{'Who can see these photos?'|@translate} <select name="privacy_level">{html_options options=$introduction.privacy_level_options selected=$introduction.privacy_level_selected}</select></label></li>
|
||||
@@ -76,7 +84,7 @@
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="syncMetadata">
|
||||
<legend>{'synchronize files metadata with database photos informations'|@translate}</legend>
|
||||
<legend><span class="icon-hdd icon-red"></span>{'synchronize files metadata with database photos informations'|@translate}</legend>
|
||||
<label><input type="checkbox" name="sync_meta" {if $introduction.sync_meta}checked="checked"{/if}> {'Synchronize metadata'|@translate} ({$METADATA_LIST})</label>
|
||||
<ul style="padding-left:3em">
|
||||
<li>
|
||||
@@ -89,12 +97,12 @@
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="syncSimulate">
|
||||
<legend>{'Simulation'|@translate}</legend>
|
||||
<legend><span class="icon-chart-bar icon-green"></span>{'Simulation'|@translate}</legend>
|
||||
<ul><li><label><input type="checkbox" name="simulate" value="1" checked="checked"> {'only perform a simulation (no change in database will be made)'|@translate}</label></li></ul>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="catSubset">
|
||||
<legend>{'reduce to single existing albums'|@translate}</legend>
|
||||
<legend><span class="icon-filter icon-purple"></span>{'reduce to single existing albums'|@translate}</legend>
|
||||
<ul>
|
||||
<li>
|
||||
<select class="categoryList" name="cat" size="10">
|
||||
|
||||
@@ -1,25 +1,61 @@
|
||||
{footer_script}
|
||||
var str_number_page_visited = "{'Page Visited'|@translate}";
|
||||
var str_number_page_visited_with_year = "{'Page Visited in %s'|@translate}";
|
||||
var str_tooltip_format = {
|
||||
"years":"YYYY",
|
||||
"months":"MMMM YYYY",
|
||||
"days":"DD MMM",
|
||||
"hours":"LT"
|
||||
};
|
||||
var str_unit_format = {
|
||||
"day":"dddd",
|
||||
"month":"MMM YYYY"
|
||||
}
|
||||
var str_avg = "{'Average last 12 months'|@translate}"
|
||||
var str_months = ["{'January'|@translate}", "{'February'|@translate}", "{'March'|@translate}", "{'April'|@translate}", "{'May'|@translate}", "{'June'|@translate}", "{'July'|@translate}", "{'August'|@translate}", "{'September'|@translate}", "{'Octobember'|@translate}", "{'November'|@translate}", "{'December'|@translate}"];
|
||||
moment.locale("{$langCode}");
|
||||
{/footer_script}
|
||||
|
||||
{combine_script id='chart.js' load='footer' path='themes/default/js/plugins/Chart.min.js'}
|
||||
{combine_css path="themes/default/js/plugins/Chart.min.css"}
|
||||
|
||||
{combine_script id='moment-with-locales.js' path='themes/default/js/plugins/moment-with-locales.min.js'}
|
||||
|
||||
{combine_script id='stats' load='footer' path='admin/themes/default/js/stats.js'}
|
||||
|
||||
<div class="titrePage">
|
||||
<h2>{'History'|@translate} {$TABSHEET_TITLE}</h2>
|
||||
<h2>{'History'|@translate}</h2>
|
||||
</div>
|
||||
|
||||
<h3>{$L_STAT_TITLE}</h3>
|
||||
<div class="stat-compare-mode">
|
||||
<label class="switch">
|
||||
<input type="checkbox" id="toggleCompareMode">
|
||||
<span class="slider round" checked="false"></span>
|
||||
</label>
|
||||
{'Compare mode'|@translate}
|
||||
</div>
|
||||
|
||||
<table class="table2" id="dailyStats">
|
||||
<tr class="throw">
|
||||
<th>{$PERIOD_LABEL}</th>
|
||||
<th>{'Pages seen'|@translate}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<div id="data"
|
||||
data-hours='{json_encode($lastHours)}'
|
||||
data-days='{json_encode($lastDays)}'
|
||||
data-months='{json_encode($lastMonths)}'
|
||||
data-years='{json_encode($lastYears)}'
|
||||
data-compare-years='{json_encode($compareYears)}'
|
||||
data-month-stats='{json_encode($monthStats)}'
|
||||
></div>
|
||||
<div class="stat-legend-container">
|
||||
<div class="stat-data-selector">
|
||||
<input type="radio" id="hours-selector" name="stat-data-type">
|
||||
<label for="hours-selector" data-value="hours">{"Hour"|@translate}</label>
|
||||
<input type="radio" id="days-selector" name="stat-data-type" checked>
|
||||
<label for="days-selector" data-value="days">{"Day"|@translate}</label>
|
||||
<input type="radio" id="months-selector" name="stat-data-type">
|
||||
<label for="months-selector" data-value="months">{"Month"|@translate}</label>
|
||||
<input type="radio" id="years-selector" name="stat-data-type">
|
||||
<label for="years-selector" data-value="years">{"Year"|@translate}</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{if not empty($statrows)}
|
||||
{foreach from=$statrows item=row}
|
||||
<tr>
|
||||
<td style="white-space: nowrap">{$row.VALUE}</td>
|
||||
<td class="number">{$row.PAGES}</td>
|
||||
<td><div class="statBar" style="width:{$row.WIDTH}px"></div></td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{/if}
|
||||
|
||||
</table>
|
||||
<div class="stat-graph-container">
|
||||
<canvas id="stat-graph" width="400" height="150" role="img"><p>Your browser does not support the canvas element.</p></canvas>
|
||||
</div>
|
||||
|
||||
@@ -1,336 +1,195 @@
|
||||
{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'}
|
||||
{include file='include/tag_selection.inc.tpl'}
|
||||
|
||||
{html_style}
|
||||
.showInfo { text-indent:5px; }
|
||||
form fieldset p { margin-left:0; }
|
||||
{/html_style}
|
||||
|
||||
{footer_script require='jquery'}
|
||||
/**
|
||||
* Add tag
|
||||
*/
|
||||
jQuery("#addTag").click(function() {
|
||||
jQuery("#addTagForm").toggle();
|
||||
jQuery("input[name=add_tag]").focus();
|
||||
return false;
|
||||
});
|
||||
|
||||
jQuery("#addTagClose").click(function() {
|
||||
jQuery("#addTagForm").hide();
|
||||
return false;
|
||||
});
|
||||
|
||||
jQuery("#selectionMode").click(function() {
|
||||
if (jQuery(this).hasClass("icon-check-empty")) {
|
||||
jQuery("#selectionMode").removeClass("icon-check-empty").addClass("icon-check");
|
||||
jQuery('label.font-checkbox span').show();
|
||||
jQuery('ul.tagSelection a.showInfo').hide();
|
||||
jQuery('fieldset#action').show();
|
||||
jQuery('fieldset#selectTags legend').html("{'Tag selection'|translate|escape:javascript}");
|
||||
}
|
||||
else {
|
||||
jQuery("#selectionMode").removeClass("icon-check").addClass("icon-check-empty");
|
||||
jQuery('label.font-checkbox span').hide();
|
||||
jQuery('ul.tagSelection a.showInfo').show();
|
||||
jQuery('fieldset#action').hide();
|
||||
jQuery('fieldset#selectTags legend').html("{'Tags'|translate|escape:javascript}");
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
jQuery('.showInfo').tipTip({
|
||||
'delay' : 0,
|
||||
'fadeIn' : 200,
|
||||
'fadeOut' : 200,
|
||||
'maxWidth':'300px',
|
||||
'keepAlive':true,
|
||||
'activation':'click'
|
||||
});
|
||||
|
||||
function displayDeletionWarnings() {
|
||||
jQuery(".warningDeletion").show();
|
||||
jQuery("input[name=destination_tag]:checked").parent("label").children(".warningDeletion").hide();
|
||||
}
|
||||
|
||||
displayDeletionWarnings();
|
||||
|
||||
jQuery("#mergeTags label").click(function() {
|
||||
displayDeletionWarnings();
|
||||
});
|
||||
|
||||
$("#searchInput").on("keydown", function(e) {
|
||||
var $this = $(this),
|
||||
timer = $this.data("timer");
|
||||
|
||||
if (timer) {
|
||||
clearTimeout(timer);
|
||||
}
|
||||
|
||||
$this.data("timer", setTimeout(function() {
|
||||
var val = $this.val();
|
||||
if (!val) {
|
||||
$(".tagSelection>li").show();
|
||||
$("#filterIcon").css("visibility","hidden");
|
||||
}
|
||||
else {
|
||||
$("#filterIcon").css("visibility","visible");
|
||||
var regex = new RegExp( val.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&"), "i" );
|
||||
$(".tagSelection>li").each(function() {
|
||||
var $li = $(this),
|
||||
text = $.trim( $("label", $li).text() );
|
||||
$li.toggle(regex.test(text));
|
||||
});
|
||||
}
|
||||
|
||||
}, 300) );
|
||||
|
||||
if (e.keyCode == 13) { // Enter
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
jQuery('input[name="tags[]"]').click(function() {
|
||||
var nbSelected = 0;
|
||||
nbSelected = jQuery('input[name="tags[]"]').filter(':checked').length;
|
||||
|
||||
if (nbSelected == 0) {
|
||||
jQuery("#permitAction").hide();
|
||||
jQuery("#forbidAction").show();
|
||||
}
|
||||
else {
|
||||
jQuery("#permitAction").show();
|
||||
jQuery("#forbidAction").hide();
|
||||
}
|
||||
});
|
||||
|
||||
jQuery("[id^=action_]").hide();
|
||||
|
||||
jQuery("select[name=selectAction]").change(function () {
|
||||
jQuery("[id^=action_]").hide();
|
||||
|
||||
jQuery("#action_"+jQuery(this).prop("value")).show();
|
||||
|
||||
jQuery("#displayFormBlock").hide();
|
||||
jQuery("#applyActionBlock").hide();
|
||||
|
||||
if (jQuery(this).val() != -1 ) {
|
||||
if (jQuery(this).val() == 'delete') {
|
||||
jQuery("#applyActionBlock").show();
|
||||
jQuery("#applyAction").attr("name", jQuery(this).val());
|
||||
}
|
||||
else {
|
||||
jQuery("#displayForm").attr("name", jQuery(this).val());
|
||||
jQuery("#displayFormBlock").show();
|
||||
}
|
||||
}
|
||||
else {
|
||||
}
|
||||
});
|
||||
|
||||
jQuery("form").submit(function() {
|
||||
if (jQuery("select[name=selectAction]").val() == "delete") {
|
||||
if (!jQuery("input[name=confirm_deletion]").is(":checked")) {
|
||||
jQuery("#action_delete .errors").show();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (jQuery("select[name=selectAction]").val() == "merge") {
|
||||
if (jQuery("ul.tagSelection input[type=checkbox]:checked").length < 2) {
|
||||
alert("{'Select at least two tags for merging'|@translate}");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
jQuery("input[name=confirm_deletion]").change(function() {
|
||||
jQuery("#action_delete .errors").hide();
|
||||
});
|
||||
{footer_script}
|
||||
var pwg_token = "{$PWG_TOKEN}";
|
||||
var str_delete = '{'Delete tag "%s"?'|@translate}';
|
||||
var str_delete_tags = '{'Delete tags \{%s\}?'|@translate}';
|
||||
var str_yes_delete_confirmation = "{'Yes, delete'|@translate}";
|
||||
var str_no_delete_confirmation = "{"No, I have changed my mind"|@translate}";
|
||||
var str_tag_deleted = '{'Tag "%s" succesfully deleted'|@translate}';
|
||||
var str_tags_deleted = '{'Tags \{%s\} succesfully deleted'|@translate}';
|
||||
var str_already_exist = '{'Tag "%s" already exists'|@translate}';
|
||||
var str_tag_created = '{'Tag "%s" created'|@translate}';
|
||||
var str_tag_renamed = '{'Tag "%s1" renamed in "%s2"'|@translate}';
|
||||
var str_delete_orphan_tags = '{'Delete orphan tags ?'|@translate}';
|
||||
var str_orphan_tags = '{'You have %s1 orphan : %s2'|@translate}';
|
||||
var str_delete_them = '{'Delete them'|@translate}';
|
||||
var str_keep_them = '{'Keep them'|@translate}';
|
||||
var str_copy = '{' (copy)'|@translate}';
|
||||
var str_other_copy = '{' (copy %s)'|@translate}';
|
||||
var str_merged_into = '{'Tag(s) \{%s1\} succesfully merged into "%s2"'|@translate}';
|
||||
var str_and_others_tags = '{'and %s others'|@translate}';
|
||||
var str_others_tags_available = '{'%s other tags available...'|@translate}'
|
||||
var str_number_photos = '{'%d photos'}'
|
||||
var str_no_photos = '{'no photo'}'
|
||||
var str_select_all_tag = '{'Select all %d tags'|@translate}';
|
||||
var str_clear_selection = '{'Clear Selection'|@translate}';
|
||||
var str_selection_done = '{'The %d tags on this page are selected'|@translate}';
|
||||
var str_tag_selected = '{'<b>%d</b> tag selected'|@translate}';
|
||||
var str_tags_found = '{'<b>%d</b> tags found'|@translate}';
|
||||
var str_tag_found = '{'<b>%d</b> tag found'|@translate}';
|
||||
{/footer_script}
|
||||
|
||||
{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'}
|
||||
{combine_script id='jquery.confirm' load='footer' require='jquery' path='themes/default/js/plugins/jquery-confirm.min.js'}
|
||||
{combine_css path="themes/default/js/plugins/jquery-confirm.min.css"}
|
||||
{combine_css path="admin/themes/default/fontello/css/animation.css"}
|
||||
{combine_script id='tiptip' load='header' path='themes/default/js/plugins/jquery.tipTip.minified.js'}
|
||||
{combine_script id='tags' load='footer' path='admin/themes/default/js/tags.js'}
|
||||
|
||||
<meta http-equiv='cache-control' content='no-cache'>
|
||||
<meta http-equiv='expires' content='0'>
|
||||
<meta http-equiv='pragma' content='no-cache'>
|
||||
|
||||
{function name=tagContent}
|
||||
{function tagContent}
|
||||
<p class='tag-name'>{$tag_name}</p>
|
||||
<a class="icon-ellipsis-vert showOptions"></a>
|
||||
<div class="tag-dropdown-block dropdown">
|
||||
<div class="dropdown-content">
|
||||
<div class='tag-dropdown-header'>
|
||||
<b>{$tag_name}</b>
|
||||
<i>{if !$has_image}{'no photo'|@translate}{else}{'%d photos'|@translate:$tag_count}{/if}</i>
|
||||
</div>
|
||||
<a class='dropdown-option icon-eye view' href="{$tag_U_VIEW}" {if !$has_image} style='display:none' {/if}> {'View in gallery'|@translate}</a>
|
||||
<a class='dropdown-option icon-picture manage' href="{$tag_U_EDIT}" {if !$has_image} style='display:none' {/if}> {'Manage photos'|@translate}</a>
|
||||
<a class='dropdown-option icon-pencil edit'> {'Edit'|@translate}</a>
|
||||
<a class='dropdown-option icon-docs duplicate'> {'Duplicate'|@translate}</a>
|
||||
<a class='dropdown-option icon-trash delete'> {'Delete'|@translate}</a>
|
||||
</div>
|
||||
</div>
|
||||
<span class="select-checkbox">
|
||||
<i class="icon-ok"> </i>
|
||||
</span>
|
||||
<div class="tag-rename">
|
||||
<form>
|
||||
<input type="text" class="tag-name-editable" value="{$tag_name}">
|
||||
<input type="submit" hidden>
|
||||
</form>
|
||||
<span class="icon-ok validate"></span>
|
||||
<span class="icon-cancel"></span>
|
||||
</div>
|
||||
{/function}
|
||||
{/function}
|
||||
|
||||
<div class="titrePage">
|
||||
<h2>{'Manage tags'|@translate}</h2>
|
||||
<h2>{'Tag Manager'|@translate} <span class="badge-number"> {$total}</span> </h2>
|
||||
</div>
|
||||
|
||||
{if !isset($EDIT_TAGS_LIST) and !isset($DUPLIC_TAGS_LIST) and !isset($MERGE_TAGS_LIST)}
|
||||
<p class="showCreateAlbum" id="showAddTag">
|
||||
<a class="icon-plus-circled" href="#" id="addTag">{'Add a tag'|translate}</a>
|
||||
<a class="icon-check-empty" href="#" id="selectionMode">{'Select tags'|translate}</a>
|
||||
</p>
|
||||
<div class="selection-mode-group-manager">
|
||||
<label class="switch">
|
||||
<input type="checkbox" id="toggleSelectionMode">
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
<p>{'Selection mode'|@translate}</p>
|
||||
</div>
|
||||
|
||||
<form method="post" style="display:none" id="addTagForm" name="add_user" action="{$F_ACTION}" class="properties">
|
||||
<input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
|
||||
<div id="selection-mode-block" class="in-selection-mode tag-selection">
|
||||
<div class="tag-selection-content">
|
||||
|
||||
<fieldset class="with-border">
|
||||
<legend>{'Add a tag'|@translate}</legend>
|
||||
<p id="nothing-selected">{'No tags selected, no actions possible.'|@translate}</p>
|
||||
|
||||
<label>
|
||||
{'New tag'|@translate}
|
||||
<input type="text" name="add_tag" size="50">
|
||||
</label>
|
||||
<div class="selection-mode-tag">
|
||||
<p>{'Your selection'|@translate}</p>
|
||||
<div class="tag-list" data-list='[]'>
|
||||
|
||||
</div>
|
||||
<div class="selection-other-tags"></div>
|
||||
<button id="MergeSelectionMode" class="icon-object-group unavailable" title="{'At least 2 selected tags are needed to merge'|@translate}">{'Merge'|@translate}</button>
|
||||
<button id="DeleteSelectionMode" class="icon-trash-1">{'Delete'|@translate}</button>
|
||||
</div>
|
||||
|
||||
<p class="actionButtons">
|
||||
<input class="submit" type="submit" name="add" value="{'Submit'|@translate}">
|
||||
<a href="#" id="addTagClose">{'Cancel'|@translate}</a>
|
||||
</p>
|
||||
</fieldset>
|
||||
</form>
|
||||
{/if}
|
||||
|
||||
<form action="{$F_ACTION}" method="post">
|
||||
<input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
|
||||
|
||||
{if isset($EDIT_TAGS_LIST)}
|
||||
<fieldset>
|
||||
<legend>{'Edit tags'|@translate}</legend>
|
||||
<input type="hidden" name="edit_list" value="{$EDIT_TAGS_LIST}">
|
||||
<table class="table2">
|
||||
<tr class="throw">
|
||||
<th>{'Current name'|@translate}</th>
|
||||
<th>{'New name'|@translate}</th>
|
||||
</tr>
|
||||
{foreach from=$tags item=tag}
|
||||
<tr>
|
||||
<td>{$tag.NAME}</td>
|
||||
<td><input type="text" name="tag_name-{$tag.ID}" value="{$tag.NAME}" size="50"></td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
|
||||
<p>
|
||||
<input type="submit" name="edit_submit" value="{'Submit'|@translate}">
|
||||
<input type="submit" name="edit_cancel" value="{'Cancel'|@translate}">
|
||||
</p>
|
||||
</fieldset>
|
||||
{/if}
|
||||
|
||||
{if isset($DUPLIC_TAGS_LIST)}
|
||||
<fieldset>
|
||||
<legend>{'Edit tags'|@translate}</legend>
|
||||
<input type="hidden" name="edit_list" value="{$DUPLIC_TAGS_LIST}">
|
||||
<table class="table2">
|
||||
<tr class="throw">
|
||||
<th>{'Source tag'|@translate}</th>
|
||||
<th>{'Name of the duplicate'|@translate}</th>
|
||||
</tr>
|
||||
{foreach from=$tags item=tag}
|
||||
<tr>
|
||||
<td>{$tag.NAME}</td>
|
||||
<td><input type="text" name="tag_name-{$tag.ID}" value="{$tag.NAME}" size="50"></td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
|
||||
<p>
|
||||
<input type="submit" name="duplic_submit" value="{'Submit'|@translate}">
|
||||
<input type="submit" name="duplic_cancel" value="{'Cancel'|@translate}">
|
||||
</p>
|
||||
</fieldset>
|
||||
{/if}
|
||||
|
||||
{if isset($MERGE_TAGS_LIST)}
|
||||
<fieldset id="mergeTags">
|
||||
<legend>{'Merge tags'|@translate}</legend>
|
||||
{'Select the destination tag'|@translate}
|
||||
|
||||
<p>
|
||||
{foreach from=$tags item=tag name=tagloop}
|
||||
<label><input type="radio" name="destination_tag" value="{$tag.ID}"{if $smarty.foreach.tagloop.index == 0} checked="checked"{/if}> {$tag.NAME}<span class="warningDeletion"> {'(this tag will be deleted)'|@translate}</span></label><br>
|
||||
{/foreach}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<input type="hidden" name="merge_list" value="{$MERGE_TAGS_LIST}">
|
||||
<input type="submit" name="merge_submit" value="{'Confirm merge'|@translate}">
|
||||
<input type="submit" name="merge_cancel" value="{'Cancel'|@translate}">
|
||||
</p>
|
||||
</fieldset>
|
||||
{/if}
|
||||
|
||||
{if !isset($EDIT_TAGS_LIST) and !isset($DUPLIC_TAGS_LIST) and !isset($MERGE_TAGS_LIST)}
|
||||
|
||||
<fieldset id="selectTags">
|
||||
<legend>{'Tags'|@translate}</legend>
|
||||
|
||||
{if count($all_tags)}
|
||||
<div><label><span class="icon-filter" style="visibility:hidden" id="filterIcon"></span>{'Search'|@translate} <input id="searchInput" type="text" size="12"></label></div>
|
||||
{/if}
|
||||
|
||||
<ul class="tagSelection">
|
||||
{foreach from=$all_tags item=tag}
|
||||
<li>
|
||||
{capture name='showInfo'}{strip}
|
||||
<b>{$tag.name}</b> ({$tag.counter|@translate_dec:'%d photo':'%d photos'})<br>
|
||||
<a href="{$tag.U_VIEW}">{'View in gallery'|@translate}</a> |
|
||||
<a href="{$tag.U_EDIT}">{'Manage photos'|@translate}</a>
|
||||
{if !empty($tag.alt_names)}<br>{$tag.alt_names}{/if}
|
||||
{/strip}{/capture}
|
||||
<a class="icon-info-circled-1 showInfo" title="{$smarty.capture.showInfo|@htmlspecialchars}"></a>
|
||||
<label class="font-checkbox no-bold">
|
||||
<span class="icon-check" style="display:none"></span>
|
||||
<input type="checkbox" name="tags[]" value="{$tag.id}">
|
||||
{$tag.name}
|
||||
</label>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="action" style="display:none">
|
||||
<legend>{'Action'|@translate}</legend>
|
||||
<div id="forbidAction">{'No tag selected, no action possible.'|@translate}</div>
|
||||
<div id="permitAction" style="display:none">
|
||||
|
||||
<select name="selectAction">
|
||||
<option value="-1">{'Choose an action'|@translate}</option>
|
||||
<option disabled="disabled">------------------</option>
|
||||
<option value="edit">{'Edit selected tags'|@translate}</option>
|
||||
<option value="duplicate">{'Duplicate selected tags'|@translate}</option>
|
||||
<option value="merge">{'Merge selected tags'|@translate}</option>
|
||||
<option value="delete">{'Delete selected tags'|@translate}</option>
|
||||
{if !empty($tag_manager_plugin_actions)}
|
||||
{foreach from=$tag_manager_plugin_actions item=action}
|
||||
<option value="{$action.ID}">{$action.NAME}</option>
|
||||
{/foreach}
|
||||
{/if}
|
||||
<div id="MergeOptionsBlock">
|
||||
<p>{'Choose which tag to merge these tags into'|@translate}</p>
|
||||
<p class="ItalicTextInfo">{'The other tags will be removed'|@translate}</p>
|
||||
<div class="MergeOptionsContainer">
|
||||
<select id="MergeOptionsChoices">
|
||||
</select>
|
||||
</div>
|
||||
<button class="icon-ok ConfirmMergeButton">Confirm merge</button>
|
||||
<a id="CancelMerge">Cancel</a>
|
||||
</div>
|
||||
|
||||
<!-- delete -->
|
||||
<div id="action_delete" class="bulkAction">
|
||||
<p>
|
||||
<label class="font-checkbox">
|
||||
<span class="icon-check"></span>
|
||||
<input type="checkbox" name="confirm_deletion" value="1">
|
||||
{'Are you sure?'|@translate}
|
||||
</label>
|
||||
<span class="errors" style="display:none"><i class="icon-cancel"></i> we really need you to confirm</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* plugins *}
|
||||
{if !empty($tag_manage_plugin_actions)}
|
||||
{foreach from=$element_set_groupe_plugins_actions item=action}
|
||||
<div id="action_{$action.ID}" class="bulkAction">
|
||||
{if !empty($action.CONTENT)}{$action.CONTENT}{/if}
|
||||
</div>
|
||||
<div class='tag-header'>
|
||||
<div id='search-tag'>
|
||||
<div class='search-info'> </div>
|
||||
<span class='icon-filter search-icon'> </span>
|
||||
<span class="icon-cancel search-cancel"></span>
|
||||
<input class='search-input' type='text' placeholder='{'Filter'|@translate}'>
|
||||
</div>
|
||||
<form id='add-tag' class='not-in-selection-mode'>
|
||||
<span class='icon-cancel-circled'></span>
|
||||
<label class='add-tag-label icon-plus-circled'>
|
||||
<p>{'Add a tag'|@translate}</p>
|
||||
<div class='add-tag-container'>
|
||||
<input type='text' id='add-tag-input' placeholder="{'New tag'|@translate}">
|
||||
<input type='submit' hidden>
|
||||
<span class='icon-plus icon-validate'></span>
|
||||
</div>
|
||||
</label>
|
||||
</form>
|
||||
<div class='selection-controller in-selection-mode'>
|
||||
<p>{'Select'|@translate}</p>
|
||||
<a id="selectAll">{'All'|@translate}</a>
|
||||
<a id="selectNone">{'None'|@translate}</a>
|
||||
<a id="selectInvert">{'Invert'|@translate}</a>
|
||||
</div>
|
||||
{if $warning_tags != ""}
|
||||
<div class='tag-warning tag-info icon-attention not-in-selection-mode'><p> {$warning_tags} </p></div>
|
||||
{/if}
|
||||
<div class='tag-message tag-info icon-ok not-in-selection-mode' {if $message_tags != ""}style='display:flex'{/if}> <p> {$message_tags} </p> </div>
|
||||
<div class='tag-error tag-info icon-cancel not-in-selection-mode'> <p> </p> </div>
|
||||
</div>
|
||||
<div class="pageLoad">
|
||||
<i class='icon-spin6 animate-spin'> </i>
|
||||
</div>
|
||||
|
||||
<div class="tag-select-message">
|
||||
<div></div> <a></a>
|
||||
</div>
|
||||
|
||||
<div class='tag-container' data-tags='{json_encode($data)}' data-per_page={$per_page}>
|
||||
{foreach from=$first_tags item=tag}
|
||||
<div class='tag-box' data-id='{$tag.id}' data-selected='0'>
|
||||
{tagContent
|
||||
tag_name = $tag.name
|
||||
tag_U_VIEW = 'index.php?/tags/%s-%s'|@sprintf:$tag['id']:$tag['url_name']
|
||||
tag_U_EDIT = 'admin.php?page=batch_manager&filter=tag-%s'|@sprintf:$tag['id']
|
||||
has_image = ($tag.counter > 0)
|
||||
tag_count = $tag.counter
|
||||
}
|
||||
</div>
|
||||
{/foreach}
|
||||
{/if}
|
||||
<span id="displayFormBlock" style="display:none">
|
||||
<button id="displayForm" class="buttonLike" type="submit" name="">{'Display form'|translate} <i class="icon-right"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
<div class="emptyResearch"> {'No tag found'|@translate} </div>
|
||||
<div class="tag-pagination">
|
||||
<div class="pagination-per-page">
|
||||
<span class="thumbnailsActionsShow" style="font-weight: bold;">{'Display'|@translate}</span>
|
||||
<a>100</a>
|
||||
<a>200</a>
|
||||
<a>500</a>
|
||||
<a>1000</a>
|
||||
</div>
|
||||
|
||||
<p id="applyActionBlock" style="display:none" class="actionButtons">
|
||||
<button id="applyAction" name="submit" type="submit" class="buttonLike">
|
||||
<i class="icon-trash"></i> {'Apply action'|translate} {* icon-trash because the only action is deletion *}
|
||||
</button>
|
||||
<span id="applyOnDetails"></span>
|
||||
</p>
|
||||
</div> {* #permitAction *}
|
||||
</fieldset>
|
||||
{/if}
|
||||
<div class="pagination-container">
|
||||
<div class="pagination-arrow left">
|
||||
<span class="icon-left-open"></span>
|
||||
</div>
|
||||
<div class="pagination-item-container">
|
||||
</div>
|
||||
<div class="pagination-arrow rigth">
|
||||
<span class="icon-left-open"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<div class='tag-template' style='display:none'>
|
||||
{tagContent
|
||||
tag_name='%name%'
|
||||
tag_U_VIEW='%U_VIEW%'
|
||||
tag_U_EDIT='%U_EDIT%'
|
||||
has_image=false
|
||||
tag_count='%count%'
|
||||
}
|
||||
</div>
|
||||