public function get_actions_tree_links()
 {
     $lang = LangLoader::get('common', 'bugtracker');
     $tree = new ModuleTreeLinks();
     $tree->add_link(new ModuleLink($lang['actions.add'], BugtrackerUrlBuilder::add(), BugtrackerAuthorizationsService::check_authorizations()->write()));
     $tree->add_link(new AdminModuleLink(LangLoader::get_message('configuration', 'admin-common'), BugtrackerUrlBuilder::configuration()));
     $tree->add_link(new AdminModuleLink($lang['titles.admin.authorizations.manage'], BugtrackerUrlBuilder::authorizations()));
     return $tree;
 }
 public function get_actions_tree_links()
 {
     $lang = LangLoader::get('common', 'database');
     $tree = new ModuleTreeLinks();
     $tree->add_link(new AdminModuleLink($lang['database.actions.database_management'], DatabaseUrlBuilder::database_management()));
     $tree->add_link(new AdminModuleLink($lang['database.actions.db_sql_queries'], DatabaseUrlBuilder::db_sql_queries()));
     $tree->add_link(new AdminModuleLink(LangLoader::get_message('configuration', 'admin-common'), DatabaseUrlBuilder::configuration()));
     return $tree;
 }
Exemplo n.º 3
0
 public function get_actions_tree_links()
 {
     global $LANG;
     load_module_lang('search');
     //Chargement de la langue du module.
     $tree = new ModuleTreeLinks();
     $tree->add_link(new AdminModuleLink($LANG['search_config'], new Url('/search/admin_search.php')));
     $tree->add_link(new AdminModuleLink($LANG['weights.manage'], new Url('/search/admin_search.php?weighting=true')));
     return $tree;
 }
Exemplo n.º 4
0
 public function get_actions_tree_links()
 {
     $tree = new ModuleTreeLinks();
     $manage_fields_link = new AdminModuleLink(LangLoader::get_message('admin.fields.manage', 'common', 'contact'), ContactUrlBuilder::manage_fields());
     $manage_fields_link->add_sub_link(new AdminModuleLink(LangLoader::get_message('admin.fields.manage', 'common', 'contact'), ContactUrlBuilder::manage_fields()));
     $manage_fields_link->add_sub_link(new AdminModuleLink(LangLoader::get_message('fields.action.add_field', 'admin-user-common'), ContactUrlBuilder::add_field()));
     $tree->add_link($manage_fields_link);
     $tree->add_link(new AdminModuleLink(LangLoader::get_message('configuration', 'admin-common'), ContactUrlBuilder::configuration()));
     return $tree;
 }
 public static function display(ModuleTreeLinks $tree_links, View $view)
 {
     $has_links = $tree_links->has_links();
     if ($has_links) {
         $links = $tree_links->get_links();
         foreach ($links as $element) {
             if ($element->is_visible()) {
                 $view->assign_block_vars('element', array(), array('ELEMENT' => $element->export()));
             }
         }
     }
     return $view;
 }
Exemplo n.º 6
0
 public function get_actions_tree_links()
 {
     global $LANG;
     load_module_lang('poll');
     //Chargement de la langue du module.
     $tree = new ModuleTreeLinks();
     $manage_poll_link = new AdminModuleLink($LANG['poll.manage'], new Url('/poll/admin_poll.php'));
     $manage_poll_link->add_sub_link(new AdminModuleLink($LANG['poll.manage'], new Url('/poll/admin_poll.php')));
     $manage_poll_link->add_sub_link(new AdminModuleLink($LANG['poll_add'], new Url('/poll/admin_poll_add.php')));
     $tree->add_link($manage_poll_link);
     $tree->add_link(new AdminModuleLink(LangLoader::get_message('configuration', 'admin'), new Url('/poll/admin_poll_config.php')));
     return $tree;
 }
