From dd88b3a70b37f4d8cf3633eb14d68fbe924ac66a Mon Sep 17 00:00:00 2001 From: Bouboule Date: Wed, 14 Mar 2018 17:31:43 +0100 Subject: [PATCH] trad create ressource and news scope impact rework clean and easier --- views/news/formCreateNewsCO2.php | 165 +++++++++++++++++++++++++------ views/translation/trad.php | 3 + 2 files changed, 138 insertions(+), 30 deletions(-) diff --git a/views/news/formCreateNewsCO2.php b/views/news/formCreateNewsCO2.php index e4ce4d9f..ef149b10 100755 --- a/views/news/formCreateNewsCO2.php +++ b/views/news/formCreateNewsCO2.php @@ -172,8 +172,102 @@ .updateMention .mentions-input-box .mentions{ padding:10px !important; } + array( + "public"=>array( + "icon"=>"globe", + "label"=>ucfirst(Yii::t("common", "public")), + "explain"=>Yii::t("news","Write a public message visible in live on selected places") + ), + "restricted"=>array( + "icon"=>"rss", + "label"=>ucfirst(Yii::t("common", "followers")), + "explain"=>Yii::t("news", "Posted on followers and members wall and visible to all on this wall")//Visible to all on this wall and published on community's network", + ), + "private"=>array( + "icon"=>"users", + "label"=>ucfirst(Yii::t("common", "members")), + "explain"=>Yii::t("news", "Posted on members wall and visible only for them") + ), + "init"=>array( + "admin"=>"restricted", + "noadmin"=>"private" + ) + ), + Project::COLLECTION => array( + "public"=>array( + "icon"=>"globe", + "label"=>ucfirst(Yii::t("common", "public")), + "explain"=>Yii::t("news","Write a public message visible in live on selected places") + ), + "restricted"=>array( + "icon"=>"rss", + "label"=>ucfirst(Yii::t("common", "followers")), + "explain"=>Yii::t("news", "Posted on followers and contributors wall and visible to all on this wall") + ), + "private"=>array( + "icon"=>"users", + "label"=>ucfirst(Yii::t("common", "contributors")), + "explain"=>Yii::t("news", "Posted on contributors wall and visible only for them") + ), + "init"=>array( + "admin"=>"restricted", + "noadmin"=>"private" + ) + ), + Event::COLLECTION => array( + "public"=>array( + "icon"=>"globe", + "label"=>ucfirst(Yii::t("common", "public")), + "explain"=>Yii::t("news","Write a public message visible in live on selected places") + ), + "restricted"=>array( + "icon"=>"rss", + "label"=>ucfirst(Yii::t("common", "attendees")), + "explain"=>Yii::t("news", "Posted on attendees wall and visible to all on this wall"), + ), + "private"=>array( + "icon"=>"users", + "label"=>ucfirst(Yii::t("common", "admins")), + "explain"=>Yii::t("news","Posted on administrators wall and visible only for them"), + ), + "init"=>array( + "admin"=>"restricted", + "noadmin"=>"private" + ) + ), + Person::COLLECTION => array( + "public"=>array( + "icon"=>"globe", + "label"=>ucfirst(Yii::t("common", "public")), + "explain"=>Yii::t("news","Write a public message visible in live on selected places") + ), + "restricted"=>array( + "icon"=>"rss", + "label"=>ucfirst(Yii::t("common", "followers")), + "explain"=>Yii::t("news", "Posted on followers wall and visible to all on this wall"), + ), + "private"=>array( + "icon"=>"lock", + "label"=>ucfirst(Yii::t("common", "private")), + "explain"=>Yii::t("news","Visible only to me"), + ), + "init"=>array( + "admin"=>"restricted", + "noadmin"=>"private" + ) + ), + "city" => array( + "public"=>array( + "icon"=>"globe", + "label"=>ucfirst(Yii::t("common", "public")), + "explain"=>Yii::t("news","Write a public message visible in live on selected places"), + ) + ) + ); $isLive = isset($_GET["isLive"]) ? true : false; $contextName = ""; $contextIcon = "bookmark fa-rotate-270"; @@ -184,13 +278,13 @@ $contextName = $parent["name"]; $contextIcon = "users"; $contextTitle = Yii::t("common","Participants"); - $restricted = Yii::t("common","Visible to all on this wall and published on community's network"); - $titleRestricted = "Restreint"; - $private = Yii::t("common","Visible only to the members"); - $titlePrivate = "Privé"; - $scopeBegin= ucfirst(Yii::t("common", "followers")); - $public = true; - $iconBegin= "connectdevelop"; + //$restricted = Yii::t("common","Visible to all on this wall and published on community's network"); + //$titleRestricted = "Restreint"; + //$private = Yii::t("common","Visible only to the members"); + //$titlePrivate = "Privé"; + //$scopeBegin= ucfirst(Yii::t("common", "followers")); + //$public = true; + //$iconBegin= "connectdevelop"; $headerName= "Journal de l'organisation";//.$contextName; $topTitle= "Journal de l'organisation";//.$contextName; if(@$canManageNews && $canManageNews==true) @@ -208,10 +302,10 @@ $contextIcon = " "; $contextTitle = Yii::t("common", "DIRECTORY of")." ".$contextName; if(@Yii::app()->session["userId"] && $contextParentId==Yii::app()->session["userId"]){ - $restricted = Yii::t("common","Visible to all on my wall and published on my network"); - $private = Yii::t("common","Visible only to me"); + // $restricted = Yii::t("common","Visible to all on my wall and published on my network"); + // $private = Yii::t("common","Visible only to me"); $textForm = Yii::t("common","Published a message in your wall for your network"); - $public = true; + // $public = true; } if(Yii::app()->session["userId"] ==$contextParentId){ $headerName= "Mon journal"; @@ -226,22 +320,22 @@ $shortName=explode(" ", $parent["name"]); //$headerName= "Bonjour ".addslashes($shortName[0]).", l'actu de votre réseau"; $headerName= "L'actu de votre réseau"; - $restricted = Yii::t("common","Visible to all on my wall and published on my network"); - $private = Yii::t("common","Visible only to me"); + //$restricted = Yii::t("common","Visible to all on my wall and published on my network"); + //$private = Yii::t("common","Visible only to me"); $textForm = Yii::t("common","Published a message in your wall for your network"); } - $scopeBegin= ucfirst(Yii::t("common", "followers")); - $iconBegin= "connectdevelop"; + //$scopeBegin= ucfirst(Yii::t("common", "followers")); + //$iconBegin= "connectdevelop"; } else if( isset($type) && $type == Project::COLLECTION && isset($parent) ){ $contextName = $parent["name"]; $contextIcon = "lightbulb-o"; $contextTitle = Yii::t("common", "Contributors of project"); - $restricted = Yii::t("common","Visible to all on this wall and published on community's network"); - $private = Yii::t("common","Visible only to the project's contributors"); - $scopeBegin= ucfirst(Yii::t("common", "followers")); - $iconBegin= "connectdevelop"; - $public = true; + //$restricted = Yii::t("common","Visible to all on this wall and published on community's network"); + //$private = Yii::t("common","Visible only to the project's contributors"); + //$scopeBegin= ucfirst(Yii::t("common", "followers")); + //$iconBegin= "connectdevelop"; + //$public = true; $headerName= "Journal du projet";//.$contextName; $topTitle = "Journal du projet";//.$contextName; if(@$canManageNews && $canManageNews==true) @@ -253,12 +347,12 @@ $contextName = $parent["name"]; $contextIcon = "calendar"; $contextTitle = Yii::t("common", "Contributors of event"); - $restricted = Yii::t("common","Visible to all on this wall and published on community's network"); - $scopeBegin= ucfirst(Yii::t("common", "followers")); - $iconBegin= "connectdevelop"; + //$restricted = Yii::t("common","Visible to all on this wall and published on community's network"); + //$scopeBegin= ucfirst(Yii::t("common", "followers")); + //$iconBegin= "connectdevelop"; $headerName= "Journal de l'événement";//.$contextName; $topTitle = "Journal de l'événement";//.$contextName; - $public = true; + //$public = true; //if(@$canManageNews && $canManageNews==true) $textForm = Yii::t("common","Post a message in the wall of"). " ".$contextName.""; @@ -271,20 +365,20 @@ $contextName = Yii::t("common","City")." : ".$city["name"]; $contextIcon = "university"; $contextTitle = Yii::t("common", "DIRECTORY Local network of")." ".$city["name"]; - $scopeBegin= "Public"; - $iconBegin= "globe"; + //$scopeBegin= "Public"; + //$iconBegin= "globe"; $headerName= "Actualités de ".$city["name"]; $topTitle = ""; //$headerName; $textForm = Yii::t("common","Write a idea, a message in the city wall of")." ".$contextName; } - else if( isset($type) && $type == "pixels"){ + /*else if( isset($type) && $type == "pixels"){ //$contextName = " Signaler un bug"; //$contextTitle = Yii::t("common", "Contributors of project"); $headerName= " La foire aux bugs"; $topTitle = " La foire aux bugs"; $textForm = Yii::t("common","Write a bug or an idea to improve the development of communecter"); - } + }*/ $imgProfil = ""; if($contextParentType != "city"){ @@ -366,9 +460,20 @@ -->