コード例 #1
0
 /**
  * Gets the actions for the bottom of the panel
  *
  * @return FieldList
  */
 public function getSecondaryActions()
 {
     if (!$this->SubjectPageID || !$this->GridFieldName) {
         return false;
     }
     $actions = parent::getPrimaryActions();
     $actions->push(DashboardPanelAction::create($this->ViewAllLink(), _t('Dashboard.VIEWALLGRIDFIELD', 'View all')));
     return $actions;
 }
コード例 #2
0
 /**
  * Gets the actions for the bottom of the panel
  *
  * @return FieldList
  */
 public function getSecondaryActions()
 {
     if (!$this->ModelAdminClass || !$this->ModelAdminModel) {
         return false;
     }
     $actions = parent::getPrimaryActions();
     $actions->push(DashboardPanelAction::create($this->ViewAllLink(), sprintf(_t('Dashboard.VIEWALL', 'View all %s'), $this->PluralModelName())));
     return $actions;
 }
コード例 #3
0
 public function getPrimaryActions()
 {
     if (!$this->Subject || !$this->ParentID) {
         return false;
     }
     $actions = parent::getPrimaryActions();
     $actions->push(DashboardPanelAction::create($this->CreatePageLink(), sprintf(_t('Dashboard.CREATENEW', 'Create new %s'), $this->SubjectSingularName()), "good"));
     return $actions;
 }