diff --git a/app/resources/locales/en_US/information.po b/app/resources/locales/en_US/information.po index 15f47f3ae..8713d0b20 100644 --- a/app/resources/locales/en_US/information.po +++ b/app/resources/locales/en_US/information.po @@ -45,6 +45,9 @@ msgstr "Error: " msgid "flash.success" msgstr "Success: " +msgid "entity.id" +msgstr "ID: {0}" + msgid "pagination.format" msgstr "Page {{page}} of {{pages}}, Viewing {{start}}-{{end}} of {{count}}" diff --git a/app/resources/locales/en_US/operation.po b/app/resources/locales/en_US/operation.po index c1491edeb..29198eb27 100644 --- a/app/resources/locales/en_US/operation.po +++ b/app/resources/locales/en_US/operation.po @@ -67,7 +67,7 @@ msgid "edit.a" msgstr "Edit {0}" msgid "edit.ai" -msgstr "Edit {0} (ID {1})" +msgstr "Edit {0}" msgid "filter" msgstr "Filter" @@ -127,5 +127,5 @@ msgid "view.a" msgstr "View {0}" msgid "view.ai" -msgstr "View {0} ({1})" +msgstr "View {0}" diff --git a/app/src/Controller/StandardController.php b/app/src/Controller/StandardController.php index 17dd1be8f..4dac86cf4 100644 --- a/app/src/Controller/StandardController.php +++ b/app/src/Controller/StandardController.php @@ -319,17 +319,18 @@ public function edit(string $id) { if(method_exists($table, 'generateDisplayField')) { // We don't use a trait for this since each table will implement different logic - $this->set('vv_title', __d('operation', 'edit.ai', $table->generateDisplayField($obj), $id)); + $this->set('vv_title', __d('operation', 'edit.ai', $table->generateDisplayField($obj))); } else { // Default view title is edit object display field $field = $table->getDisplayField(); if(!empty($obj->$field)) { - $this->set('vv_title', __d('operation', 'edit.ai', $obj->$field, $id)); + $this->set('vv_title', __d('operation', 'edit.ai', $obj->$field)); } else { - $this->set('vv_title', __d('operation', 'edit.ai', __d('controller', $modelsName, [1]), $id)); + $this->set('vv_title', __d('operation', 'edit.ai', __d('controller', $modelsName, [1]))); } } + $this->set('vv_entity_id', __d('information', 'entity.id', $id)); // Let the view render $this->render('/Standard/add-edit-view'); @@ -648,17 +649,18 @@ public function view($id = null) { if(method_exists($table, 'generateDisplayField')) { // We don't use a trait for this since each table will implement different logic - $this->set('vv_title', __d('operation', 'view.ai', $table->generateDisplayField($obj), $id)); + $this->set('vv_title', __d('operation', 'view.ai', $table->generateDisplayField($obj))); } else { // Default view title is the object display field $field = $table->getDisplayField(); if(!empty($obj->$field)) { - $this->set('vv_title', __d('operation', 'view.ai', $obj->$field, $id)); + $this->set('vv_title', __d('operation', 'view.ai', $obj->$field)); } else { - $this->set('vv_title', __d('operation', 'view.ai', __d('controller', $modelsName, [1]), $id)); + $this->set('vv_title', __d('operation', 'view.ai', __d('controller', $modelsName, [1]))); } } + $this->set('vv_entity_id', __d('information', 'entity.id', $id)); // Let the view render $this->render('/Standard/add-edit-view');