/**
  * @param bool $unlinked
  * @return ArrayList
  */
 public function Breadcrumbs($unlinked = false)
 {
     $items = parent::Breadcrumbs($unlinked);
     $items[0]->Link = singleton('CloudinaryAdmin')->Link('show');
     $items->push(new ArrayData(array('Title' => _t('CloudinaryAdmin.Upload', 'Upload'), 'Link' => $this->Link())));
     return $items;
 }
 /**
  * @return ArrayList
  */
 public function Breadcrumbs($unlinked = false)
 {
     $items = parent::Breadcrumbs($unlinked);
     // The root element should explicitly point to the root node.
     $items[0]->Link = Controller::join_links(singleton('AssetAdmin')->Link('show'), 0);
     // Enforce linkage of hierarchy to AssetAdmin
     foreach ($items as $item) {
         $baselink = $this->Link('show');
         if (strpos($item->Link, $baselink) !== false) {
             $item->Link = str_replace($baselink, singleton('AssetAdmin')->Link('show'), $item->Link);
         }
     }
     $items->push(new ArrayData(array('Title' => _t('AssetAdmin.Upload', 'Upload'), 'Link' => $this->Link())));
     return $items;
 }
 /**
  * @return ArrayList
  */
 public function Breadcrumbs($unlinked = false)
 {
     $items = parent::Breadcrumbs($unlinked);
     // The root element should point to the pages tree view,
     // rather than the actual controller (which would just show an empty edit form)
     $defaultTitle = self::menu_title_for_class('ContentModulesController');
     $items[0]->Title = _t("{$this->class}.MENUTITLE", $defaultTitle);
     $items[0]->Link = singleton('ContentModulesController')->Link();
     return $items;
 }
Пример #4
0
 /**
  * @return ArrayList
  */
 public function Breadcrumbs($unlinked = false)
 {
     $items = parent::Breadcrumbs($unlinked);
     // Show the class name rather than ModelAdmin title as root node
     $models = $this->getManagedModels();
     $params = $this->request->getVars();
     if (isset($params['url'])) {
         unset($params['url']);
     }
     $items[0]->Title = $models[$this->modelClass]['title'];
     $items[0]->Link = Controller::join_links($this->Link($this->sanitiseClassName($this->modelClass)), '?' . http_build_query($params));
     return $items;
 }
 /**
  * Returns the Breadcrumbs for the ReportAdmin
  * @return ArrayList
  */
 public function Breadcrumbs($unlinked = false)
 {
     $items = parent::Breadcrumbs($unlinked);
     // The root element should explicitly point to the root node.
     // Uses session state for current record otherwise.
     $items[0]->Link = singleton('ReportAdmin')->Link();
     if ($this->reportObject) {
         //build breadcrumb trail to the current report
         $items->push(new ArrayData(array('Title' => $this->reportObject->title(), 'Link' => Controller::join_links($this->Link(), '?' . http_build_query(array('q' => $this->request->requestVar('q')))))));
     }
     return $items;
 }
Пример #6
0
 /**
  * @return ArrayList
  */
 public function Breadcrumbs($unlinked = false)
 {
     $items = parent::Breadcrumbs($unlinked);
     // Show the class name rather than ModelAdmin title as root node
     $models = $this->getManagedModels();
     $items[0]->Title = $models[$this->modelClass]['title'];
     $items[0]->Link = $this->Link($this->sanitiseClassName($this->modelClass));
     return $items;
 }
