Beispiel #1
0
 /**
  * Displays admin menu bar according to selected action
  *
  * @access  public
  * @param   string  $action_selected    selected action
  * @return  string XHTML template content
  */
 function MenuBar($action_selected)
 {
     $actions = array('Summary', 'NewEntry', 'ListEntries', 'ManageComments', 'ManageTrackbacks', 'ManageCategories', 'AdditionalSettings');
     if (!in_array($action_selected, $actions)) {
         $action_selected = 'ListEntries';
     }
     $menubar = new Jaws_Widgets_Menubar();
     $menubar->AddOption('Summary', _t('BLOG_SUMMARY'), BASE_SCRIPT . '?gadget=Blog&action=Summary', 'images/stock/new.png');
     if ($this->gadget->GetPermission('AddEntries')) {
         $menubar->AddOption('NewEntry', _t('BLOG_NEW_ENTRY'), BASE_SCRIPT . '?gadget=Blog&action=NewEntry', 'images/stock/new.png');
     }
     $menubar->AddOption('ListEntries', _t('BLOG_LIST_ENTRIES'), BASE_SCRIPT . '?gadget=Blog&action=ListEntries', 'images/stock/edit.png');
     if (Jaws_Gadget::IsGadgetInstalled('Comments') && $this->gadget->GetPermission('ManageComments')) {
         $menubar->AddOption('ManageComments', _t('BLOG_MANAGE_COMMENTS'), BASE_SCRIPT . '?gadget=Blog&action=ManageComments', 'images/stock/stock-comments.png');
     }
     if ($this->gadget->GetPermission('ManageTrackbacks')) {
         $menubar->AddOption('ManageTrackbacks', _t('BLOG_MANAGE_TRACKBACKS'), BASE_SCRIPT . '?gadget=Blog&action=ManageTrackbacks', 'images/stock/stock-comments.png');
     }
     if ($this->gadget->GetPermission('ManageCategories')) {
         $menubar->AddOption('ManageCategories', _t('BLOG_CATEGORIES'), BASE_SCRIPT . '?gadget=Blog&action=ManageCategories', 'images/stock/edit.png');
     }
     if ($this->gadget->GetPermission('Settings')) {
         $menubar->AddOption('AdditionalSettings', _t('BLOG_SETTINGS'), BASE_SCRIPT . '?gadget=Blog&action=AdditionalSettings', 'images/stock/properties.png');
     }
     $menubar->Activate($action_selected);
     return $menubar->Get();
 }
Beispiel #2
0
 /**
  * Displays menu bar according to selected action
  *
  * @access  public
  * @param   string  $action  Selected action
  * @return  string  XHTML UI
  */
 function MenuBar($action = null)
 {
     $menubar = new Jaws_Widgets_Menubar();
     $menubar->AddOption('ManageEvents', _t('EVENTSCALENDAR_EVENTS_MANAGE'), $this->gadget->urlMap('ManageEvents'), 'gadgets/EventsCalendar/Resources/images/events.png');
     $menubar->AddOption('Events', _t('EVENTSCALENDAR_CALENDAR'), $this->gadget->urlMap('ViewYear'), 'gadgets/EventsCalendar/Resources/images/calendar.png');
     if (!empty($action)) {
         $menubar->Activate($action);
     }
     return $menubar->Get();
 }
Beispiel #3
0
 /**
  * Prepares the comments menubar
  *
  * @access  public
  * @param   string  $action   Selected action
  * @return  string  XHTML of menubar
  */
 function MenuBar($action)
 {
     $actions = array('Settings');
     if (!in_array($action, $actions)) {
         $action = 'Settings';
     }
     $menubar = new Jaws_Widgets_Menubar();
     $menubar->AddOption('Settings', _t('GLOBAL_SETTINGS'), BASE_SCRIPT . '?gadget=Notification&action=Settings', STOCK_PREFERENCES);
     $menubar->Activate($action);
     return $menubar->Get();
 }
Beispiel #4
0
 /**
  * Prepares the comments menubar
  *
  * @access  public
  * @param   string  $action   Selected action
  * @return  string  XHTML of menubar
  */
 function MenuBar($action)
 {
     $actions = array('SiteActivity');
     if (!in_array($action, $actions)) {
         $action = 'SiteActivity';
     }
     $menubar = new Jaws_Widgets_Menubar();
     $menubar->AddOption('SiteActivity', _t('SITEACTIVITY_SITEACTIVITY'), BASE_SCRIPT . '?gadget=SiteActivity&action=SiteActivity', STOCK_PREFERENCES);
     $menubar->Activate($action);
     return $menubar->Get();
 }
