示例#1
0
def stays_view(hotel_id, stay_id):
    facade = stays_facade.view(stay_id)
    if not facade:
        return render_template('admin/hotel/stays/no_stay.html')
    facade["hotel_id"] = hotel_id
    #raise Exception(str( facade))
    return render_template('admin/hotel/stays/view.html', **facade)
示例#2
0
def stays_view(hotel_id, stay_id):
    facade = stays_facade.view(stay_id)
    if not facade:
        return render_template('admin/hotel/stays/no_stay.html')
    facade["hotel_id"] = hotel_id
    #raise Exception(str( facade))
    return render_template('admin/hotel/stays/view.html', **facade)
示例#3
0
def stays_by_room_number(hotel_id):

    facade = stays_facade.by_room_number()
    if facade.empty_results:
        return redirect(url_for('.search', hotel_id=hotel_id))
    if not facade.successful:
        return render_template('helpdesk/search.html', **facade)
    if len(facade['stays']) == 1:
        return redirect(url_for('.stays_view', hotel_id=hotel_id, stay_id=facade['stays'][0]['Stay']['id']))

    return render_template('helpdesk/stays/by_room_number.html', **facade)
示例#4
0
def stays_by_room_number(hotel_id):

    facade = stays_facade.by_room_number()
    if facade.empty_results:
        return redirect(url_for('.search', hotel_id=hotel_id))
    if not facade.successful:
        return render_template('helpdesk/search.html', **facade)
    if len(facade['stays']) == 1:
        return redirect(
            url_for('.stays_view',
                    hotel_id=hotel_id,
                    stay_id=facade['stays'][0]['Stay']['id']))

    return render_template('helpdesk/stays/by_room_number.html', **facade)
示例#5
0
def service_coupons_edit(hotel_id, service_coupon_id):
    facade = service_coupons_facade.edit(service_coupon_id)

    if facade.successful:
        return redirect(url_for('.service_coupons_view', hotel_id=hotel_id, service_coupon_id=facade['service_coupon_id']))

    return render_template('admin/hotel/service_coupons/edit.html', **facade)
示例#6
0
def printer_disable(hotel_id, printer_id):
    g.proxies.Printers.disable_printer(printer_id)
    printers = g.proxies.Printers.index()
    printer = printers[printer_id]
    return render_template('admin/hotel/printers/view.html',
                           printer_id=printer_id,
                           printer=printer)
示例#7
0
def printer_cancel_print_jobs(hotel_id, printer_id):
    g.proxies.Printers.cancel_all_jobs(printer_id)
    printers = g.proxies.Printers.index()
    printer = printers[printer_id]
    return render_template('admin/hotel/printers/view.html',
                           printer_id=printer_id,
                           printer=printer)
示例#8
0
def printer_view(hotel_id, printer_id):
    printers = g.proxies.Printers.index()
    printer = printers[printer_id]
    print printer
    return render_template('admin/hotel/printers/view.html',
                           printer_id=printer_id,
                           printer=printer)
示例#9
0
def hotels_view(hotel_id):
    hotel = Hotel.query.filter_by(id=hotel_id).first()
    if not hotel:
        abort(404)

    form = HotelDeleteForm(id=hotel.id)
    return render_template('admin/hotels/view.html', hotel=hotel, form=form)
示例#10
0
def hotels_view(hotel_id):
    hotel = Hotel.query.filter_by(id=hotel_id).first()
    if not hotel:
        abort(404)

    form = HotelDeleteForm(id = hotel.id)
    return render_template('admin/hotels/view.html', hotel=hotel, form=form)
示例#11
0
def service_options_edit(hotel_id, service_option_id):
    facade = service_options_facade.edit(service_option_id)
    if facade.successful:
        return redirect(
            url_for('.service_options_view',
                    hotel_id=hotel_id,
                    service_option_id=facade['service_option_id']))
    return render_template('admin/hotel/service_options/edit.html', **facade)
示例#12
0
def service_groups_add(hotel_id):
    facade = service_groups_facade.add()
    if facade.successful:
        return redirect(
            url_for('.service_groups_view',
                    hotel_id=hotel_id,
                    service_group_id=service_group_id))
    return render_template('admin/hotel/service_groups/add.html', **facade)
