Merge pull request #10 from abrenoch/master

updating
This commit is contained in:
Dave Anderson 2022-07-13 22:21:04 -04:00 committed by GitHub
commit c4c2f6aedb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
95 changed files with 371 additions and 348 deletions

View file

@ -55,6 +55,10 @@ $tabsheet->assign();
// | Load the tab |
// +-----------------------------------------------------------------------+
$template->assign(array(
'ADMIN_PAGE_TITLE' => l10n('Edit album'),
));
if ('properties' == $page['tab'])
{
include(PHPWG_ROOT_PATH.'admin/cat_modify.php');

View file

@ -181,10 +181,12 @@ $template->set_filename('album_notification', 'album_notification.tpl');
$template->assign(
array(
'CATEGORIES_NAV' =>
get_cat_display_name_from_id(
$page['cat'],
'admin.php?page=album-'
),
trim(
get_cat_display_name_from_id(
$page['cat'],
'admin.php?page=album-'
)
),
'F_ACTION' => $admin_album_base_url.'-notification',
'PWG_TOKEN' => get_pwg_token(),
)

View file

@ -476,6 +476,7 @@ $template->assign(
'PWG_TOKEN' => get_pwg_token(),
'U_DISPLAY'=>$base_url.get_query_string_diff(array('display')),
'F_ACTION'=>$base_url.get_query_string_diff(array('cat','start','tag','filter')),
'ADMIN_PAGE_TITLE' => l10n('Batch Manager'),
)
);

View file

@ -109,6 +109,7 @@ $template->assign(
'U_ELEMENTS_PAGE' => $base_url.get_query_string_diff(array('display','start')),
'F_ACTION' => $base_url.get_query_string_diff(array()),
'level_options' => get_privacy_level_options(),
'ADMIN_PAGE_TITLE' => l10n('Batch Manager'),
)
);

View file