Пример #7
0
 /**
  * @param bool $unlinked
  * @return ArrayList
  */
 public function Breadcrumbs($unlinked = false)
 {
     $items = parent::Breadcrumbs($unlinked);
     // The root element should explicitly point to the root node.
     // Uses session state for current record otherwise.
     $items[0]->Link = Controller::join_links(singleton('AssetAdmin')->Link('show'), 0);
     // If a search is in progress, don't show the path
     if ($this->getRequest()->requestVar('q')) {
         $items = $items->limit(1);
         $items->push(new ArrayData(array('Title' => _t('LeftAndMain.SearchResults', 'Search Results'), 'Link' => Controller::join_links($this->Link(), '?' . http_build_query(array('q' => $this->getRequest()->requestVar('q')))))));
     }
     // If we're adding a folder, note that in breadcrumbs as well
     if ($this->getRequest()->param('Action') == 'addfolder') {
         $items->push(new ArrayData(array('Title' => _t('Folder.AddFolderButton', 'Add folder'), 'Link' => false)));
     }
     return $items;
 }
 public function Breadcrumbs($unlinked = false)
 {
     $crumbs = parent::Breadcrumbs($unlinked);
     // Name root breadcrumb based on which record is edited,
     // which can only be determined by looking for the fieldname of the GridField.
     // Note: Titles should be same titles as tabs in RootForm().
     $params = $this->getRequest()->allParams();
     if (isset($params['FieldName'])) {
         // TODO FieldName param gets overwritten by nested GridFields,
         // so shows "Members" rather than "Groups" for the following URL:
         // admin/security/EditForm/field/Groups/item/2/ItemEditForm/field/Members/item/1/edit
         $firstCrumb = $crumbs->shift();
         if ($params['FieldName'] == 'Groups') {
             $crumbs->unshift(new ArrayData(array('Title' => singleton('Group')->i18n_plural_name(), 'Link' => $this->Link('groups'))));
         } elseif ($params['FieldName'] == 'Users') {
             $crumbs->unshift(new ArrayData(array('Title' => _t('SecurityAdmin.Users', 'Users'), 'Link' => $this->Link('users'))));
         } elseif ($params['FieldName'] == 'Roles') {
             $crumbs->unshift(new ArrayData(array('Title' => _t('SecurityAdmin.TABROLES', 'Roles'), 'Link' => $this->Link('roles'))));
         }
         $crumbs->unshift($firstCrumb);
     }
     return $crumbs;
 }
 public function Breadcrumbs($unlinked = false)
 {
     return parent::Breadcrumbs($unlinked = false);
 }
Пример #10
0
	public function Breadcrumbs($unlinked = false) {
		$crumbs = parent::Breadcrumbs($unlinked);

		// Name root breadcrumb based on which record is edited,
		// which can only be determined by looking for the fieldname of the GridField.
		// Note: Titles should be same titles as tabs in RootForm().
		$params = $this->request->allParams();
		if(isset($params['FieldName'])) {
			if($params['FieldName'] == 'Groups') {
				$crumbs->First()->Title = singleton('Group')->plural_name();
			} elseif($params['FieldName'] == 'Users') {
				$crumbs->First()->Title = _t('SecurityAdmin.Users', 'Users');
			} elseif($params['FieldName'] == 'Roles') {
				$crumbs->First()->Title = _t('SecurityAdmin.TABROLES', 'Roles');
			}
		} else {
			// Avoid writing "Users" (the controller menu title) as a breadcrumb
			// because its confusing and inaccurate.
			$crumbs = new ArrayList();
		}

		return $crumbs;
	}
 /**
  * Only show first element, as the profile form is limited to editing
  * the current member it doesn't make much sense to show the member name
  * in the breadcrumbs.
  */
 public function Breadcrumbs($unlinked = false)
 {
     $items = parent::Breadcrumbs($unlinked);
     return new ArrayList(array($items[0]));
 }
 public function Breadcrumbs($unlinked = false)
 {
     $sng = singleton('KapostAdmin');
     $crumbs = new ArrayList(array(new ArrayData(array('Title' => $sng->SectionTitle(), 'Link' => $unlinked ? false : $sng->Link()))));
     $crumbs->merge(parent::Breadcrumbs($unlinked));
     return $crumbs;
 }
Пример #13
0
 /**
  * @param bool $unlinked
  * @return ArrayList
  */
 public function Breadcrumbs($unlinked = false)
 {
     $items = parent::Breadcrumbs($unlinked);
     if ($items->count() > 1) {
         // Specific to the SiteTree admin section, we never show the cms section and current
         // page in the same breadcrumbs block.
         $items->shift();
     }
     return $items;
 }
Пример #14
0
	/**
	 * @return ArrayList
	 */
	public function Breadcrumbs($unlinked = false) {
		$items = parent::Breadcrumbs($unlinked);

		// Show the class name rather than ModelAdmin title as root node
		$models = $this->getManagedModels();
		$modelSpec = ArrayLib::is_associative($models) ? $models[$this->modelClass] : null;
		if(is_array($modelSpec) && isset($modelSpec['title'])) {
			$items[0]->Title = $modelSpec['title'];
		} else {
			$items[0]->Title = singleton($this->modelClass)->i18n_singular_name();
		}
		
		return $items;
	}
Пример #15
0
 /**
  * Returns the Breadcrumbs for the LiveChatAdmin
  * @return ArrayList
  */
 public function Breadcrumbs($unlinked = false)
 {
     return new ArrayList(array(new ArrayData(array('Title' => 'live chat', 'Link' => '/admin/' . self::$tree_class))));
     return parent::Breadcrumbs($unlinked);
 }