From df50c3c88a3757e54c89352e13ccc6dca8b196ab Mon Sep 17 00:00:00 2001 From: Bouboule Date: Tue, 27 Mar 2018 15:35:26 +0200 Subject: [PATCH] docs app #813 --- components/CommunecterController.php | 5 +- config/CO2/params.json | 15 +++++- controllers/AppController.php | 10 +++- controllers/DocsController.php | 43 ++++++++++++++++ views/docs/index.php | 73 ++++++++++++++++++---------- 5 files changed, 117 insertions(+), 29 deletions(-) create mode 100644 controllers/DocsController.php diff --git a/components/CommunecterController.php b/components/CommunecterController.php index a4a3f8c4..b126ce99 100755 --- a/components/CommunecterController.php +++ b/components/CommunecterController.php @@ -105,7 +105,9 @@ class CommunecterController extends Controller "cities" => array("href" => "/ph/co2/admin/cities"), "circuits" => array("href" => "/ph/co2/admin/circuits"), ), - + "docs" => array( + "index" => array("href" => "/ph/co2/docs"), + ), "adminpublic" => array( "index" => array("href" => "/ph/co2/adminpublic/index"), "adddata" => array("href" => "/ph/co2/adminpublic/adddata"), @@ -561,6 +563,7 @@ class CommunecterController extends Controller "power" => array('href' => "/ph/co2/app/power", "public" => true), "superadmin" => array('href' => "/ph/co2/app/superadmin", "public" => false), "admin" => array('href' => "/ph/co2/app/admin", "public" => true), + "docs" => array('href' => "/ph/co2/app/docs", "public" => true), "adminpublic" => array('href' => "/ph/co2/app/adminpublic", "public" => true), "info" => array('href' => "/ph/co2/app/info", "public" => true), "smartconso" => array('href' => "/ph/co2/app/smartconso", "public" => true), diff --git a/config/CO2/params.json b/config/CO2/params.json index 1c527e24..ab4ff0d0 100644 --- a/config/CO2/params.json +++ b/config/CO2/params.json @@ -37,8 +37,19 @@ "lblBtnCreate" : "Create something", "colorBtnCreate" : "green" }, - - + "#docs": { + "inMenu" : false, + "useHeader" : false, + "open" : true, + "subdomain" : "docs", + "subdomainName" : "Documentation", + "hash" : "#app.docs", + "icon" : "", + "mainTitle" : "Réseau sociétal territorial", + "placeholderMainSearch" : "search something ...", + "lblBtnCreate" : "Create something", + "colorBtnCreate" : "green" + }, "#territorial": { "inMenu" : true, "useHeader" : true, diff --git a/controllers/AppController.php b/controllers/AppController.php index 2db37504..11ec400e 100755 --- a/controllers/AppController.php +++ b/controllers/AppController.php @@ -192,7 +192,15 @@ class AppController extends CommunecterController { $params = array("type" => "vote"); echo $this->renderPartial("search", $params, true); } - + public function actionDocs($page=null, $dir=null){ + CO2Stat::incNbLoad("co2-docs"); + $params = array( + "page" => @$page, + "dir"=>@$dir, + ); + echo $this->renderPartial("../docs/index", $params, true); + } + public function actionAdmin($view=null, $dir=null){ CO2Stat::incNbLoad("co2-admin"); $params = array( diff --git a/controllers/DocsController.php b/controllers/DocsController.php new file mode 100644 index 00000000..778a9c7f --- /dev/null +++ b/controllers/DocsController.php @@ -0,0 +1,43 @@ + + * Date: 14/03/2014 + */ +class DocsController extends CommunecterController { + + + protected function beforeAction($action) + { + + parent::initPage(); + + + return parent::beforeAction($action); + } + + /** + * Home page + */ + + public function actionIndex($page=null, $dir=null) + { + //Yii::app()->theme = $theme; + //Yii::app()->session["theme"] = $theme; + //Yii::app()->theme = "notragora"; + //Yii::app()->theme = "CO2"; + + // http://127.0.0.1/ph/network?network=tierslieuxlille + // http://127.0.0.1/ph/network/default/index/src/tierslieuxlille + + //if(@$_GET["network"] ){ + //$this->redirect(Yii::app()->createUrl("/network/default/index?src=".$_GET["network"])); + //} + $url=(!empty($dir)) ? $dir."/".$page : $page; + echo $this->renderPartial($url, null,true); + } +} + ?> \ No newline at end of file diff --git a/views/docs/index.php b/views/docs/index.php index f65c186a..f718510e 100644 --- a/views/docs/index.php +++ b/views/docs/index.php @@ -7,6 +7,7 @@ left: 0; padding: 0; overflow-y: scroll; + background-color: white; } #header-doc{ position: fixed; @@ -76,7 +77,7 @@ ul.subMenu{ padding-left: 30px } -#show-menu-xs{ +#show-menu-xs, #close-docs{ padding: 7px 15px; font-size: 20px; } @@ -116,7 +117,8 @@ font-style: italic; } #container-docs{ - top: 40px; + background-color: white; + z-index: 10000; } @media (max-width: 991px) { /* .open-type-filter{ @@ -135,7 +137,7 @@ #menu-left{ width: 56%; left: -56%; - background-color: white; + bottom: 0px; } } @@ -148,17 +150,16 @@
-

you need to know about") ?>

+

you need to know about") ?>

- +
-
+