Exemplo n.º 7
0
 public function get_actions_tree_links()
 {
     $lang = LangLoader::get('common', 'sandbox');
     $tree = new ModuleTreeLinks();
     $tree->add_link(new ModuleLink($lang['title.form_builder'], SandboxUrlBuilder::form()));
     $tree->add_link(new ModuleLink($lang['title.css'], SandboxUrlBuilder::css()));
     $tree->add_link(new ModuleLink($lang['title.icons'], SandboxUrlBuilder::icons()));
     $tree->add_link(new ModuleLink($lang['title.table_builder'], SandboxUrlBuilder::table()));
     $tree->add_link(new ModuleLink($lang['title.string_template'], SandboxUrlBuilder::template()));
     $tree->add_link(new ModuleLink($lang['title.mail_sender'], SandboxUrlBuilder::mail()));
     return $tree;
 }
 public function get_actions_tree_links()
 {
     $lang = LangLoader::get('common', 'customization');
     $tree = new ModuleTreeLinks();
     $tree->add_link(new AdminModuleLink($lang['interface'], AdminCustomizeUrlBuilder::customize_interface()));
     $tree->add_link(new AdminModuleLink($lang['favicon'], AdminCustomizeUrlBuilder::customize_favicon()));
     $tree->add_link(new AdminModuleLink($lang['css-files'], AdminCustomizeUrlBuilder::editor_css_file()));
     $tree->add_link(new AdminModuleLink($lang['tpl-files'], AdminCustomizeUrlBuilder::editor_tpl_file()));
     return $tree;
 }
Exemplo n.º 9
0
 public function get_actions_tree_links()
 {
     global $LANG;
     load_module_lang('wiki');
     //Chargement de la langue du module.
     require_once PATH_TO_ROOT . '/wiki/wiki_auth.php';
     $id_cat = AppContext::get_request()->get_getstring('id_cat', 0);
     $current_user = AppContext::get_current_user();
     $config = WikiConfig::load();
     $tree = new ModuleTreeLinks();
     $tree->add_link(new AdminModuleLink(LangLoader::get_message('configuration', 'admin'), new Url('/wiki/admin_wiki.php')));
     $tree->add_link(new AdminModuleLink($LANG['authorizations'], new Url('/wiki/admin_wiki_groups.php')));
     $tree->add_link(new ModuleLink($LANG['wiki_create_article'], new Url('/wiki/post.php' . ($id_cat > 0 ? '?id_parent=' . $id_cat : '')), $current_user->check_auth($config->get_authorizations(), WIKI_CREATE_ARTICLE)));
     $tree->add_link(new ModuleLink($LANG['wiki_create_cat'], new Url('/wiki/post.php?type=cat' . ($id_cat > 0 ? '&id_parent=' . $id_cat : '')), $current_user->check_auth($config->get_authorizations(), WIKI_CREATE_CAT)));
     if ($current_user->check_level(User::MEMBER_LEVEL)) {
         $tree->add_link(new ModuleLink($LANG['wiki_followed_articles'], new Url('/wiki/favorites.php')));
     }
     $tree->add_link(new ModuleLink($LANG['wiki_explorer_short'], new Url('/wiki/explorer.php')));
     return $tree;
 }
 public function get_actions_tree_links()
 {
     $lang = LangLoader::get('common', 'newsletter');
     $tree = new ModuleTreeLinks();
     $manage_newsletter_link = new AdminModuleLink($lang['newsletter.streams.manage'], NewsletterUrlBuilder::manage_streams());
     $manage_newsletter_link->add_sub_link(new AdminModuleLink($lang['newsletter.streams.manage'], NewsletterUrlBuilder::manage_streams()));
     $manage_newsletter_link->add_sub_link(new AdminModuleLink($lang['stream.add'], NewsletterUrlBuilder::add_stream()));
     $tree->add_link($manage_newsletter_link);
     $tree->add_link(new AdminModuleLink(LangLoader::get_message('configuration', 'admin'), NewsletterUrlBuilder::configuration()));
     $tree->add_link(new ModuleLink($lang['newsletter-add'], NewsletterUrlBuilder::add_newsletter(), NewsletterAuthorizationsService::default_authorizations()->create_newsletters()));
     $tree->add_link(new ModuleLink($lang['newsletter.archives'], NewsletterUrlBuilder::archives(), NewsletterAuthorizationsService::default_authorizations()->read_archives()));
     return $tree;
 }
