Skip to content

Commit

Permalink
Show subnavigation for read-only views (CFM-293) (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
arlen authored Jun 28, 2023
1 parent 752bd66 commit ded2ee1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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

0 comments on commit ded2ee1

Please sign in to comment.