Example #1
0
def include_receipts_views(config):
    """
    Add views for payments configuration
    """
    config.add_route("admin_receipts", "admin/receipts")

    all_views = [
        (
            MainReceiptsConfig,
            "admin_main_receipts",
            "/admin/main.mako",
        ),
        get_model_admin_view(BankAccount, r_path="admin_receipts"),
    ]

    for view, route_name, tmpl in all_views:
        config.add_route(route_name, "admin/" + route_name)
        config.add_admin_view(
            view,
            route_name=route_name,
            renderer=tmpl,
        )

    config.add_admin_view(
        make_enter_point_view(
            "admin_vente",
            all_views,
            u"Configuration comptables du module encaissements",
        ),
        route_name='admin_receipts'
    )
Example #2
0
def include_receipts_views(config):
    """
    Add views for payments configuration
    """
    config.add_route("admin_receipts", "admin/receipts")

    all_views = [
        (
            MainReceiptsConfig,
            "admin_main_receipts",
            "/admin/main.mako",
        ),
        get_model_admin_view(BankAccount, r_path="admin_receipts"),
    ]

    for view, route_name, tmpl in all_views:
        config.add_route(route_name, "admin/" + route_name)
        config.add_admin_view(
            view,
            route_name=route_name,
            renderer=tmpl,
        )

    config.add_admin_view(
        make_enter_point_view(
            "admin_vente",
            all_views,
            u"Configuration comptables du module encaissements",
        ),
        route_name='admin_receipts'
    )
Example #3
0
def include_userdatas_views(config):
    """
    Include views related to userdatas configuration
    """
    all_option_views = list(get_all_userdatas_views())
    for view, route_name, tmpl in all_option_views:
        config.add_route(route_name, "admin/" + route_name)
        config.add_admin_view(
            view,
            route_name=route_name,
            renderer=tmpl,
        )

    config.add_admin_view(
        TemplateDisableView,
        route_name='template',
        request_param='action=disable',
    )

    config.add_admin_view(
        TemplateDeleteView,
        route_name='template',
        request_param='action=delete',
    )

    config.add_admin_view(
        file_dl_view,
        route_name='template',
    )

    config.add_admin_view(
        TemplateEditView,
        route_name='template',
        renderer='admin/template_edit.mako',
        request_param='action=edit',
    )

    config.add_admin_view(
        TemplateUploadView,
        route_name='templates',
        renderer='admin/template_add.mako',
        request_param='action=new',
    )

    config.add_admin_view(
        make_enter_point_view(
            'admin_index',
            all_option_views,
            u"Configuration de la gestion sociale"
        ),
        route_name="admin_userdatas",
    )
Example #4
0
def include_userdatas_views(config):
    """
    Include views related to userdatas configuration
    """
    all_option_views = list(get_all_userdatas_views())
    for view, route_name, tmpl in all_option_views:
        config.add_route(route_name, "admin/" + route_name)
        config.add_admin_view(
            view,
            route_name=route_name,
            renderer=tmpl,
        )

    config.add_admin_view(
        TemplateDisableView,
        route_name='template',
        request_param='action=disable',
    )

    config.add_admin_view(
        TemplateDeleteView,
        route_name='template',
        request_param='action=delete',
    )

    config.add_admin_view(
        file_dl_view,
        route_name='template',
    )

    config.add_admin_view(
        TemplateEditView,
        route_name='template',
        renderer='admin/template_edit.mako',
        request_param='action=edit',
    )

    config.add_admin_view(
        TemplateUploadView,
        route_name='templates',
        renderer='admin/template_add.mako',
        request_param='action=new',
    )

    config.add_admin_view(
        make_enter_point_view('admin_index', all_option_views,
                              u"Configuration de la gestion sociale"),
        route_name="admin_userdatas",
    )