def index(page):
    limit = app.config.get('PAGINATOR_PER_PAGE', 25)
    count = g.proxies.Mails.count()
    mails = g.proxies.Mails.index(page=page, limit=limit)
    paginator = Paginator(page, limit, count)
    facade = Facade(mails=mails,paginator=paginator)
    return facade
def index(page):
    limit = app.config.get('PAGINATOR_PER_PAGE', 25)
    serviceGroups = g.proxies.ServiceGroups.index(page=page, limit=limit)
    count = g.proxies.ServiceGroups.count()

    paginator = Paginator(page, limit, count)
    facade = Facade(serviceGroups=serviceGroups, paginator=paginator)
    return facade
Exemple #3
0
def index(page):
    limit = app.config.get('PAGINATOR_PER_PAGE', 25)
    printJobs = g.proxies.StayPrintjobs.index(page=page, limit=limit)
    count = g.proxies.StayPrintjobs.count()

    paginator = Paginator(page, limit, count)
    facade = Facade(stayPrintJobs=printJobs, paginator=paginator)
    return facade
Exemple #4
0
def index(page):
    limit = app.config.get('PAGINATOR_PER_PAGE', 25)
    stays = g.proxies.Stays.index(active=True,
                                  page=page,
                                  with_rooms=True,
                                  with_guests=True,
                                  limit=limit)
    count = g.proxies.Stays.count(active=True)
    paginator = Paginator(page, limit, count)

    return Facade(stays=stays, paginator=paginator)
def index(page):
    '''
    Paginates all the navigators
    '''

    limit = app.config.get('PAGINATOR_PER_PAGE', 25)
    count = g.proxies.Navigators.count()
    navigators = g.proxies.Navigators.index(page=page, limit=limit)
    paginator = Paginator(page, limit, count)
    facade = Facade(navigators=navigators, paginator=paginator)
    return facade
Exemple #6
0
def index(page):
    limit = app.config.get('PAGINATOR_PER_PAGE', 25)
    servicePurchases = g.proxies.ServicePurchases.index(
        page=page, limit=limit, with_service_options=True)

    serviceGroups = dict(g.proxies.ServiceGroups.list())

    count = g.proxies.ServicePurchases.count()

    paginator = Paginator(page, limit, count)

    facade = Facade(servicePurchases=servicePurchases,
                    paginator=paginator,
                    serviceGroups=serviceGroups)
    return facade
def view(group_id, page):
    limit = app.config.get('PAGINATOR_PER_PAGE', 25)
    group = g.proxies.Groups.from_id(group_id, with_pms_groups=True)
    if not group:
        abort(404)

    stays = g.proxies.Stays.index(page=page,
                                  active=True,
                                  group_id=group_id,
                                  with_rooms=True)
    stays_count = g.proxies.Stays.count(active=True, group_id=group_id)

    paginator = Paginator(page, limit, stays_count)
    forms = {}
    for pmsGroup in group['PmsGroup']:
        forms[pmsGroup['id']] = GroupPmsRemoveForm(
            pms_group=pmsGroup['pms_group'])

    return Facade(deleteForms=forms,
                  group=group,
                  stays=stays,
                  stays_count=stays_count,
                  paginator=paginator)