Example #1
0
 static function getIndexManageEntryList($pluginId, $entryLabel = null, $entryTitle = null, $entryIcon = null, $params = null)
 {
     $entryLabel = self::isset_or($entryLabel, "p_{$pluginId}_mlink");
     $entryTitle = self::isset_or($entryTitle, "p_{$pluginId}_managetitle");
     $entryIcon = self::isset_or($entryIcon, "/images/{$pluginId}/logo.png");
     $params = self::isset_or($params, array('controller' => 'config', 'action' => 'index', 'key' => $pluginId));
     $link = new X_Page_Item_ManageLink($pluginId, X_Env::_($entryLabel));
     $link->setTitle(X_Env::_($entryTitle))->setIcon($entryIcon)->setLink($params, 'default', true);
     return new X_Page_ItemList_ManageLink(array($link));
 }
 /**
  * Show the dashboard
  */
 public function indexAction()
 {
     /* @var $messages X_Page_ItemList_Message */
     $messages = new X_Page_ItemList_Message();
     $messages->merge(X_VlcShares_Plugins::broker()->getIndexMessages($this));
     $fm = $this->_helper->flashMessenger->getMessages();
     foreach ($fm as $i => $m) {
         $_m = new X_Page_Item_Message("fm-{$i}", '');
         if (is_array($m)) {
             if (array_key_exists('type', $m)) {
                 $_m->setType($m['type']);
             }
             if (array_key_exists('text', $m)) {
                 $_m->setLabel($m['text']);
             }
         } else {
             $_m->setType(X_Page_Item_Message::TYPE_WARNING)->setLabel((string) $m);
         }
         $messages->append($_m);
     }
     $news = X_VlcShares_Plugins::broker()->getIndexNews($this);
     $manageLinks = new X_Page_ItemList_ManageLink();
     $item = new X_Page_Item_ManageLink('core-manage-browse', X_Env::_('manage_goto_browsetitle'));
     $item->setTitle(X_Env::_('manage_goto_browse'))->setIcon('/images/manage/browse.png')->setLink(array('controller' => 'index', 'action' => 'collections'), 'default', true);
     $manageLinks->append($item);
     $item = new X_Page_Item_ManageLink('core-manage-test', X_Env::_('manage_goto_testtitle'));
     $item->setTitle(X_Env::_('manage_goto_test'))->setIcon('/images/manage/test.png')->setLink(array('controller' => 'test', 'action' => 'index'), 'default', true);
     $manageLinks->append($item);
     $item = new X_Page_Item_ManageLink('core-manage-configs', X_Env::_('manage_goto_configstitle'));
     $item->setTitle(X_Env::_('manage_goto_configs'))->setIcon('/images/manage/configs.png')->setLink(array('controller' => 'gconfigs', 'action' => 'index'), 'default', true);
     $manageLinks->append($item);
     $item = new X_Page_Item_ManageLink('core-manage-threads', X_Env::_('manage_goto_threadstitle'));
     $item->setTitle(X_Env::_('manage_goto_threads'))->setIcon('/images/manage/threads.png')->setLink(array('controller' => 'tmanager', 'action' => 'index'), 'default', true);
     $manageLinks->append($item);
     $manageLinks->merge(X_VlcShares_Plugins::broker()->getIndexManageLinks($this));
     // fetch links from plugins
     $actionLinks = X_VlcShares_Plugins::broker()->getIndexActionLinks($this);
     $statistics = X_VlcShares_Plugins::broker()->getIndexStatistics($this);
     $this->view->version = X_VlcShares::VERSION;
     //$this->view->configPath = X_VlcShares::config();
     //$this->view->test = $this->_helper->url('index', 'test');
     //$this->view->pcstream = $this->_helper->url('pcstream', 'index');
     //$this->view->pcstream_enabled = ($this->options->pcstream->get('commanderEnabled', false) && $this->vlc->isRunning());
     $this->view->actionLinks = $actionLinks;
     $this->view->manageLinks = $manageLinks;
     $this->view->statistics = $statistics;
     $this->view->news = $news;
     $this->view->messages = $messages;
     // i need to get first class links
 }
 /**
  * Add the link for -manage-animeland-
  * @param Zend_Controller_Action $this
  * @return X_Page_ItemList_ManageLink
  */
 public function getIndexManageLinks(Zend_Controller_Action $controller)
 {
     $link = new X_Page_Item_ManageLink($this->getId(), X_Env::_('p_animeland_mlink'));
     $link->setTitle(X_Env::_('p_animeland_managetitle'))->setIcon('/images/animeland/logo.png')->setLink(array('controller' => 'config', 'action' => 'index', 'key' => 'animeland'), 'default', true);
     return new X_Page_ItemList_ManageLink(array($link));
 }
 /**
  * Add the link for -manage-output-
  * @param Zend_Controller_Action $this
  * @return X_Page_ItemList_ManageLink
  */
 public function getIndexManageLinks(Zend_Controller_Action $controller)
 {
     $link = new X_Page_Item_ManageLink($this->getId(), X_Env::_('p_profiles_mlink'));
     $link->setTitle(X_Env::_('p_profiles_managetitle'))->setLink(array('controller' => 'profiles', 'action' => 'index'), 'default', true);
     return new X_Page_ItemList_ManageLink(array($link));
 }
Example #5
0
 /**
  * Add the link for -manage-accounts-
  * @param Zend_Controller_Action $this
  * @return X_Page_ItemList_ManageLink
  */
 public function getIndexManageLinks(Zend_Controller_Action $controller)
 {
     $list = new X_Page_ItemList_ManageLink();
     $link = new X_Page_Item_ManageLink($this->getId(), X_Env::_('p_auth_mlink'));
     $link->setTitle(X_Env::_('p_auth_managetitle'))->setIcon('/images/auth/logo.png')->setLink(array('controller' => 'auth', 'action' => 'accounts'), 'default', true);
     $list->append($link);
     if ($this->config('acl.enabled', false)) {
         $link = new X_Page_Item_ManageLink($this->getId(), X_Env::_('p_auth_mlink_resources'));
         $link->setTitle(X_Env::_('p_auth_managetitle_resources'))->setIcon('/images/auth/permissions.png')->setLink(array('controller' => 'acl', 'action' => 'index'), 'default', true);
         $list->append($link);
     }
     return $list;
 }
 /**
  * Add the link for -manage-onlinelibrary-
  * @param Zend_Controller_Action $this
  * @return X_Page_ItemList_ManageLink
  */
 public function getIndexManageLinks(Zend_Controller_Action $controller)
 {
     $link = new X_Page_Item_ManageLink($this->getId(), X_Env::_('p_bookmarks_mlink'));
     $link->setTitle(X_Env::_('p_bookmarks_managetitle'))->setIcon('/images/bookmarklets/addpage.png')->setLink(array('controller' => 'bookmarks', 'action' => 'index'), 'default', true);
     return new X_Page_ItemList_ManageLink(array($link));
 }