Exemplo n.º 11
0
 public function get_actions_tree_links()
 {
     $lang = LangLoader::get('common', 'download');
     $tree = new ModuleTreeLinks();
     $manage_categories_link = new AdminModuleLink(LangLoader::get_message('categories.manage', 'categories-common'), DownloadUrlBuilder::manage_categories());
     $manage_categories_link->add_sub_link(new AdminModuleLink(LangLoader::get_message('categories.manage', 'categories-common'), DownloadUrlBuilder::manage_categories()));
     $manage_categories_link->add_sub_link(new AdminModuleLink(LangLoader::get_message('category.add', 'categories-common'), DownloadUrlBuilder::add_category()));
     $tree->add_link($manage_categories_link);
     $manage_link = new AdminModuleLink($lang['download.manage'], DownloadUrlBuilder::manage());
     $manage_link->add_sub_link(new AdminModuleLink($lang['download.manage'], DownloadUrlBuilder::manage()));
     $manage_link->add_sub_link(new AdminModuleLink($lang['download.actions.add'], DownloadUrlBuilder::add(AppContext::get_request()->get_getint('id_category', Category::ROOT_CATEGORY))));
     $tree->add_link($manage_link);
     $tree->add_link(new AdminModuleLink(LangLoader::get_message('configuration', 'admin-common'), DownloadUrlBuilder::configuration()));
     if (!AppContext::get_current_user()->check_level(User::ADMIN_LEVEL)) {
         $tree->add_link(new ModuleLink($lang['download.actions.add'], DownloadUrlBuilder::add(AppContext::get_request()->get_getint('id_category', Category::ROOT_CATEGORY)), DownloadAuthorizationsService::check_authorizations()->write() || DownloadAuthorizationsService::check_authorizations()->contribution()));
     }
     $tree->add_link(new ModuleLink($lang['download.pending'], DownloadUrlBuilder::display_pending(), DownloadAuthorizationsService::check_authorizations()->write() || DownloadAuthorizationsService::check_authorizations()->contribution() || DownloadAuthorizationsService::check_authorizations()->moderation()));
     return $tree;
 }
Exemplo n.º 12
0
 public function get_actions_tree_links()
 {
     $lang = LangLoader::get('common', 'forum');
     $tree = new ModuleTreeLinks();
     $manage_categories_link = new AdminModuleLink(LangLoader::get_message('categories.manage', 'categories-common'), ForumUrlBuilder::manage_categories());
     $manage_categories_link->add_sub_link(new AdminModuleLink(LangLoader::get_message('categories.manage', 'categories-common'), ForumUrlBuilder::manage_categories()));
     $manage_categories_link->add_sub_link(new AdminModuleLink(LangLoader::get_message('category.add', 'categories-common'), ForumUrlBuilder::add_category()));
     $tree->add_link($manage_categories_link);
     $manage_ranks_link = new AdminModuleLink($lang['forum.manage_ranks'], ForumUrlBuilder::manage_ranks());
     $manage_ranks_link->add_sub_link(new AdminModuleLink($lang['forum.manage_ranks'], ForumUrlBuilder::manage_ranks()));
     $manage_ranks_link->add_sub_link(new AdminModuleLink($lang['forum.actions.add_rank'], ForumUrlBuilder::add_rank()));
     $tree->add_link($manage_ranks_link);
     $tree->add_link(new AdminModuleLink(LangLoader::get_message('configuration', 'admin-common'), ForumUrlBuilder::configuration()));
     $tree->add_link(new AdminModuleLink(LangLoader::get_message('moderation_panel', 'main'), ForumUrlBuilder::moderation_panel()));
     return $tree;
 }