Beispiel #5
0
 /**
  * Prepares the menubar
  *
  * @access  public
  * @param   string  $action  Selected action
  * @return  string  XHTML menubar
  */
 function Menubar($action)
 {
     $actions = array('Themes');
     if (!in_array($action, $actions)) {
         $action = 'Themes';
     }
     $menubar = new Jaws_Widgets_Menubar();
     $menubar->AddOption('Themes', _t('TMS_THEMES'), BASE_SCRIPT . '?gadget=Tms&action=Themes', 'gadgets/Tms/Resources/images/themes.png');
     $menubar->Activate($action);
     return $menubar->Get();
 }
Beispiel #6
0
 /**
  * Prepares the comments menubar
  *
  * @access  public
  * @param   string  $action   Selected action
  * @return  string  XHTML of menubar
  */
 function MenuBar($action)
 {
     $actions = array('Activities');
     if (!in_array($action, $actions)) {
         $action = 'Activities';
     }
     $menubar = new Jaws_Widgets_Menubar();
     $menubar->AddOption('Activities', _t('ACTIVITIES_ACTIVITIES'), BASE_SCRIPT . '?gadget=Activities&action=Activities', STOCK_PREFERENCES);
     $menubar->Activate($action);
     return $menubar->Get();
 }
Beispiel #7
0
 /**
  * Prepares the comments menubar
  *
  * @access  public
  * @param   string  $action   Selected action
  * @return  string  XHTML of menubar
  */
 function MenuBar($action)
 {
     $actions = array('Subscription');
     if (!in_array($action, $actions)) {
         $action = 'Subscription';
     }
     $menubar = new Jaws_Widgets_Menubar();
     $menubar->AddOption('Subscription', _t('SUBSCRIPTION_SUBSCRIPTION'), BASE_SCRIPT . '?gadget=Subscription&action=Subscription', STOCK_PREFERENCES);
     $menubar->Activate($action);
     return $menubar->Get();
 }
Beispiel #8
0
 /**
  * Displays menu bar according to selected action
  *
  * @access  public
  * @param   string  $action_selected    selected action
  * @return  string XHTML template content
  */
 function MenuBar($action_selected)
 {
     $actions = array('AddressBook', 'Groups');
     if (!in_array($action_selected, $actions)) {
         $action_selected = 'AddressBook';
     }
     $menubar = new Jaws_Widgets_Menubar();
     $menubar->AddOption('AddressBook', _t('ADDRESSBOOK_ADDRESSBOOK_MANAGE'), $this->gadget->urlMap('AddressBook'), 'gadgets/AddressBook/Resources/images/contact.png');
     $menubar->AddOption('Groups', _t('ADDRESSBOOK_GROUPS_MANAGE'), $this->gadget->urlMap('ManageGroups'), 'gadgets/AddressBook/Resources/images/groups_mini.png');
     $menubar->Activate($action_selected);
     return $menubar->Get();
 }
Beispiel #9
0
 /**
  * Builds the users menubar
  *
  * @access  public
  * @param   string  $action   Selected action
  * @return  string  XHTML menubar
  */
 function MenuBar($action)
 {
     $actions = array('Sitemap', 'Robots');
     if (!in_array($action, $actions)) {
         $action = 'Dashboard';
     }
     $menubar = new Jaws_Widgets_Menubar();
     $menubar->AddOption('Sitemap', _t('SITEMAP_TITLE'), BASE_SCRIPT . '?gadget=Sitemap&action=ManageSitemap', 'gadgets/Sitemap/Resources/images/logo.mini.png');
     $menubar->AddOption('Robots', _t('SITEMAP_ROBOTS'), BASE_SCRIPT . '?gadget=Sitemap&action=Robots', 'gadgets/Sitemap/Resources/images/robots.png');
     $menubar->Activate($action);
     return $menubar->Get();
 }
Beispiel #10
0
 /**
  * Builds the users menubar
  *
  * @access  public
  * @param   string  $action   Selected action
  * @return  string  XHTML menubar
  */
 function MenuBar($action)
 {
     $actions = array('Properties');
     if (!in_array($action, $actions)) {
         $action = 'Properties';
     }
     $menubar = new Jaws_Widgets_Menubar();
     if ($this->gadget->GetPermission('ManageProperties')) {
         $menubar->AddOption('Properties', _t('GLOBAL_PROPERTIES'), BASE_SCRIPT . '?gadget=PrivateMessage&action=Properties', STOCK_PREFERENCES);
     }
     $menubar->Activate($action);
     return $menubar->Get();
 }
