コード例 #1
0
        def GET(self):
                """
                """
                posts = pm.postList()

                view = bv.sidebarView()

                elements = be.adminElements()
                view["nav"] = elements.navbar()
                view["sidebar"] = elements.sidebar()

                view["title"] = "Posts"
                view["messages"] = bv.baseRow(c.session.getMessages(), 12, 0)

                pageHead = """Want to <a href="%s">add another post?</a>""" % ("/admin/posts/new")

                if posts:
                        postList = bl.baseList(posts, "row_list_Post")

                        content = bv.baseRow(postList, 8, 0)

                else:
                        content = "You don't have any posts at this time!"

                view["content"] = bv.baseRow([pageHead, content], 8, 0)

                return view.build()
コード例 #2
0
        def GET(self):
                """

                """
                users = am.userList()

                view = bv.sidebarView()

                elements = be.adminElements()
                view["nav"] = elements.navbar()
                view["sidebar"] = elements.sidebar()

                view["title"] = "Users"
                view["messages"] = bv.baseRow(c.session.getMessages(), 12, 0)

                pageHead = """What to <a href="%s">add a user?</a>""" % ("/admin/users/new")

                if users:
                        userList = bl.baseList(users, "row_list_User")

                        content = bv.baseRow(userList, 8, 0)

                else:
                        content = "Well either all of your users have god perms and aren't shown, or you don't have any additional users!"

                view["content"] = bv.baseRow([pageHead, content], 8, 0)

                return view.build()
コード例 #3
0
ファイル: index.py プロジェクト: JoshAshby/seshat_historical
        def GET(self):
                """

                """
                posts = pm.postList()

                view = bv.noSidebarView()

                elements = be.baseElements()
                view["nav"] = elements.navbar()

                view["title"] = "Home"
                view["messages"] = bv.baseRow(c.session.getMessages(), 12, 0)


                postList = bl.baseList(posts, "post_index")

                view["content"] = bv.baseRow(postList)

                return view.build()