Beispiel #1
0
 def get_menu_entries(self, request):
     category = SETTINGS_MENU_CATEGORY
     return [
         MenuEntry(
             text=_("Taxes"),
             icon="fa fa-pie-chart",
             url="wshop_admin:tax.list",
             category=category,
             subcategory="taxes",
             ordering=1
         ),
         MenuEntry(
             text=_("Customer Tax Groups"),
             icon="fa fa-pie-chart",
             url="wshop_admin:customer_tax_group.list",
             category=category,
             subcategory="taxes",
             ordering=2
         ),
         MenuEntry(
             text=_("Tax Classes"),
             icon="fa fa-pie-chart",
             url="wshop_admin:tax_class.list",
             category=category,
             subcategory="taxes",
             ordering=3
         )
     ]
Beispiel #2
0
 def get_menu_entries(self, request):
     return [
         MenuEntry(text=self.name,
                   icon="fa fa-image",
                   url="wshop_admin:reports.list",
                   category=REPORTS_MENU_CATEGORY)
     ]
Beispiel #3
0
class DisplayUnitModule(AdminModule):
    name = _("Display Units")
    breadcrumbs_menu_entry = MenuEntry(name,
                                       url="wshop_admin:display_unit.list")

    def get_urls(self):
        return get_edit_and_list_urls(
            url_prefix="^display-units",
            view_template=
            "wshop.admin.modules.sales_units.views.DisplayUnit%sView",
            name_template="display_unit.%s",
            permissions=get_default_model_permissions(DisplayUnit))

    def get_menu_entries(self, request):
        return [
            MenuEntry(text=self.name,
                      icon="fa fa-asterisk",
                      url="wshop_admin:display_unit.list",
                      category=STOREFRONT_MENU_CATEGORY,
                      subcategory="settings",
                      ordering=5),
        ]

    def get_required_permissions(self):
        return get_default_model_permissions(DisplayUnit)

    def get_model_url(self, object, kind, shop=None):
        return derive_model_url(DisplayUnit, "wshop_admin:display_unit",
                                object, kind)
Beispiel #4
0
 def get_menu_entries(self, request):
     return [
         MenuEntry(text="OK",
                   url="/OK",
                   category="RestrictedTest",
                   aliases=("spooky", ))
     ]
Beispiel #5
0
class TaxRulesAdminModule(AdminModule):
    name = _("Tax Rules")
    breadcrumbs_menu_entry = MenuEntry(
        name, "wshop_admin:default_tax.tax_rule.list")

    def get_urls(self):
        return get_edit_and_list_urls(
            url_prefix="^default-tax/rules",
            view_template="wshop.default_tax.admin_module.views.TaxRule%sView",
            name_template="default_tax.tax_rule.%s",
            permissions=get_default_model_permissions(TaxRule))

    def get_menu_entries(self, request):
        return [
            MenuEntry(text=_("Tax Rules"),
                      icon="fa fa-file-text",
                      url="wshop_admin:default_tax.tax_rule.list",
                      category=SETTINGS_MENU_CATEGORY,
                      subcategory="taxes",
                      ordering=4,
                      aliases=[_("Show tax rules")])
        ]

    def get_required_permissions(self):
        return get_default_model_permissions(TaxRule)

    def get_model_url(self, object, kind, shop=None):
        return derive_model_url(TaxRule, "wshop_admin:default_tax.tax_rule",
                                object, kind)
Beispiel #6
0
class CurrencyModule(AdminModule):
    name = _("Currencies")
    breadcrumbs_menu_entry = MenuEntry(name, url="wshop_admin:currency.list")

    def get_urls(self):
        return get_edit_and_list_urls(
            url_prefix="^currencies",
            view_template="wshop.admin.modules.currencies.views.Currency%sView",
            name_template="currency.%s",
            permissions=get_default_model_permissions(Currency))

    def get_menu_entries(self, request):
        return [
            MenuEntry(text=self.name,
                      icon="fa fa-money",
                      url="wshop_admin:currency.list",
                      category=STOREFRONT_MENU_CATEGORY,
                      subcategory="currency",
                      ordering=2),
        ]

    def get_required_permissions(self):
        return get_default_model_permissions(Currency)

    def get_model_url(self, object, kind, shop=None):
        return derive_model_url(Currency, "wshop_admin:currency", object, kind)