Beispiel #11
0
 /**
  * Builds the menubar
  *
  * @access  public
  * @param   string  $selected   Selected action
  * @return  string  XHTML menu template
  */
 function MenuBar($selected)
 {
     $actions = array('Questions', 'Categories');
     if (!in_array($selected, $actions)) {
         $selected = 'Questions';
     }
     $menubar = new Jaws_Widgets_Menubar();
     $menubar->AddOption('Questions', _t('FAQ_LIST'), BASE_SCRIPT . '?gadget=Faq&action=Questions', STOCK_DOCUMENTS);
     if ($this->gadget->GetPermission('ManageCategories')) {
         $menubar->AddOption('Categories', _t('FAQ_CATEGORIES'), BASE_SCRIPT . '?gadget=Faq&action=Categories', 'gadgets/Faq/Resources/images/categories.png');
     }
     $menubar->Activate($selected);
     return $menubar->Get();
 }
Beispiel #12
0
 /**
  * Displays admin menu bar according to selected action
  *
  * @access  public
  * @param   string  $action    selected action
  * @return  string XHTML template content
  */
 function MenuBar($action)
 {
     $actions = array('Directory', 'Comments');
     if (!in_array($action, $actions)) {
         $action = 'Directory';
     }
     $menubar = new Jaws_Widgets_Menubar();
     $menubar->AddOption('Directory', _t('DIRECTORY_TITLE'), BASE_SCRIPT . '?gadget=Directory&action=Directory', 'images/stock/folder.png');
     if (Jaws_Gadget::IsGadgetInstalled('Comments') && $this->gadget->GetPermission('ManageComments')) {
         $menubar->AddOption('Comments', _t('DIRECTORY_FILE_COMMENTS'), BASE_SCRIPT . '?gadget=Directory&action=ManageComments', 'images/stock/stock-comments.png');
     }
     $menubar->Activate($action);
     return $menubar->Get();
 }
Beispiel #13
0
 /**
  * Builds the users menubar
  *
  * @access  public
  * @param   string  $action   Selected action
  * @return  string  XHTML menubar
  */
 function MenuBar($action)
 {
     $actions = array('Logs', 'Settings');
     if (!in_array($action, $actions)) {
         $action = 'Logs';
     }
     $menubar = new Jaws_Widgets_Menubar();
     $menubar->AddOption('Logs', _t('LOGS_TITLE'), BASE_SCRIPT . '?gadget=Logs&action=Logs', STOCK_NEW);
     if ($this->gadget->GetPermission('ManageSettings')) {
         $menubar->AddOption('Settings', _t('GLOBAL_PROPERTIES'), BASE_SCRIPT . '?gadget=Logs&action=Settings', STOCK_PREFERENCES);
     }
     $menubar->Activate($action);
     return $menubar->Get();
 }
Beispiel #14
0
 /**
  * Builds the weather menubar
  *
  * @access  public
  * @param   string  $action   Selected action
  * @return  string  XHTML menubar
  */
 function MenuBar($action)
 {
     $actions = array('Regions', 'Properties');
     if (!in_array($action, $actions)) {
         $action = 'Regions';
     }
     $menubar = new Jaws_Widgets_Menubar();
     if ($this->gadget->GetPermission('ManageRegions')) {
         $menubar->AddOption('Regions', _t('WEATHER_REGIONS'), BASE_SCRIPT . '?gadget=Weather&action=Regions', 'gadgets/Weather/Resources/images/regions.png');
     }
     if ($this->gadget->GetPermission('UpdateProperties')) {
         $menubar->AddOption('Properties', _t('GLOBAL_PROPERTIES'), BASE_SCRIPT . '?gadget=Weather&action=Properties', 'gadgets/Weather/Resources/images/properties.png');
     }
     $menubar->Activate($action);
     return $menubar->Get();
 }
Beispiel #15
0
 /**
  * Builds the menubar
  *
  * @access  public
  * @param   string  $action  Selected action
  * @return  string  XHTML UI
  */
 function Menubar($action)
 {
     $actions = array('Gadgets', 'Plugins');
     if (!in_array($action, $actions)) {
         $action = 'Gadgets';
     }
     $menubar = new Jaws_Widgets_Menubar();
     if ($this->gadget->GetPermission('ManageGadgets')) {
         $menubar->AddOption('Gadgets', _t('COMPONENTS_GADGETS'), BASE_SCRIPT . '?gadget=Components&action=Gadgets', 'gadgets/Components/Resources/images/gadgets.png');
     }
     if ($this->gadget->GetPermission('ManagePlugins')) {
         $menubar->AddOption('Plugins', _t('COMPONENTS_PLUGINS'), BASE_SCRIPT . '?gadget=Components&action=Plugins', 'gadgets/Components/Resources/images/plugins.png');
     }
     $menubar->Activate($action);
     return $menubar->Get();
 }
