def admin_booking_text_save(request): page = StaticPages.get_by_name(StaticPages.TYPE_BOOKING) page.save( request.params.get('txt'), request.params.get('txt_en'), title=request.params.get('title'), title_en=request.params.get('title_en')) request.session.flash(u'INFO: Booking page saved!') return HTTPFound(location=request.route_url('admin_booking_text'))
def admin_contact_text_save(request): page = StaticPages.get_by_name(StaticPages.TYPE_CONTACT) page.save( request.params.get('txt'), request.params.get('txt_en'), title=request.params.get('title'), title_en=request.params.get('title_en')) request.session.flash(u'INFO: contact page saved!') return HTTPFound(location=request.route_url('admin_contact_text'))
def admin_events_text_save(request): page = StaticPages.get_by_name(StaticPages.TYPE_EVENTS) page.save( request.params.get("txt"), request.params.get("txt_en"), title=request.params.get("title"), title_en=request.params.get("title_en"), ) request.session.flash(u"INFO: Events page saved!") return HTTPFound(location=request.route_url("admin_events_text"))
def admin_beer_wall_text_save(request): page = StaticPages.get_by_name(StaticPages.TYPE_BEER_WALL) page.save( request.params.get('txt'), request.params.get('txt_en'), title = request.params.get('title'), title_en = request.params.get('title_en') ) request.session.flash(u'INFO: Beer Wall page saved!') return HTTPFound(location=request.route_url('admin_beer_wall_text'))
def admin_contact_text(request): return { 'txt': StaticPages.get_by_name(StaticPages.TYPE_CONTACT) }
def admin_events_text(request): return {"txt": StaticPages.get_by_name(StaticPages.TYPE_EVENTS)}
def admin_about_us_text_save(request): page = StaticPages.get_by_name(StaticPages.TYPE_ABOUT_US) page.save(request.params.get('txt'), request.params.get('txt_en')) request.session.flash(u'INFO: About us page saved!') return HTTPFound(location=request.route_url('admin_about_us_text'))
def admin_about_us_text(request): return { 'txt': StaticPages.get_by_name(StaticPages.TYPE_ABOUT_US) }
def admin_location_text(request): return { 'txt': StaticPages.get_by_name(StaticPages.TYPE_LOCATION) }
def admin_menu_text_save(request): page = StaticPages.get_by_name(StaticPages.TYPE_MENU) page.save(request.params.get('txt'), request.params.get('txt_en')) request.session.flash(u'INFO: Menu page saved!') return HTTPFound(location=request.route_url('admin_menu_edit'))
def admin_menu_edit(request): return { 'txt': StaticPages.get_by_name(StaticPages.TYPE_MENU), 'menus': Menu.get_all() }
def admin_booking_text(request): return { 'txt': StaticPages.get_by_name(StaticPages.TYPE_BOOKING) }
def admin_beer_wall_text(request): return { 'txt': StaticPages.get_by_name(StaticPages.TYPE_BEER_WALL) }