Exemplo n.º 13
0
 public function get_actions_tree_links()
 {
     $request = AppContext::get_request();
     $year = $request->get_getint('year', date('Y'));
     $month = $request->get_getint('month', date('n'));
     $day = $request->get_getint('day', date('j'));
     $lang = LangLoader::get('common', 'calendar');
     $tree = new ModuleTreeLinks();
     $manage_categories_link = new AdminModuleLink(LangLoader::get_message('categories.manage', 'categories-common'), CalendarUrlBuilder::manage_categories());
     $manage_categories_link->add_sub_link(new AdminModuleLink(LangLoader::get_message('categories.manage', 'categories-common'), CalendarUrlBuilder::manage_categories()));
     $manage_categories_link->add_sub_link(new AdminModuleLink(LangLoader::get_message('category.add', 'categories-common'), CalendarUrlBuilder::add_category()));
     $tree->add_link($manage_categories_link);
     $manage_events_link = new AdminModuleLink($lang['calendar.manage'], CalendarUrlBuilder::manage_events());
     $manage_events_link->add_sub_link(new AdminModuleLink($lang['calendar.manage'], CalendarUrlBuilder::manage_events()));
     $manage_events_link->add_sub_link(new AdminModuleLink($lang['calendar.titles.add_event'], CalendarUrlBuilder::add_event($year, $month, $day)));
     $tree->add_link($manage_events_link);
     $tree->add_link(new AdminModuleLink(LangLoader::get_message('configuration', 'admin-common'), CalendarUrlBuilder::configuration()));
     if (!AppContext::get_current_user()->check_level(User::ADMIN_LEVEL)) {
         $tree->add_link(new ModuleLink($lang['calendar.titles.add_event'], CalendarUrlBuilder::add_event($year, $month, $day), CalendarAuthorizationsService::check_authorizations()->write() || CalendarAuthorizationsService::check_authorizations()->contribution()));
     }
     $tree->add_link(new ModuleLink($lang['calendar.events_list'], CalendarUrlBuilder::events_list($year, $month, $day), CalendarAuthorizationsService::check_authorizations()->read()));
     $tree->add_link(new ModuleLink($lang['calendar.pending'], CalendarUrlBuilder::display_pending_events(), CalendarAuthorizationsService::check_authorizations()->write() || CalendarAuthorizationsService::check_authorizations()->contribution() || CalendarAuthorizationsService::check_authorizations()->moderation()));
     return $tree;
 }
Exemplo n.º 14
0
 public function get_actions_tree_links()
 {
     global $LANG;
     load_module_lang('pages');
     //Chargement de la langue du module.
     require_once PATH_TO_ROOT . '/pages/pages_defines.php';
     $current_user = AppContext::get_current_user();
     $config = PagesConfig::load();
     $tree = new ModuleTreeLinks();
     $manage_ranks_link = new AdminModuleLink($LANG['pages_manage'], new Url('/pages/pages.php'));
     $manage_ranks_link->add_sub_link(new AdminModuleLink($LANG['pages_manage'], new Url('/pages/pages.php')));
     $manage_ranks_link->add_sub_link(new AdminModuleLink($LANG['pages_create'], new Url('/pages/post.php')));
     $tree->add_link($manage_ranks_link);
     $tree->add_link(new AdminModuleLink(LangLoader::get_message('configuration', 'admin'), new Url('/pages/admin_pages.php')));
     if (!$current_user->check_level(User::ADMIN_LEVEL)) {
         $tree->add_link(new ModuleLink($LANG['pages_create'], new Url('/pages/post.php'), $current_user->check_auth($config->get_authorizations(), EDIT_PAGE)));
     }
     $tree->add_link(new ModuleLink($LANG['pages_redirection_manage'], new Url('/pages/action.php'), $current_user->check_auth($config->get_authorizations(), EDIT_PAGE)));
     $tree->add_link(new ModuleLink($LANG['pages_explorer'], new Url('/pages/explorer.php'), $current_user->check_auth($config->get_authorizations(), EDIT_PAGE)));
     return $tree;
 }
