From 340f2647ec32fe812ffdef029262c2a7cf266674 Mon Sep 17 00:00:00 2001 From: Matthieu Leproux Date: Tue, 28 Jun 2022 11:19:19 +0200 Subject: [PATCH] related to #1679 Regular title for edit album tabs --- admin/album.php | 4 ++++ admin/album_notification.php | 10 ++++++---- admin/cat_modify.php | 2 +- admin/element_set_ranks.php | 2 +- admin/themes/default/template/album_notification.tpl | 6 ++---- admin/themes/default/template/cat_modify.tpl | 7 ++----- admin/themes/default/template/cat_perm.tpl | 8 ++++---- admin/themes/default/template/element_set_ranks.tpl | 11 ++++------- 8 files changed, 24 insertions(+), 26 deletions(-) diff --git a/admin/album.php b/admin/album.php index 2a132c78e..faa28c8c7 100644 --- a/admin/album.php +++ b/admin/album.php @@ -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'); diff --git a/admin/album_notification.php b/admin/album_notification.php index da16ddafe..78b69fe8e 100644 --- a/admin/album_notification.php +++ b/admin/album_notification.php @@ -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(), ) diff --git a/admin/cat_modify.php b/admin/cat_modify.php index cc6cf1430..79f2d5e5a 100644 --- a/admin/cat_modify.php +++ b/admin/cat_modify.php @@ -211,7 +211,7 @@ if (!empty($category['id_uppercat'])) $template->assign( array( - 'CATEGORIES_NAV' => $navigation, + 'CATEGORIES_NAV' => trim($navigation), 'CAT_ID' => $category['id'], 'CAT_NAME' => @htmlspecialchars($category['name']), 'CAT_COMMENT' => @htmlspecialchars($category['comment']), diff --git a/admin/element_set_ranks.php b/admin/element_set_ranks.php index 7defa3c3b..b52433084 100644 --- a/admin/element_set_ranks.php +++ b/admin/element_set_ranks.php @@ -126,7 +126,7 @@ $navigation = get_cat_display_name_cache( $template->assign( array( - 'CATEGORIES_NAV' => $navigation, + 'CATEGORIES_NAV' => trim($navigation), 'F_ACTION' => $base_url.get_query_string_diff(array()), ) ); diff --git a/admin/themes/default/template/album_notification.tpl b/admin/themes/default/template/album_notification.tpl index 67f1e90ea..a6dd82980 100644 --- a/admin/themes/default/template/album_notification.tpl +++ b/admin/themes/default/template/album_notification.tpl @@ -4,6 +4,8 @@ {footer_script} jQuery(document).ready(function() { + $("h1").append(' {$CATEGORIES_NAV}'); + jQuery("input[name=who]").change(function () { checkWhoOptions(); }); @@ -55,10 +57,6 @@ span.errors { } {/html_style} -
-

{$CATEGORIES_NAV} › {'Edit album'|@translate} {$TABSHEET_TITLE}

-
-
diff --git a/admin/themes/default/template/cat_modify.tpl b/admin/themes/default/template/cat_modify.tpl index 6a684cc82..08f49d829 100644 --- a/admin/themes/default/template/cat_modify.tpl +++ b/admin/themes/default/template/cat_modify.tpl @@ -38,6 +38,8 @@ categoriesCache.selectize(jQuery('[data-selectize=categories]'), { }); jQuery(document).ready(function() { + $("h1").append(' #{$CAT_ID} {$CATEGORIES_NAV}'); + jQuery(document).on('click', '.refreshRepresentative', function(e) { var $this = jQuery(this); var method = 'pwg.categories.refreshRepresentative'; @@ -232,11 +234,6 @@ function cropImage() { } {/html_style} - -
-

{'Edit album'|@translate} #{$CAT_ID} {$CATEGORIES_NAV}

-
-
diff --git a/admin/themes/default/template/cat_perm.tpl b/admin/themes/default/template/cat_perm.tpl index d2026e256..b161f115d 100644 --- a/admin/themes/default/template/cat_perm.tpl +++ b/admin/themes/default/template/cat_perm.tpl @@ -47,11 +47,11 @@ jQuery("#selectStatus").change(function() { }); {/if} }()); -{/footer_script} -
-

{$CATEGORIES_NAV} › {'Edit album'|@translate} {$TABSHEET_TITLE}

-
+$(document).ready(function () { + $("h1").append(' {$CATEGORIES_NAV}'); +}) +{/footer_script} diff --git a/admin/themes/default/template/element_set_ranks.tpl b/admin/themes/default/template/element_set_ranks.tpl index 67e40a5b1..c13429d39 100644 --- a/admin/themes/default/template/element_set_ranks.tpl +++ b/admin/themes/default/template/element_set_ranks.tpl @@ -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(' {$CATEGORIES_NAV}'); + 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} - -
-

{$CATEGORIES_NAV} › {'Edit album'|@translate} {$TABSHEET_TITLE}

-
+{/footer_script} {if !empty($thumbnails)}