protected function _draw_field($obj) { $route_str = Extasy::obj_placeholders($obj, $this->_route_str); $title = Extasy::obj_placeholders($obj, $this->_title); $alternative = Extasy::obj_placeholders($obj, $this->_alternative); $color = Extasy::obj_placeholders($obj, $this->_color); $attributes = array(); if ($this->_confirm) { $attributes['onclick'] = 'javascript: return confirm("' . Extasy::obj_placeholders($obj, $this->_confirm) . '")'; } $attributes['class'] = 'btn btn-default'; if ($color == 'red') { $attributes['class'] = 'btn btn-danger'; } if ($color == 'green') { $attributes['class'] = 'btn btn-success'; } if ($color == 'blue') { $attributes['class'] = 'btn btn-primary'; } $attributes['data-toggle'] = 'tooltip'; $attributes['data-placement'] = 'top'; $attributes['title'] = $alternative; return '<td align="' . $this->_align . '">' . Extasy_Html::link_to_route($route_str, $title, $attributes) . '</td>'; }
protected function _field($obj) { $editRoute = Extasy::obj_placeholders($obj, $this->_route_str); $editUrl = Extasy_Html::link_to_route($editRoute, $obj->name); $externalRoute = Extasy::obj_placeholders($obj, $this->_external_url); $externalIcon = ' <i class="fa fa-share-square"></i>'; $externalUrl = Extasy_Html::link_to_route($externalRoute, $externalIcon, array('target' => '_blank', 'class' => 'title-tooltip noborder', 'title' => 'Перейти на страницу сайта')); return View::factory($this->_field_template, array('align' => $this->_align, 'value' => $editUrl . $externalUrl)); }
protected function _field($obj) { $model = $this->_model; $field = $this->_field; $name = $obj->{$model}->{$field}; $externalRoute = Extasy::obj_placeholders($obj, $this->_external_url); $externalUrl = Extasy_Html::link_to_route($externalRoute, $name, array('target' => '_blank', 'class' => 'title-tooltip', 'title' => 'Перейти на страницу сайта')); return View::factory($this->_field_template, array('align' => $this->_align, 'value' => $externalUrl)); }
protected function _field($obj) { $editRoute = Extasy::obj_placeholders($obj, $this->_route_str); $editUrl = Extasy_Html::link_to_route($editRoute, 'Редактировать', array('class' => 'btn')); return View::factory($this->_field_template, array('align' => $this->_align, 'value' => substr(strip_tags($obj[$this->get_name()]), 0, 250) . '... ' . '<a href="#myModal" data-toggle="modal"><i class="fa fa-eye"></i></a> <div style="margin-top: 25px;" id="myModal" class="modal fade" tabindex="1" role="dialog" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-body"> ' . $obj[$this->get_name()] . ' </div> <div class="modal-footer">' . $editUrl . ' <button class="btn" data-dismiss="modal" aria-hidden="true">Закрыть</button> </div> </div> </div> </div>')); }
public static function crumbs(array $crumbs = array()) { $links = array(); $crumbs_out = array(); foreach ($crumbs as $crumb) { if ($link = Extasy_Html::link_to_route($crumb['route'], $crumb['title'])) { $links[] = $link; $crumbs_out[] = $crumb; } } return View::factory('cms/crumbs', array('links' => $links, 'crumbs' => $crumbs_out)); }
<b class="caret"></b></a> <ul class="dropdown-menu"> <li><?php echo Extasy_Html::link_to_route('admin-auth:change_password', 'Изменить пароль'); ?> </li> <li><?php echo Extasy_Html::link_to_route('admin-auth:logout', 'Выйти'); ?> </li> </ul> <?php } else { ?> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Привет, Гость <b class="caret"></b></a> <ul class="dropdown-menu"> <li><?php echo Extasy_Html::link_to_route('admin-auth:login', 'Войти'); ?> </li> <li><?php echo Extasy_Html::link_to_route('admin-auth:reset_password_step_1', 'Забыл пароль'); ?> </li> </ul> <?php } ?> </li> </ul>