Commit 2d5af28f authored by Anatole Rakotoson's avatar Anatole Rakotoson

sommom organisme

parent fe480ca5
...@@ -20,9 +20,10 @@ ...@@ -20,9 +20,10 @@
} }
} }
if (isset($this->costum["contextType"]) and isset($this->costum["contextId"])) { if (isset($this->costum["contextId"])) {
//$communityLinks = Element::getByTypeAndId($this->costum["contextType"],$this->costum["contextId"]);
$communityLinks = Element::getByTypeAndId($this->costum["contextType"],$this->costum["contextId"]); $communityLinks = Organization::getById($this->costum["contextId"]);
} }
...@@ -30,6 +31,7 @@ ...@@ -30,6 +31,7 @@
if (isset($communityLinks["links"]["members"])) { if (isset($communityLinks["links"]["members"])) {
foreach ($communityLinks["links"]["members"] as $memberId => $memberValue) { foreach ($communityLinks["links"]["members"] as $memberId => $memberValue) {
if(isset(Yii::app()->session["userId"])){ if(isset(Yii::app()->session["userId"])){
var_dump(Yii::app()->session["userId"]);
if($memberId != ""){ if($memberId != ""){
if($memberId == Yii::app()->session["userId"]){ if($memberId == Yii::app()->session["userId"]){
if(isset($memberValue["roles"])){ if(isset($memberValue["roles"])){
...@@ -163,7 +165,7 @@ ...@@ -163,7 +165,7 @@
foreach ($properties as $i => $inp) { foreach ($properties as $i => $inp) {
if (isset($inp["label"])){ if (isset($inp["label"])){
if ($inp["label"] == "contact") { if ($inp["label"] == "contact") {
if($canEditForm || $partenaire){ if($adminStatus or $partenaire){
echo "<th>".$inp["label"]."</th>"; echo "<th>".$inp["label"]."</th>";
} }
} else { } else {
...@@ -184,7 +186,7 @@ ...@@ -184,7 +186,7 @@
echo "<tr id='".$kunik.$q."' class='".$kunik."Line'>"; echo "<tr id='".$kunik.$q."' class='".$kunik."Line'>";
foreach ($properties as $i => $inp) { foreach ($properties as $i => $inp) {
if($i == "contact"){ if($i == "contact"){
if($canEditForm || $partenaire){ if($adminStatus || $partenaire){
echo "<th>".$a[$i]."</th>"; echo "<th>".$a[$i]."</th>";
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment