Skip to content

Show subnavigation for read-only views (CFM-293) #105

Merged
merged 1 commit into from
Jun 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/templates/Standard/add-edit-view.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@

// Include subnavigation structures on add/edit/view pages
// XXX: if CFM-218 (Make fields.inc configuration only) is accepted, move the contents of fields-nav.inc into fields.inc
// When subnav exists, include on all Edit views and on Add/View for items with a parent.
if($vv_action == 'edit' || !empty($vv_bc_parent_obj) || !empty($vv_primary_link_id)) {
// When subnav exists, include on all Edit/View views and on Add views for items with a parent.
if($vv_action == 'edit' || $vv_action == 'view' || !empty($vv_bc_parent_obj) || !empty($vv_primary_link_id)) {
if(file_exists($templatePath . DS . "fields-nav.inc")) {
include($templatePath . DS . "fields-nav.inc");
}
Expand Down
4 changes: 2 additions & 2 deletions app/templates/element/subnavigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
print $this->Html->link(
__d('controller', 'People', [1]),
[ 'controller' => 'people',
'action' => 'edit',
'action' => $curAction == 'edit' ? 'edit' : 'view',
$curId
],
['class' => $linkClass]
Expand Down Expand Up @@ -267,7 +267,7 @@
print $this->Html->link(
__d('controller', 'Properties', [99]),
[ 'controller' => 'groups',
'action' => 'edit',
'action' => $curAction == 'edit' ? 'edit' : 'view',
$curId
],
['class' => $linkClass]
Expand Down