From 46040738d8a4b09c3d45f99047a34a09a89d9233 Mon Sep 17 00:00:00 2001 From: flop25 Date: Tue, 2 Jul 2013 19:59:34 +0000 Subject: [PATCH] bug:2808 add "Your Favorites" to the filters of the Batch Manager git-svn-id: http://piwigo.org/svn/trunk@23746 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/batch_manager.php | 13 +++++++++++++ admin/batch_manager_global.php | 1 + admin/themes/default/template/intro.tpl | 12 ++++++++++-- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/admin/batch_manager.php b/admin/batch_manager.php index a5c82d061..31fb46c00 100644 --- a/admin/batch_manager.php +++ b/admin/batch_manager.php @@ -168,6 +168,19 @@ SELECT element_id ); } + if ('favorites' == $_SESSION['bulk_manager_filter']['prefilter']) + { + $query = ' +SELECT image_id + FROM '.FAVORITES_TABLE.' + WHERE user_id = '.$user['id'].' +;'; + array_push( + $filter_sets, + array_from_query($query, 'image_id') + ); + } + if ('last import'== $_SESSION['bulk_manager_filter']['prefilter']) { $query = ' diff --git a/admin/batch_manager_global.php b/admin/batch_manager_global.php index e74a6dd9d..dfaca2cf8 100644 --- a/admin/batch_manager_global.php +++ b/admin/batch_manager_global.php @@ -432,6 +432,7 @@ $base_url = get_root_url().'admin.php'; $prefilters = array( array('ID' => 'caddie', 'NAME' => l10n('Caddie')), + array('ID' => 'favorites', 'NAME' => l10n('Your favorites')), array('ID' => 'last import', 'NAME' => l10n('Last import')), array('ID' => 'with no album', 'NAME' => l10n('With no album')), array('ID' => 'with no tag', 'NAME' => l10n('With no tag')), diff --git a/admin/themes/default/template/intro.tpl b/admin/themes/default/template/intro.tpl index fc460c115..9e2017554 100644 --- a/admin/themes/default/template/intro.tpl +++ b/admin/themes/default/template/intro.tpl @@ -29,7 +29,14 @@ jQuery().ready(function(){ if (ext_update) jQuery(".warnings ul").append('
  • '+ext_need_update_msg+'
  • '); } - }); + }); + jQuery('.tips').cluetip({ + multiple: true, + width: 300, + splitTitle: '|', + positionBy: 'bottomTop', + attribute:'data-help' + }); }); {/literal} {/footer_script} @@ -46,7 +53,8 @@ jQuery().ready(function(){ {/if} - +TRIGGER +TEXT
    {'Environment'|@translate}