From c097b77cb0b52453c07e913702322ca30079f5b8 Mon Sep 17 00:00:00 2001 From: Dave Roberts Date: Fri, 17 Oct 2025 14:38:05 +0100 Subject: [PATCH 01/10] Make default "all" view on view all button click on curval --- lib/GADS.pm | 3 ++- lib/GADS/API.pm | 2 +- views/edit.tt | 2 +- views/navigation/records_top_bar.tt | 6 ++++++ 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/GADS.pm b/lib/GADS.pm index 62ba1fa71..3d1f50d0d 100644 --- a/lib/GADS.pm +++ b/lib/GADS.pm @@ -2675,11 +2675,12 @@ prefix '/:layout_name' => sub { { $params->{curval_layout_id} = query_parameters->get('curval_layout_id'); $params->{curval_record_id} = query_parameters->get('curval_record_id'); + $params->{hide_view_menu} = 1; } my $records = GADS::Records->new(%params); - $records->view($view); + $records->view(query_parameters->get('curval_record_id') ? undef : $view); $records->rows($rows); $records->page($page); $records->sort(session 'sort'); diff --git a/lib/GADS/API.pm b/lib/GADS/API.pm index c0a92b940..90cddffe0 100644 --- a/lib/GADS/API.pm +++ b/lib/GADS/API.pm @@ -1092,7 +1092,7 @@ sub _get_records { my $sheetname = param 'sheet'; my $user = logged_in_user; my $layout = var('instances')->layout_by_shortname($sheetname); # borks on not found - my $view = current_view($user, $layout); + my $view = query_parameters->get('curval_record_id') ? undef : current_view($user, $layout); # Allow parameters to be passed by URL query or in the body. Flatten into # one parameters object diff --git a/views/edit.tt b/views/edit.tt index 0c3de8e13..24a484c1d 100755 --- a/views/edit.tt +++ b/views/edit.tt @@ -57,7 +57,7 @@ [% IF record.child_record_ids.size %]

- Child records + Attached records

diff --git a/views/navigation/records_top_bar.tt b/views/navigation/records_top_bar.tt index 509280de4..5ce7bda2b 100644 --- a/views/navigation/records_top_bar.tt +++ b/views/navigation/records_top_bar.tt @@ -2,9 +2,15 @@
    + [% IF hide_view_menu %] +
  • +

    Child Records

    +
  • + [% ELSE %]
  • [% INCLUDE navigation/dropdown_select_view.tt %]
  • + [% END %]
  • [% From 3047b4b26a78f98bb05c7936758a28e1c9e05368 Mon Sep 17 00:00:00 2001 From: Dave Roberts Date: Mon, 26 Jan 2026 15:35:22 +0000 Subject: [PATCH 02/10] Update view name and styling --- src/frontend/css/stylesheets/base/_global.scss | 4 ++++ views/navigation/records_top_bar.tt | 12 ++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/frontend/css/stylesheets/base/_global.scss b/src/frontend/css/stylesheets/base/_global.scss index 097917358..ae980cd35 100644 --- a/src/frontend/css/stylesheets/base/_global.scss +++ b/src/frontend/css/stylesheets/base/_global.scss @@ -102,3 +102,7 @@ table.table-bordered { margin: 0 auto; } } + +.text-primary { + color: $brand-secundary !important; +} \ No newline at end of file diff --git a/views/navigation/records_top_bar.tt b/views/navigation/records_top_bar.tt index 5ce7bda2b..4cd4a385e 100644 --- a/views/navigation/records_top_bar.tt +++ b/views/navigation/records_top_bar.tt @@ -4,7 +4,7 @@
      [% IF hide_view_menu %]
    • -

      Child Records

      +

      Linked Child Records

    • [% ELSE %]
    • @@ -55,14 +55,18 @@ INCLUDE navigation/dropdown_view_limits.tt; END; - INCLUDE navigation/dropdown_manage_views.tt; + UNLESS hide_view_menu; + INCLUDE navigation/dropdown_manage_views.tt; + END; IF viewtype == "graph"; INCLUDE navigation/dropdown_manage_graphs.tt; END; - INCLUDE navigation/dropdown_actions.tt; - + UNLESS hide_view_menu; + INCLUDE navigation/dropdown_actions.tt; + END; + IF page == "data_timeline" AND ! layout.no_download_pdf; INCLUDE navigation/dropdown_download_timeline.tt; END; From 223c0869d05694dc385e8f490cd4980716396ba2 Mon Sep 17 00:00:00 2001 From: Dave Roberts Date: Mon, 26 Jan 2026 16:23:54 +0000 Subject: [PATCH 03/10] Remove erroneous change --- views/edit.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/edit.tt b/views/edit.tt index 24a484c1d..0c3de8e13 100755 --- a/views/edit.tt +++ b/views/edit.tt @@ -57,7 +57,7 @@ [% IF record.child_record_ids.size %]

      - Attached records + Child records

      From 75b4988eb1bd1c485e5cc3ae8046206b0a1da5fc Mon Sep 17 00:00:00 2001 From: Dave Roberts Date: Fri, 17 Oct 2025 14:38:05 +0100 Subject: [PATCH 04/10] Make default "all" view on view all button click on curval --- lib/GADS.pm | 3 ++- lib/GADS/API.pm | 2 +- views/edit.tt | 2 +- views/navigation/records_top_bar.tt | 6 ++++++ 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/GADS.pm b/lib/GADS.pm index 1a94f837e..129e525c8 100644 --- a/lib/GADS.pm +++ b/lib/GADS.pm @@ -2677,11 +2677,12 @@ prefix '/:layout_name' => sub { { $params->{curval_layout_id} = query_parameters->get('curval_layout_id'); $params->{curval_record_id} = query_parameters->get('curval_record_id'); + $params->{hide_view_menu} = 1; } my $records = GADS::Records->new(%params); - $records->view($view); + $records->view(query_parameters->get('curval_record_id') ? undef : $view); $records->rows($rows); $records->page($page); $records->sort(session 'sort'); diff --git a/lib/GADS/API.pm b/lib/GADS/API.pm index c0a92b940..90cddffe0 100644 --- a/lib/GADS/API.pm +++ b/lib/GADS/API.pm @@ -1092,7 +1092,7 @@ sub _get_records { my $sheetname = param 'sheet'; my $user = logged_in_user; my $layout = var('instances')->layout_by_shortname($sheetname); # borks on not found - my $view = current_view($user, $layout); + my $view = query_parameters->get('curval_record_id') ? undef : current_view($user, $layout); # Allow parameters to be passed by URL query or in the body. Flatten into # one parameters object diff --git a/views/edit.tt b/views/edit.tt index 0c3de8e13..24a484c1d 100755 --- a/views/edit.tt +++ b/views/edit.tt @@ -57,7 +57,7 @@ [% IF record.child_record_ids.size %]

      - Child records + Attached records

      diff --git a/views/navigation/records_top_bar.tt b/views/navigation/records_top_bar.tt index 509280de4..5ce7bda2b 100644 --- a/views/navigation/records_top_bar.tt +++ b/views/navigation/records_top_bar.tt @@ -2,9 +2,15 @@
        + [% IF hide_view_menu %] +
      • +

        Child Records

        +
      • + [% ELSE %]
      • [% INCLUDE navigation/dropdown_select_view.tt %]
      • + [% END %]
      • [% From 856c85b569779d99eaa6ce2e110b92b82228db3e Mon Sep 17 00:00:00 2001 From: Dave Roberts Date: Mon, 26 Jan 2026 15:35:22 +0000 Subject: [PATCH 05/10] Update view name and styling --- src/frontend/css/stylesheets/base/_global.scss | 4 ++++ views/navigation/records_top_bar.tt | 12 ++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/frontend/css/stylesheets/base/_global.scss b/src/frontend/css/stylesheets/base/_global.scss index 097917358..ae980cd35 100644 --- a/src/frontend/css/stylesheets/base/_global.scss +++ b/src/frontend/css/stylesheets/base/_global.scss @@ -102,3 +102,7 @@ table.table-bordered { margin: 0 auto; } } + +.text-primary { + color: $brand-secundary !important; +} \ No newline at end of file diff --git a/views/navigation/records_top_bar.tt b/views/navigation/records_top_bar.tt index 5ce7bda2b..4cd4a385e 100644 --- a/views/navigation/records_top_bar.tt +++ b/views/navigation/records_top_bar.tt @@ -4,7 +4,7 @@
          [% IF hide_view_menu %]
        • -

          Child Records

          +

          Linked Child Records

        • [% ELSE %]
        • @@ -55,14 +55,18 @@ INCLUDE navigation/dropdown_view_limits.tt; END; - INCLUDE navigation/dropdown_manage_views.tt; + UNLESS hide_view_menu; + INCLUDE navigation/dropdown_manage_views.tt; + END; IF viewtype == "graph"; INCLUDE navigation/dropdown_manage_graphs.tt; END; - INCLUDE navigation/dropdown_actions.tt; - + UNLESS hide_view_menu; + INCLUDE navigation/dropdown_actions.tt; + END; + IF page == "data_timeline" AND ! layout.no_download_pdf; INCLUDE navigation/dropdown_download_timeline.tt; END; From a7eca6c36453de734b996baa7f24178389a06e7d Mon Sep 17 00:00:00 2001 From: Dave Roberts Date: Mon, 26 Jan 2026 16:23:54 +0000 Subject: [PATCH 06/10] Remove erroneous change --- views/edit.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/edit.tt b/views/edit.tt index 24a484c1d..0c3de8e13 100755 --- a/views/edit.tt +++ b/views/edit.tt @@ -57,7 +57,7 @@ [% IF record.child_record_ids.size %]

          - Attached records + Child records

          From 118cd55d7fdaa88ce0ed5756aad25e6ab1fb23e2 Mon Sep 17 00:00:00 2001 From: Dave Roberts Date: Fri, 6 Feb 2026 09:43:20 +0000 Subject: [PATCH 07/10] Updated curval view display name --- lib/GADS.pm | 1 + views/navigation/records_top_bar.tt | 2 +- views/snippets/datum.tt | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/GADS.pm b/lib/GADS.pm index 129e525c8..0c75cdb6a 100644 --- a/lib/GADS.pm +++ b/lib/GADS.pm @@ -2678,6 +2678,7 @@ prefix '/:layout_name' => sub { $params->{curval_layout_id} = query_parameters->get('curval_layout_id'); $params->{curval_record_id} = query_parameters->get('curval_record_id'); $params->{hide_view_menu} = 1; + $params->{current} = query_parameters->get('current') // 0; } my $records = GADS::Records->new(%params); diff --git a/views/navigation/records_top_bar.tt b/views/navigation/records_top_bar.tt index 4cd4a385e..cc31132ca 100644 --- a/views/navigation/records_top_bar.tt +++ b/views/navigation/records_top_bar.tt @@ -4,7 +4,7 @@
            [% IF hide_view_menu %]
          • -

            Linked Child Records

            +

            Records for curval ([% curval_layout_id %]) on record [% current %]

          • [% ELSE %]
          • diff --git a/views/snippets/datum.tt b/views/snippets/datum.tt index 8f67f77b3..12dba552f 100644 --- a/views/snippets/datum.tt +++ b/views/snippets/datum.tt @@ -37,8 +37,8 @@ [% ELSE %] [% curval.links.size %] [% END %] - row[%IF curval.links.size != 1%]s[%END%]. - view all)

            + row[%IF curval.links.size != 1%]s[%END%].| + view all)

            [% END %] [% END %] From 3ffa1a752df62574e798f42ffbe372f12c954a11 Mon Sep 17 00:00:00 2001 From: Dave Roberts Date: Fri, 6 Feb 2026 17:01:09 +0000 Subject: [PATCH 08/10] Update view name as per requirement --- lib/GADS.pm | 4 +++- src/frontend/css/stylesheets/base/_global.scss | 2 +- views/navigation/records_top_bar.tt | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/GADS.pm b/lib/GADS.pm index 0c75cdb6a..7218278a6 100644 --- a/lib/GADS.pm +++ b/lib/GADS.pm @@ -2675,10 +2675,12 @@ prefix '/:layout_name' => sub { if (query_parameters->get('curval_record_id')) { + my $curval = schema->resultset('Layout')->find(query_parameters->get('curval_layout_id')); $params->{curval_layout_id} = query_parameters->get('curval_layout_id'); $params->{curval_record_id} = query_parameters->get('curval_record_id'); $params->{hide_view_menu} = 1; - $params->{current} = query_parameters->get('current') // 0; + $params->{current} = query_parameters->get('current') // 0; + $params->{field} = $curval->name; } my $records = GADS::Records->new(%params); diff --git a/src/frontend/css/stylesheets/base/_global.scss b/src/frontend/css/stylesheets/base/_global.scss index ae980cd35..f7d964370 100644 --- a/src/frontend/css/stylesheets/base/_global.scss +++ b/src/frontend/css/stylesheets/base/_global.scss @@ -105,4 +105,4 @@ table.table-bordered { .text-primary { color: $brand-secundary !important; -} \ No newline at end of file +} diff --git a/views/navigation/records_top_bar.tt b/views/navigation/records_top_bar.tt index cc31132ca..dcf98815f 100644 --- a/views/navigation/records_top_bar.tt +++ b/views/navigation/records_top_bar.tt @@ -4,7 +4,7 @@
              [% IF hide_view_menu %]
            • -

              Records for curval ([% curval_layout_id %]) on record [% current %]

              +

              Records from field "[% field %]" on record [% current %]

            • [% ELSE %]
            • From 2374cf3874b2cded10e8db8b7fa6ed16877f274c Mon Sep 17 00:00:00 2001 From: Dave Roberts Date: Fri, 6 Feb 2026 17:14:11 +0000 Subject: [PATCH 09/10] Rename variables as requested --- lib/GADS.pm | 4 ++-- views/navigation/records_top_bar.tt | 2 +- views/snippets/datum.tt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/GADS.pm b/lib/GADS.pm index 7218278a6..462db95d1 100644 --- a/lib/GADS.pm +++ b/lib/GADS.pm @@ -2678,9 +2678,9 @@ prefix '/:layout_name' => sub { my $curval = schema->resultset('Layout')->find(query_parameters->get('curval_layout_id')); $params->{curval_layout_id} = query_parameters->get('curval_layout_id'); $params->{curval_record_id} = query_parameters->get('curval_record_id'); + $params->{parent_record_id} = query_parameters->get('parent_record_id'); + $params->{parent_field_name} = $curval->name; $params->{hide_view_menu} = 1; - $params->{current} = query_parameters->get('current') // 0; - $params->{field} = $curval->name; } my $records = GADS::Records->new(%params); diff --git a/views/navigation/records_top_bar.tt b/views/navigation/records_top_bar.tt index dcf98815f..84a535055 100644 --- a/views/navigation/records_top_bar.tt +++ b/views/navigation/records_top_bar.tt @@ -4,7 +4,7 @@
                [% IF hide_view_menu %]
              • -

                Records from field "[% field %]" on record [% current %]

                +

                Records from field "[% parent_field_name %]" on record [% parent_record_id %]

              • [% ELSE %]
              • diff --git a/views/snippets/datum.tt b/views/snippets/datum.tt index 12dba552f..ee6252871 100644 --- a/views/snippets/datum.tt +++ b/views/snippets/datum.tt @@ -38,7 +38,7 @@ [% curval.links.size %] [% END %] row[%IF curval.links.size != 1%]s[%END%].| - view all)

                + view all)

                [% END %] [% END %] From b74e175f8eb2546c69aa780886bdd258c423abc3 Mon Sep 17 00:00:00 2001 From: Dave Roberts Date: Fri, 6 Feb 2026 17:19:43 +0000 Subject: [PATCH 10/10] Escape values with `html` filter --- views/navigation/records_top_bar.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/navigation/records_top_bar.tt b/views/navigation/records_top_bar.tt index 84a535055..070bc5b47 100644 --- a/views/navigation/records_top_bar.tt +++ b/views/navigation/records_top_bar.tt @@ -4,7 +4,7 @@
                  [% IF hide_view_menu %]
                • -

                  Records from field "[% parent_field_name %]" on record [% parent_record_id %]

                  +

                  Records from field "[% parent_field_name | html %]" on record [% parent_record_id | html %]

                • [% ELSE %]