From 597beac2d136c1394f20ecc1e9c1841ccacf89a2 Mon Sep 17 00:00:00 2001 From: Alexander Lutay Date: Sat, 27 Nov 2021 14:11:27 +0100 Subject: [PATCH] TT#149450 Add nagivation buttons '... Sets' to return from submenu Those extra buttons helps with navigation (mainly on AUI/v2 WEB), while they are also useful on ngcp-pane/v1, as allow to return from level 2 to level 1 of objects in object sets. Change-Id: I6d151408b9de87a77bc6e57f07d10b9f44f47d78 --- share/templates/header/actions_list.tt | 2 ++ share/templates/header/conditions_list.tt | 2 ++ share/templates/header/rules_list.tt | 2 ++ share/templates/rewrite/rules_list.tt | 3 +++ share/templates/sound/handles_list.tt | 1 + share/templates/timeset/event_list.tt | 5 +++++ 6 files changed, 15 insertions(+) diff --git a/share/templates/header/actions_list.tt b/share/templates/header/actions_list.tt index 8a1f74ce50..248c6ef8d0 100644 --- a/share/templates/header/actions_list.tt +++ b/share/templates/header/actions_list.tt @@ -21,6 +21,7 @@ backuritmp.query_param_delete('where'); END; helper.top_buttons = [ + { name = c.loc('Header Rule Sets'), uri = c.uri_for('/header/'), icon = 'icon-list' }, { name = c.loc('Create Header Rule Action'), uri = c.uri_for_action('/header/actions_create', [c.req.captures.0, c.req.captures.1]), icon = 'icon-star' }, { name = c.loc('Conditions'), uri = "/header/" _ hm_set_result.id _ "/rules/" _ hm_rule_result.id _ "/conditions", class = 'btn btn-teritary btn-large', icon = 'icon-play' }, ]; @@ -32,6 +33,7 @@ ]; ELSE; helper.top_buttons = [ + { name = c.loc('Header Rule Sets'), uri = c.uri_for('/header/'), icon = 'icon-list' }, { name = c.loc('Conditions'), uri = "/header/" _ hm_set_result.id _ "/rules/" _ hm_rule_result.id _ "/conditions", class = 'btn btn-teritary btn-large', icon = 'icon-play' }, ]; helper.dt_buttons = [ diff --git a/share/templates/header/conditions_list.tt b/share/templates/header/conditions_list.tt index 562aa87a97..f48c929d34 100644 --- a/share/templates/header/conditions_list.tt +++ b/share/templates/header/conditions_list.tt @@ -15,6 +15,7 @@ UNLESS c.user.read_only; helper.top_buttons = [ + { name = c.loc('Header Rule Sets'), uri = c.uri_for('/header/'), icon = 'icon-list' }, { name = c.loc('Create Header Rule Condition'), uri = c.uri_for_action('/header/conditions_create', [c.req.captures.0, c.req.captures.1]), icon = 'icon-star' }, { name = c.loc('Actions'), uri = "/header/" _ hm_set_result.id _ "/rules/" _ hm_rule_result.id _ "/actions", class = 'btn btn-teritary btn-large', icon = 'icon-play' }, ]; @@ -24,6 +25,7 @@ ]; ELSE; helper.top_buttons = [ + { name = c.loc('Header Rule Sets'), uri = c.uri_for('/header/'), icon = 'icon-list' }, { name = c.loc('Actions'), uri = "/header/" _ hm_set_result.id _ "/rules/" _ hm_rule_result.id _ "/actions", class = 'btn btn-teritary btn-large', icon = 'icon-play' }, ]; helper.dt_buttons = [ diff --git a/share/templates/header/rules_list.tt b/share/templates/header/rules_list.tt index cc2c2d4404..552e0835f2 100644 --- a/share/templates/header/rules_list.tt +++ b/share/templates/header/rules_list.tt @@ -21,6 +21,7 @@ backuritmp.query_param_delete('where'); END; helper.top_buttons = [ + { name = c.loc('Header Rule Sets'), uri = c.uri_for('/header/'), icon = 'icon-list' }, { name = c.loc('Create Header Rule'), uri = c.uri_for_action('/header/rules_create', [c.req.captures.0]), icon = 'icon-star' }, ]; helper.dt_buttons = [ @@ -33,6 +34,7 @@ ]; ELSE; helper.top_buttons = [ + { name = c.loc('Header Rule Sets'), uri = c.uri_for('/header/'), icon = 'icon-list' }, ]; helper.dt_buttons = [ { name = c.loc('Conditions'), uri = "/header/"_ hm_set_result.id _ "/rules/'+full.id+'/conditions", class = 'btn-small btn-tertiary', icon = 'icon-glass' }, diff --git a/share/templates/rewrite/rules_list.tt b/share/templates/rewrite/rules_list.tt index 6932968015..0e69ad15f8 100644 --- a/share/templates/rewrite/rules_list.tt +++ b/share/templates/rewrite/rules_list.tt @@ -5,6 +5,9 @@ [% c.loc('Back') %] [% back_created = 1 -%] + + [% c.loc('Rewrite Rule Sets') %] + [% UNLESS c.user.read_only -%] [% c.loc('Create Rewrite Rule') %] diff --git a/share/templates/sound/handles_list.tt b/share/templates/sound/handles_list.tt index 6427e037d6..72b68d0bae 100644 --- a/share/templates/sound/handles_list.tt +++ b/share/templates/sound/handles_list.tt @@ -3,6 +3,7 @@
[% c.loc('Back') %] + [% c.loc('Sound Sets') %] [% IF c.user.roles == "subscriberadmin" || ((c.user.roles == "admin" || c.user.roles == "reseller") && !c.user.read_only) -%] diff --git a/share/templates/timeset/event_list.tt b/share/templates/timeset/event_list.tt index e52e02e011..903969f39f 100644 --- a/share/templates/timeset/event_list.tt +++ b/share/templates/timeset/event_list.tt @@ -258,10 +258,15 @@ $( document ).ready(function() { { name = c.loc('Delete'), uri = "/timeset/'+full.time_set_id+'/event/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' }, ]; helper.top_buttons = [ + { name = c.loc('Time Sets'), uri = c.uri_for('/timeset/'), icon = 'icon-list' }, { name = c.loc('Create Event'), uri = c.uri_for_action('/timeset/event_create', [c.req.captures.0] ), icon = 'icon-star' }, { name = c.loc('Upload iCalendar events'), uri = c.uri_for_action('/timeset/event_upload',[c.req.captures.0]), icon = 'icon-star' }, { name = c.loc('Download iCalendar'), uri = c.uri_for_action('/timeset/download', [c.req.captures.0]), icon = 'icon-th-list'}, ]; + ELSE; + helper.top_buttons = [ + { name = c.loc('Time Sets'), uri = c.uri_for('/timeset/'), icon = 'icon-list' }, + ]; END; PROCESS 'helpers/datatables.tt';