Beispiel #7
0
class ProductTypeModule(AdminModule):
    name = _("Product Types")
    breadcrumbs_menu_entry = MenuEntry(name, url="wshop_admin:product_type.list")

    def get_urls(self):
        return get_edit_and_list_urls(
            url_prefix="^product-types",
            view_template="wshop.admin.modules.product_types.views.ProductType%sView",
            name_template="product_type.%s",
            permissions=get_default_model_permissions(ProductType),
        )

    def get_menu_entries(self, request):
        return [
            MenuEntry(
                text=_("Product types"),
                icon="fa fa-asterisk",
                url="wshop_admin:product_type.list",
                category=STOREFRONT_MENU_CATEGORY,
                subcategory="attributes",
                ordering=3
            )
        ]

    def get_required_permissions(self):
        return get_default_model_permissions(ProductType)

    def get_model_url(self, object, kind, shop=None):
        return derive_model_url(ProductType, "wshop_admin:product_type", object, kind)
Beispiel #8
0
class ManufacturerModule(AdminModule):
    name = _("Manufacturers")
    breadcrumbs_menu_entry = MenuEntry(name,
                                       url="wshop_admin:manufacturer.list")

    def get_urls(self):
        return get_edit_and_list_urls(
            url_prefix="^manufacturers",
            view_template=
            "wshop.admin.modules.manufacturers.views.Manufacturer%sView",
            name_template="manufacturer.%s",
            permissions=get_default_model_permissions(Manufacturer),
        )

    def get_menu_entries(self, request):
        return [
            MenuEntry(text=_("Manufacturers"),
                      icon="fa fa-building",
                      url="wshop_admin:manufacturer.list",
                      category=STOREFRONT_MENU_CATEGORY,
                      subcategory="settings",
                      ordering=4),
        ]

    def get_required_permissions(self):
        return get_default_model_permissions(Manufacturer)

    def get_model_url(self, object, kind, shop=None):
        return derive_model_url(Manufacturer, "wshop_admin:manufacturer",
                                object, kind)
Beispiel #9
0
class PermissionGroupModule(AdminModule):
    name = _("Permission Groups")
    breadcrumbs_menu_entry = MenuEntry(name,
                                       url="wshop_admin:permission_group.list")

    def get_urls(self):
        return get_edit_and_list_urls(
            url_prefix="^permission-groups",
            view_template=
            "wshop.admin.modules.permission_groups.views.PermissionGroup%sView",
            name_template="permission_group.%s",
            permissions=get_default_model_permissions(PermissionGroup),
        )

    def get_menu_entries(self, request):
        return [
            MenuEntry(text=self.name,
                      icon="fa fa-users",
                      url="wshop_admin:permission_group.list",
                      category=STOREFRONT_MENU_CATEGORY,
                      subcategory="other_settings",
                      ordering=3)
        ]

    def get_required_permissions(self):
        return get_default_model_permissions(PermissionGroup)

    def get_model_url(self, object, kind, shop=None):
        return derive_model_url(PermissionGroup,
                                "wshop_admin:permission_group", object, kind)
Beispiel #10
0
 def get_menu_entries(self, request):
     return [
         MenuEntry(text=_("Products"),
                   icon="fa fa-cube",
                   url="wshop_admin:shop_product.list",
                   category=PRODUCTS_MENU_CATEGORY,
                   ordering=1)
     ]
Beispiel #11
0
 def get_menu_entries(self, request):
     return [
         MenuEntry(text=self.name,
                   url=self.menu_entry_url,
                   category=STOREFRONT_MENU_CATEGORY,
                   subcategory="payment_shipping",
                   ordering=self.menu_ordering)
     ]
Beispiel #12
0
 def get_menu_entries(self, request):
     return [
         MenuEntry(text=_("Categories"),
                   icon="fa fa-sitemap",
                   url="wshop_admin:category.list",
                   category=PRODUCTS_MENU_CATEGORY,
                   ordering=2)
     ]
Beispiel #13
0
 def get_menu_entries(self, request):
     return [
         MenuEntry(text=_("Contacts"),
                   icon="fa fa-users",
                   url="wshop_admin:contact.list",
                   category=CONTACTS_MENU_CATEGORY,
                   ordering=1)
     ]
Beispiel #14
0
 def get_menu_entries(self, request):
     return [
         MenuEntry(text=_("Orders"),
                   icon="fa fa-inbox",
                   url="wshop_admin:order.list",
                   category=ORDERS_MENU_CATEGORY,
                   subcategory="orders",
                   ordering=1,
                   aliases=[_("Show orders")]),
         MenuEntry(text=_("Order Status"),
                   icon="fa fa-inbox",
                   url="wshop_admin:order_status.list",
                   category=STOREFRONT_MENU_CATEGORY,
                   subcategory="settings",
                   ordering=1,
                   aliases=[_("List Statuses")]),
     ]
Beispiel #15
0
 def get_menu_entries(self, request):
     return [
         MenuEntry(text=self.name,
                   icon="fa fa-asterisk",
                   url="wshop_admin:display_unit.list",
                   category=STOREFRONT_MENU_CATEGORY,
                   subcategory="settings",
                   ordering=5),
     ]
