Inheritance: extends Controller
示例#1
0
 public function __construct()
 {
     Auth::requireAdmin();
     if (!$this->noun) {
         $this->noun = preg_replace('/^.+\\\\/', '', $this->entity);
     }
     if (!$this->nounPlural) {
         $this->nounPlural = $this->noun . 's';
     }
     if (!$this->displayName) {
         $this->displayName = 'Manage ' . $this->nounPlural;
     }
     parent::__construct();
 }
 public function init()
 {
     parent::init('example');
 }
 public function actionAdmin()
 {
     $model = new LengthClass('search');
     parent::admin($model, $this->modelName);
 }
示例#4
0
 public function create_post($survey_id = 0)
 {
     $_POST['survey_id'] = $survey_id;
     parent::create_post();
 }
 public function actionAdmin()
 {
     $model = new SpecialOrder('search');
     parent::admin($model, $this->modelName);
 }
 public function actionAdmin()
 {
     $model = new Returns('search');
     parent::admin($model, $this->modelName);
 }
示例#7
0
 public function init()
 {
     parent::init('role');
 }
示例#8
0
文件: Surveys.php 项目: lkho/comp3421
 public function index()
 {
     $url = site_url(uri_string() . '/response') . '/';
     $this->db->select(array('*', "concat('<a href=\"{$url}',id,'\"><button>View</button></a><a href=\"{$url}',id,'/csv\"><button>Download CSV</button></a>') as response"));
     parent::index();
 }
 public function actionAdmin()
 {
     $model = new AttributeGroup('search');
     parent::admin($model, $this->modelName);
 }
 public function init()
 {
     parent::init('privilege');
 }
 public function actionAdmin()
 {
     $model = new StockStatus('search');
     parent::admin($model, $this->modelName);
 }
示例#12
0
文件: Forum.php 项目: lkho/comp3421
 public function __construct()
 {
     parent::__construct();
     $this->item_fields = array('title' => array('label' => 'Title', 'type' => 'text', 'column' => 'title'), 'content' => array('label' => 'Content', 'type' => 'textarea', 'column' => 'Content'), 'writer_id' => array('column' => 'Writer', 'data_source' => array($this, 'get_writer')), 'time' => array('label' => 'Time', 'column' => 'Time'));
 }
 public function init()
 {
     parent::init('resource');
 }
示例#14
0
 public function init()
 {
     parent::init('faq');
 }
示例#15
0
文件: Rewards.php 项目: lkho/comp3421
 public function __construct()
 {
     parent::__construct();
     $this->fields = array('id' => array('column' => 'No.'), 'title' => array('label' => 'Title', 'type' => 'text', 'column' => 'Title'), 'content' => array('label' => 'Content', 'type' => 'textarea', 'column' => 'Content'), 'receiver_id' => array('label' => 'Receiver', 'type' => 'select', 'column' => 'Title', 'values_source' => array($this, 'get_receiver')));
 }
 public function actionAdmin()
 {
     $model = new PaymentSource('search');
     parent::admin($model, $this->modelName);
 }
 public function actionAdmin()
 {
     $model = new Manufacturer('search');
     parent::admin($model, $this->modelName);
 }
 public function actionAdmin()
 {
     $model = new Category('search');
     parent::admin($model, $this->modelName);
 }
示例#19
0
 public function __construct()
 {
     parent::__construct();
     $this->fields = array('id' => array('column' => 'ID'), 'title' => array('label' => 'Title', 'type' => 'text', 'column' => 'Title'));
 }
 public function actionAdmin()
 {
     $model = new Newsletter('search');
     parent::admin($model, $this->modelName);
 }
 public function init()
 {
     parent::init('role-resource-privilege');
 }
 public function actionAdmin()
 {
     $model = new FrontendBackgroundImages('search');
     parent::admin($model, $this->modelName);
 }
 protected function performAjaxValidationTabular($model, $form = null)
 {
     if (Yii::app()->getRequest()->getIsAjaxRequest() && ($form === null || isset($_POST['ajax']) && parent::startsWith($_POST['ajax'], $form))) {
         echo GxActiveForm::validateMultiple($model);
         Yii::app()->end();
     }
 }
示例#24
0
 public function __construct()
 {
     parent::__construct();
     $this->load->model('DBMember');
     $this->fields = array('id' => array('column' => 'ID'), 'topic' => array('label' => 'Conference topic', 'type' => 'text', 'column' => 'Topic', 'attr' => array('required' => '')), 'info' => array('label' => 'Conference Description', 'type' => 'textarea'), 'start_time' => array('label' => 'Start time', 'type' => 'datetime-local', 'column' => 'Start', 'attr' => array('required' => '')), 'end_time' => array('label' => 'End time', 'type' => 'datetime-local', 'column' => 'End', 'attr' => array('required' => '')), 'speaker' => array('label' => 'Speaker', 'type' => 'select', 'column' => 'Speaker', 'values_source' => array($this, 'get_speakers'), 'attr' => array('required' => ''), 'data_source' => array($this, 'get_speaker')), 'venue' => array('label' => 'Venue', 'type' => 'text', 'column' => 'Venue'), 'venue_lat' => array('label' => 'Location (lat)', 'type' => 'text', 'attr' => array('required' => '')), 'venue_lng' => array('label' => 'Location (Lng)', 'type' => 'text', 'attr' => array('required' => '')), 'venue_map' => array('label' => 'Pick the location of the venue on the map<br>or type it in the box above', 'type' => 'map', 'lat' => 'venue_lat', 'lng' => 'venue_lng', 'attr' => array('style' => 'width: 450px; height: 300px')));
 }