From 819ae22b0e51e52d26f380ec2d0577cabb132461 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Thu, 23 Dec 2021 15:18:30 -0600 Subject: [PATCH] Expose products setting for type 2 UPC lookup also expose Configure button for most master view pages --- tailbone/templates/master/index.mako | 2 +- tailbone/templates/products/configure.mako | 13 ++++++++++ tailbone/templates/themes/falafel/base.mako | 27 ++++++++++++++++----- tailbone/views/products.py | 5 ++++ 4 files changed, 40 insertions(+), 7 deletions(-) diff --git a/tailbone/templates/master/index.mako b/tailbone/templates/master/index.mako index ca0615ce..6be36948 100644 --- a/tailbone/templates/master/index.mako +++ b/tailbone/templates/master/index.mako @@ -162,7 +162,7 @@
  • ${h.link_to("Create a new {}".format(model_title), url('{}.create'.format(route_prefix)))}
  • % endif % endif - % if master.configurable and master.has_perm('configure'): + % if not use_buefy and master.configurable and master.has_perm('configure'):
  • ${h.link_to("Configure {}".format(config_title), url('{}.configure'.format(route_prefix)))}
  • % endif % if master.has_input_file_templates and master.has_perm('download_template'): diff --git a/tailbone/templates/products/configure.mako b/tailbone/templates/products/configure.mako index e3c21307..31b879c5 100644 --- a/tailbone/templates/products/configure.mako +++ b/tailbone/templates/products/configure.mako @@ -29,6 +29,19 @@ +

    Handling

    +
    + + + + Auto-convert Type 2 UPC for sake of lookup + + + +
    +

    Display

    diff --git a/tailbone/templates/themes/falafel/base.mako b/tailbone/templates/themes/falafel/base.mako index 5a873735..1e996e6b 100644 --- a/tailbone/templates/themes/falafel/base.mako +++ b/tailbone/templates/themes/falafel/base.mako @@ -304,12 +304,14 @@ ${h.link_to(instance_title, instance_url)} % elif master.creatable and master.show_create_link and master.has_perm('create'): - - + % if not request.matched_route.name.endswith('.create'): + + + % endif % endif % if master.viewing and grid_index: ${grid_index_nav()} @@ -367,6 +369,19 @@
    % endif + % if master.configurable and master.has_perm('configure'): + % if not request.matched_route.name.endswith('.configure'): +
    + + +
    + % endif + % endif + ## Theme Picker % if expose_theme_picker and request.has_perm('common.change_app_theme'):
    diff --git a/tailbone/views/products.py b/tailbone/views/products.py index 6459085b..7f40e1e3 100644 --- a/tailbone/views/products.py +++ b/tailbone/views/products.py @@ -1919,6 +1919,11 @@ class ProductView(MasterView): {'section': 'rattail', 'option': 'product.key_title'}, + # handling + {'section': 'rattail', + 'option': 'products.convert_type2_for_gpc_lookup', + 'type': bool}, + # display {'section': 'tailbone', 'option': 'products.show_pod_image',