def blog(identifier): actions = menubar("blog", g.role.id) i = int(identifier) if i == 0: item = Blog.query.order_by( Blog.changedOn.desc()).first() # @UndefinedVariable else: item = Blog.get(i) if not item: return render("modules/blog-empty.html", actions=actions) ownership = (item.author == g.user) item.actions = contextmenu("blog", g.role.id, ownership) return render("modules/blog.html", item=item, actions=actions)
def entries(): items = Menu.all() actions = menubar("menu", g.role.id) for item in items: item.actions = contextmenu("menu", g.role.id) return render("core/menu_list.html", items=items, actions=actions)
def listentries(): actions = menubar("blog", g.role.id) items = Blog.query.order_by( Blog.changedOn.desc()).all() # @UndefinedVariable return render("modules/blog-list.html", items=items, actions=actions)
def administration(): links = menubar("administration", g.role.id) return render("core/administration.html", links=links)
def view(identifier): return render("pages/%s.html" % (identifier))