示例#1
0
 def menuItems(self, menuId):
     menu = None
     if menuId == "topMenu":
         reloadJS = "parent.top.list.location.reload(true);"
         menu = [
             MenuItem('id_auth_tmPages', _("Auth pages"), None, 1000,
                      False),
             MenuItem('id_auth_Login', _("Login"), None, 1100,
                      'id_auth_tmPages'),
             MenuItem('id_auth_Logout',
                      _("Logout"),
                      h.url_for('logout'),
                      1200,
                      'id_auth_tmPages',
                      onclick=reloadJS,
                      target="_top"),
             MenuItem('id_auth_Kill',
                      _("Kill session"),
                      h.url_for('logout'),
                      1300,
                      'id_auth_tmPages',
                      onclick=reloadJS,
                      target="_top"),
             MenuItem('id_auth_Reg', _("Register"),
                      h.url_for('register', invite='register'), 1400,
                      'id_auth_tmPages'),
         ]
     return menu
示例#2
0
    def menuItems(self, menuId):
        menu = None
        if menuId == "topMenu":
            menu = [
                MenuItem('id_profile_ProfileQS', _("Quick switch"), None, 200,
                         'id_profile_Profile'),
                MenuItem('id_profile_frame', "", "", 300,
                         'id_profile_Profile'),
                MenuItem('id_profile_style', _("Style"), None, 400,
                         'id_profile_Profile'),
            ]

            #for style in c.styles:
        return menu
示例#3
0
 def menuItems(self, menuId):
     menu = None
     if menuId == "managementMenu":
         menu = (MenuItem('id_ImportThread', _("Import thread"),
                          h.url_for('hsImportThread'), 601,
                          'id_adminPosts'), )
     return menu
示例#4
0
 def menuItems(self, menuId):
     #          id        link       name                weight   parent
     menu = None
     if menuId == "managementMenu":
         menu = (MenuItem('id_hsMaintenance', _("Maintenance"),
                          h.url_for('hsMaintenance'), 300, False), )
     return menu
示例#5
0
 def menuItems(self, menuId):
     menu = None
     if menuId == "managementMenu":
         menu = (MenuItem('id_FilesMod', _("Files"),
                          h.url_for('hsFileMod', page=0), 601,
                          'id_adminPosts'), )
     return menu
示例#6
0
 def menuItems(self, menuId):
     #          id        link       name                weight   parent
     menu = None
     if menuId == "managementMenu":
         menu = (MenuItem('id_RebuildJs', N_("Rebuild JavaScript"), h.url_for('hsRebuildJs'), 310, 'id_hsMaintenance'),
                 )
     return menu
示例#7
0
 def menuItems(self, menuId):
     #          id        link       name                weight   parent
     menu = None
     if menuId == "managementMenu":
         menu = (MenuItem('id_ListPlugins', N_("Show active plugins"),
                          h.url_for('hsListPlugins'), 320,
                          'id_hsMaintenance'), )
     return menu
示例#8
0
 def menuItems(self, menuId):
     menu = None
     if menuId == "topMenu":
         menu = [
             MenuItem('id_profile_ProfileTop',
                      _("Profile"),
                      None,
                      250,
                      False,
                      collapse=True),
             MenuItem('id_profile_Profile', _("Profile"),
                      h.url_for('userProfile'), 100,
                      'id_profile_ProfileTop'),
             MenuItem('id_profile_ProfileSub', _("Profile"),
                      h.url_for('userProfile'), 100, 'id_profile_Profile'),
         ]
     return menu
示例#9
0
 def insertAfterMenuItem(self, menuItem, baseController):
     user = baseController.userInst
     ret = []
     if menuItem.id == 'id_profile_style':
         onclicktemplate = "changeCSS(event, '%s', '%s')"
         for style in c.styles:
             ret.append(
                 MenuItem('id_profile_style_%s' % style,
                          style,
                          h.url_for('ajChangeOption',
                                    name='style',
                                    value=style,
                                    returnTo=c.currentURL),
                          401,
                          'id_profile_Profile',
                          onclick=onclicktemplate %
                          (style, h.staticFile("%s.css" % style))))
     return ret
