From 5a9a905c8da6b5696855539ffa55a4a5e879d59c Mon Sep 17 00:00:00 2001 From: mokaddem Date: Thu, 22 Aug 2019 11:47:57 +0200 Subject: [PATCH] chg: [decaying] Added formula description in multiple location --- app/Controller/DecayingModelController.php | 4 ++++ app/Model/DecayingModelsFormulas/Base.php | 2 ++ app/View/DecayingModel/index.ctp | 11 +++++++++-- app/View/DecayingModel/view.ctp | 8 +++++++- 4 files changed, 22 insertions(+), 3 deletions(-) diff --git a/app/Controller/DecayingModelController.php b/app/Controller/DecayingModelController.php index 979a2c77e..dfd330e7b 100644 --- a/app/Controller/DecayingModelController.php +++ b/app/Controller/DecayingModelController.php @@ -83,6 +83,8 @@ class DecayingModelController extends AppController $decaying_model = $this->DecayingModel->fetchModel($this->Auth->user(), $id, true); $this->set('id', $id); $this->set('decaying_model', $decaying_model); + $available_formulas = $this->DecayingModel->listAvailableFormulas(); + $this->set('available_formulas', $available_formulas); } // Sets pagination condition for url parameters @@ -135,6 +137,8 @@ class DecayingModelController extends AppController $passedArgsArray = $this->__setIndexFilterConditions($this->passedArgs); $this->set('passedArgsArray', $passedArgsArray); $this->set('decayingModels', $this->paginate()); + $available_formulas = $this->DecayingModel->listAvailableFormulas(); + $this->set('available_formulas', $available_formulas); } public function add() diff --git a/app/Model/DecayingModelsFormulas/Base.php b/app/Model/DecayingModelsFormulas/Base.php index 8437ce80d..8a44fe986 100644 --- a/app/Model/DecayingModelsFormulas/Base.php +++ b/app/Model/DecayingModelsFormulas/Base.php @@ -2,6 +2,8 @@ abstract class DecayingModelBase { + // Description of the formula. Will be displayed at various places in the web interface + // Should be overriden public const DESCRIPTION = ''; public function checkLoading() diff --git a/app/View/DecayingModel/index.ctp b/app/View/DecayingModel/index.ctp index 1bc4ff287..3f9e85ef0 100644 --- a/app/View/DecayingModel/index.ctp +++ b/app/View/DecayingModel/index.ctp @@ -121,7 +121,14 @@ foreach ($decayingModels as $item): ?> } ?> '">  -   + + + + + +   + +     @@ -170,7 +177,7 @@ endforeach; ?>