示例#13
0
def rooms_add(hotel_id):
    facade = rooms_facade.add()
    if facade.successful:
        return redirect(
            url_for('.rooms_view',
                    hotel_id=hotel_id,
                    room_id=facade['room_id']))
    return render_template('admin/hotel/rooms/add.html', **facade)
示例#14
0
def navigators_edit(hotel_id, navigator_id):
    facade = navigators_facade.edit(navigator_id)
    if facade.successful:
        return redirect(
            url_for('.navigators_view',
                    hotel_id=hotel_id,
                    navigator_id=navigator_id))
    return render_template('admin/hotel/navigators/edit.html', **facade)
示例#15
0
def navigators_room_move(hotel_id, navigator_id):
    facade = navigators_facade.room_move(navigator_id)
    if facade.successful:
        return redirect(
            url_for('.navigators_view',
                    hotel_id=hotel_id,
                    navigator_id=navigator_id))
    return render_template('helpdesk/navigators/room_move.html', **facade)
示例#16
0
def printer_configurations_add(hotel_id):
    facade = printer_configurations_facade.add()

    if 'printer_configuration_id' in facade:
        flash("Printer configuration added.", 'success')
        return redirect(url_for('.printer_configurations_index', hotel_id=hotel_id))

    return render_template('admin/hotel/printer_configurations/add.html', **facade)
示例#17
0
def navigators_add(hotel_id):
    facade = navigators_facade.add()
    if facade.successful:
        return redirect(
            url_for('.navigators_view',
                    hotel_id=hotel_id,
                    navigator_id=facade['navigator_id']))
    return render_template('admin/hotel/navigators/add.html', **facade)
示例#18
0
def printer_configurations_edit(hotel_id, printer_configuration_id):
    facade = printer_configurations_facade.edit(printer_configuration_id)

    if facade.successful:
        flash("Printer configuration updated.", 'success')
        return redirect(url_for('.printer_configurations_index', hotel_id=hotel_id))

    return render_template('admin/hotel/printer_configurations/edit.html', **facade)
示例#19
0
def mails_add(hotel_id):
    facade = mails_facade.add()
    if facade.successful:
        return redirect(
            url_for('.mails_view',
                    hotel_id=hotel_id,
                    mail_id=facade['mail_id']))
    return render_template('admin/hotel/mails/add.html', **facade)
示例#20
0
def printer_configurations_edit(hotel_id, printer_configuration_id):
    facade = printer_configurations_facade.edit(printer_configuration_id)

    if facade.successful:
        flash("Printer configuration updated.", 'success')
        return redirect(
            url_for('.printer_configurations_index', hotel_id=hotel_id))

    return render_template('admin/hotel/printer_configurations/edit.html',
                           **facade)
示例#21
0
def printer_configurations_add(hotel_id):
    facade = printer_configurations_facade.add()

    if 'printer_configuration_id' in facade:
        flash("Printer configuration added.", 'success')
        return redirect(
            url_for('.printer_configurations_index', hotel_id=hotel_id))

    return render_template('admin/hotel/printer_configurations/add.html',
                           **facade)
示例#22
0
def hotels_add():
    form = HotelForm()
    if form.validate_on_submit():
        hotel = Hotel()
        form.populate_obj(hotel)
        db_session.add(hotel)
        db_session.commit()
        flash('Hotel added.', 'success')
        return redirect(url_for('.hotels_index'))

    return render_template('admin/hotels/add.html', form=form)
示例#23
0
def hotels_add():
    form = HotelForm()
    if form.validate_on_submit():
        hotel = Hotel()
        form.populate_obj(hotel)
        db_session.add(hotel)
        db_session.commit()
        flash('Hotel added.', 'success')
        return redirect(url_for('.hotels_index'))

    return render_template('admin/hotels/add.html', form=form)