@ -201,7 +201,7 @@ $sort_orders_checked = array_keys($sort_orders);
$template->assign(array(
'ADMIN_PAGE_TITLE' => l10n('Album list management'),
'CATEGORIES_NAV'=>$navigation,
'CATEGORIES_NAV'=> preg_replace("# {2,}#"," ",preg_replace("#(\r\n|\n\r|\n|\r)#"," ",$navigation)),
'F_ACTION'=>$form_action,
'PWG_TOKEN' => get_pwg_token(),
'sort_orders' => $sort_orders,

View file

@ -211,7 +211,7 @@ if (!empty($category['id_uppercat']))
$template->assign(
array(
'CATEGORIES_NAV' => $navigation,
'CATEGORIES_NAV' => preg_replace("# {2,}#"," ",preg_replace("#(\r\n|\n\r|\n|\r)#"," ",$navigation)),
'CAT_ID' => $category['id'],
'CAT_NAME' => @htmlspecialchars($category['name']),
'CAT_COMMENT' => @htmlspecialchars($category['comment']),

View file

@ -242,6 +242,7 @@ SELECT DISTINCT id,name,uppercats,global_rank
display_select_cat_wrapper($query_true,array(),'category_option_true');
display_select_cat_wrapper($query_false,array(),'category_option_false');
$template->assign('PWG_TOKEN',get_pwg_token());
$template->assign('ADMIN_PAGE_TITLE', l10n('Properties of abums'));
// +-----------------------------------------------------------------------+
// | sending html code |

View file

@ -87,7 +87,7 @@ $template->set_filename('cat_search', 'cat_search.tpl');
$template->assign(
array(
'data_cat' => $categories,
'ADMIN_PAGE_TITLE' => l10n('Album search tool'),
'ADMIN_PAGE_TITLE' => l10n('Albums'),
'placeholder' => $placeholder,
)
);

View file

@ -211,6 +211,7 @@ $navbar = create_navigation_bar(
);
$template->assign('navbar', $navbar);
$template->assign('ADMIN_PAGE_TITLE', l10n('User comments'));
// +-----------------------------------------------------------------------+
// | sending html code |

View file

@ -608,6 +608,7 @@ switch ($page['section'])
}
$template->assign('isWebmaster', (is_webmaster()) ? 1 : 0);
$template->assign('ADMIN_PAGE_TITLE', l10n('Configuration'));
//----------------------------------------------------------- sending html code
$template->assign_var_from_handle('ADMIN_CONTENT', 'config');

View file

@ -126,7 +126,7 @@ $navigation = get_cat_display_name_cache(
$template->assign(
array(
'CATEGORIES_NAV' => $navigation,
'CATEGORIES_NAV' => preg_replace("# {2,}#"," ",preg_replace("#(\r\n|\n\r|\n|\r)#"," ",$navigation)),
'F_ACTION' => $base_url.get_query_string_diff(array()),
)
);

View file

@ -184,6 +184,7 @@ foreach ($tpl_extension as $file => $conditions)
// +-----------------------------------------------------------------------+
// | html code display |
// +-----------------------------------------------------------------------+
$template->assign('ADMIN_PAGE_TITLE', l10n('Extend for templates'));
$template->assign_var_from_handle('ADMIN_CONTENT', 'extend_for_templates');
?>

View file

@ -113,6 +113,7 @@ $template->assign(
$template->assign('display_thumbnails', $display_thumbnails);
$template->assign('display_thumbnail_selected', $form['display_thumbnail']);
$template->assign('guest_id', $conf['guest_id']);
$template->assign('ADMIN_PAGE_TITLE', l10n('History'));
// +-----------------------------------------------------------------------+
// | html code display |

View file

@ -18,7 +18,7 @@ function add_core_tabs($sheets, $tab_id)
case 'tags':
global $my_base_url;
$sheets[''] = array('caption' => '<span class="icon-tags"></span>'.l10n('Tags'), 'url' => $my_base_url.'tags');
$sheets[''] = array('caption' => '<span class="icon-menu"></span>'.l10n('List'), 'url' => $my_base_url.'tags');
break;
case 'album':
@ -38,7 +38,7 @@ function add_core_tabs($sheets, $tab_id)
case 'users':
global $my_base_url;
$sheets['user_list'] = array('caption' => '<span class="icon-users"></span>'.l10n('User list'), 'url' => $my_base_url.'user_list');
$sheets['user_list'] = array('caption' => '<span class="icon-menu"></span>'.l10n('List'), 'url' => $my_base_url.'user_list');
$sheets['user_activity'] = array('caption' => '<span class="icon-eye"></span>'.l10n('Activity'), 'url' => $my_base_url.'user_activity');
break;
@ -60,7 +60,7 @@ function add_core_tabs($sheets, $tab_id)
case 'comments':
global $my_base_url;
$sheets[''] = array('caption' => l10n('User comments'), 'url' => $my_base_url.'comments');
$sheets[''] = array('caption' => '<span class="icon-menu"></span>'.l10n('List'), 'url' => $my_base_url.'comments');
break;
case 'users':
@ -70,7 +70,7 @@ function add_core_tabs($sheets, $tab_id)
case 'groups':
global $my_base_url;
$sheets[''] = array('caption' => '<span class="icon-group"> </span>'.l10n('Groups'), 'url' => $my_base_url.'group_list');
$sheets[''] = array('caption' => '<span class="icon-menu"> </span>'.l10n('List'), 'url' => $my_base_url.'group_list');
break;
case 'configuration':
@ -100,14 +100,14 @@ function add_core_tabs($sheets, $tab_id)
case 'languages':
global $my_base_url;
$sheets['installed'] = array('caption' => '<span class="icon-language"></span>'.l10n('Installed Languages'), 'url' => $my_base_url.'&amp;tab=installed');
$sheets['installed'] = array('caption' => '<span class="icon-menu"></span>'.l10n('List'), 'url' => $my_base_url.'&amp;tab=installed');
$sheets['update'] = array('caption' => '<span class="icon-arrows-cw"></span>'.l10n('Check for updates'), 'url' => $my_base_url.'&amp;tab=update');
$sheets['new'] = array('caption' => '<span class="icon-plus-circled"></span>'.l10n('Add New Language'), 'url' => $my_base_url.'&amp;tab=new');
break;
case 'menus':
global $my_base_url;
$sheets[''] = array('caption' => '<span class="icon-menu"></span>'.l10n('Menu Management'), 'url' => $my_base_url.'menubar');
$sheets[''] = array('caption' => '<span class="icon-menu"></span>'.l10n('List'), 'url' => $my_base_url.'menubar');
break;
case 'nbm':
@ -119,7 +119,7 @@ function add_core_tabs($sheets, $tab_id)
case 'photo':
global $admin_photo_base_url;
$sheets['properties'] = array('caption' => l10n('Properties'), 'url' => $admin_photo_base_url.'-properties');
$sheets['properties'] = array('caption' => '<span class="icon-file-image"></span>'.l10n('Properties'), 'url' => $admin_photo_base_url.'-properties');
$sheets['coi'] = array('caption' => '<span class="icon-crop"></span>'.l10n('Center of interest'), 'url' => $admin_photo_base_url.'-coi');
break;
@ -133,9 +133,9 @@ function add_core_tabs($sheets, $tab_id)
case 'plugins':
global $my_base_url;
$sheets['installed'] = array('caption' => '<span class="icon-equalizer"></span>'.l10n('Plugin list'), 'url' => $my_base_url.'&amp;tab=installed');
$sheets['installed'] = array('caption' => '<span class="icon-menu"></span>'.l10n('List'), 'url' => $my_base_url.'&amp;tab=installed');
$sheets['update'] = array('caption' => '<span class="icon-arrows-cw"></span>'.l10n('Check for updates'), 'url' => $my_base_url.'&amp;tab=update');
$sheets['new'] = array('caption' => '<span class="icon-plus-circled"></span>'.l10n('Other plugins'), 'url' => $my_base_url.'&amp;tab=new');
$sheets['new'] = array('caption' => '<span class="icon-plus-circled"></span>'.l10n('Add New Plugin'), 'url' => $my_base_url.'&amp;tab=new');
break;
case 'rating':
@ -145,15 +145,15 @@ function add_core_tabs($sheets, $tab_id)
case 'themes':
global $my_base_url;
$sheets['installed'] = array('caption' => '<span class="icon-brush"></span>'.l10n('Installed Themes'), 'url' => $my_base_url.'&amp;tab=installed');
$sheets['installed'] = array('caption' => '<span class="icon-menu"></span>'.l10n('List'), 'url' => $my_base_url.'&amp;tab=installed');
$sheets['update'] = array('caption' => '<span class="icon-arrows-cw"></span>'.l10n('Check for updates'), 'url' => $my_base_url.'&amp;tab=update');
$sheets['new'] = array('caption' => '<span class="icon-plus-circled"></span>'.l10n('Add New Theme'), 'url' => $my_base_url.'&amp;tab=new');
break;
case 'updates':
global $my_base_url;
$sheets['pwg'] = array('caption' => l10n('Piwigo Update'), 'url' => $my_base_url);
$sheets['ext'] = array('caption' => l10n('Extensions Update'), 'url' => $my_base_url.'&amp;tab=ext');
$sheets['pwg'] = array('caption' => l10n('Piwigo core'), 'url' => $my_base_url);
$sheets['ext'] = array('caption' => l10n('Extensions'), 'url' => $my_base_url.'&amp;tab=ext');
break;
case 'site_update':
global $my_base_url;

View file

@ -15,4 +15,16 @@ $tabsheet->set_id('albums');
$tabsheet->select($page['tab']);
$tabsheet->assign();
$query = '
SELECT COUNT(*)
FROM '.CATEGORIES_TABLE.'
;';
list($nb_cats) = pwg_db_fetch_row(pwg_query($query));
$template->assign(
array(
'nb_cats' => $nb_cats,
)
);
?>

View file

@ -30,9 +30,12 @@ $tabsheet->set_id('languages');
$tabsheet->select($page['tab']);
$tabsheet->assign();
if ($page['tab'] == 'update')
if ($page['tab'] == 'update') {
include(PHPWG_ROOT_PATH.'admin/updates_ext.php');
$template->assign('ADMIN_PAGE_TITLE', l10n('Languages'));
}
else
{
include(PHPWG_ROOT_PATH.'admin/languages_'.$page['tab'].'.php');
}
?>

View file

@ -116,6 +116,7 @@ DELETE
}
$template->assign('isWebmaster', (is_webmaster()) ? 1 : 0);
$template->assign('ADMIN_PAGE_TITLE', l10n('Languages'));
$template->assign_var_from_handle('ADMIN_CONTENT', 'languages');
?>

View file

@ -108,6 +108,7 @@ else
{
$page['errors'][] = l10n('Can\'t connect to server.');
}
$template->assign('ADMIN_PAGE_TITLE', l10n('Languages'));
$template->assign_var_from_handle('ADMIN_CONTENT', 'languages');
?>

View file

@ -155,6 +155,7 @@ $action = get_root_url().'admin.php?page=menubar';
$template->assign(array('F_ACTION'=>$action));
$template->assign('isWebmaster', (is_webmaster()) ? 1 : 0);
$template->assign('ADMIN_PAGE_TITLE', l10n('Menu Management'));
$template->set_filename( 'menubar_admin_content', 'menubar.tpl' );
$template->assign_var_from_handle( 'ADMIN_CONTENT', 'menubar_admin_content');

View file

@ -725,6 +725,8 @@ switch ($page['mode'])
}
}
$template->assign('ADMIN_PAGE_TITLE', l10n('Send mail to users'));
// +-----------------------------------------------------------------------+
// | Sending html code |
// +-----------------------------------------------------------------------+

View file

@ -181,6 +181,7 @@ $template->assign(array(
'PWG_TOKEN' => $pwg_token,
'U_HELP' => get_root_url().'admin/popuphelp.php?page=permalinks',
'deleted_permalinks' => $deleted_permalinks,
'ADMIN_PAGE_TITLE' => l10n('Albums'),
));
$template->assign_var_from_handle('ADMIN_CONTENT', 'permalinks');

View file

@ -55,7 +55,7 @@ $tabsheet->assign();
$template->assign(
array(
'ADMIN_PAGE_TITLE' => l10n('Edit photo #%s', $_GET['image_id']),
'ADMIN_PAGE_TITLE' => l10n('Edit photo <span class="image-id">#%s</span>', $_GET['image_id']),
)
);

View file

@ -19,5 +19,7 @@ if (!defined('PHOTOS_ADD_BASE_URL'))
// | sending html code |
// +-----------------------------------------------------------------------+
$template->assign('ADMIN_PAGE_TITLE', l10n('Upload Photos'));
$template->assign_var_from_handle('ADMIN_CONTENT', 'photos_add');
?>

View file

@ -65,8 +65,10 @@ SELECT COUNT(*)
;';
list($nb_images) = pwg_db_fetch_row(pwg_query($query));
include_once(PHPWG_ROOT_PATH.'include/mdetect.php');
$uagent_obj = new uagent_info();
// To see the mobile app promote, the account must have 2 weeks ancient, 3 albums created and 30 photos uploaded
$template->assign("PROMOTE_MOBILE_APPS", (strtotime($register_date) < strtotime('2 weeks ago') and $nb_cats >= 3 and $nb_images >= 30));
$template->assign("PROMOTE_MOBILE_APPS", (!$uagent_obj->DetectIos() and strtotime($register_date) < strtotime('2 weeks ago') and $nb_cats >= 3 and $nb_images >= 30));
}
else
{

View file

@ -27,6 +27,7 @@ $template->assign(
// +-----------------------------------------------------------------------+
// | sending html code |
// +-----------------------------------------------------------------------+
$template->assign('ADMIN_PAGE_TITLE', l10n('Upload Photos'));
$template->assign_var_from_handle('ADMIN_CONTENT', 'photos_add');
?>

View file

@ -25,9 +25,12 @@ $tabsheet->set_id('plugins');
$tabsheet->select($page['tab']);
$tabsheet->assign();
if ($page['tab'] == 'update')
if ($page['tab'] == 'update') {
include(PHPWG_ROOT_PATH.'admin/updates_ext.php');
$template->assign('ADMIN_PAGE_TITLE', l10n('Plugins'));
}
else
{
include(PHPWG_ROOT_PATH.'admin/plugins_'.$page['tab'].'.php');
}
?>

View file

@ -194,6 +194,7 @@ $template->assign(
'show_details' => $show_details,
'max_inactive_before_hide' => isset($_GET['show_inactive']) ? 999 : 8,
'isWebmaster' => (is_webmaster()) ? 1 : 0,
'ADMIN_PAGE_TITLE' => l10n('Plugins'),
)
);

View file

@ -45,7 +45,8 @@ if (isset($_GET['installstatus']))
$activate_url = get_root_url().'admin.php?page=plugins'
. '&amp;plugin=' . $_GET['plugin_id']
. '&amp;pwg_token=' . get_pwg_token()
. '&amp;action=activate';
. '&amp;action=activate'
. '&amp;filter=deactivated';
$page['infos'][] = l10n('Plugin has been successfully copied');
$page['infos'][] = '<a href="'. $activate_url . '">' . l10n('Activate it now') . '</a>';
@ -185,6 +186,7 @@ if (!$beta_test and preg_match('/(beta|RC)/', PHPWG_VERSION))
{
$template->assign('BETA_URL', $base_url.'&amp;beta-test=true');
}
$template->assign('ADMIN_PAGE_TITLE', l10n('Plugins'));
$template->assign_var_from_handle('ADMIN_CONTENT', 'plugins');
?>

View file

@ -102,6 +102,12 @@ $query.= '
WHERE 1=1'. $page['user_filter'];
list($nb_images) = pwg_db_fetch_row(pwg_query($query));
$query = '
SELECT
COUNT(*)
FROM '.RATE_TABLE.
';';
list($nb_elements) = pwg_db_fetch_row(pwg_query($query));
// +-----------------------------------------------------------------------+
// | template init |
@ -119,7 +125,7 @@ $template->assign(
),
'F_ACTION' => PHPWG_ROOT_PATH.'admin.php',
'DISPLAY' => $elements_per_page,
'NB_ELEMENTS' => $nb_images,
'NB_ELEMENTS' => $nb_elements,
'category' => (isset($_GET['cat']) ? array($_GET['cat']) : array()),
'CACHE_KEYS' => get_admin_client_cache_keys(array('categories')),
)
@ -156,7 +162,7 @@ $user_options = array(
$template->assign('user_options', $user_options );
$template->assign('user_options_selected', array(@$_GET['users']) );
$template->assign('ADMIN_PAGE_TITLE', l10n('Rating'));
$query = '
SELECT i.id,

View file

@ -229,6 +229,13 @@ $template->assign('order_by_options_selected', array($order_by_index) );
$x = uasort($by_user_ratings, $available_order_by[$order_by_index][1] );
$query = '
SELECT
COUNT(*)
FROM '.RATE_TABLE.
';';
list($nb_elements) = pwg_db_fetch_row(pwg_query($query));
$template->assign( array(
'F_ACTION' => get_root_url().'admin.php',
'F_MIN_RATES' => $filter_min_rates,
@ -237,7 +244,9 @@ $template->assign( array(
'ratings' => $by_user_ratings,
'image_urls' => $image_urls,
'TN_WIDTH' => ImageStdParams::get_by_type(IMG_SQUARE)->sizing->ideal_size[0],
) );
'NB_ELEMENTS' => $nb_elements,
'ADMIN_PAGE_TITLE' => l10n('Rating'),
));
$template->set_filename('rating', 'rating_user.tpl');
$template->assign_var_from_handle('ADMIN_CONTENT', 'rating');

View file

@ -125,6 +125,7 @@ $template->assign(
array(
'F_ACTION' => get_root_url().'admin.php'.get_query_string_diff(array('action','site','pwg_token')),
'PWG_TOKEN' => get_pwg_token(),
'ADMIN_PAGE_TITLE' => l10n('Synchronize'),
)
);

View file

@ -957,6 +957,7 @@ $template->assign(
'L_RESULT_METADATA'=>$result_title.l10n('Metadata synchronization results'),
'METADATA_LIST' => $used_metadata,
'U_HELP' => get_root_url().'admin/popuphelp.php?page=synchronize',
'ADMIN_PAGE_TITLE' => l10n('Synchronize'),
));
// +-----------------------------------------------------------------------+

View file

@ -150,7 +150,8 @@ $template->assign(
'first_tags' => array_slice($all_tags, 0, $per_page),
'data' => $all_tags,
'total' => count($all_tags),
'per_page' => $per_page
'per_page' => $per_page,
'ADMIN_PAGE_TITLE' => l10n('Tags'),
)
);

