From a4187cabf0914e223b94db62f163374286381d1a Mon Sep 17 00:00:00 2001 From: Teatek <38403802+Teatek@users.noreply.github.com> Date: Fri, 15 Feb 2019 15:34:43 +0100 Subject: [PATCH] Fixes #247 number of photos in breadcrumb * Fixes #247 (Adding a span and a class to modify the picture number in the breadcrumb with css) * same for menubar categories --- index.php | 6 ++---- themes/default/template/index.tpl | 2 +- themes/default/template/menubar_categories.tpl | 2 +- themes/default/theme.css | 8 ++++++++ 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/index.php b/index.php index e3af45f10..67ada7be2 100644 --- a/index.php +++ b/index.php @@ -110,11 +110,9 @@ $template->assign('U_CANONICAL', $canonical_url); //-------------------------------------------------------------- page title $title = $page['title']; $template_title = $page['section_title']; -if (count($page['items']) > 0) -{ - $template_title.= ' ['.count($page['items']).']'; -} +$nb_items = count($page['items']); $template->assign('TITLE', $template_title); +$template->assign('NB_ITEMS', $nb_items); //-------------------------------------------------------------- menubar include( PHPWG_ROOT_PATH.'include/menubar.inc.php'); diff --git a/themes/default/template/index.tpl b/themes/default/template/index.tpl index 81802b16f..d1411d2f7 100644 --- a/themes/default/template/index.tpl +++ b/themes/default/template/index.tpl @@ -97,7 +97,7 @@ {if !empty($PLUGIN_INDEX_ACTIONS)}{$PLUGIN_INDEX_ACTIONS}{/if} -

{$TITLE}

+

{$TITLE} {if $NB_ITEMS > 0}{$NB_ITEMS}{/if}

{if isset($chronology_views)}
{'View'|@translate}: diff --git a/themes/default/template/menubar_categories.tpl b/themes/default/template/menubar_categories.tpl index c3c5b1c02..6000e756f 100644 --- a/themes/default/template/menubar_categories.tpl +++ b/themes/default/template/menubar_categories.tpl @@ -19,7 +19,7 @@
  • {$cat.NAME} {if $cat.count_images > 0} - [{$cat.count_images}] + {$cat.count_images} {/if} {if !empty($cat.icon_ts)} (!) diff --git a/themes/default/theme.css b/themes/default/theme.css index 5a438be9c..3468e3992 100644 --- a/themes/default/theme.css +++ b/themes/default/theme.css @@ -113,6 +113,14 @@ padding:0 25px; } +.badge::before { + content: '['; +} + +.badge::after { + content: ']'; +} + /* category and tag results paragraphs on a quick search */ .search_results { font-size: 16px;