From 6c2fad0dd335898d8c56f982e369ed6f29d872b0 Mon Sep 17 00:00:00 2001 From: plegall Date: Wed, 25 Jul 2012 11:45:08 +0000 Subject: merge r17008 from branch 2.4 to trunk feature 2693 added: automatically show link to caddie if caddie not empty git-svn-id: http://piwigo.org/svn/trunk@17009 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin.php | 18 ++++++++++++++++++ admin/themes/default/template/admin.tpl | 3 +++ admin/themes/default/theme.css | 13 ++++++++++++- 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/admin.php b/admin.php index 2a9f4cdd1..a27d4e72c 100644 --- a/admin.php +++ b/admin.php @@ -219,6 +219,24 @@ if ($conf['activate_comments']) $template->assign('U_PENDING_COMMENTS', $link_start.'comments'); } +// any photo in the caddie? +$query = ' +SELECT COUNT(*) + FROM '.CADDIE_TABLE.' + WHERE user_id = '.$user['id'].' +;'; +list($nb_photos_in_caddie) = pwg_db_fetch_row(pwg_query($query)); + +if ($nb_photos_in_caddie > 0) +{ + $template->assign( + array( + 'NB_PHOTOS_IN_CADDIE' => $nb_photos_in_caddie, + 'U_CADDIE' => $link_start.'batch_manager&cat=caddie', + ) + ); +} + // +-----------------------------------------------------------------------+ // | Plugin menu | // +-----------------------------------------------------------------------+ diff --git a/admin/themes/default/template/admin.tpl b/admin/themes/default/template/admin.tpl index 293e4be6e..8bb28b2f4 100644 --- a/admin/themes/default/template/admin.tpl +++ b/admin/themes/default/template/admin.tpl @@ -41,6 +41,9 @@ Raphael("menubarUsers", 20, 16).path("").scale(0.6, 0.6, 0, 0).attr({fill: "#464
  • {'Tags'|@translate}
  • {'Recent photos'|@translate}
  • {'Batch Manager'|@translate}
  • +{if $NB_PHOTOS_IN_CADDIE > 0} +
  • {'Caddie'|@translate}{$NB_PHOTOS_IN_CADDIE}
  • +{/if} diff --git a/admin/themes/default/theme.css b/admin/themes/default/theme.css index 2e7c25643..688c07997 100644 --- a/admin/themes/default/theme.css +++ b/admin/themes/default/theme.css @@ -1113,4 +1113,15 @@ input[type="text"].dError {border-color:#ff7070; background-color:#FFe5e5;} .dErrorDesc {background-color:red; color:white; padding:0 5px;border-radius:10px; font-weight:bold;cursor:help;} #wImg {max-height:100px;border:2px solid #ccc;margin-top:5px;} -#addWatermark {display:none;} \ No newline at end of file +#addWatermark {display:none;} + +.adminMenubarCounter { + background-color:#666; + color:white; + padding:1px 5px; + border-radius:10px; + -moz-border-radius:10px; + -webkit-border-radius:10px; + -border-radius:10px; + margin-left:5px; +} \ No newline at end of file -- cgit v1.2.3