From cacdce647409ce7559dd63e94830648786126859 Mon Sep 17 00:00:00 2001 From: plegall Date: Fri, 25 Jul 2014 13:28:16 +0000 Subject: feature 2904: add a link "empty caddie" in the Batch Manager. git-svn-id: http://piwigo.org/svn/trunk@29076 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/batch_manager.php | 21 +++++++++++++++++++++ .../default/template/batch_manager_global.tpl | 5 +++++ 2 files changed, 26 insertions(+) (limited to 'admin') diff --git a/admin/batch_manager.php b/admin/batch_manager.php index 950124ad0..a89ef615b 100644 --- a/admin/batch_manager.php +++ b/admin/batch_manager.php @@ -43,6 +43,27 @@ check_status(ACCESS_ADMINISTRATOR); check_input_parameter('selection', $_POST, true, PATTERN_ID); +// +-----------------------------------------------------------------------+ +// | specific actions | +// +-----------------------------------------------------------------------+ + +if (isset($_GET['action'])) +{ + if ('empty_caddie' == $_GET['action']) + { + $query = ' +DELETE FROM '.CADDIE_TABLE.' + WHERE user_id = '.$user['id'].' +;'; + pwg_query($query); + + $_SESSION['page_infos'] = array( + l10n('Information data registered in database') + ); + + redirect(get_root_url().'admin.php?page='.$_GET['page']); + } +} // +-----------------------------------------------------------------------+ // | initialize current set | diff --git a/admin/themes/default/template/batch_manager_global.tpl b/admin/themes/default/template/batch_manager_global.tpl index 7d693edc6..94adb98be 100644 --- a/admin/themes/default/template/batch_manager_global.tpl +++ b/admin/themes/default/template/batch_manager_global.tpl @@ -352,6 +352,10 @@ $(document).ready(function() { .slider("values", 0, getSliderKeyFromValue(min, dimension_values[type]) ) .slider("values", 1, getSliderKeyFromValue(max, dimension_values[type]) ); }); + + jQuery("select[name=filter_prefilter]").change(function() { + jQuery("#empty_caddie").toggle(jQuery(this).val() == "caddie"); + }); }); {/footer_script} @@ -376,6 +380,7 @@ $(document).ready(function() { {/foreach} + {'Empty caddie'|translate}
  • -- cgit v1.2.3