function indexAction() { $result = DB::select()->from($this->tablename)->order_by('id')->find_all(); $this->_filter = View::widget(array(), 'Filter/Pages'); $this->_toolbar = View::widget(array(), 'Toolbar/List'); $this->_content = View::tpl(array('result' => $result, 'tpl_folder' => $this->tpl_folder, 'tablename' => $this->tablename), $this->tpl_folder . '/Index'); }
public function headerNew($array = array()) { $count = 0; $result = DB::select(array(DB::expr('COUNT(id)'), 'count'))->from('log')->where('deleted', '=', 0)->as_object()->execute()->current(); if ($result) { $count = $result->count; } $result = DB::select()->from('log')->where('deleted', '=', 0)->limit(7)->as_object()->execute(); return $this->_data['headerNew'] = View::widget(array('count' => $count, 'result' => $result), 'HeaderNew'); }
?> " target="_blank"><?php echo $obj->alias; ?> </a></td> <td width="10%"><?php echo date('d.m.Y', $obj->event_date); ?> </td> <td><?php echo $obj->main_show ? '<span style="color: green;">Да</span>' : '<span style="color: red">Нет</span>'; ?> </td> <td width="45" valign="top" class="icon-column status-column"> <?php echo \Core\View::widget(array('status' => $obj->status, 'id' => $obj->id), 'StatusList'); ?> </td> <td class="nav-column"> <ul class="table-controls"> <li> <a class="bs-tooltip dropdownToggle" href="javascript:void(0);" title="Управление"><i class="fa-cog size14"></i></a> <ul class="dropdownMenu pull-right"> <?php if (Core\User::caccess() == 'edit' or Core\User::caccess() == 'view') { ?> <li> <a href="/backend/<?php echo \Core\Route::controller(); ?> /edit/<?php