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(); } }); }
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(); } }); }
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(); } }); }
public function __construct() { parent::__construct(); $this->title($this->translate("members")); }
public function __construct() { parent::__construct(); $this->title(l('custom_fields')); }
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)))); }
public function __construct() { parent::__construct(); $this->addCrumb($this->translate('members'), $this->generateUrl('project_settings_members')); }