Beispiel #16
0
 /**
  * Prepares the quotes menubar
  *
  * @access  public
  * @param   string  $action   Selected action
  * @return  string  XHTML of menubar
  */
 function MenuBar($action)
 {
     $actions = array('Quotes', 'QuoteGroups');
     if (!in_array($action, $actions)) {
         $action = 'Quotes';
     }
     $menubar = new Jaws_Widgets_Menubar();
     if ($this->gadget->GetPermission('ManageQuotes')) {
         $menubar->AddOption('Quotes', $this->gadget->title, BASE_SCRIPT . '?gadget=Quotes', 'gadgets/Quotes/Resources/images/quotes_mini.png');
     }
     if ($this->gadget->GetPermission('ManageQuoteGroups')) {
         $menubar->AddOption('QuoteGroups', _t('QUOTES_GROUPS'), BASE_SCRIPT . '?gadget=Quotes&action=QuoteGroups', 'gadgets/Quotes/Resources/images/groups_mini.png');
     }
     $menubar->Activate($action);
     return $menubar->Get();
 }
Beispiel #17
0
 /**
  * Prepares the comments menubar
  *
  * @access  public
  * @param   string  $action   Selected action
  * @return  string  XHTML of menubar
  */
 function MenuBar($action)
 {
     $actions = array('Comments', 'Settings');
     if (!in_array($action, $actions)) {
         $action = 'Comments';
     }
     $menubar = new Jaws_Widgets_Menubar();
     if ($this->gadget->GetPermission('ManageComments')) {
         $menubar->AddOption('Comments', _t('COMMENTS_TITLE'), BASE_SCRIPT . '?gadget=Comments&action=Comments');
     }
     if ($this->gadget->GetPermission('Settings')) {
         $menubar->AddOption('Settings', _t('GLOBAL_SETTINGS'), BASE_SCRIPT . '?gadget=Comments&action=Settings', STOCK_PREFERENCES);
     }
     $menubar->Activate($action);
     return $menubar->Get();
 }
Beispiel #18
0
 /**
  * Displays menu bar according to selected action
  *
  * @access  public
  * @param   string  $action_selected    selected action
  * @return  string XHTML template content
  */
 function MenuBar($action_selected)
 {
     $actions = array('Notifications', 'Inbox', 'Outbox', 'Draft', 'Archived', 'Compose');
     if (!in_array($action_selected, $actions)) {
         $action_selected = 'Notifications';
     }
     $menubar = new Jaws_Widgets_Menubar();
     $menubar->AddOption('Notifications', _t('PRIVATEMESSAGE_NOTIFICATIONS'), $this->gadget->urlMap('Messages', array('folder' => PrivateMessage_Info::PRIVATEMESSAGE_FOLDER_NOTIFICATIONS)), 'gadgets/PrivateMessage/Resources/images/notify.png');
     $menubar->AddOption('Inbox', _t('PRIVATEMESSAGE_INBOX'), $this->gadget->urlMap('Messages', array('folder' => PrivateMessage_Info::PRIVATEMESSAGE_FOLDER_INBOX)), 'gadgets/PrivateMessage/Resources/images/inbox.png');
     $menubar->AddOption('Outbox', _t('PRIVATEMESSAGE_OUTBOX'), $this->gadget->urlMap('Messages', array('folder' => PrivateMessage_Info::PRIVATEMESSAGE_FOLDER_OUTBOX)), 'gadgets/PrivateMessage/Resources/images/outbox.png');
     $menubar->AddOption('Draft', _t('PRIVATEMESSAGE_DRAFT'), $this->gadget->urlMap('Messages', array('folder' => PrivateMessage_Info::PRIVATEMESSAGE_FOLDER_DRAFT)), 'gadgets/PrivateMessage/Resources/images/draft.png');
     $menubar->AddOption('Archive', _t('PRIVATEMESSAGE_ARCHIVED'), $this->gadget->urlMap('Messages', array('folder' => PrivateMessage_Info::PRIVATEMESSAGE_FOLDER_ARCHIVED)), 'gadgets/PrivateMessage/Resources/images/archive.png');
     $menubar->AddOption('Trash', _t('PRIVATEMESSAGE_TRASH'), $this->gadget->urlMap('Messages', array('folder' => PrivateMessage_Info::PRIVATEMESSAGE_FOLDER_TRASH)), 'gadgets/PrivateMessage/Resources/images/trash.png');
     $menubar->AddOption('Compose', _t('PRIVATEMESSAGE_COMPOSE_MESSAGE'), $this->gadget->urlMap('Compose'), 'gadgets/PrivateMessage/Resources/images/compose.png');
     $menubar->Activate($action_selected);
     return $menubar->Get();
 }
