Since: 3.0.0
Author: Jack P.
Inheritance: extends Traq\Controllers\AppController
示例#1
0
 public function __construct()
 {
     parent::__construct();
     $this->addCrumb($this->translate('custom_fields'), $this->generateUrl('project_settings_custom_fields'));
     $this->before(['edit', 'save', 'destroy'], function () {
         $this->object = CustomField::find(Request::$properties->get('id'));
         if (!$this->object || $this->object->project_id != $this->currentProject['id']) {
             return $this->show404();
         }
     });
 }
示例#2
0
 public function __construct()
 {
     parent::__construct();
     $this->title($this->translate('components'));
     $this->before(['edit', 'save', 'destroy'], function () {
         $this->object = Component::find(Request::$properties->get('id'));
         if (!$this->object || $this->object->project_id != $this->currentProject['id']) {
             return $this->show404();
         }
     });
 }
示例#3
0
 public function __construct()
 {
     parent::__construct();
     $this->title($this->translate('milestones'));
     $this->before(['edit', 'save', 'delete', 'destroy'], function () {
         $this->object = Milestone::find(Request::$properties->get('id'));
         if (!$this->object || $this->object->project_id != $this->currentProject['id']) {
             return $this->show404();
         }
     });
     $this->after('save', function () {
         if ($this->object->isBeingCompleted) {
             Timeline::milestoneCompletedEvent($this->currentUser, $this->object)->save();
         }
     });
 }
示例#4
0
文件: Members.php 项目: dasklney/traq
 public function __construct()
 {
     parent::__construct();
     $this->title($this->translate("members"));
 }
示例#5
0
 public function __construct()
 {
     parent::__construct();
     $this->title(l('custom_fields'));
 }
示例#6
0
 public function __construct()
 {
     parent::__construct();
     // Set Form::select() options
     View::set('options', array('defaults' => array(array('label' => l('allow'), 'value' => 1), array('label' => l('deny'), 'value' => 0)), 'all' => array(array('label' => l('defaults'), 'value' => -1), array('label' => l('allow'), 'value' => 1), array('label' => l('deny'), 'value' => 0))));
 }
示例#7
0
文件: Members.php 项目: nirix/traq
 public function __construct()
 {
     parent::__construct();
     $this->addCrumb($this->translate('members'), $this->generateUrl('project_settings_members'));
 }