Exemplo n.º 15
0
 public function get_actions_tree_links()
 {
     $lang = LangLoader::get('common', 'media');
     $tree = new ModuleTreeLinks();
     $manage_categories_link = new AdminModuleLink(LangLoader::get_message('categories.manage', 'categories-common'), MediaUrlBuilder::manage_categories());
     $manage_categories_link->add_sub_link(new AdminModuleLink(LangLoader::get_message('categories.manage', 'categories-common'), MediaUrlBuilder::manage_categories()));
     $manage_categories_link->add_sub_link(new AdminModuleLink(LangLoader::get_message('category.add', 'categories-common'), MediaUrlBuilder::add_category()));
     $tree->add_link($manage_categories_link);
     $manage_media_link = new AdminModuleLink($lang['media.manage'], MediaUrlBuilder::manage());
     $manage_media_link->add_sub_link(new AdminModuleLink($lang['media.manage'], MediaUrlBuilder::manage()));
     $manage_media_link->add_sub_link(new AdminModuleLink($lang['media.actions.add'], MediaUrlBuilder::add()));
     $tree->add_link($manage_media_link);
     $tree->add_link(new AdminModuleLink(LangLoader::get_message('configuration', 'admin-common'), MediaUrlBuilder::configuration()));
     if (!AppContext::get_current_user()->check_level(User::ADMIN_LEVEL)) {
         $tree->add_link(new ModuleLink($lang['media.actions.add'], MediaUrlBuilder::add(), MediaAuthorizationsService::check_authorizations()->write() || MediaAuthorizationsService::check_authorizations()->contribution()));
     }
     return $tree;
 }
Exemplo n.º 16
0
 public function get_actions_tree_links()
 {
     $lang = LangLoader::get('common', 'gallery');
     $tree = new ModuleTreeLinks();
     $manage_categories_link = new AdminModuleLink(LangLoader::get_message('categories.manage', 'categories-common'), GalleryUrlBuilder::manage_categories());
     $manage_categories_link->add_sub_link(new AdminModuleLink(LangLoader::get_message('categories.manage', 'categories-common'), GalleryUrlBuilder::manage_categories()));
     $manage_categories_link->add_sub_link(new AdminModuleLink(LangLoader::get_message('category.add', 'categories-common'), GalleryUrlBuilder::add_category()));
     $tree->add_link($manage_categories_link);
     $manage_gallery_link = new AdminModuleLink($lang['gallery.manage'], GalleryUrlBuilder::manage());
     $manage_gallery_link->add_sub_link(new AdminModuleLink($lang['gallery.manage'], GalleryUrlBuilder::manage()));
     $manage_gallery_link->add_sub_link(new AdminModuleLink($lang['gallery.actions.add'], GalleryUrlBuilder::admin_add(AppContext::get_request()->get_getstring('id_category', 0))));
     $tree->add_link($manage_gallery_link);
     $tree->add_link(new AdminModuleLink(LangLoader::get_message('configuration', 'admin-common'), GalleryUrlBuilder::configuration()));
     if (!AppContext::get_current_user()->check_level(User::ADMIN_LEVEL)) {
         $tree->add_link(new ModuleLink($lang['gallery.actions.add'], GalleryUrlBuilder::add(AppContext::get_request()->get_getstring('id_category', 0)), GalleryAuthorizationsService::check_authorizations()->write()));
     }
     return $tree;
 }
Exemplo n.º 17
0
 public function get_actions_tree_links()
 {
     $tree = new ModuleTreeLinks();
     $tree->add_link(new AdminModuleLink(LangLoader::get_message('configuration', 'admin'), SitemapUrlBuilder::get_general_config()));
     return $tree;
 }
Exemplo n.º 18
0
 public function get_actions_tree_links()
 {
     $tree = new ModuleTreeLinks();
     $tree->add_link(new AdminModuleLink(LangLoader::get_message('configuration', 'admin-common'), OnlineUrlBuilder::configuration()));
     return $tree;
 }