Beispiel #19
0
 /**
  * Builds the menubar
  *
  * @access  public
  * @param   string   $action_selected   Selected action
  * @return  string   XHTML template content
  */
 function MenuBar($action_selected)
 {
     $actions = array('Maps', 'Aliases', 'ErrorMaps', 'Properties');
     if (!in_array($action_selected, $actions)) {
         $action_selected = 'Maps';
     }
     $menubar = new Jaws_Widgets_Menubar();
     $menubar->AddOption('Maps', _t('URLMAPPER_MAPS'), BASE_SCRIPT . '?gadget=UrlMapper&action=Maps', STOCK_DOCUMENTS);
     $menubar->AddOption('Aliases', _t('URLMAPPER_ALIASES'), BASE_SCRIPT . '?gadget=UrlMapper&action=Aliases', 'gadgets/UrlMapper/Resources/images/aliases.png');
     $menubar->AddOption('ErrorMaps', _t('URLMAPPER_ERRORMAPS'), BASE_SCRIPT . '?gadget=UrlMapper&action=ErrorMaps', STOCK_DOCUMENTS);
     $menubar->AddOption('Properties', _t('GLOBAL_PROPERTIES'), BASE_SCRIPT . '?gadget=UrlMapper&action=Properties', STOCK_PREFERENCES);
     $menubar->Activate($action_selected);
     return $menubar->Get();
 }
Beispiel #20
0
 /**
  * Displays a menu bar for the control panel gadget.
  *
  * @access protected
  * @param   string   $action_selected    The item to display as selected.
  * @return  string   XHTML template content for menubar
  */
 function MenuBar($action_selected)
 {
     $actions = array('Photos', 'Groups', 'ManageComments', 'AdditionalSettings', 'Import');
     if (!in_array($action_selected, $actions)) {
         $action_selected = 'Photos';
     }
     $menubar = new Jaws_Widgets_Menubar();
     $menubar->AddOption('Photos', _t('PHOO_PHOTOS'), BASE_SCRIPT . '?gadget=Phoo', STOCK_IMAGE);
     if ($this->gadget->GetPermission('Groups')) {
         $menubar->AddOption('Groups', _t('GLOBAL_GROUPS'), BASE_SCRIPT . '?gadget=Phoo&action=Groups', 'gadgets/Phoo/Resources/images/groups_mini.png');
     }
     if (Jaws_Gadget::IsGadgetInstalled('Comments') && $this->gadget->GetPermission('ManageComments')) {
         $menubar->AddOption('ManageComments', _t('PHOO_COMMENTS'), BASE_SCRIPT . '?gadget=Phoo&action=ManageComments', 'images/stock/stock-comments.png');
     }
     if ($this->gadget->GetPermission('Settings')) {
         $menubar->AddOption('AdditionalSettings', _t('PHOO_ADDITIONAL_SETTINGS'), BASE_SCRIPT . '?gadget=Phoo&action=AdditionalSettings', 'images/stock/properties.png');
     }
     if ($this->gadget->GetPermission('Import')) {
         $menubar->AddOption('Import', _t('PHOO_IMPORT'), BASE_SCRIPT . '?gadget=Phoo&action=Import', STOCK_IMAGE);
     }
     $menubar->Activate($action_selected);
     return $menubar->Get();
 }
Beispiel #21
0
 /**
  * Builds the menubar
  *
  * @access  public
  * @param   string  $selected   Selected action
  * @return  string  XHTML menu template
  */
 function MenuBar($selected)
 {
     $actions = array('ManageQuestions', 'AddNewQuestion', 'AddNewCategory');
     if (!in_array($selected, $actions)) {
         $selected = 'ManageQuestions';
     }
     $menubar = new Jaws_Widgets_Menubar();
     $menubar->AddOption('ManageQuestions', _t('FAQ_LIST'), BASE_SCRIPT . '?gadget=Faq&action=ManageQuestions', STOCK_DOCUMENTS);
     if ($this->gadget->GetPermission('AddNewQuestion')) {
         $menubar->AddOption('AddNewQuestion', _t('FAQ_ADD_QUESTION'), BASE_SCRIPT . '?gadget=Faq&action=EditQuestion', STOCK_NEW);
     }
     if ($this->gadget->GetPermission('ManageCategories')) {
         $menubar->AddOption('AddNewCategory', _t('FAQ_ADD_CATEGORY'), BASE_SCRIPT . '?gadget=Faq&action=EditCategory', STOCK_NEW);
     }
     $menubar->Activate($selected);
     return $menubar->Get();
 }