示例#24
0
def hotels_edit(hotel_id):
    hotel = Hotel.query.filter_by(id=hotel_id).first()
    if not hotel:
        abort(404)

    form = HotelForm(obj=hotel)
    if form.validate_on_submit():
        form.populate_obj(hotel)
        db_session.commit()
        flash('Hotel information updated.', 'success')
        return redirect(url_for('.hotels_view', hotel_id=hotel.id))
    return render_template('admin/hotels/edit.html', form=form, hotel=hotel)
示例#25
0
def hotels_edit(hotel_id):
    hotel = Hotel.query.filter_by(id=hotel_id).first()
    if not hotel:
        abort(404)

    form = HotelForm(obj=hotel)
    if form.validate_on_submit():
        form.populate_obj(hotel)
        db_session.commit()
        flash('Hotel information updated.', 'success')
        return redirect(url_for('.hotels_view', hotel_id=hotel.id))
    return render_template('admin/hotels/edit.html', form=form,hotel=hotel)
示例#26
0
def users_edit(user_id):
    user = User.query.filter_by(id=user_id).first()
    if not user:
        abort(404)

    user_form = UserForm(obj=user)

    verification_form = UserSendVerificationForm(obj=user)
    if user_form.validate_on_submit():
        user_form.populate_obj(user)
        db_session.commit()
        return redirect(url_for('.users_index'))

    return render_template('admin/users/edit.html', user=user, user_form=user_form, verification_form=verification_form)
示例#27
0
def users_edit(user_id):
    user = User.query.filter_by(id=user_id).first()
    if not user:
        abort(404)

    user_form = UserForm(obj=user)

    verification_form = UserSendVerificationForm(obj=user)
    if user_form.validate_on_submit():
        user_form.populate_obj(user)
        db_session.commit()
        return redirect(url_for('.users_index'))

    return render_template('admin/users/edit.html',
                           user=user,
                           user_form=user_form,
                           verification_form=verification_form)
示例#28
0
def groups_view(hotel_id, group_id):
    facade = groups_facade.view(group_id)
    return render_template('helpdesk/groups/view.html', **facade)
示例#29
0
def navigators_view(hotel_id, navigator_id):
    facade = navigators_facade.view(navigator_id)
    return render_template('helpdesk/navigators/view.html', **facade)
示例#30
0
def stays_search(hotel_id):
    facade = stays_facade.search()
    return render_template('admin/hotel/stays/search.html', **facade)
示例#31
0
def search(hotel_id):
    facade = stays_facade.search()
    return render_template('helpdesk/search.html', **facade)
示例#32
0
def stays_view(hotel_id, stay_id):

    facade = stays_facade.view(stay_id)
    if not facade:
        return render_template('helpdesk/stays/index_no_stays.html', **facade)
    return render_template('helpdesk/stays/view.html', **facade)
示例#33
0
def stays_purchases(hotel_id, stay_id):
    facade = stays_facade.purchases(stay_id)
    return render_template('helpdesk/stays/purchases.html', **facade)
示例#34
0
def stays_purchases(hotel_id, stay_id):
    facade = stays_facade.purchases(stay_id)
    return render_template('helpdesk/stays/purchases.html', **facade)
示例#35
0
def service_options_index(hotel_id, page):
    facade = service_options_facade.index(page)
    return render_template('helpdesk/service_options/index.html', **facade)
示例#36
0
def stays_view(hotel_id, stay_id):

    facade = stays_facade.view(stay_id)
    if not facade:
        return render_template('helpdesk/stays/index_no_stays.html', **facade)
    return render_template('helpdesk/stays/view.html', **facade)
示例#37
0
def stays_print_queue(hotel_id, stay_id):
    facade = stays_facade.print_queue(stay_id)

    return render_template('helpdesk/stays/print_queue.html', **facade)
示例#38
0
def stays_index(hotel_id):
    facade = stays_facade.index(page)
    return render_template('helpdesk/stays/index.html', **facade)
示例#39
0
def technicians_add(hotel_id):
    facade = technicians_facade.add()
    if facade.successful:
        return redirect(url_for('.technicians_index'))

    return render_template('admin/hotel/technicians/add.html', **facade)