示例#10
0
 def menuItems(self, menuId):
     #          id        link       name                weight   parent
     menu = None
     if menuId == "managementMenu":
         menu = (
             MenuItem('id_adminDashboard', _("Dashboard"),
                      h.url_for('holySynod'), 200, False),
             MenuItem('id_adminBoard', _("Common settings"), None, 200,
                      False),
             MenuItem('id_adminUsers', _("Users"), None, 210, False),
             MenuItem('id_adminPosts', _("Threads and posts"), None, 220,
                      False),
             MenuItem('id_hsExtensions', _("Manage extensions"),
                      h.url_for('hsExtensions'), 240, 'id_adminBoard'),
             MenuItem('id_hsUsers', _("Manage users"), h.url_for('hsUsers'),
                      220, 'id_adminUsers'),
             MenuItem('id_hsBans', _("Manage bans"), h.url_for('hsBans'),
                      230, 'id_adminUsers'),
             MenuItem('id_hsInvite', _("Generate invite"),
                      h.url_for('hsInvite'), 270, 'id_adminUsers'),
             MenuItem('id_hsBoards', _("Manage boards"),
                      h.url_for('hsBoards'), 210, 'id_adminPosts'),
             MenuItem('id_hsMappings', _("Manage mappings"),
                      h.url_for('hsMappings'), 250, 'id_adminPosts'),
             MenuItem('id_hsMergeTags', _("Merge tags"),
                      h.url_for('hsMergeTags'), 270, 'id_adminPosts'),
             MenuItem('id_hsViewLogBase', _("View logs"),
                      h.url_for('hsViewLogBase'), 260, False),
         )
     elif menuId == 'topMenu':
         menu = (MenuItem('id_view_links_synod', _('Holy Synod'),
                          h.url_for('holySynod'), 100, 'id_view_tmLinks'), )
     return menu
示例#11
0
    def menuItems(self, menuId):
        menu = None
        if menuId == "topMenu":
            menu = [
                MenuItem('id_view_tmSpecialPagesTop', _("Special pages"), None,
                         100, False),
                MenuItem('id_view_tmSpecialPages', _("Special pages"), None,
                         100, 'id_view_tmSpecialPagesTop'),
                MenuItem('id_view_tmBoards', _("Boards"), None, 200, False),
                MenuItem('id_view_tmLinksTop',
                         _("Links"),
                         None,
                         300,
                         False,
                         collapse=True),
                MenuItem('id_view_tmLinks', _("Links"), None, 100,
                         'id_view_tmLinksTop'),
                MenuItem('id_view_overview', _("~"),
                         h.url_for('boardBase', board='~'), 100,
                         'id_view_tmSpecialPages', _('Overview')),
                MenuItem('id_view_related', _("@"),
                         h.url_for('boardBase', board='@'), 200,
                         'id_view_tmSpecialPages', _('Related threads')),
                MenuItem('id_view_mythreads', _("*"),
                         h.url_for('boardBase', board='*'), 300,
                         'id_view_tmSpecialPages', _('My threads')),
                MenuItem('id_view_homepage', _("!"),
                         h.url_for('boardBase', board='!'), 400,
                         'id_view_tmSpecialPages', _('Home')),
            ]

            tagsections = g.caches.setdefaultEx('boardlist', chBoardList)
            for section, sectionName, sectionId in tagsections:
                submenuId = 'id_view_tagsection_%d' % sectionId
                menu.append(
                    MenuItem(submenuId, sectionName, None, 200 + sectionId * 5,
                             'id_view_tmBoards'))

                for id, tag in enumerate(section):
                    menu.append(
                        MenuItem('id_view_tag_%s' % tag.tag, tag.tag,
                                 h.url_for('boardBase', board=tag.tag), id,
                                 submenuId, tag.comment))

            menu.append(
                MenuItem("id_view_links_special", _("Special"), None, 0,
                         'id_view_tmLinks'))
            menu.append(
                MenuItem("id_view_links_log", _("Logs"),
                         h.url_for('viewLogBase'), 100, 'id_view_tmLinks'))
            menu.append(
                MenuItem("id_view_links_caption", _("Other"), None, 200,
                         'id_view_tmLinks'))
            for id, link in enumerate(g.additionalLinks):
                menu.append(
                    MenuItem("id_view_link_%s" % link[0], link[1], link[0],
                             200 + id, 'id_view_tmLinks'))
        return menu
示例#12
0
 def menuItems(self, menuId):
     menu = None
     if menuId == "managementMenu":
         menu = (MenuItem('id_ExtSettings', _("Extended settings"),
                          h.url_for('hsCfgManage'), 601, 'id_adminBoard'), )
     return menu