Beispiel #22
0
 /**
  * Prepares the contacs menubar
  *
  * @access  public
  * @param   string  $action   Selected action
  * @return  string  XHTML of menubar
  */
 function MenuBar($action)
 {
     $actions = array('Contacts', 'Recipients', 'Mailer', 'Properties');
     if (!in_array($action, $actions)) {
         $action = 'Contacts';
     }
     $menubar = new Jaws_Widgets_Menubar();
     if ($this->gadget->GetPermission('ManageContacts')) {
         $menubar->AddOption('Contacts', _t('CONTACT_TITLE'), BASE_SCRIPT . '?gadget=Contact&action=Contacts', 'gadgets/Contact/Resources/images/contact_mini.png');
     }
     if ($this->gadget->GetPermission('ManageRecipients')) {
         $menubar->AddOption('Recipients', _t('CONTACT_RECIPIENTS'), BASE_SCRIPT . '?gadget=Contact&action=Recipients', 'gadgets/Contact/Resources/images/recipients_mini.png');
     }
     if ($this->gadget->GetPermission('AccessToMailer')) {
         $menubar->AddOption('Mailer', _t('CONTACT_MAILER'), BASE_SCRIPT . '?gadget=Contact&action=Mailer', 'gadgets/Contact/Resources/images/email_send.png');
     }
     if ($this->gadget->GetPermission('UpdateProperties')) {
         $menubar->AddOption('Properties', _t('GLOBAL_PROPERTIES'), BASE_SCRIPT . '?gadget=Contact&action=Properties', 'gadgets/Contact/Resources/images/properties_mini.png');
     }
     $menubar->Activate($action);
     return $menubar->Get();
 }
Beispiel #23
0
 /**
  * Builds the users menubar
  *
  * @access  public
  * @param   string  $action   Selected action
  * @return  string  XHTML menubar
  */
 function MenuBar($action)
 {
     $actions = array('Users', 'Groups', 'OnlineUsers', 'Properties');
     if (!in_array($action, $actions)) {
         $action = 'Users';
     }
     $menubar = new Jaws_Widgets_Menubar();
     if ($this->gadget->GetPermission('ManageUsers')) {
         $menubar->AddOption('Users', _t('USERS_TITLE'), BASE_SCRIPT . '?gadget=Users&action=Users', 'gadgets/Users/Resources/images/users_mini.png');
     }
     if ($this->gadget->GetPermission('ManageGroups')) {
         $menubar->AddOption('Groups', _t('USERS_GROUPS_GROUPS'), BASE_SCRIPT . '?gadget=Users&action=Groups', 'gadgets/Users/Resources/images/groups_mini.png');
     }
     if ($this->gadget->GetPermission('ManageOnlineUsers')) {
         $menubar->AddOption('OnlineUsers', _t('USERS_ONLINE_USERS'), BASE_SCRIPT . '?gadget=Users&action=OnlineUsers', STOCK_PREFERENCES);
     }
     if ($this->gadget->GetPermission('ManageProperties')) {
         $menubar->AddOption('Properties', _t('GLOBAL_PROPERTIES'), BASE_SCRIPT . '?gadget=Users&action=Properties', STOCK_PREFERENCES);
     }
     $menubar->Activate($action);
     return $menubar->Get();
 }
Beispiel #24
0
 /**
  * Prepares the poll menubar
  *
  * @access  public
  * @param   string  $action   Selected action
  * @return  string  XHTML of menubar
  */
 function MenuBar($action)
 {
     $actions = array('Polls', 'PollGroups', 'Reports');
     if (!in_array($action, $actions)) {
         $action = 'Polls';
     }
     $menubar = new Jaws_Widgets_Menubar();
     if ($this->gadget->GetPermission('ManagePolls')) {
         $menubar->AddOption('Polls', _t('POLL_POLLS'), BASE_SCRIPT . '?gadget=Poll&action=Polls', 'gadgets/Poll/Resources/images/polls_mini.png');
     }
     if ($this->gadget->GetPermission('ManageGroups')) {
         $menubar->AddOption('PollGroups', _t('POLL_GROUPS'), BASE_SCRIPT . '?gadget=Poll&action=PollGroups', 'gadgets/Poll/Resources/images/groups_mini.png');
     }
     if ($this->gadget->GetPermission('ViewReports')) {
         $menubar->AddOption('Reports', _t('POLL_REPORTS'), BASE_SCRIPT . '?gadget=Poll&action=Reports', 'gadgets/Poll/Resources/images/reports_mini.png');
     }
     $menubar->Activate($action);
     return $menubar->Get();
 }
