public function godfathered() { $page = $this->get->page; Phalanx::loadClasses('Godfather'); $response = Godfather::get_detailed(); $result = array(); echo '<section id="gatinhos-para-adocao"><ul class="row aug_grey"> <h4 class="bold upper aug_blue p-10">Gatinhos para apadrinhamento</h4>'; //ORIGINAL foreach ($response as $item) { $item->godfathers_list = Godfather::get_names(unserialize($item->godfathers_list)); $godfathers = "<br><strong>Meus padrinhos</strong>"; $godfathers .= "<ul>"; foreach ($item->godfathers_list as $gf) { $godfathers .= "<li style='display:inline-block; width:50%;'>- " . $gf->nome . "</li>"; } $godfathers .= "</ul>"; $html = '<li id="gato' . $item->id . '" class="modal"> <div class="modal-content"><article class="p-20"> <h4 class="text_15 aug_blue">' . $item->name . ' <a href="#!" class="modal-action modal-close right"><i class="icon-purple ic-close-circle"></i></a></h4> <p>' . strip_tags($item->godfather_description) . '</p>'; if ($item->godfathers_list < 1) { $html .= '<p><br><br><img src="' . HOST . '/img/sadcat.png" width="100" height="71" style="width:auto; margin-right:30px;" class="left" /><br>Ainda não tenho padrinhos. <br>'; } else { $html .= $godfathers . '<br><br>'; } $html .= '<a href="' . HOST . '/apadrinhamento/cadastro/#' . $item->name . '" class="aug_purple"> Clique aqui para apadrinhar ' . $item->name . '</a>.<br><br><br></p></article></div> </li>'; $html .= '<li class="col s12 m6 l4"> <div class="card border_b_blue card-wrapper max-height-godfather"> <div class="card-image card-image-godfather-large waves-effect waves-block waves-light"> <div class="fix_image_card"> <a class="modal-trigger" style="display:block;position: relative;bottom: 0;" href="#gato' . $item->id . '"><img src="' . MEDIA_DIR . "uploads/cats/" . $item->picture . '" /></a>'; if ($item->godfathers_list < 1) { $html .= "<div class=\"no_godfather aug_blue_bg white-text bold upper text-right p-2\">Sem padrinhos</div>"; } $html .= ' </div> </div> <div class="card-content"> <span class="card-title white aug_blue bold upper truncate" style="text-shadow: none; width:100%"><a class="modal-trigger aug_blue" style="display:block;position: relative;bottom: 0;" href="#gato' . $item->id . '">' . $item->name . '<i class="material-icons right" style="position: absolute; left: 92%;top: 12px;">more_vert</i></a></span> </div> </div> </li>'; echo $html; } echo '</ul></section>'; }
public function godfathered() { $page = $this->get->page; Phalanx::loadClasses('Godfather'); $response = Godfather::get_detailed(); $result = array(); echo '<section id="gatinhos-para-adocao"><ul class="row aug_grey"> <h4 class="bold upper aug_blue p-10">Gatinhos para apadrinhamento</h4>'; //ORIGINAL foreach ($response as $item) { $item->godfathers_list = Godfather::get_names(unserialize($item->godfathers_list)); $godfathers = "<br><strong>Meus padrinhos</strong>"; $godfathers .= "<ul>"; foreach ($item->godfathers_list as $gf) { $godfathers .= "<li style='display:inline-block; width:50%;'>- " . $gf->nome . "</li>"; } $godfathers .= "</ul>"; /* // header $html = "<li class=\" col s12 m6 l4 sub-section cat tooltip godfathered\" "; ($item->godfather_description) ? $html .= "" : $html .= ""; $html .= " ><h4>".($item->name)."</h4>"; $html .= "<img src=\"".MEDIA_DIR."uploads/cats/".$item->picture."\" />"; // image if ($item->special == 1) $html .= "<span class=\"special_cat\">Especial</span>"; if ($item->godfathers_list < 1) $html .= "<span class=\"nogodfather_cat\"></span>"; // description if($item->godfather_description) $item->godfather_description = substr($item->godfather_description, 0, 300); $html .= "<span>".$this->closeUnclosedTags(utf8_encode($item->godfather_description))."</span>"; // godfather $html .= "<h6 style=\"cursor: pointer;\" title=\"".html_entity_decode($godfathers)."\">Meus padrinhos »</h6>"; */ $html = '<li class="col s12 m6 l4"> <div class="card border_b_blue card-wrapper max-height-godfather"> <div class="card-image card-image-godfather-large waves-effect waves-block waves-light"> <div class="fix_image_card"> <img src="' . MEDIA_DIR . "uploads/cats/" . $item->picture . '" class="activator" />'; if ($item->godfathers_list < 1) { $html .= "<div class=\"no_godfather aug_blue_bg white-text bold upper text-right p-2\">Sem padrinhos</div>"; } $html .= ' </div> </div> <div class="card-content"> <span class="card-title activator white aug_blue bold upper truncate" style="text-shadow: none;">' . $item->name . '<i class="material-icons right" style="position: absolute; right: 15px;">more_vert</i></span> </div> <div class="card-content hide-on-large-only" style="height: 130px"> ' . strip_tags($item->godfather_description) . ' </div> <div class="card-reveal"><br><br> <span class="card-title white aug_blue" style="text-shadow: none;">' . $item->name . ' <i class="gray-text material-icons right">close</i></span><br> '; $html .= '<p style="width:90%" class="hide-on-med-only hide-on-small-only">' . strip_tags($item->godfather_description) . '</p> ' . $godfathers; if ($item->godfathers_list < 1) { $html .= '<span class=\\"no_godfathers\\">Sem padrinhos</span> </div> </div> </li>'; } echo $html; } echo '</ul></section>'; }