示例#40
0
def service_groups_index(hotel_id, page):
    facade = service_groups_facade.index(page)
    return render_template('helpdesk/service_groups/index.html', **facade)
示例#41
0
def technicians_edit(hotel_id, technician_id):
    facade = technicians_facade.edit(technician_id)
    if facade.successful:
        return redirect(url_for('.technicians_index', hotel_id=hotel_id))

    return render_template('admin/hotel/technicians/edit.html', **facade)
示例#42
0
def stays_add_purchase(hotel_id, stay_id):
    facade = stays_facade.add_purchase(stay_id)
    if facade.successful:
        return redirect(url_for('.stays_purchases', hotel_id=hotel_id, stay_id=stay_id))
    return render_template('helpdesk/stays/add_purchase.html', **facade)
示例#43
0
def navigators_room_move(hotel_id, navigator_id):
    facade = navigators_facade.room_move(navigator_id)
    if facade.successful:
        return redirect(url_for('.navigators_view', hotel_id=hotel_id, navigator_id=navigator_id))
    return render_template('helpdesk/navigators/room_move.html', **facade)
示例#44
0
def technicians_index(hotel_id):
    technicians = g.proxies.Technicians.index()
    return render_template('admin/hotel/technicians/index.html', technicians=technicians)
示例#45
0
def service_options_view(hotel_id, service_option_id):
    facade = service_options_facade.view(service_option_id)
    return render_template('helpdesk/service_options/view.html', **facade)
示例#46
0
def home():
    hotels = Hotel.query.order_by('name')
    return render_template('helpdesk/home.html', hotels=hotels)
示例#47
0
def stays_print_queue(hotel_id, stay_id):
    facade = stays_facade.print_queue(stay_id)

    return render_template('helpdesk/stays/print_queue.html', **facade)
示例#48
0
def search(hotel_id):
    facade = stays_facade.search()
    return render_template('helpdesk/search.html', **facade)
示例#49
0
def stays_add_purchase(hotel_id, stay_id):
    facade = stays_facade.add_purchase(stay_id)
    if facade.successful:
        return redirect(
            url_for('.stays_purchases', hotel_id=hotel_id, stay_id=stay_id))
    return render_template('helpdesk/stays/add_purchase.html', **facade)
示例#50
0
def stays_index(hotel_id, page):
    facade = stays_facade.index(page)
    return render_template('admin/hotel/stays/index.html', **facade)
示例#51
0
def home():
    hotels = Hotel.query.order_by('name')
    return render_template('helpdesk/home.html', hotels=hotels)
示例#52
0
def groups_view(hotel_id, group_id):
    facade=groups_facade.view(group_id)
    return render_template('helpdesk/groups/view.html', **facade)
示例#53
0
def groups_index(hotel_id):
    groups = g.proxies.Groups.index()
    return render_template('helpdesk/groups/index.html', groups=groups)
示例#54
0
def guests_view(hotel_id, guest_id):
    facade = guests_facade.view(guest_id)
    return render_template('helpdesk/guests/view.html', **facade)
示例#55
0
def guests_view(hotel_id, guest_id):
    facade = guests_facade.view(guest_id)
    return render_template('helpdesk/guests/view.html', **facade)
示例#56
0
def navigators_view(hotel_id, navigator_id):
    facade = navigators_facade.view(navigator_id)
    return render_template('helpdesk/navigators/view.html', **facade)
示例#57
0
def groups_index(hotel_id):
    groups = g.proxies.Groups.index()
    return render_template('helpdesk/groups/index.html', groups=groups)
示例#58
0
def users_index():
    users = User.query.order_by('name')
    form = UserDeleteForm()
    return render_template('admin/users/index.html', users=users, form=form)
示例#59
0
def service_groups_view(hotel_id, service_group_id):
    facade = service_groups_facade.view(service_group_id)
    return render_template('helpdesk/service_groups/view.html', **facade)
示例#60
0
def hotel_home(hotel_id):
    hotel = Hotel.query.filter_by(id=hotel_id).first()
    if not hotel:
        abort(404)

    return render_template('admin/hotel/home.html', hotel=hotel)