Beispiel #25
0
 /**
  * Prepares the banners menubar
  *
  * @access  public
  * @param   string  $action   Selected action
  * @return  string  XHTML template of menubar
  */
 function MenuBar($action)
 {
     $actions = array('Banners', 'Groups', 'Reports');
     if (!in_array($action, $actions)) {
         $action = 'Banners';
     }
     $menubar = new Jaws_Widgets_Menubar();
     if ($this->gadget->GetPermission('ManageBanners')) {
         $menubar->AddOption('Banners', $this->gadget->title, BASE_SCRIPT . '?gadget=Banner&action=Banners', 'gadgets/Banner/Resources/images/banners_mini.png');
     }
     if ($this->gadget->GetPermission('ManageGroups')) {
         $menubar->AddOption('Groups', _t('BANNER_GROUPS_GROUPS'), BASE_SCRIPT . '?gadget=Banner&action=Groups', 'gadgets/Banner/Resources/images/groups_mini.png');
     }
     if ($this->gadget->GetPermission('ViewReports')) {
         $menubar->AddOption('Reports', _t('BANNER_REPORTS_REPORTS'), BASE_SCRIPT . '?gadget=Banner&action=Reports', 'gadgets/Banner/Resources/images/reports_mini.png');
     }
     $menubar->Activate($action);
     return $menubar->Get();
 }
Beispiel #26
0
 /**
  * Builds the menubar
  *
  * @access  public
  * @param   string  $selected   Selected action
  * @return  string  XHTML menubar
  */
 function MenuBar($selected)
 {
     $actions = array('ManagePages', 'AddNewPage', 'PreviewAddPage', 'Groups', 'Properties');
     if (!in_array($selected, $actions)) {
         $selected = 'ManagePages';
     }
     if ($selected == 'PreviewAddPage') {
         $selected = 'AddNewPage';
     }
     $menubar = new Jaws_Widgets_Menubar();
     $menubar->AddOption('ManagePages', _t('STATICPAGE_MENU_PAGES'), BASE_SCRIPT . '?gadget=StaticPage&action=ManagePages', STOCK_DOCUMENTS);
     if ($this->gadget->GetPermission('AddPage')) {
         $menubar->AddOption('AddNewPage', _t('STATICPAGE_MENU_ADDPAGE'), BASE_SCRIPT . '?gadget=StaticPage&action=AddNewPage', STOCK_NEW);
     }
     if ($this->gadget->GetPermission('ManageGroups')) {
         $menubar->AddOption('Groups', _t('STATICPAGE_GROUPS'), BASE_SCRIPT . '?gadget=StaticPage&action=Groups', 'gadgets/StaticPage/Resources/images/groups.png');
     }
     if ($this->gadget->GetPermission('Properties')) {
         $menubar->AddOption('Properties', _t('GLOBAL_SETTINGS'), BASE_SCRIPT . '?gadget=StaticPage&action=Properties', 'images/stock/properties.png');
     }
     $menubar->Activate($selected);
     return $menubar->Get();
 }
