Commit 07c6e081 authored by Clément Damiens's avatar Clément Damiens
Browse files

Merge remote-tracking branch 'origin/development' into development

parents 2d487cb7 1102a658
......@@ -2,8 +2,6 @@
background-color: white;
color: #098048 !important;
border-radius: 20px !important;
margin-top: 2vw;
margin-bottom: 2vw;
}
#newsstream {
......@@ -37,7 +35,6 @@
#second-search-bar-addon-alternatiba{
position: relative;
left: 2.5%;
margin-top: 3%;
}
......@@ -67,8 +64,8 @@
}
.text-one{
background-color: white;
color: #098048;
background-color: #098048;
color: white;
font-family: 'Helvetica';
font-size: 37px;
margin-left: 29vw;
......
assets/images/costrasbourg/logo.png

215 KB | W: | H:

assets/images/costrasbourg/logo.png

354 KB | W: | H:

assets/images/costrasbourg/logo.png
assets/images/costrasbourg/logo.png
assets/images/costrasbourg/logo.png
assets/images/costrasbourg/logo.png
  • 2-up
  • Swipe
  • Onion skin
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg class="ArrowLeft" fill="black" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 240.823 240.823" style="enable-background:new 0 0 240.823 240.823;" xml:space="preserve">
<g>
<path id="Chevron_Right" d="M57.633,129.007L165.93,237.268c4.752,4.74,12.451,4.74,17.215,0c4.752-4.74,4.752-12.439,0-17.179
l-99.707-99.671l99.695-99.671c4.752-4.74,4.752-12.439,0-17.191c-4.752-4.74-12.463-4.74-17.215,0L57.621,111.816
C52.942,116.507,52.942,124.327,57.633,129.007z"/>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg class="ArrowRight" fill="black" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 240.823 240.823" style="enable-background:new 0 0 240.823 240.823;" xml:space="preserve">
<g>
<path id="Chevron_Right" d="M57.633,129.007L165.93,237.268c4.752,4.74,12.451,4.74,17.215,0c4.752-4.74,4.752-12.439,0-17.179
l-99.707-99.671l99.695-99.671c4.752-4.74,4.752-12.439,0-17.191c-4.752-4.74-12.463-4.74-17.215,0L57.621,111.816
C52.942,116.507,52.942,124.327,57.633,129.007z"/>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>
This diff is collapsed.
<?php
class CostumgeneriqueController extends CommunecterController {
protected function beforeAction($action) {
//parent::initPage();
return parent::beforeAction($action);
}
public function actions(){
return array(
'getprojects' => 'costum.controllers.actions.costumgenerique.GetProjectsAction'
);
}
//public function actionPersondah
/*public function actionIndex()
{
if(Yii::app()->request->isAjaxRequest)
echo $this->renderPartial("../default/index");
else
$this->render("index");
//$this->redirect(Yii::app()->createUrl( "/".Yii::app()->params["module"]["parent"] ));
}*/
}
<?php
class GetProjectsAction extends CAction{
public function run($id = null,$type= null,$slug = null, $view = null, $page =null){
$controller = $this->getController();
$params = CostumGenerique::getProjects($_POST);
Rest::json($params);
}
}
\ No newline at end of file
......@@ -10,6 +10,7 @@ class DashboardAction extends CAction
$answers = PHDB::find( Form::ANSWER_COLLECTION,[ //"formId" => $params["formId"],
"parentSlug" => $controller->costum["contextSlug"] ] );
//var_dump($answers);
$blocks = [];
$title = "Observatoire <br/>de l'amélioration de l'habitat Réunion";
......@@ -52,6 +53,9 @@ class DashboardAction extends CAction
["data"=>60,"name"=>"Pourcentage financé","type"=>"danger","icon"=>"money"],
["data"=>45,"name"=>"Resta à financer","type"=>"danger","icon"=>"money"],
["data"=>45,"name"=>"Combien de financeurs","type"=>"danger","icon"=>"group"],
["data"=>"??","name"=>"Open projects Finance distribution","icon"=>"thumbs-up","type"=>"success"],
["data"=>"??","name"=>"for open projects Finance distribution per task types","type"=>"danger","icon"=>"map-marker"],
["data"=>"??","name"=>"for each worker Finances distribution per project","type"=>"danger","icon"=>"money"]
],
"tpl" => "costum.views.tpls.list"
],
......@@ -115,7 +119,114 @@ class DashboardAction extends CAction
echo "<br/>---- xxx Tasks";*/
//count
$countAnswersWithOperators = 0;
$countAnswersWithOperatorsUnset = 0;
$countAnswersFinanced = 0;
$countAnswersFinished = 0;
$countAnswersRefused = 0;
$totalAsked = 0;
$totalFinanced = 0;
$totalProjetNonFinanced = 0;
$totalProjetEnCours = 0;
$totalProjetEnValidation = 0;
$totalProjetFinished = 0;
$pieBudgetPerOperatorLbl = [];
$pieBudgetPerOperatorData = [];
$pieBudgetPerFinancer = [];
$pieBudgetPerFinancerLbl = [];
$pieBudgetPerFinancerData = [];
$barTasksPerProject = [];
$barTasksPerProjectLbl = [];
$barTasksPerProjectData = [];
foreach ($answers as $key => $ans) {
if( isset($ans["step"]) && $ans["step"] == "deal5" )
$countAnswersFinanced++;
if( isset($ans["links"]["operators"]) ){
$hasOperator = false;
foreach ( $ans["links"]["operators"] as $oid => $op) {
if($op != "0")
$hasOperator = true;
}
if($hasOperator)
$countAnswersWithOperators++;
else
$countAnswersWithOperatorsUnset++;
} else
$countAnswersWithOperatorsUnset++;
if( isset($ans["validation"]) ){
$refused = false;
foreach ( $ans["validation"] as $step => $v) {
if($v["valid"] == "notValid")
$refused = true;
}
if( isset($ans["validation"]['deal5']["finished"]) && $ans["validation"]['deal5']["finished"] == true )
$countAnswersFinished++;
if($refused)
$countAnswersRefused++;
}
//var_dump(@$ans["deal3"]["deal3"]);
if( isset($ans["answers"]["deal3"]["budget"]) ){
//var_dump( count( array_keys($ans["deal3"]["budget"])));
foreach ($ans["answers"]["deal3"]["budget"] as $bix => $bud) {
$totalAsked += (int)$bud["price"];
//var_dump($bud["price"]);
if( isset($bud["financer"]) ){
foreach ($bud["financer"] as $bfix => $fin) {
$totalFinanced += (int)$fin["amount"];
if(!isset($pieBudgetPerFinancer[$fin["name"]]))
$pieBudgetPerFinancer[ $fin["name"] ] = 0;
$pieBudgetPerFinancer[ $fin["name"] ] += (int)$fin["amount"];
}
if( isset($ans["step"]) && $ans["step"] == "deal4" )
$totalProjetEnValidation += (int)$bud["price"];
} else
$totalProjetNonFinanced += (int)$bud["price"];
if( isset($ans["step"]) && $ans["step"] == "deal5" && isset($bud["todo"]) ){
foreach ($bud["todo"] as $bfix => $todo) {
$totalFinanced += (int)$fin["amount"];
if(isset($ans["deal1"]["deal13"])){
if( !isset($barTasksPerProject[ $ans["deal1"]["deal13"] ]))
$barTasksPerProject[ $ans["deal1"]["deal13"] ] = 0;
if(isset($todo["done"]) && $todo["done"] == "0")
$barTasksPerProject[ $fin["name"] ]++;
else
$barTasksPerProject[ $fin["name"] ]++;
}
}
if( isset($ans["step"]) && $ans["step"] == "deal4" )
$totalProjetEnValidation += (int)$bud["price"];
}
//if( isset($ans["validation"]['deal5']["finished"]) && $ans["validation"]['deal5']["finished"] == true )
if( isset($ans["step"]) && $ans["step"] == "deal5" )
$totalProjetEnCours += (int)$bud["price"];
else if( isset($ans["validation"]['deal5']["finished"]) && $ans["validation"]['deal5']["finished"] == true )
$totalProjetFinished += (int)$bud["price"];
}
}
}
$pieBudgetPerFinancerLbl = array_keys($pieBudgetPerFinancer);
$pieBudgetPerFinancerData = array_values($pieBudgetPerFinancer);
$barTasksPerProjectLbl = array_keys($barTasksPerProject);
$barTasksPerProjectData = array_values($barTasksPerProject);
var_dump($barTasksPerProject);
var_dump($barTasksPerProjectLbl);
var_dump($barTasksPerProjectData);
$lists = [
"chiffresDoss" =>[
"title"=>"<i class='fa fa-2x fa-folder-open-o'></i><br/>Dossiers",
......@@ -124,25 +235,23 @@ class DashboardAction extends CAction
"color" => "#fff",
"data" => [
["data"=>count($answers),"name"=>"Dossier déposés","icon"=>"folder-open","type"=>"default"],
["data"=>24,"name"=>"Dossier instruit","icon"=>"gavel","type"=>"success"],
["data"=>24,"name"=>"Dossier financé","icon"=>"money","type"=>"success"],
["data"=>24,"name"=>"Dossier refusé","icon"=>"thumbs-down","type"=>"success"],
["data"=>45,"name"=>"Dossier en attente de decision","type"=>"danger","icon"=>"hourglass-half"],
["data"=>60,"name"=>"Dossier en attente de decision","type"=>"danger","icon"=>"money"],
["data"=>45,"name"=>"Dossier abandonné","icon"=>"ban"],
["data"=>$countAnswersWithOperators,"name"=>"Dossier géré avec opérateur","icon"=>"handshake-o"],
["data"=>$countAnswersWithOperatorsUnset,"name"=>"Dossier sans opérateur","icon"=>"gavel","type"=>"danger"],
["data"=>$countAnswersFinanced,"name"=>"Dossier financé","icon"=>"money","type"=>"success"],
["data"=>$countAnswersFinished,"name"=>"Dossier clôturé","icon"=>"check-circle-o","type"=>"success"],
["data"=>$countAnswersRefused,"name"=>"Dossier refusé","icon"=>"thumbs-down","type"=>"danger"],
],
"tpl" => "costum.views.tpls.list"
],
"chiffresDecis" =>[
"title"=>"<i class='fa fa-2x fa-gavel'></i><br/>Decisions",
"title"=>"<i class='fa fa-2x fa-cogs'></i><br/>Travaux",
"blocksize"=>"4 col-xs-6",
"bgColor" => Ctenat::$COLORS[0],
"color" => "#fff",
"data" => [
["data"=>24,"name"=>"active Projects","icon"=>"thumbs-up","type"=>"success"],
["data"=>45,"name"=>"finished Projects","type"=>"danger","icon"=>"map-marker"],
["data"=>60,"name"=>"for open projects Tasks distribution","type"=>"danger","icon"=>"money"],
["data"=>24,"name"=>"for each worker Tasks distribution per project","icon"=>"hourglass-half"],
["data"=>"??","name"=>"for open projects Tasks distribution","type"=>"danger","icon"=>"money"],
["data"=>"??","name"=>"for each worker Tasks distribution per project","icon"=>"hourglass-half"],
],
"tpl" => "costum.views.tpls.list"
],
......@@ -152,33 +261,41 @@ class DashboardAction extends CAction
"bgColor" => Ctenat::$COLORS[0],
"color" => "#fff",
"data" => [
["data"=>24,"name"=>"for open projects Finance distribution per presta/ commons","icon"=>"thumbs-up","type"=>"success"],
["data"=>45,"name"=>"for open projects Finance distribution per task types","type"=>"danger","icon"=>"map-marker"],
["data"=>60,"name"=>"for each worker Finances distribution per project","type"=>"danger","icon"=>"money"]
["data"=>$totalProjetEnCours."€","name"=>"Budget des projets en cours","icon"=>"cogs","type"=>"success"],
["data"=>$totalProjetEnValidation."€","name"=>"Budget en cours de validation","type"=>"danger","icon"=>"gavel"],
["data"=>$totalProjetNonFinanced."€","name"=>"Budget des projets non financés","type"=>"danger","icon"=>"question-o"],
["data"=>$totalProjetFinished."€","name"=>"Budget des projets cloturés","type"=>"success","icon"=>"money"]
],
"tpl" => "costum.views.tpls.list"
],
"dossier" =>[
"title"=>"Dossier",
"data" => [32,65,36,21,10],
"lbls" => ["Dossier 0","Dossier 1","Dossier 2","Dossier 3","Dossier 4"],
"url" => "/graph/co/dash/g/graph.views.co.line"
// "dossier" =>[
// "title"=>"Dossier",
// "data" => [32,65,36,21,10],
// "lbls" => ["Dossier 0","Dossier 1","Dossier 2","Dossier 3","Dossier 4"],
// "url" => "/graph/co/dash/g/graph.views.co.line"
// ],
"financeBalance" => [
"title"=>"Finance Demandé / Financé",
"colors" => [ Ctenat::$COLORS[0],Ctenat::$COLORS[4]],
"data" => [$totalAsked,$totalFinanced],
"lbls" => ["Total Demandé","Total Financé"],
"url"=>"/graph/co/dash/g/costum.views.custom.ctenat.graph.pieMany"
],
"decision" =>[
"title"=>"Décision",
"data" => [32,344,36,21,10],
"lbls" => ["Décision 0","Décision 1","Décision 2","Décision 3","Décision 4"],
"budgetPerFinancer" => [
"title"=>"Budget par Financeur",
"data" => $pieBudgetPerFinancerData,
"lbls" => $pieBudgetPerFinancerLbl,
"url"=>"/graph/co/dash/g/costum.views.custom.ctenat.graph.pieMany"
],
"tasks" =>[
"title"=>"Travaux",
"data" => [32,65,3,21,10],
"lbls" => ["Travaux 0","Travaux 1","Travaux 2","Travaux 3","Travaux 4"],
"url" => "/graph/co/dash/g/graph.views.co.line"
"title"=>"Travaux en cours par projet" ,
"data" => $barTasksPerProjectData ,
"lbls" => $barTasksPerProjectLbl ,
"url" => "/graph/co/dash/g/graph.views.co.barMany"
],
"finance" =>[
"title"=>"Finance",
"data" => [32,65,6,1,10],
"data" => [["x"=>32,"y"=>65],["x"=>42,"y"=>58],["x"=>2,"y"=>5],["x"=>3,"y"=>6]],
"lbls" => ["Finance 0","Finance 1","Finance 2","Finance 3","Finance 4"],
"url" => "/graph/co/dash/g/graph.views.co.scatter"
],
......@@ -208,7 +325,7 @@ class DashboardAction extends CAction
"datasets"=> [
[
"data"=> $list["data"],
"backgroundColor"=> Ctenat::$COLORS
"backgroundColor"=> (isset($list["colors"])) ? $list["colors"] : Ctenat::$COLORS
]
],
"labels"=> $list["lbls"]
......
......@@ -10,6 +10,63 @@
"filters" : {
"sourceKey" : true
},
"dynForm" : {
"jsonSchema" : {
"title" : "Template config",
"type" : "object",
"properties" : {
"text1" : {
"label" : "Text 1",
"inputType" : "textarea",
"path" : "costum.text1"
},
"logoMin" : {
"label" : "Image Logo",
"inputType" : "text",
"path" : "costum.logoMin"
},
"elementBanner" : {
"label" : "Image Banière",
"inputType" : "image",
"path" : "costum.elementBanner"
},
"color1" : {
"label" : "Couleur 1",
"inputType" : "colorpicker",
"path" : "costum.colors.pink"
},
"color2" : {
"label" : "Couleur 2",
"inputType" : "colorpicker",
"path" : "costum.colors.dark"
},
"typeObj" : {
"label" : "Selectionnez les éléments qui peuvent etre ajouter",
"inputType" : "select",
"placeholder" : "---- Things that can be added ----",
"options" : {
"poi" : "Point of Interests",
"organization" : "Organization",
"project" : "projects",
"event" : "Events",
"person" : "People",
"proposal" : "Proposals"
},
"path" : "costum.slug"
},
"menuApp" : {
"label" : "Selectionnez les modules qui peuvent etre ajouter",
"inputType" : "select",
"placeholder" : "---- Active Modules ----",
"options" : {
"search" : "Search",
"agenda" : "Agenda"
},
"path" : "costum.slug"
}
}
}
},
"htmlConstruct" : {
"appRendering" : "vertical",
"redirect" : {
......@@ -75,13 +132,13 @@
"directory" : {
"results" : {
"organizations" : {
"defaultImg" : "/images/coeurNumerique/default_directory.png"
"defaultImg" : "/images/filiereCostum/no-banner.jpg"
},
"projects" : {
"defaultImg" : "/images/coeurNumerique/default_directory.png"
"defaultImg" : "/images/filiereCostum/no-banner.jpg"
},
"events" : {
"defaultImg" : "/images/coeurNumerique/default_directory.png"
"defaultImg" : "/images/filiereCostum/no-banner.jpg"
}
},
"preview" : true,
......@@ -162,7 +219,7 @@
"loader" : {
"background" : "white",
"ring1" : {
"color" : "#6abea2",
"color" : "#8ec641",
"height" : 360,
"width" : 360,
"left" : -15,
......@@ -170,7 +227,7 @@
"top" : -35
},
"ring2" : {
"color" : "#313757",
"color" : "#669933",
"height" : 350,
"width" : 350,
"left" : -10,
......@@ -180,7 +237,7 @@
},
"progress" : {
"value" : {
"background" : "#313757"
"background" : "#8ec641"
},
"bar" : {
"background" : "red"
......@@ -204,7 +261,7 @@
"display" : "none"
},
"connectBtn" : {
"background" : "#313757",
"background" : "#8ec641",
"color" : "white",
"fontSize" : 18,
"borderRadius" : 10,
......@@ -270,6 +327,7 @@
"#live" : {
"subdomainName" : "L'actualité",
"class" : "Annuaire",
"slug" : "costrasbourg2",
"formCreate" : false,
"useFilter" : false,
"viewMode" : "list"
......
//a mettre formWizard.json dans costum
//a mettre dans forms
/* 1 */
{
"id" : "deal5",
"type" : "openForm",
"name" : "Travaux",
"inputs" : {
"deal43" : {
"label" : "Suivi",
"type" : "tpls.forms.cplx.suiviFromBudget"
}
}
}
/* 2 */
{
......@@ -87,50 +72,8 @@
}
}
/* 4 */
{
"id" : "deal4",
"type" : "openForm",
"name" : "Finances",
"inputs" : {
"financement" : {
"label" : "Financement",
"type" : "tpls.forms.cplx.financementFromBudget"
},
"stepValidation" : {
"label" : "Validation",
"type" : "tpls.forms.cplx.stepValidation"
}
}
}
/* 3 */
{
"id" : "deal3",
"type" : "openForm",
"name" : "Dépense",
"inputs" : {
"deal312" : {
"label" : "Dépense éligible ",
"type" : "sectionTitle"
},
"budget" : {
"label" : "Dépenses",
"placeholder" : "Dépenses",
"type" : "tpls.forms.cplx.budget"
},
"deal3stepValidation" : {