Skip to content

Consolidate fields-links.inc into fields-nav.inc (CFM-259) #91

Merged
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
File renamed without changes.
6 changes: 1 addition & 5 deletions app/templates/Standard/add-edit-view.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,12 @@
// 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)) {
if($vv_action != 'add' || !empty($vv_bc_parent_obj) || !empty($vv_primary_link_id)) {
if(file_exists(ROOT . DS . "templates" . DS . $modelsName . DS . "fields-nav.inc")) {
include(ROOT . DS . "templates" . DS . $modelsName . DS . "fields-nav.inc");
}
}

if(file_exists(ROOT . DS . "templates" . DS . $modelsName . DS . "fields-links.inc")) {
include(ROOT . DS . "templates" . DS . $modelsName . DS . "fields-links.inc");
}

// $linkFilter is used for models that belong to a specific parent model (eg: co_id)
$linkFilter = [];

Expand Down