Skip to content

Commit

Permalink
Merge branch '6.0/asset-edit-menu'
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrandtbuffalo committed Sep 10, 2024
2 parents 190e6ff + aba8a10 commit 1d5b343
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/RT/Interface/Web/MenuBuilder.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1075,16 +1075,17 @@ sub _BuildAssetMenu {
if ($asset->id) {
$page->child("display", title => HTML::Mason::Commands::loc("Display"), path => "/Asset/Display.html?id=$id");
$page->child("history", title => HTML::Mason::Commands::loc("History"), path => "/Asset/History.html?id=$id");
$page->child("basics", title => HTML::Mason::Commands::loc("Basics"), path => "/Asset/Modify.html?id=$id");
$page->child("links", title => HTML::Mason::Commands::loc("Links"), path => "/Asset/ModifyLinks.html?id=$id");
$page->child("people", title => HTML::Mason::Commands::loc("People"), path => "/Asset/ModifyPeople.html?id=$id");
$page->child("dates", title => HTML::Mason::Commands::loc("Dates"), path => "/Asset/ModifyDates.html?id=$id");
my $edit = $page->child( edit => title => loc('Edit') );
$edit->child("basics", title => HTML::Mason::Commands::loc("Basics"), path => "/Asset/Modify.html?id=$id");
$edit->child("people", title => HTML::Mason::Commands::loc("People"), path => "/Asset/ModifyPeople.html?id=$id");
$edit->child("dates", title => HTML::Mason::Commands::loc("Dates"), path => "/Asset/ModifyDates.html?id=$id");
$edit->child("links", title => HTML::Mason::Commands::loc("Links"), path => "/Asset/ModifyLinks.html?id=$id");

for my $grouping (RT::CustomField->CustomGroupings($asset)) {
my $cfs = $asset->CustomFields;
$cfs->LimitToGrouping( $asset => $grouping );
next unless $cfs->Count;
$page->child(
$edit->child(
"cf-grouping-$grouping",
title => HTML::Mason::Commands::loc($grouping),
path => "/Asset/ModifyCFs.html?id=$id;Grouping=" . $HTML::Mason::Commands::m->interp->apply_escapes($grouping, 'u'),
Expand Down

0 comments on commit 1d5b343

Please sign in to comment.