Beispiel #16
0
 def get_menu_entries(self, request):
     return [
         MenuEntry(text=_("Media browser"),
                   icon="fa fa-folder-open",
                   url="wshop_admin:media.browse",
                   category=CONTENT_MENU_CATEGORY,
                   subcategory="other",
                   ordering=2),
     ]
Beispiel #17
0
 def get_menu_entries(self, request):
     return [
         MenuEntry(
             text=_("Addons"),
             icon="fa fa-puzzle-piece",
             url="wshop_admin:addon.list",
             category=ADDONS_MENU_CATEGORY
         )
     ]
Beispiel #18
0
 def get_menu_entries(self, request):
     return [
         MenuEntry(text=self.name,
                   icon="fa fa-users",
                   url="wshop_admin:permission_group.list",
                   category=STOREFRONT_MENU_CATEGORY,
                   subcategory="other_settings",
                   ordering=3)
     ]
Beispiel #19
0
 def get_menu_entries(self, request):
     return [
         MenuEntry(text=self.name,
                   icon="fa fa-cubes",
                   url="wshop_admin:simple_supplier.stocks",
                   category=STOREFRONT_MENU_CATEGORY,
                   subcategory="settings",
                   ordering=6)
     ]
Beispiel #20
0
 def get_menu_entries(self, request):
     return [
         MenuEntry(text=_("Manufacturers"),
                   icon="fa fa-building",
                   url="wshop_admin:manufacturer.list",
                   category=STOREFRONT_MENU_CATEGORY,
                   subcategory="settings",
                   ordering=4),
     ]
Beispiel #21
0
 def get_menu_entries(self, request):
     return [
         MenuEntry(text=self.name,
                   icon="fa fa-asterisk",
                   url="wshop_admin:contact_group.list",
                   category=STOREFRONT_MENU_CATEGORY,
                   subcategory="other_settings",
                   ordering=2),
     ]
Beispiel #22
0
 def get_menu_entries(self, request):  # doccov: ignore
     return [
         MenuEntry(text=_("Themes"),
                   icon="fa fa-paint-brush",
                   url="wshop_admin:xtheme.config",
                   category=CONTENT_MENU_CATEGORY,
                   subcategory="design",
                   ordering=1)
     ]
Beispiel #23
0
 def get_menu_entries(self, request):
     return [
         MenuEntry(text=self.name,
                   icon="fa fa-money",
                   url="wshop_admin:currency.list",
                   category=STOREFRONT_MENU_CATEGORY,
                   subcategory="currency",
                   ordering=2),
     ]
Beispiel #24
0
 def get_menu_entries(self, request):
     return [
         MenuEntry(text=_("Users"),
                   icon="fa fa-users",
                   url="wshop_admin:user.list",
                   category=SETTINGS_MENU_CATEGORY,
                   subcategory="permissions",
                   ordering=1)
     ]
Beispiel #25
0
 def get_menu_entries(self, request):
     return [
         MenuEntry(text=self.name,
                   icon="fa fa-house",
                   url="wshop_admin:settings.list",
                   category=SETTINGS_MENU_CATEGORY,
                   subcategory="other_settings",
                   ordering=4),
     ]
Beispiel #26
0
 def get_menu_entries(self, request):
     return [
         MenuEntry(text=_("Pages"),
                   icon="fa fa-file-text",
                   url="wshop_admin:simple_cms.page.list",
                   category=CONTENT_MENU_CATEGORY,
                   subcategory="elements",
                   ordering=3,
                   aliases=[_("Show pages")])
     ]
Beispiel #27
0
 def get_menu_entries(self, request):
     return [
         MenuEntry(text=_("Tax Rules"),
                   icon="fa fa-file-text",
                   url="wshop_admin:default_tax.tax_rule.list",
                   category=SETTINGS_MENU_CATEGORY,
                   subcategory="taxes",
                   ordering=4,
                   aliases=[_("Show tax rules")])
     ]
Beispiel #28
0
 def get_menu_entries(self, request):
     return [
         MenuEntry(text=_("Notifications"),
                   icon="fa fa-code",
                   url="wshop_admin:notify.script.list",
                   category=SETTINGS_MENU_CATEGORY,
                   subcategory="other_settings",
                   ordering=9,
                   aliases=[_("Show notification scripts")])
     ]
Beispiel #29
0
 def get_menu_entries(self, request):
     return [
         MenuEntry(
             text="Create Mock Objects",
             category=SETTINGS_MENU_CATEGORY,
             subcategory="data_transfer",
             url="wshop_admin:mocker",
             icon="fa fa-star"
         )
     ]
Beispiel #30
0
 def get_menu_entries(self, request):
     return [
         MenuEntry(
             text=_("API"),
             icon="fa fa-code",
             url="wshop_admin:api_permission",
             category=SETTINGS_MENU_CATEGORY,
             subcategory="permissions",
         )
     ]