/* ********** PEOPLE ****************** */ if (isset($people)) { foreach ($people as $e) { buildDirectoryLine($e, Person::COLLECTION, Person::CONTROLLER, Person::ICON, $this->module->id, $tags, $scopes); } } /* ************ EVENTS ************************ */ if (isset($events)) { foreach ($events as $e) { buildDirectoryLine($e, Event::COLLECTION, Event::CONTROLLER, Event::ICON, $this->module->id, $tags, $scopes); } } /* ************ PROJECTS **************** */ if (count($projects)) { foreach ($projects as $e) { buildDirectoryLine($e, Project::COLLECTION, Project::CONTROLLER, Project::ICON, $this->module->id, $tags, $scopes); } } function buildDirectoryLine($e, $collection, $type, $icon, $moduleId, &$tags, &$scopes) { $actions = ""; $classes = ""; /* ************************************** * ADMIN STUFF ***************************************** */ if (Yii::app()->session["userIsAdmin"] && $type == Person::CONTROLLER) { //Activated if (@$e["roles"]["tobeactivated"]) { $classes .= "tobeactivated"; $actions .= '<li><a href="javascript:;" data-id="' . $e["_id"] . '" data-type="' . $type . '" class="margin-right-5 validateThisBtn"><span class="fa-stack"><i class="fa fa-user fa-stack-1x"></i><i class="fa fa-check fa-stack-1x stack-right-bottom text-danger"></i></span> Validate </a></li>'; }
/* ********** PEOPLE ****************** */ if (isset($people)) { foreach ($people as $e) { buildDirectoryLine($e, Person::COLLECTION, Person::CONTROLLER, Person::ICON, $this->module->id, $tags, $scopes, $tagsHTMLFull, $scopesHTMLFull, $manage); } } /* ************ EVENTS ************************ */ if (isset($events)) { foreach ($events as $e) { buildDirectoryLine($e, Event::COLLECTION, Event::CONTROLLER, Event::ICON, $this->module->id, $tags, $scopes, $tagsHTMLFull, $scopesHTMLFull, $manage = null); } } /* ************ PROJECTS **************** */ if (count($projects)) { foreach ($projects as $e) { buildDirectoryLine($e, Project::COLLECTION, Project::CONTROLLER, Project::ICON, $this->module->id, $tags, $scopes, $tagsHTMLFull, $scopesHTMLFull, $manage = null); } } /* <li class="col-md-3 col-sm-6 col-xs-12 mix kiki gallery-img" data-cat="1" id=""> <div class="portfolio-item"> <a class="thumb-info" href="" data-title="Website" data-lightbox="all"> <i class="fa fa-user"></i> <span class="thumb-info-title">Tihdfhd fghdfh dg dfgh tle</span> </a> <br/><br/><br/> <div class="chkbox"></div> <div class="tools tools-bottom"> <a href="#" class="btnRemove" data-id="" data-name="" data-key="" > <i class="fa fa-trash-o"></i> </a>