Beispiel #27
0
 /**
  * Displays sub-menu bar according to selected action
  *
  * @access  public
  * @param   string  $selected   selected action
  * @param   array   $actions    visible actions
  * @param   array   $params     action params
  * @return  string  XHTML template content
  */
 function SubMenuBar($selected, $actions, $params = null)
 {
     $default_actions = array('Profile', 'Members', 'EditGroup', 'AddGroup', 'Account', 'Personal', 'Preferences', 'Contacts');
     if (!in_array($selected, $default_actions)) {
         $action_selected = 'Profile';
     }
     $menubar = new Jaws_Widgets_Menubar();
     $menubar->setClass('gadget_submenubar');
     if (in_array('Profile', $actions)) {
         $menubar->AddOption('Profile', _t('USERS_PROFILE'), $this->gadget->urlMap('Profile', array('user' => $GLOBALS['app']->Session->GetAttribute('username'))));
     }
     if (in_array('Groups', $actions)) {
         $menubar->AddOption('Groups', _t('USERS_USER_GROUPS'), $this->gadget->urlMap('Groups'));
     }
     if (in_array('AddGroup', $actions)) {
         $menubar->AddOption('AddGroup', _t('USERS_ADD_GROUP'), $this->gadget->urlMap('UserGroupUI'), STOCK_ADD);
     }
     if (in_array('Members', $actions)) {
         $menubar->AddOption('Members', _t('USERS_GROUPS_MEMBERS'), $this->gadget->urlMap('ManageGroup', $params));
     }
     if (in_array('EditGroup', $actions)) {
         $menubar->AddOption('EditGroup', _t('USERS_EDIT_GROUP'), $this->gadget->urlMap('EditUserGroup', $params));
     }
     if (in_array('Account', $actions)) {
         if ($this->gadget->GetPermission('EditUserName,EditUserNickname,EditUserEmail,EditUserPassword', '', false)) {
             $menubar->AddOption('Account', _t('USERS_EDIT_ACCOUNT'), $this->gadget->urlMap('Account'));
         }
     }
     if (in_array('Personal', $actions)) {
         if ($this->gadget->GetPermission('EditUserPersonal')) {
             $menubar->AddOption('Personal', _t('USERS_EDIT_PERSONAL'), $this->gadget->urlMap('Personal'));
         }
     }
     if (in_array('Preferences', $actions)) {
         if ($this->gadget->GetPermission('EditUserPreferences')) {
             $menubar->AddOption('Preferences', _t('USERS_EDIT_PREFERENCES'), $this->gadget->urlMap('Preferences'));
         }
     }
     if (in_array('Contacts', $actions)) {
         if ($this->gadget->GetPermission('EditUserContacts')) {
             $menubar->AddOption('Contacts', _t('USERS_EDIT_CONTACTS'), $this->gadget->urlMap('Contacts'));
         }
     }
     $menubar->Activate($selected);
     return $menubar->Get();
 }
Beispiel #28
0
 /**
  * Displays menu bar according to selected action
  *
  * @access  public
  * @param   string  $selected_action    Selected action
  * @param   array   $visible_actions    Visible actions
  * @param   array   $action_params      action params
  * @return  string XHTML template content
  */
 function MenuBar($selected_action, $visible_actions, $action_params = null)
 {
     $actions = array('ManageTags', 'ViewTag');
     if (!in_array($selected_action, $actions)) {
         $selected_action = 'ManageTags';
     }
     $menubar = new Jaws_Widgets_Menubar();
     if (in_array('ViewTag', $visible_actions)) {
         $menubar->AddOption('ViewTag', _t('TAGS_VIEW_TAG'), $this->gadget->urlMap('ViewTag', $action_params), 'gadgets/Tags/Resources/images/view-tag-mini.png');
     }
     if (in_array('ManageTags', $visible_actions)) {
         $menubar->AddOption('ManageTags', _t('TAGS_MANAGE_TAGS'), $this->gadget->urlMap('ManageTags'), 'gadgets/Tags/Resources/images/manage-tags-mini.png');
     }
     $menubar->Activate($selected_action);
     return $menubar->Get();
 }
Beispiel #29
0
 /**
  * Builds the menubar
  *
  * @access  private
  * @param   string  $selected   Selected menu item
  * @return  string  XHTML menubar
  */
 function MenuBar($selected)
 {
     $actions = array('Admin', 'ResetCounter', 'CleanEntries');
     if (!in_array($selected, $actions)) {
         $selected = 'Admin';
     }
     $menubar = new Jaws_Widgets_Menubar();
     $menubar->AddOption('Admin', _t('VISITCOUNTER_ADMIN_ACTION'), '');
     if ($this->gadget->GetPermission('ResetCounter')) {
         $menubar->AddOption('ResetCounter', _t('VISITCOUNTER_RESET_COUNTER_ACTION'), "javascript: if (confirm('" . _t("VISITCOUNTER_RESET_COUNTER_CONFIRM") . "')) " . "resetCounter(); return false;");
     }
     if ($this->gadget->GetPermission('CleanEntries')) {
         $menubar->AddOption('CleanEntries', _t('VISITCOUNTER_CLEAN_COUNTER'), "javascript: if (confirm('" . _t("VISITCOUNTER_CLEAN_COUNTER_CONFIRM") . "')) " . "cleanEntries(); return false;");
     }
     $menubar->Activate($selected);
     return $menubar->Get();
 }