Beispiel #1
0
    def GET(self):
        if web.config.theme == 'm' or web.config.theme == 'n':
            v = board_actions()
            return v.subboard_list_get()
        else:
            child_board = board.get_child(1)

            notice_board_path = '/divisionCS/Notice'
            notice_board_id = board._get_board_id_from_path(notice_board_path)
            a = article.get_recent_article_list(notice_board_id, 5)

            student_notice_board_path = '/divisionCS/studentNotice'
            student_notice_board_id = board._get_board_id_from_path(student_notice_board_path)
            b = article.get_recent_article_list(student_notice_board_id, 5)

            freeboard_path = '/garbage'
            freeboard_id = board._get_board_id_from_path(freeboard_path)
            c = article.get_recent_article_list(freeboard_id, 5)

            undergraduate_path = '/divisionCS/undergraduate'
            undergraduate_id = board._get_board_id_from_path(undergraduate_path)
            d = article.get_recent_article_list(undergraduate_id, 5)

            return util.render().main(title = u'전산학과 BBS 노아입니다', lang='ko',
                    board_desc = _('[KAIST CS BBS]'), board_path = '',
                    child_boards = child_board,
                    notice_board_path = notice_board_path, notice_articles = a,
                    student_notice_board_path = student_notice_board_path, student_notice_articles = b, 
                    freeboard_path = freeboard_path, freeboard_articles = c,
                    undergraduate_path = undergraduate_path, undergraduate_articles = d,
                    help_context = 'main')
Beispiel #2
0
 def subboard_list_get(self, board_name = '', board_id = 1):
     board_info = board.get_board_info(board_id)
     child_board = board.get_child(board_id)
     if board_name == "":
         board_name = _('Main menu')
         board_path = ""
     else:
         board_path = board_name
         if board_name[0] != '/':
             board_name = '/%s' % (board_name)
     return util.render().subboard_list(
             lang="ko",
             title = board_name,
             board_path = board_path,
             board_desc = board_info.bDescription,
             stylesheet = board_info.stylesheet,
             child_boards = child_board)