View file

@ -25,9 +25,12 @@ $tabsheet->set_id('themes');
$tabsheet->select($page['tab']);
$tabsheet->assign();
if ($page['tab'] == 'update')
if ($page['tab'] == 'update') {
include(PHPWG_ROOT_PATH.'admin/updates_ext.php');
$template->assign('ADMIN_PAGE_TITLE', l10n('Themes'));
}
else
{
include(PHPWG_ROOT_PATH.'admin/themes_'.$page['tab'].'.php');
}
?>

View file

@ -32,6 +32,11 @@ or
box-shadow: 0px 2px #bb7932;
}
.head-button-1 p, .head-button-2 p {
margin: 0;
white-space: nowrap;
}
.head-button-1:hover {
background: #ff7700;
}

View file

@ -89,15 +89,18 @@ jQuery(document).ready(function () {
jQuery.ajax({
url: "ws.php?format=json&method=pwg.groups.add",
type: "POST",
data: "name=" + name + "&pwg_token=" + pwg_token,
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")
groupBox = createGroup(group);
$("#addGroupForm").after(groupBox);
setupGroupBox(groupBox);
updateBadge();
} else {

View file

@ -497,8 +497,6 @@ function performPluginDeactivate(id) {
/* group action */
jQuery(document).ready(function () {
jQuery(".pluginBox").each(function (index) {
$("label[for='seeActive'] .filter-badge").html(nb_plugin.active);
$("label[for='seeInactive'] .filter-badge").html(nb_plugin.inactive);
@ -730,6 +728,10 @@ jQuery(document).ready(function () {
/* Show Inactive plugins or button to show them*/
jQuery(".showInactivePlugins button").on("click", showInactivePlugins);
if (plugin_filter == "deactivated") {
jQuery(".filterLabel[for='seeInactive']").trigger("click");
}
});
$(document).mouseup(function (e) {

View file

@ -148,88 +148,6 @@ $( document ).ready(function() {
jQuery("#applyActionBlock").hide();
}
});
jQuery("#applyAction").click(function() {
let action = jQuery("select[name=selectAction]").prop("value");
let method = 'pwg.users.setInfo';
let data = {
pwg_token: pwg_token,
user_id: selection.map(x => x.id)
};
switch (action) {
case 'delete':
if (!($("#permitActionUserList .user-list-checkbox[name=confirm_deletion]").attr("data-selected") === "1")) {
alert(missingConfirm);
return false;
}
method = 'pwg.users.delete';
break;
case 'group_associate':
method = 'pwg.groups.addUser';
data.group_id = jQuery("#permitActionUserList select[name=associate]").prop("value");
break;
case 'group_dissociate':
method = 'pwg.groups.deleteUser';
data.group_id = jQuery("#permitActionUserList select[name=dissociate]").prop("value");
break;
case 'status':
data.status = jQuery("#permitActionUserList select[name=status]").prop("value");
break;
case 'enabled_high':
data.enabled_high = $("#permitActionUserList .user-list-checkbox[name=enabled_high_yes]").attr("data-selected") === "1" ? true : false;
break;
case 'level':
data.level = jQuery("#permitActionUserList select[name=level]").val();
break;
case 'nb_image_page':
data.nb_image_page = jQuery("#permitActionUserList input[name=nb_image_page]").val();
break;
case 'theme':
data.theme = jQuery("#permitActionUserList select[name=theme]").val();
break;
case 'language':
data.language = jQuery("#permitActionUserList select[name=language]").val();
break;
case 'recent_period':
data.recent_period = recent_period_values[$('#permitActionUserList .period-select-bar .slider-bar-container').slider("option", "value")];;
break;
case 'expand':
data.expand = $("#permitActionUserList .user-list-checkbox[name=expand_yes]").attr("data-selected") === "1" ? true : false;
break;
case 'show_nb_comments':
data.show_nb_comments = $("#permitActionUserList .user-list-checkbox[name=show_nb_comments_yes]").attr("data-selected") === "1" ? true : false
break;
case 'show_nb_hits':
data.show_nb_hits = $("#permitActionUserList .user-list-checkbox[name=show_nb_hits_yes]").attr("data-selected") === "1" ? true : false;
break;
default:
alert("Unexpected action");
return false;
}
jQuery.ajax({
url: "ws.php?format=json&method="+method,
type:"POST",
data: data,
beforeSend: function() {
jQuery("#applyActionLoading").show();
jQuery("#applyActionBlock .infos").fadeOut();
},
success:function(data) {
jQuery("#applyActionLoading").hide();
jQuery("#applyActionBlock .infos").fadeIn();
jQuery("#applyActionBlock .infos").css("display", "inline-block");
update_user_list();
if (action == 'delete') {
selection = [];
update_selection_content();
}
},
error:function(XMLHttpRequest, textStatus, errorThrows) {
jQuery("#applyActionLoading").hide();
}
});
return false;
});
$(".yes_no_radio .user-list-checkbox").unbind("click").click(function () {
if ($(this).attr("data-selected") !== "1") {
$(this).attr("data-selected", "1");

View file

@ -4,6 +4,8 @@
{footer_script}
jQuery(document).ready(function() {
$("h1").append(' <span style="letter-spacing:0">{$CATEGORIES_NAV}</span>');
jQuery("input[name=who]").change(function () {
checkWhoOptions();
});
@ -55,10 +57,6 @@ span.errors {
}
{/html_style}
<div class="titrePage">
<h2><span style="letter-spacing:0">{$CATEGORIES_NAV}</span> &#8250; {'Edit album'|@translate} {$TABSHEET_TITLE}</h2>
</div>
<form action="{$F_ACTION}" method="post" id="categoryNotify">
<fieldset id="emailCatInfo">

View file

@ -111,12 +111,12 @@ const add_sub_album_of = '{'Create a sub-album of "%s"'|@translate|escape:javasc
<div class="cat-move-header">
<div class="add-album-button">
<label class="album-add-button-label icon-plus-circled">
<label class="head-button-2 icon-plus-circled">
<p>{'Add Album'|@translate}</p>
</label>
</div>
<div class="order-root-button">
<label class="order-root order-root-button-label icon-sort-name-up">
<label class="order-root head-button-2 icon-sort-name-up">
<p>{'Automatic sort order'|@translate}</p>
</label>
</div>
@ -478,11 +478,6 @@ input[name="position"] {
margin: 0 !important;
}
.add-album-button,
.order-root-button {
margin: 0 10px 0 0;
}
.badge-container {
position: absolute;
right: 275px;

View file

@ -345,9 +345,6 @@ var sliders = {
{combine_css path="admin/themes/default/fontello/css/animation.css" order=10} {* order 10 is required, see issue 1080 *}
<div id="batchManagerGlobal">
<h2>{'Batch Manager'|@translate}</h2>
<form action="{$F_ACTION}" method="post">
<input type="hidden" name="start" value="{$START}">
<input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">

View file

@ -35,8 +35,6 @@ jQuery("a.preview-box").colorbox( {
}());
{/footer_script}
<h2>{'Batch Manager'|@translate}</h2>
<form action="{$F_ACTION}" method="POST">
<div style="margin: 30px 0; display: flex; justify-content: space-between;">
<div style="margin-left: 22px;">

View file

@ -38,6 +38,8 @@ categoriesCache.selectize(jQuery('[data-selectize=categories]'), {
});
jQuery(document).ready(function() {
$("h1").append('<span title="{"Numeric identifier"|@translate}"> <span class="image-id">#{$CAT_ID}</span></span> <span style="letter-spacing:0" class="bc-albums">{$CATEGORIES_NAV}</span>');
jQuery(document).on('click', '.refreshRepresentative', function(e) {
var $this = jQuery(this);
var method = 'pwg.categories.refreshRepresentative';
@ -232,11 +234,6 @@ function cropImage() {
}
{/html_style}
<div class="titrePage">
<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">

View file

@ -1,7 +1,3 @@
<div class="titrePage">
<h2>{'Properties'|@translate} {$TABSHEET_TITLE}</h2>
</div>
<form method="post" action="{$F_ACTION}" id="cat_options">
<fieldset>
<legend>{$L_SECTION}</legend>

View file

@ -47,11 +47,11 @@ jQuery("#selectStatus").change(function() {
});
{/if}
}());
{/footer_script}
<div class="titrePage">
<h2><span style="letter-spacing:0">{$CATEGORIES_NAV}</span> &#8250; {'Edit album'|@translate} {$TABSHEET_TITLE}</h2>
</div>
$(document).ready(function () {
$("h1").append(' <span style="letter-spacing:0">{$CATEGORIES_NAV}</span>');
})
{/footer_script}
<form action="{$F_ACTION}" method="post" id="categoryPermissions">

View file

@ -1,6 +1,9 @@
{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'}
{footer_script}
$(document).ready(() => {
$("h1").append("<span class='badge-number'>"+{$nb_cats}+"</span>");
});
var data = {json_encode($data_cat)};
/*
Here data is an associative array id => category under this form

View file

@ -1,5 +1,7 @@
{footer_script}{literal}
{footer_script}
jQuery(document).ready(function(){
$("h1").append("<span class='badge-number'>"+{$nb_total}+"</span>");
function highlighComments() {
jQuery(".checkComment").each(function() {
var parent = jQuery(this).parent('tr');
@ -41,10 +43,7 @@ jQuery(document).ready(function(){
});
});
{/literal}{/footer_script}
<h2>{'User comments'|@translate}{if isset($TABSHEET_TITLE)} {$TABSHEET_TITLE}{/if}
</h2>
{/footer_script}
<div class="commentFilter">
<a href="{$F_ACTION}&amp;filter=all" class="{if $filter == 'all'}commentFilterSelected{/if}">{'All'|@translate}</a> ({$nb_total})

View file

@ -30,8 +30,6 @@
}());
{/footer_script}
<h2>{'Piwigo configuration'|translate} {$TABSHEET_TITLE}</h2>
<form method="post" action="{$F_ACTION}" class="properties">
<div id="configContent">

View file

@ -1,7 +1,5 @@
{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'}
<h2>{'Piwigo configuration'|translate} {$TABSHEET_TITLE}</h2>
<form method="post" name="profile" action="{$GUEST_F_ACTION}" id="profile" class="properties">
<div id="configContent">

View file

@ -17,8 +17,6 @@
}
{/html_style}
<h2>{'Piwigo configuration'|translate} {$TABSHEET_TITLE}</h2>
<form method="post" action="{$F_ACTION}" class="properties">
<div id="configContent">

View file

@ -69,8 +69,6 @@ jQuery("input[name='mail_theme']").change(function() {
});
{/footer_script}
<h2>{'Piwigo configuration'|translate} {$TABSHEET_TITLE}</h2>
<form method="post" action="{$F_ACTION}" class="properties">
<div id="configContent">

View file

@ -79,8 +79,6 @@ $(".restore-settings-button").each(function() {
.sizeEditOpen { margin-left:10px; }
{/html_style}
<h2>{'Piwigo configuration'|translate} {$TABSHEET_TITLE}</h2>
<form method="post" action="{$F_ACTION}" class="properties">
<div id="configContent">

View file

@ -36,8 +36,6 @@
}());
{/footer_script}
<h2>{'Piwigo configuration'|translate} {$TABSHEET_TITLE}</h2>
<form method="post" action="{$F_ACTION}" class="properties" enctype="multipart/form-data">
<div id="configContent">

View file

@ -1,7 +1,8 @@
{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'}
{footer_script require='jquery.ui.sortable'}{literal}
{footer_script require='jquery.ui.sortable'}
jQuery(document).ready(function() {
$("h1").append(' <span style="letter-spacing:0">{$CATEGORIES_NAV}</span>');
function checkOrderOptions() {
jQuery("#image_order_user_define_options").hide();
if (jQuery("input[name=image_order_choice]:checked").val() == "user_define") {
@ -37,11 +38,7 @@ jQuery('.thumbnail').tipTip({
'fadeOut' : 200
});
});
{/literal}{/footer_script}
<div class="titrePage">
<h2><span style="letter-spacing:0">{$CATEGORIES_NAV}</span> &#8250; {'Edit album'|@translate} {$TABSHEET_TITLE}</h2>
</div>
{/footer_script}
<form action="{$F_ACTION}" method="post">
{if !empty($thumbnails)}

View file

@ -1,5 +1,3 @@
<div class="titrePage"><h2>{'Extend for templates'|@translate}</h2>
</div>
{if isset($extents)}
<h4>{'Replacement of original templates by customized templates from template-extension subfolder'|@translate}</h4>
<form method="post" name="extend_for_templates" id="extend_for_templates" action="">

View file

@ -52,8 +52,6 @@ const guest_id = {$guest_id};
{combine_script id='jquery.confirm' load='footer' require='jquery' path='themes/default/js/plugins/jquery-confirm.min.js'}
{combine_css path="admin/themes/default/fontello/css/animation.css" order=10} {* order 10 is required, see issue 1080 *}
<h2>{'History'|@translate} {$TABSHEET_TITLE}</h2>
<form class="filter" method="post" name="filter" action="">
<fieldset class="history-filter">
<div class="selectable-filter">

View file

@ -127,7 +127,8 @@ let str_size = "";
{if $NB_USERS > 2}
<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>
{* -1 because we don't count the "guest" user *}
<span class="number">{$NB_USERS - 1}</span><span class="caption">{'Users'|translate}</span>
</a>
{/if}

View file

@ -15,10 +15,6 @@ $(".delete-lang-button").each(function() {
});
{/footer_script}
<div class="titrePage">
<h2>{'Installed Languages'|@translate}</h2>
</div>
{foreach from=$language_states item=language_state}
<fieldset>
<legend>

View file

@ -9,10 +9,6 @@ jQuery().ready(function(){ldelim}
});
{/footer_script}
<div class="titrePage">
<h2>{'Add New Language'|@translate}</h2>
</div>
{if $isWebmaster == 1}
{if !empty($languages)}

View file

@ -33,10 +33,6 @@ jQuery(document).ready(function(){
}
{/html_style}
<div class="titrePage">
<h2>{'Menu Management'|@translate}</h2>
</div>
<form id="menuOrdering" action="{$F_ACTION}" method="post">
<ul class="menuUl">
{foreach from=$blocks item=block name="block_loop"}

View file

@ -16,10 +16,6 @@ jQuery(document).ready(function(){
});
{/literal}{/footer_script}
<div class="titrePage">
<h2>{'Send mail to users'|@translate} {$TABSHEET_TITLE}</h2>
</div>
<form method="post" name="notification_by_mail" id="notification_by_mail" action="{$F_ACTION}">
<input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">

View file

@ -1,5 +1,6 @@
{footer_script require='jquery.ui.sortable'}{literal}
{footer_script require='jquery.ui.sortable'}
jQuery(document).ready(function(){
$("h1").append("<span class='badge-number'>{$nb_cats}</span>")
jQuery("#addPermalinkOpen").click(function(){
jQuery("#addPermalink").show();
jQuery("#showAddPermalink").hide();
@ -10,7 +11,7 @@ jQuery(document).ready(function(){
jQuery("#showAddPermalink").show();
});
});
{/literal}{/footer_script}
{/footer_script}
{literal}
<style>
@ -27,10 +28,6 @@ form fieldset p.actionButtons {margin-bottom:0}
}
{/html_style}
<div class="titrePage">
<h2>{'Permalinks'|@translate}</h2>
</div>
<p id="showAddPermalink"><a href="#" id="addPermalinkOpen">{'Add/delete a permalink'|@translate}</a></p>
<form method="post" action="" id="addPermalink" style="display:none">

View file

@ -68,10 +68,6 @@ jQuery().ready(function(){
</style>
{/literal}{/html_head}
<div class="titrePage">
<h2>{'Upload Photos'|@translate} {$TABSHEET_TITLE}</h2>
</div>
<div class="applicationContainer">
<div class="applicationCard">

View file

@ -396,6 +396,29 @@ jQuery(document).ready(function(){
<div id="photosAddContent">
{if $PROMOTE_MOBILE_APPS}
<div class="promote-apps">
<span class="icon-cancel close-apps"></span>
<div class="promote-content">
<div class="left-side">
<img src="https://de.piwigo.org/./plugins/piwigo-piwigodotorg/images/mobile_applications/Group_77.png">
<div class="promote-text">
<span>{"Piwigo is also on mobile."|@translate|escape:javascript}</span>
<span>{"Try now !"|@translate|escape:javascript}</span>
</div>
</div>
<div class="mid-side"></div>
<div class="right-side">
<div class="promote-text">
<span>{"Install Piwigo on mobile"|@translate|escape:javascript}</span>
<a href="https://piwigo.org/mobile-applications" target="_blank"><span class="go-to-porg icon-link-1">{"Discover"|@translate|escape:javascript}</span></a>
</div>
</div>
</div>
<span class="dont-show-again">{"Ne plus afficher"|@translate|escape:javascript}</span>
</div>
{/if}
{if $ENABLE_FORMATS}
<div class="format-mode-group-manager">
<label class="switch" onClick="window.location.replace('{$SWITCH_MODE_URL}'); $('.switch .slider').addClass('loading');">
@ -447,29 +470,6 @@ jQuery(document).ready(function(){
</div>
{/if}
{if $PROMOTE_MOBILE_APPS}
<div class="promote-apps">
<span class="icon-cancel close-apps"></span>
<div class="promote-content">
<div class="left-side">
<img src="https://de.piwigo.org/./plugins/piwigo-piwigodotorg/images/mobile_applications/Group_77.png">
<div class="promote-text">
<span>{"Piwigo is also on mobile."|@translate|escape:javascript}</span>
<span>{"Try now !"|@translate|escape:javascript}</span>
</div>
</div>
<div class="mid-side"></div>
<div class="right-side">
<div class="promote-text">
<span>{"Install Piwigo on mobile"|@translate|escape:javascript}</span>
<a href="https://piwigo.org/mobile-applications" target="_blank"><span class="go-to-porg icon-link-1">{"Install"|@translate|escape:javascript}</span></a>
</div>
</div>
</div>
<span class="dont-show-again">{"Ne plus afficher"|@translate|escape:javascript}</span>
</div>
{/if}
<form id="uploadForm" class="{if $DISPLAY_FORMATS}format-mode{/if}" enctype="multipart/form-data" method="post" action="{$form_action}"{if $NB_ALBUMS == 0} style="display:none;"{/if}>
{if not $DISPLAY_FORMATS}
<fieldset class="selectAlbum">

View file

@ -1,7 +1,3 @@
<div class="titrePage">
<h2>{'Upload Photos'|@translate} {$TABSHEET_TITLE}</h2>
</div>
<div id="ftpPage">
<p><a href="{$U_CAT_UPDATE}">{'Administration'|@translate} &raquo; {'Tools'|@translate} &raquo; {'Synchronize'|@translate}</a></p>

View file

@ -41,11 +41,10 @@ const plugin_found = '{'%s plugin found'|@translate|@escape:'javascript'}';
const isWebmaster = {$isWebmaster};
const show_details = {if $show_details} true {else} false {/if};
{/footer_script}
<div class="titrePage">
<h2>{'Plugins'|@translate}</h2>
</div>
let searchParams = new URLSearchParams(window.location.search);
let plugin_filter = searchParams.get('filter');
{/footer_script}
{if isset($plugins)}

View file

@ -124,7 +124,6 @@ const str_from_begining = "{"since the beginning"|@translate}";
</div>
</div>
</div>
<h2>{'Plugins'|@translate}</h2>
</div>
{if not empty($plugins)}

View file

@ -32,9 +32,12 @@ checkCatFilter();
jQuery("select[name=cat]").change(function(){
checkCatFilter();
});
{/footer_script}
<h2>{$NB_ELEMENTS} {'Photos'|@translate}</h2>
$(document).ready(function() {
$('h1').append("<span class='badge-number'>{$NB_ELEMENTS}</span>")
});
{/footer_script}
<form action="{$F_ACTION}" method="GET" class="filter">
<fieldset>

View file

@ -36,8 +36,11 @@ body .ui-tooltip {
}
{/html_style}
<h2>{$ratings|@count} {'Users'|@translate}</h2>
{footer_script}
$(document).ready(function() {
$('h1').append("<span class='badge-number'>{$NB_ELEMENTS}</span>")
});
{/footer_script}
<form action="{$F_ACTION}" method="GET">
<fieldset>

View file

@ -21,9 +21,6 @@ $(".delete-site-button").each(function() {
});
});
{/footer_script}
<div class="titrePage">
<h2>{'Site manager'|@translate}</h2>
</div>
{if not empty($remote_output)}
<div class="remoteOutput">

View file

@ -9,10 +9,6 @@ $('#syncFiles label').click(function () {
{/footer_script}
<div class="titrePage">
<h2>{'Synchronize'|@translate}</h2>
</div>
<div class="selectedAlbum site-url-path">
<span class="icon-folder-open selectedAlbum-first">{$SITE_URL}</span>
</div>

View file

@ -29,6 +29,11 @@ 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}';
$(document).ready(function() {
$("h1").append('<span class="badge-number">{$total}</span>');
});
{/footer_script}
{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'}
@ -66,10 +71,6 @@ var str_tag_found = '{'<b>%d</b> tag found'|@translate}';
{/function}
{/function}
<div class="titrePage">
<h2>{'Tags'|@translate} <span class="badge-number"> {$total}</span> </h2>
</div>
<div class="selection-mode-group-manager">
<label class="switch">
<input type="checkbox" id="toggleSelectionMode">
@ -116,7 +117,7 @@ var str_tag_found = '{'<b>%d</b> tag found'|@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 {if $total == 0} highlight {/if}'>
<label class='add-tag-label icon-plus-circled {if $total == 0} head-button-1 {else} head-button-2 {/if}'>
<p>{'Add a tag'|@translate}</p>
<div class='add-tag-container'>
<input type='text' id='add-tag-input' placeholder="{'New tag'|@translate}">

View file

@ -62,10 +62,6 @@ $(window).bind("load", function() {
{/literal}{/footer_script}
<div class="titrePage">
<h2>{'Installed Themes'|@translate}</h2>
</div>
<div id="themesContent">
{assign var='field_name' value='null'} {* <!-- 'counter' for fieldset management --> *}

View file

@ -19,9 +19,6 @@ $(window).bind("load", function() {
})
})
{/literal}{/footer_script}
<div class="titrePage">
<h2>{'Add New Theme'|@translate}</h2>
</div>
{if not empty($new_themes)}
<div class="themeBoxes">

View file

@ -158,10 +158,6 @@ $("#update_all").click(function() {
})
{/footer_script}
<div class="titrePage">
<h2>{'Updates'|@translate}</h2>
</div>
{if $isWebmaster == 1}
<div class="autoupdate_bar">
@ -209,4 +205,5 @@ $("#update_all").click(function() {
{/foreach}
</fieldset>
{/if}
{/foreach}
{/foreach}
{/if}

View file

@ -57,9 +57,7 @@ p.release .errors {margin:0}
</div>
{/if}
<div class="titrePage">
<h2>{'Updates'|@translate}</h2>
</div>
<p><i class="icon-info-circled-1"></i> {'Currently running version %s'|translate:PHPWG_VERSION}</p>
{if $STEP == 0}
{if $CHECK_VERSION}

View file

@ -669,6 +669,8 @@ function append_pagination_item(page = null) {
$(document).ready(function () {
$("h1").append(`<span class='badge-number'>`+{$nb_users - 1}+`</span>`);
$('select').on('change', function (user) {
if ($(".selectize-input").hasClass("full")) {
{* call ajax sur activity list avec uid en param *}

View file

@ -83,6 +83,93 @@ $(".icon-help-circled").tipTip({
'fadeIn': '1000',
});
$(document).ready(function() {
// We set the applyAction btn click event here so plugins can add cases to the list
// which is not possible if this JS part is in a JS file
// see #1571 on Github
jQuery("#applyAction").click(function() {
let action = jQuery("select[name=selectAction]").prop("value");
let method = 'pwg.users.setInfo';
let data = {
pwg_token: pwg_token,
user_id: selection.map(x => x.id)
};
switch (action) {
case 'delete':
if (!($("#permitActionUserList .user-list-checkbox[name=confirm_deletion]").attr("data-selected") === "1")) {
alert(missingConfirm);
return false;
}
method = 'pwg.users.delete';
break;
case 'group_associate':
method = 'pwg.groups.addUser';
data.group_id = jQuery("#permitActionUserList select[name=associate]").prop("value");
break;
case 'group_dissociate':
method = 'pwg.groups.deleteUser';
data.group_id = jQuery("#permitActionUserList select[name=dissociate]").prop("value");
break;
case 'status':
data.status = jQuery("#permitActionUserList select[name=status]").prop("value");
break;
case 'enabled_high':
data.enabled_high = $("#permitActionUserList .user-list-checkbox[name=enabled_high_yes]").attr("data-selected") === "1" ? true : false;
break;
case 'level':
data.level = jQuery("#permitActionUserList select[name=level]").val();
break;
case 'nb_image_page':
data.nb_image_page = jQuery("#permitActionUserList input[name=nb_image_page]").val();
break;
case 'theme':
data.theme = jQuery("#permitActionUserList select[name=theme]").val();
break;
case 'language':
data.language = jQuery("#permitActionUserList select[name=language]").val();
break;
case 'recent_period':
data.recent_period = recent_period_values[$('#permitActionUserList .period-select-bar .slider-bar-container').slider("option", "value")];;
break;
case 'expand':
data.expand = $("#permitActionUserList .user-list-checkbox[name=expand_yes]").attr("data-selected") === "1" ? true : false;
break;
case 'show_nb_comments':
data.show_nb_comments = $("#permitActionUserList .user-list-checkbox[name=show_nb_comments_yes]").attr("data-selected") === "1" ? true : false
break;
case 'show_nb_hits':
data.show_nb_hits = $("#permitActionUserList .user-list-checkbox[name=show_nb_hits_yes]").attr("data-selected") === "1" ? true : false;
break;
default:
alert("Unexpected action");
return false;
}
jQuery.ajax({
url: "ws.php?format=json&method="+method,
type:"POST",
data: data,
beforeSend: function() {
jQuery("#applyActionLoading").show();
jQuery("#applyActionBlock .infos").fadeOut();
},
success:function(data) {
jQuery("#applyActionLoading").hide();
jQuery("#applyActionBlock .infos").fadeIn();
jQuery("#applyActionBlock .infos").css("display", "inline-block");
update_user_list();
if (action == 'delete') {
selection = [];
update_selection_content();
}
},
error:function(XMLHttpRequest, textStatus, errorThrows) {
jQuery("#applyActionLoading").hide();
}
});
return false;
});
});
{/footer_script}
{combine_script id='user_list' load='footer' path='admin/themes/default/js/user_list.js'}
@ -108,14 +195,14 @@ $(".icon-help-circled").tipTip({
<div style="display:flex;justify-content:space-between; flex-grow:1;">
<div style="display:flex; align-items: center;">
<div class="not-in-selection-mode user-header-button add-user-button" style="margin: auto; margin-right: 10px">
<label class="user-header-button-label icon-plus-circled">
<div class="not-in-selection-mode user-header-button add-user-button" style="margin: auto;">
<label class="head-button-2 icon-plus-circled">
<p>{'Add a user'|@translate}</p>
</label>
</div>
<div class="not-in-selection-mode user-header-button" style="margin: auto; margin-right: 10px">
<label class="user-header-button-label icon-user-secret edit-guest-user-button">
<div class="not-in-selection-mode user-header-button" style="margin: auto;">
<label class="head-button-2 icon-user-secret edit-guest-user-button">
<p>{'Edit guest user'|@translate}</p>
</label>
</div>
@ -979,19 +1066,6 @@ $(".icon-help-circled").tipTip({
.user-header-button {
position:relative;
}
.user-header-button-label {
position: relative;
padding: 10px;
box-shadow: 0px 2px #00000024;
border-radius: 5px;
font-weight: bold;
display: flex;
align-items: baseline;
cursor: pointer;
}
.user-header-button-label p {
margin:0;
}
/* filters bar */

View file

@ -1933,6 +1933,20 @@ h1 {
color: #333;
font-size: 22px;
}
h1 .image-id {
font-weight: 100;
opacity: 0.5;
}
h1 .bc-albums {
padding: 4px 8px;
font-weight: bold;
text-align: center;
border-radius: 7px;
background-color: #c6c6c6;
font-size: 12px;
position: relative;
top: -3px;
}
h2 { letter-spacing:1px; font-weight:bold; display: none;}
h2:lang(en) { text-transform:capitalize; }
@ -3323,24 +3337,6 @@ a#showPermissions:hover {text-decoration: none;}
display: none;
}
.tag-header #add-tag .add-tag-label {
position: relative;
padding: 10px;
background-color: #fafafa;
box-shadow: 0px 2px #00000024;
border-radius: 5px;
font-weight: bold;
display: flex;
align-items: baseline;
cursor: pointer;
}
.tag-header #add-tag .add-tag-label.highlight {
background: #ffa646;
box-shadow: 0 2px #af7200;
color: white;
}
.tag-header #add-tag.input-mode .add-tag-label {
background: none;
box-shadow: none;
@ -3349,21 +3345,10 @@ a#showPermissions:hover {text-decoration: none;}
color: inherit;
}
.tag-header #add-tag .add-tag-label::before {
margin: auto;
font-size: 16px;
margin-right: 5px;
}
.tag-header #add-tag.input-mode .add-tag-label::before {
display: none;
}
.tag-header #add-tag .add-tag-label p{
margin: 0;
white-space: nowrap;
}
.tag-header #add-tag .add-tag-container {
display: none;
}
@ -4039,11 +4024,6 @@ a#showPermissions:hover {text-decoration: none;}
border-radius: 3px;
}
.album-add-button-label, .order-root-button-label {
box-shadow: 0px 2px #00000024;
background-color: #fafafa;
}
.move-cat-container:hover {
background-color: #ffd7ad;
}
@ -6604,6 +6584,7 @@ color:#FF7B00;
border-bottom: 1px solid lightgray;
padding: 0 15px 15px 15px;
margin-bottom: 15px;
}
.close-apps {

View file

@ -45,6 +45,9 @@ h1 {
background-color: #565656;
color: #c1c1c1;
}
h1 .bc-albums {
background-color: #333;
}
#tabsheet {
background-color:#565656;
@ -389,11 +392,6 @@ div.token-input-dropdown ul li.token-input-selected-dropdown-item {background-co
text-decoration: none;
color: #777;
}
.album-add-button-label, .order-root-button-label {
box-shadow: 0px 2px #00000024;
background-color: #333;
color: #777;
}
.move-cat-container:hover {
background-color: #f9852c;
}
@ -1120,21 +1118,15 @@ li.plupload_delete a:hover {background: url("images/cancelhover.svg")!important;
/* Tag Manager */
.tag-box,
.tag-header #add-tag:not(.input-mode) .add-tag-label,
.tag-box,
.tag-header .selection-controller a{
background-color: #333 !important;
}
.tag-header #add-tag .add-tag-label.highlight {
background: #f7a43c !important;
box-shadow: 0 2px #af7200;
color: #444 !important;
}
.tag-header #add-tag.input-mode .add-tag-label.highlight {
.tag-header #add-tag.input-mode .add-tag-label {
background: transparent !important;
box-shadow: none;
color: inherit !important;
color: rgb(119, 119, 119) !important;
}
.tag-container .tag-box p {
@ -1458,6 +1450,10 @@ li.plupload_delete a:hover {background: url("images/cancelhover.svg")!important;
color: #c1c1c1;
}
.head-button-1 {
color: #444 !important;
}
.head-button-2 {
background-color: #333 !important;
}
@ -1548,10 +1544,6 @@ li.plupload_delete a:hover {background: url("images/cancelhover.svg")!important;
color:#777;
}
.user-header-button-label {
background: #333;
}
.user-action-select {
background: transparent;
}

View file

@ -169,6 +169,7 @@ $template->assign(
trigger_notify('loc_end_themes_installed');
$template->assign('isWebmaster', (is_webmaster()) ? 1 : 0);
$template->assign('ADMIN_PAGE_TITLE', l10n('Themes'));
$template->set_filenames(array('themes' => 'themes_installed.tpl'));
$template->assign_var_from_handle('ADMIN_CONTENT', 'themes');

View file

@ -118,6 +118,7 @@ else
$template->assign('default_screenshot',
get_root_url().'admin/themes/'.userprefs_get_param('admin_theme', 'clear').'/images/missing_screenshot.png'
);
$template->assign('ADMIN_PAGE_TITLE', l10n('Themes'));
$template->assign_var_from_handle('ADMIN_CONTENT', 'themes');
?>

View file

@ -84,5 +84,6 @@ $template->assign('EXT_TYPE', $page['page'] == 'updates' ? 'extensions' : $page[
$template->assign('isWebmaster', (is_webmaster()) ? 1 : 0);
$template->set_filename('plugin_admin_content', 'updates_ext.tpl');
$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
$template->assign('ADMIN_PAGE_TITLE', l10n('Updates'));
?>

View file

@ -138,6 +138,7 @@ if (isset($new_versions['major']))
);
}
$template->assign('ADMIN_PAGE_TITLE', l10n('Updates'));
$template->set_filename('plugin_admin_content', 'updates_pwg.tpl');
$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');

View file

@ -87,7 +87,7 @@ SELECT
// | template initialization |
// +-----------------------------------------------------------------------+
$template->set_filename('user_activity', 'user_activity.tpl');
$template->assign('ADMIN_PAGE_TITLE', l10n('User Activity logs'));
$template->assign('ADMIN_PAGE_TITLE', l10n('Users'));
// +-----------------------------------------------------------------------+
// | sending html code |
@ -131,10 +131,16 @@ foreach ($nb_lines_for_user as $id => $nb_line) {
)
);
}
$template->assign('ulist', $filterable_users);
$query = '
SELECT COUNT(*)
FROM '.USER_INFOS_TABLE.'
;';
list($nb_users) = pwg_db_fetch_row(pwg_query($query));
$template->assign('nb_users', $nb_users);
$template->assign_var_from_handle('ADMIN_CONTENT', 'user_activity');
?>

View file

@ -556,9 +556,10 @@ function pwg_activity($object, $object_id, $action, $details=array())
}
}
if ('user' == $object and 'login' == $action)
$user_agent = null;
if ('user' == $object and 'login' == $action and isset($_SERVER['HTTP_USER_AGENT']))
{
$details['agent'] = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : 'unknown';
$user_agent = $_SERVER['HTTP_USER_AGENT'];
}
if ('photo' == $object and 'add' == $action and !isset($details['sync']))
@ -568,7 +569,6 @@ function pwg_activity($object, $object_id, $action, $details=array())
{
$details['added_with'] = 'browser';
}
$details['agent'] = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : 'unknown';
}
if (in_array($object, array('album', 'photo')) and 'delete' == $action and isset($_GET['page']) and 'site_update' == $_GET['page'])
@ -603,6 +603,7 @@ function pwg_activity($object, $object_id, $action, $details=array())
'session_idx' => session_id(),
'ip_address' => $ip_address,
'details' => $details_insert,
'user_agent' => $user_agent,
);
}

View file

@ -606,6 +606,7 @@ function pwg_mail($to, $args=array(), $tpl=array())
$conf_mail = get_mail_configuration();
}
include_once(PHPWG_ROOT_PATH.'include/phpmailer/Exception.php');
include_once(PHPWG_ROOT_PATH.'include/phpmailer/SMTP.php');
include_once(PHPWG_ROOT_PATH.'include/phpmailer/PHPMailer.php');

View file

@ -445,7 +445,8 @@ SELECT
session_idx,
ip_address,
occured_on,
details
details,
user_agent
FROM '.ACTIVITY_TABLE.'
WHERE performed_by = '.$param['uid'].'
ORDER BY activity_id DESC LIMIT '.$page_size.' OFFSET '.$page_offset.';
@ -463,7 +464,8 @@ SELECT
session_idx,
ip_address,
occured_on,
details
details,
user_agent
FROM '.ACTIVITY_TABLE.'
ORDER BY activity_id DESC LIMIT '.$page_size.' OFFSET '.$page_offset.';
;';
@ -475,7 +477,12 @@ SELECT
{
$row['details'] = str_replace('`groups`', 'groups', $row['details']);
$row['details'] = str_replace('`rank`', 'rank', $row['details']);
$details = unserialize($row['details']);
$details = @unserialize($row['details']);
if (isset($row['user_agent']))
{
$details['agent'] = $row['user_agent'];
}
if (isset($details['method']))
{

View file

@ -0,0 +1,23 @@
<?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!');
}
$upgrade_description = 'Create dedicated user agent column for activity.';
pwg_query('
ALTER TABLE `'.PREFIX_TABLE.'activity`
ADD COLUMN `user_agent` varchar(255) default NULL
;');
echo "\n".$upgrade_description."\n";
?>

View file

@ -19,6 +19,7 @@ CREATE TABLE `piwigo_activity` (
`ip_address` varchar(50) DEFAULT NULL,
`occured_on` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
`details` varchar(255) DEFAULT NULL,
`user_agent` varchar(255) DEFAULT NULL,
PRIMARY KEY (`activity_id`)
) ENGINE=MyISAM;

View file

@ -1293,4 +1293,10 @@ $lang['Placer à la fin'] = 'Place at the end';
$lang['Piwigo is also on mobile.'] = 'Piwigo is also on mobile.';
$lang['Try now !'] = 'Try now !';
$lang['Install Piwigo on mobile'] = 'Install Piwigo on mobile';
$lang['Properties of abums'] = 'Properties of abums';
$lang['Add New Plugin'] = 'Add a new plugin';
$lang['Piwigo core'] = 'Piwigo core';
$lang['Extensions'] = 'Extensions';
$lang['Currently running version %s'] = 'Currently running version %s';
$lang['Discover'] = 'Discover';
// Leave this line empty

View file

@ -1290,4 +1290,10 @@ $lang['No search in progress'] = 'Pas de recherche en cours';
$lang['Show plugins compatible with previous version of Piwigo'] = 'Montrer les plugins compatibles avec la version précédente de Piwigo';
$lang['Placer au début'] = 'Placer au début';
$lang['Placer à la fin'] = 'Placer à la fin';
$lang['Properties of abums'] = 'Propriétés des albums';
$lang['Add New Plugin'] = 'Ajouter un plugin';
$lang['Piwigo core'] = 'Noyau de Piwigo';
$lang['Extensions'] = 'Extensions';
$lang['Currently running version %s'] = 'Version %s installée actuellement';
$lang['Discover'] = 'Découvrir';
// Leave this line empty

View file

@ -723,7 +723,8 @@ $lang['You can\'t define a default photo order because you have a custom setting
$lang['You have specified <i>$conf[\'order_by\']</i> in your local configuration file, this parameter in deprecated, please remove it or rename it into <i>$conf[\'order_by_custom\']</i> !'] = 'Je hebt <i>$conf[\'order_by\']</i> in je lokale configuratie-bestand gespecificeerd. Deze parameter is verouderd, verwijder hem of hernoem hem naar <i>$conf[\'order_by_custom\']</i> !';
$lang['Following themes may not be compatible with the new version of Piwigo:'] = 'De volgende thema\'s zijn mogelijk niet compatibel met de nieuwe versie van Piwigo:';
$lang['I decide to update anyway'] = 'Ik besluit om in ieder geval te updaten';
$lang['Update to Piwigo %s'] = 'Update naar Piwigo%s';
$lang['Update to Piwigo %s'] = 'Update naar Piwigo %s';
$lang['Currently running version %s.'] = 'De huidige versie is %s.';
$lang['Two updates are available'] = 'Twee updates zijn beschikbaar';
$lang['This is a minor update, with only bug corrections.'] = 'Dit is een kleine update, met alleen wat gerepareerde foutjes';
$lang['This is a major update, with <a href="%s">new exciting features</a>.'] = 'Dit is een grote update, met <a href="%s">allerlei nieuwe mogelijkheden</a>.';

View file

@ -68,7 +68,7 @@
{/if}
</head>
<body id="{$BODY_ID}" class="{foreach from=$BODY_CLASSES item=class}{$class} {/foreach}" data-infos={$BODY_DATA}>
<body id="{$BODY_ID}" class="{foreach from=$BODY_CLASSES item=class}{$class} {/foreach}" data-infos='{$BODY_DATA}'>
<div id="the_page">

View file

@ -22,7 +22,7 @@
<label>
{'Username or email'|@translate}
<br>
<input type="text" id="username_or_email" name="username_or_email" size="40" maxlength="40"{if isset($username_or_email)} value="{$username_or_email}"{/if}>
<input type="text" id="username_or_email" name="username_or_email" size="100" maxlength="100"{if isset($username_or_email)} value="{$username_or_email}"{/if}>
</label>
</p>