spree_backend 4.3.3 → 4.4.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +222 -0
- data/.codeclimate.yml +36 -0
- data/.editorconfig +22 -0
- data/.eslintignore +7 -0
- data/.eslintrc.cjs +29 -0
- data/.gem_release.yml +4 -0
- data/.github/CONTRIBUTING.md +1 -0
- data/.github/ISSUE_TEMPLATE/bug_report.md +47 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- data/.github/ISSUE_TEMPLATE.md +39 -0
- data/.github/dependabot.yml +7 -0
- data/.github/workflows/spelling_lint.yml +34 -0
- data/.gitignore +63 -0
- data/.rubocop.yml +197 -0
- data/.solargraph.yml +20 -0
- data/.stylelintignore +4 -0
- data/.stylelintrc +6 -0
- data/CODE_OF_CONDUCT.md +22 -0
- data/Gemfile +59 -3
- data/README.md +123 -0
- data/SECURITY.md +1 -0
- data/app/assets/config/spree_backend_manifest.js +1 -1
- data/app/assets/images/backend-cloud-arrow-up.svg +4 -0
- data/app/assets/images/backend-eye-open.svg +1 -1
- data/app/assets/images/backend-file-earmark-font.svg +4 -0
- data/app/assets/images/backend-file-earmark-image.svg +4 -0
- data/app/assets/images/backend-file-earmark-music.svg +4 -0
- data/app/assets/images/backend-file-earmark-pdf.svg +4 -0
- data/app/assets/images/backend-file-earmark-play.svg +4 -0
- data/app/assets/images/backend-file-earmark-spreadsheet.svg +3 -0
- data/app/assets/images/backend-file-earmark-zip.svg +4 -0
- data/app/assets/images/backend-file-earmark.svg +3 -0
- data/app/assets/images/backend-hdd.svg +4 -0
- data/app/assets/images/backend-link.svg +4 -0
- data/app/assets/images/backend-view.svg +1 -1
- data/app/assets/javascripts/spree/backend/adjustments.js +5 -5
- data/app/assets/javascripts/spree/backend/admin.js +4 -6
- data/app/assets/javascripts/spree/backend/calculator.js +1 -1
- data/app/assets/javascripts/spree/backend/checkouts/edit.js +1 -1
- data/app/assets/javascripts/spree/backend/cms/links.es6 +1 -1
- data/app/assets/javascripts/spree/backend/cms/live_preview.es6 +1 -1
- data/app/assets/javascripts/spree/backend/cms/page.es6 +22 -40
- data/app/assets/javascripts/spree/backend/cms/section.es6 +1 -1
- data/app/assets/javascripts/spree/backend/gateway.js +1 -1
- data/app/assets/javascripts/spree/backend/general_settings.js +1 -1
- data/app/assets/javascripts/spree/backend/global/_index.js +3 -1
- data/app/assets/javascripts/spree/backend/global/alerts.es6 +1 -1
- data/app/assets/javascripts/spree/backend/global/animate_css.es6 +19 -0
- data/app/assets/javascripts/spree/backend/global/fetch_request_utility.es6 +114 -0
- data/app/assets/javascripts/spree/backend/global/flatpickr.es6 +2 -1
- data/app/assets/javascripts/spree/backend/global/info_alert.es6 +1 -1
- data/app/assets/javascripts/spree/backend/global/radio_panel_toggle.es6 +1 -1
- data/app/assets/javascripts/spree/backend/global/ransack.es6 +7 -5
- data/app/assets/javascripts/spree/backend/global/responsive_menus.es6 +1 -1
- data/app/assets/javascripts/spree/backend/global/select2_autocomplete.es6 +4 -4
- data/app/assets/javascripts/spree/backend/global/select2_populate.es6 +2 -2
- data/app/assets/javascripts/spree/backend/global/side_scroll_indication.es6 +2 -2
- data/app/assets/javascripts/spree/backend/global/sortable.es6 +1 -1
- data/app/assets/javascripts/spree/backend/global/tinymce.es6 +3 -2
- data/app/assets/javascripts/spree/backend/line_items.js +7 -9
- data/app/assets/javascripts/spree/backend/line_items_on_order_edit.js +23 -28
- data/app/assets/javascripts/spree/backend/menus/_index.es6 +0 -1
- data/app/assets/javascripts/spree/backend/menus/menu_item.es6 +1 -1
- data/app/assets/javascripts/spree/backend/multi_currency.js +2 -2
- data/app/assets/javascripts/spree/backend/option_type_autocomplete.js +1 -1
- data/app/assets/javascripts/spree/backend/orders/edit.js +1 -1
- data/app/assets/javascripts/spree/backend/payments/edit.js +32 -22
- data/app/assets/javascripts/spree/backend/payments/new.js +1 -1
- data/app/assets/javascripts/spree/backend/product_picker.js +16 -25
- data/app/assets/javascripts/spree/backend/progress.js +5 -3
- data/app/assets/javascripts/spree/backend/promotions.js +3 -1
- data/app/assets/javascripts/spree/backend/returns/expedited_exchanges_warning.js +1 -1
- data/app/assets/javascripts/spree/backend/returns/return_item_selection.js +1 -1
- data/app/assets/javascripts/spree/backend/shipments.js +80 -79
- data/app/assets/javascripts/spree/backend/spree-select2.js +1 -1
- data/app/assets/javascripts/spree/backend/states.js +1 -1
- data/app/assets/javascripts/spree/backend/stock_location.js +1 -1
- data/app/assets/javascripts/spree/backend/stock_management.js +1 -1
- data/app/assets/javascripts/spree/backend/stock_movement.js +58 -13
- data/app/assets/javascripts/spree/backend/stock_transfer.js +62 -32
- data/app/assets/javascripts/spree/backend/taxon_autocomplete.js +9 -8
- data/app/assets/javascripts/spree/backend/taxons.js +17 -14
- data/app/assets/javascripts/spree/backend/user_picker.js +1 -1
- data/app/assets/javascripts/spree/backend/users/edit.js +1 -1
- data/app/assets/javascripts/spree/backend/variant_autocomplete.js +19 -11
- data/app/assets/javascripts/spree/backend/variant_management.js +1 -1
- data/app/assets/javascripts/spree/backend/zone.js +1 -1
- data/app/assets/javascripts/spree/backend.js +13 -33
- data/app/assets/javascripts/spree.js +2 -9
- data/app/assets/stylesheets/spree/backend/components/_main.scss +8 -0
- data/app/assets/stylesheets/spree/backend/plugins/_nav_x.scss +1 -1
- data/app/assets/stylesheets/spree/backend/plugins/_select2_custom.scss +1 -1
- data/app/assets/stylesheets/spree/backend/shared/_forms.scss +1 -1
- data/app/assets/stylesheets/spree/backend/shared/_sortable_tree.scss +62 -0
- data/app/assets/stylesheets/spree/backend/spree_admin.css.scss +3 -0
- data/app/assets/stylesheets/spree/backend/views/_digitals.scss +33 -0
- data/app/assets/stylesheets/spree/backend/views/_taxonomies.scss +3 -0
- data/app/controllers/spree/admin/base_controller.rb +4 -13
- data/app/controllers/spree/admin/digitals_controller.rb +33 -0
- data/app/controllers/spree/admin/general_settings_controller.rb +0 -5
- data/app/controllers/spree/admin/images_controller.rb +1 -1
- data/app/controllers/spree/admin/oauth_applications_controller.rb +17 -0
- data/app/controllers/spree/admin/orders/customer_details_controller.rb +2 -2
- data/app/controllers/spree/admin/orders_controller.rb +10 -2
- data/app/controllers/spree/admin/payment_methods_controller.rb +2 -2
- data/app/controllers/spree/admin/payments_controller.rb +1 -1
- data/app/controllers/spree/admin/products_controller.rb +4 -2
- data/app/controllers/spree/admin/promotions_controller.rb +1 -1
- data/app/controllers/spree/admin/properties_controller.rb +1 -1
- data/app/controllers/spree/admin/resource_controller.rb +9 -4
- data/app/controllers/spree/admin/return_index_controller.rb +1 -1
- data/app/controllers/spree/admin/stock_transfers_controller.rb +2 -2
- data/app/controllers/spree/admin/store_credits_controller.rb +2 -2
- data/app/controllers/spree/admin/stores_controller.rb +2 -2
- data/app/controllers/spree/admin/taxons_controller.rb +23 -38
- data/app/controllers/spree/admin/users_controller.rb +6 -19
- data/app/controllers/spree/admin/variants_controller.rb +1 -2
- data/app/controllers/spree/admin/webhooks_subscribers_controller.rb +48 -0
- data/app/helpers/spree/admin/base_helper.rb +27 -9
- data/app/helpers/spree/admin/digital_helper.rb +28 -0
- data/app/helpers/spree/admin/menu_helper.rb +0 -21
- data/app/helpers/spree/admin/navigation_helper.rb +19 -9
- data/app/helpers/spree/admin/sortable_tree_helper.rb +31 -0
- data/app/helpers/spree/admin/stores_helper.rb +1 -1
- data/app/helpers/spree/admin/webhooks_subscribers_helper.rb +31 -0
- data/app/javascript/spree/dashboard/controllers/clipboard_controller.js +12 -0
- data/app/javascript/spree/dashboard/controllers/password_toggle_controller.js +14 -0
- data/app/javascript/spree/dashboard/controllers/sortable_tree_controller.js +55 -0
- data/app/javascript/spree/dashboard/controllers/spree_controller.js +25 -0
- data/app/javascript/spree/dashboard/controllers/upload_button_controller.js +13 -0
- data/app/javascript/spree/dashboard/controllers/webhooks_subscriber_events_controller.js +19 -0
- data/app/javascript/spree/dashboard/index.js +49 -0
- data/app/{assets/javascripts/spree/backend/global/bootstrap.es6 → javascript/spree/dashboard/utilities/bootstrap.js} +6 -2
- data/app/javascript/spree/dashboard/utilities/request_utility.js +54 -0
- data/app/models/spree/backend_configuration.rb +11 -0
- data/app/views/spree/admin/adjustments/_adjustments_table.html.erb +2 -2
- data/app/views/spree/admin/adjustments/_form.html.erb +2 -2
- data/app/views/spree/admin/adjustments/index.html.erb +1 -0
- data/app/views/spree/admin/cms_pages/_form.html.erb +8 -8
- data/app/views/spree/admin/cms_pages/edit.html.erb +1 -6
- data/app/views/spree/admin/cms_sections/_form.html.erb +2 -2
- data/app/views/spree/admin/cms_sections/types/_featured_article.html.erb +6 -6
- data/app/views/spree/admin/cms_sections/types/_hero_image.html.erb +6 -6
- data/app/views/spree/admin/cms_sections/types/_image_gallery.html.erb +12 -12
- data/app/views/spree/admin/cms_sections/types/_rich_text_content.html.erb +1 -1
- data/app/views/spree/admin/cms_sections/types/_side_by_side_images.html.erb +12 -12
- data/app/views/spree/admin/countries/_form.html.erb +4 -4
- data/app/views/spree/admin/customer_returns/new.html.erb +1 -1
- data/app/views/spree/admin/digitals/_form.html.erb +35 -0
- data/app/views/spree/admin/digitals/index.html.erb +25 -0
- data/app/views/spree/admin/general_settings/edit.html.erb +1 -22
- data/app/views/spree/admin/menu_items/_form.html.erb +6 -6
- data/app/views/spree/admin/menus/_form.html.erb +3 -3
- data/app/views/spree/admin/menus/edit.html.erb +18 -18
- data/app/views/spree/admin/oauth_applications/_form.html.erb +22 -0
- data/app/views/spree/admin/oauth_applications/create.turbo_stream.erb +38 -0
- data/app/views/spree/admin/oauth_applications/edit.html.erb +13 -0
- data/app/views/spree/admin/oauth_applications/index.html.erb +51 -0
- data/app/views/spree/admin/oauth_applications/new.html.erb +15 -0
- data/app/views/spree/admin/option_types/_form.html.erb +3 -3
- data/app/views/spree/admin/option_types/_option_value_fields.html.erb +2 -2
- data/app/views/spree/admin/orders/_channel_form.html.erb +1 -1
- data/app/views/spree/admin/orders/_form.html.erb +1 -0
- data/app/views/spree/admin/orders/_line_items_edit_form.html.erb +1 -0
- data/app/views/spree/admin/orders/_order_actions.html.erb +6 -0
- data/app/views/spree/admin/orders/_search.html.erb +151 -0
- data/app/views/spree/admin/orders/index.html.erb +2 -151
- data/app/views/spree/admin/payment_methods/_form.html.erb +2 -2
- data/app/views/spree/admin/payments/_list.html.erb +1 -1
- data/app/views/spree/admin/products/_form.html.erb +19 -19
- data/app/views/spree/admin/products/index.html.erb +2 -0
- data/app/views/spree/admin/products/new.html.erb +6 -6
- data/app/views/spree/admin/promotion_actions/create.js.erb +1 -1
- data/app/views/spree/admin/promotion_categories/_form.html.erb +2 -2
- data/app/views/spree/admin/promotions/_form.html.erb +5 -5
- data/app/views/spree/admin/properties/_form.html.erb +3 -3
- data/app/views/spree/admin/prototypes/_form.html.erb +4 -4
- data/app/views/spree/admin/refunds/new.html.erb +2 -2
- data/app/views/spree/admin/reimbursement_types/_form.html.erb +2 -2
- data/app/views/spree/admin/return_authorizations/_form.html.erb +3 -3
- data/app/views/spree/admin/roles/_form.html.erb +1 -1
- data/app/views/spree/admin/shared/_account_nav.html.erb +1 -1
- data/app/views/spree/admin/shared/_address_form.html.erb +4 -4
- data/app/views/spree/admin/shared/_head.html.erb +4 -8
- data/app/views/spree/admin/shared/_main_menu.html.erb +12 -0
- data/app/views/spree/admin/shared/_new_resource_links.html.erb +1 -1
- data/app/views/spree/admin/shared/_product_tabs.html.erb +8 -0
- data/app/views/spree/admin/shared/_version.html.erb +1 -1
- data/app/views/spree/admin/shared/cms/_spree_product.html.erb +2 -2
- data/app/views/spree/admin/shared/cms/_spree_taxon.html.erb +2 -2
- data/app/views/spree/admin/shared/linkables/_spree_cms_page.erb +2 -2
- data/app/views/spree/admin/shared/linkables/_spree_product.html.erb +2 -2
- data/app/views/spree/admin/shared/linkables/_spree_taxon.html.erb +2 -2
- data/app/views/spree/admin/shared/linkables/_url.html.erb +1 -1
- data/app/views/spree/admin/shared/named_types/_form.html.erb +1 -1
- data/app/views/spree/admin/{menus/nested_menu_items/_item_bar.html.erb → shared/sortable_tree/_menu.html.erb} +10 -7
- data/app/views/spree/admin/shared/sortable_tree/_taxonomy.html.erb +34 -0
- data/app/views/spree/admin/shared/sub_menu/_apps.html.erb +3 -0
- data/app/views/spree/admin/shared/sub_menu/_integrations.html.erb +3 -0
- data/app/views/spree/admin/shipping_categories/_form.html.erb +1 -1
- data/app/views/spree/admin/shipping_methods/_form.html.erb +8 -8
- data/app/views/spree/admin/states/_form.html.erb +2 -2
- data/app/views/spree/admin/stock_locations/_form.html.erb +2 -2
- data/app/views/spree/admin/stock_movements/_form.html.erb +3 -3
- data/app/views/spree/admin/store_credit_categories/_form.html.erb +1 -1
- data/app/views/spree/admin/store_credits/_form.html.erb +4 -4
- data/app/views/spree/admin/stores/_form.html.erb +280 -227
- data/app/views/spree/admin/tax_categories/_form.html.erb +4 -4
- data/app/views/spree/admin/tax_rates/_form.html.erb +4 -3
- data/app/views/spree/admin/taxonomies/_form.html.erb +2 -2
- data/app/views/spree/admin/taxonomies/edit.html.erb +34 -29
- data/app/views/spree/admin/taxons/_form.html.erb +101 -57
- data/app/views/spree/admin/taxons/edit.html.erb +6 -3
- data/app/views/spree/admin/taxons/index.html.erb +1 -1
- data/app/views/spree/admin/taxons/new.html.erb +16 -0
- data/app/views/spree/admin/users/_form.html.erb +3 -3
- data/app/views/spree/admin/users/edit.html.erb +0 -40
- data/app/views/spree/admin/variants/_autocomplete.js.erb +5 -5
- data/app/views/spree/admin/variants/_autocomplete_line_items_stock.js.erb +2 -2
- data/app/views/spree/admin/variants/_autocomplete_stock.js.erb +6 -6
- data/app/views/spree/admin/variants/_split.js.erb +1 -1
- data/app/views/spree/admin/variants/index.html.erb +4 -1
- data/app/views/spree/admin/webhooks_subscribers/_form.html.erb +101 -0
- data/app/views/spree/admin/webhooks_subscribers/edit.html.erb +13 -0
- data/app/views/spree/admin/webhooks_subscribers/index.html.erb +47 -0
- data/app/views/spree/admin/webhooks_subscribers/new.html.erb +13 -0
- data/app/views/spree/admin/webhooks_subscribers/show.html.erb +59 -0
- data/app/views/spree/admin/zones/_country_members.html.erb +1 -1
- data/app/views/spree/admin/zones/_form.html.erb +2 -2
- data/app/views/spree/admin/zones/_state_members.html.erb +1 -1
- data/app/views/spree/layouts/admin.html.erb +1 -11
- data/codespell.txt +8 -0
- data/config/locales/en.yml +273 -0
- data/config/routes.rb +8 -4
- data/lib/generators/spree/backend/install/install_generator.rb +4 -2
- data/lib/generators/spree/backend/install/templates/app/javascript/spree-dashboard.js +7 -0
- data/lib/spree/backend/engine.rb +2 -1
- data/lib/spree/backend/testing_support/capybara_utils.rb +53 -0
- data/lib/spree/backend/testing_support/flash.rb +38 -0
- data/lib/spree/backend/testing_support/flatpickr_capybara.rb +126 -0
- data/lib/spree/backend/version.rb +9 -0
- data/lib/spree/backend.rb +2 -1
- data/lib/spree_backend.rb +17 -0
- data/license.md +13 -0
- data/package.json +46 -0
- data/rollup.config.js +41 -0
- data/spree_backend.gemspec +17 -16
- data/vendor/assets/javascripts/purify.js +1 -1
- data/vendor/assets/stylesheets/animate.css +2 -4
- data/yarn.lock +959 -0
- metadata +120 -38
- data/app/assets/javascripts/spree/backend/menus/menu.es6 +0 -57
- data/app/assets/javascripts/spree/backend/taxon_permalink_preview.js +0 -11
- data/app/assets/javascripts/spree/backend/taxon_tree_menu.js +0 -35
- data/app/assets/javascripts/spree/backend/taxonomy.js +0 -178
- data/app/views/spree/admin/taxonomies/_js_head.html.erb +0 -7
- data/vendor/assets/javascripts/jquery.jstree/jquery.jstree.js +0 -4564
- data/vendor/assets/javascripts/js.cookie.js +0 -163
- data/vendor/assets/javascripts/modernizr.js +0 -3
- data/vendor/assets/stylesheets/jquery.jstree/themes/spree/style.scss +0 -230
- data/vendor/assets/stylesheets/jquery.jstree/themes/spree/throbber.gif +0 -0
- /data/app/assets/stylesheets/spree/backend/views/{prototypes.scss → _prototypes.scss} +0 -0
@@ -1,25 +1,25 @@
|
|
1
1
|
<div class="row pb-0">
|
2
2
|
<div class="col-12 col-md-6">
|
3
|
-
<%= f.field_container :title
|
3
|
+
<%= f.field_container :title do %>
|
4
4
|
<%= f.label :title, Spree.t('admin.cms.title') %>
|
5
5
|
<%= f.text_field :title, class: 'form-control' %>
|
6
6
|
<%= f.error_message_on :title %>
|
7
7
|
<% end %>
|
8
8
|
|
9
|
-
<%= f.field_container :button_text
|
9
|
+
<%= f.field_container :button_text do %>
|
10
10
|
<%= f.label :button_text, Spree.t('admin.cms.button_text') %>
|
11
11
|
<%= f.text_field :button_text, class: 'form-control' %>
|
12
12
|
<%= f.error_message_on :button_text %>
|
13
13
|
<% end %>
|
14
14
|
|
15
15
|
<div class="row">
|
16
|
-
<%= f.field_container :fit, class: ['
|
16
|
+
<%= f.field_container :fit, class: ['col-6'] do %>
|
17
17
|
<%= f.label :fit, Spree.t('admin.cms.fit') %>
|
18
18
|
<%= f.select(:fit, @cms_section.boundaries, {include_blank: false}, class: 'select2') %>
|
19
19
|
<%= f.error_message_on :fit %>
|
20
20
|
<% end %>
|
21
21
|
|
22
|
-
<%= f.field_container :gutters, class: ['
|
22
|
+
<%= f.field_container :gutters, class: ['col-6'] do %>
|
23
23
|
<%= f.label :gutters, Spree.t('admin.cms.gutters') %>
|
24
24
|
<%= f.select(:gutters, @cms_section.gutters_sizes, {include_blank: false}, class: 'select2') %>
|
25
25
|
<%= f.error_message_on :gutters %>
|
@@ -27,7 +27,7 @@
|
|
27
27
|
</div>
|
28
28
|
</div>
|
29
29
|
<div class="col-12 col-md-6 pt-4">
|
30
|
-
<%= f.field_container :image_one
|
30
|
+
<%= f.field_container :image_one do %>
|
31
31
|
<% if @cms_section.image_one.attached? && @cms_section.image_one.variable? %>
|
32
32
|
<figure class="admin-img-holder">
|
33
33
|
<%= image_tag main_app.url_for(@cms_section.image_one.variant(resize: '244x104>')) %>
|
@@ -45,7 +45,7 @@
|
|
45
45
|
</div>
|
46
46
|
<div class="col-12"><hr></div>
|
47
47
|
<div class="col-12 col-md-6">
|
48
|
-
<%= f.field_container :linked_resource_type
|
48
|
+
<%= f.field_container :linked_resource_type do %>
|
49
49
|
<%= f.label :linked_resource_type, Spree.t('admin.navigation.link_to') %>
|
50
50
|
<%= f.select(:linked_resource_type,
|
51
51
|
spree_humanize_dropdown_values('Spree::Cms::Sections::HeroImage',
|
@@ -9,7 +9,7 @@
|
|
9
9
|
</div>
|
10
10
|
</div>
|
11
11
|
|
12
|
-
<%= f.field_container :layout_style
|
12
|
+
<%= f.field_container :layout_style do %>
|
13
13
|
<%= f.label :layout_style, Spree.t('admin.cms.image_gallery.layout_style') %>
|
14
14
|
<%= f.select(:layout_style,
|
15
15
|
spree_humanize_dropdown_values('Spree::Cms::Sections::ImageGallery',
|
@@ -25,7 +25,7 @@
|
|
25
25
|
<div id="image_a_details" class="card p-3">
|
26
26
|
<div class="text-center">
|
27
27
|
<h4 class="pb-2"><%= Spree.t('admin.cms.image_gallery.image_a') %></h4>
|
28
|
-
<%= f.field_container :image_one
|
28
|
+
<%= f.field_container :image_one do %>
|
29
29
|
<% if @cms_section.image_one.attached? && @cms_section.image_one.variable? %>
|
30
30
|
<figure class="admin-img-holder">
|
31
31
|
<%= image_tag main_app.url_for(@cms_section.image_one.variant(resize: '244x104>')) %>
|
@@ -42,7 +42,7 @@
|
|
42
42
|
</div>
|
43
43
|
<small class="text-muted mb-4"><%= Spree.t('admin.cms.image_gallery.square_image') %></small>
|
44
44
|
|
45
|
-
<%= f.field_container :title_one
|
45
|
+
<%= f.field_container :title_one do %>
|
46
46
|
<%= f.label :title_one, Spree.t('admin.cms.title') %>
|
47
47
|
<%= f.text_field :title_one, class: 'form-control' %>
|
48
48
|
<%= f.error_message_on :title_one %>
|
@@ -50,7 +50,7 @@
|
|
50
50
|
|
51
51
|
<div class="col-12"><hr></div>
|
52
52
|
<% unless rails_5? %>
|
53
|
-
<%= f.field_container :link_type_one
|
53
|
+
<%= f.field_container :link_type_one do %>
|
54
54
|
<%= f.label :link_type_one, Spree.t('admin.navigation.link_to') %>
|
55
55
|
<%= f.select(:link_type_one,
|
56
56
|
spree_humanize_dropdown_values('Spree::Cms::Sections::ImageGallery',
|
@@ -69,7 +69,7 @@
|
|
69
69
|
<div id="image_b_details" class="card p-3">
|
70
70
|
<div class="text-center">
|
71
71
|
<h4 class="pb-2"><%= Spree.t('admin.cms.image_gallery.image_b') %></h4>
|
72
|
-
<%= f.field_container :image_two
|
72
|
+
<%= f.field_container :image_two do %>
|
73
73
|
<% if @cms_section.image_two.attached? && @cms_section.image_two.variable? %>
|
74
74
|
<figure class="admin-img-holder">
|
75
75
|
<%= image_tag main_app.url_for(@cms_section.image_two.variant(resize: '244x104>')) %>
|
@@ -86,7 +86,7 @@
|
|
86
86
|
</div>
|
87
87
|
<small class="text-muted mb-4"><%= Spree.t('admin.cms.image_gallery.tall_image') %></small>
|
88
88
|
|
89
|
-
<%= f.field_container :title_two
|
89
|
+
<%= f.field_container :title_two do %>
|
90
90
|
<%= f.label :title_two, Spree.t('admin.cms.title') %>
|
91
91
|
<%= f.text_field :title_two, class: 'form-control' %>
|
92
92
|
<%= f.error_message_on :title_two %>
|
@@ -94,7 +94,7 @@
|
|
94
94
|
|
95
95
|
<div class="col-12"><hr></div>
|
96
96
|
<% unless rails_5? %>
|
97
|
-
<%= f.field_container :link_type_two
|
97
|
+
<%= f.field_container :link_type_two do %>
|
98
98
|
<%= f.label :link_type_two, Spree.t('admin.navigation.link_to') %>
|
99
99
|
<%= f.select(:link_type_two,
|
100
100
|
spree_humanize_dropdown_values('Spree::Cms::Sections::ImageGallery',
|
@@ -113,7 +113,7 @@
|
|
113
113
|
<div id="image_c_details" class="card p-3">
|
114
114
|
<div class="text-center">
|
115
115
|
<h4 class="pb-2"><%= Spree.t('admin.cms.image_gallery.image_c') %></h4>
|
116
|
-
<%= f.field_container :image_three
|
116
|
+
<%= f.field_container :image_three do %>
|
117
117
|
<% if @cms_section.image_three.attached? && @cms_section.image_three.variable? %>
|
118
118
|
<figure class="admin-img-holder">
|
119
119
|
<%= image_tag main_app.url_for(@cms_section.image_three.variant(resize: '244x104>')) %>
|
@@ -130,7 +130,7 @@
|
|
130
130
|
</div>
|
131
131
|
<small class="text-muted mb-4"><%= Spree.t('admin.cms.image_gallery.square_image') %></small>
|
132
132
|
|
133
|
-
<%= f.field_container :title_three
|
133
|
+
<%= f.field_container :title_three do %>
|
134
134
|
<%= f.label :title_three, Spree.t('admin.cms.title') %>
|
135
135
|
<%= f.text_field :title_three, class: 'form-control' %>
|
136
136
|
<%= f.error_message_on :title_three %>
|
@@ -138,7 +138,7 @@
|
|
138
138
|
|
139
139
|
<div class="col-12"><hr></div>
|
140
140
|
<% unless rails_5? %>
|
141
|
-
<%= f.field_container :link_type_three
|
141
|
+
<%= f.field_container :link_type_three do %>
|
142
142
|
<%= f.label :link_type_three, Spree.t('admin.navigation.link_to') %>
|
143
143
|
<%= f.select(:link_type_three,
|
144
144
|
spree_humanize_dropdown_values('Spree::Cms::Sections::ImageGallery',
|
@@ -156,13 +156,13 @@
|
|
156
156
|
|
157
157
|
<div class="row pb-0">
|
158
158
|
<div class="col-12"> <hr></div>
|
159
|
-
<%= f.field_container :fit, class: ['
|
159
|
+
<%= f.field_container :fit, class: ['col-6'] do %>
|
160
160
|
<%= f.label :fit, Spree.t('admin.cms.fit') %>
|
161
161
|
<%= f.select(:fit, @cms_section.boundaries, {include_blank: false}, class: 'select2') %>
|
162
162
|
<%= f.error_message_on :fit %>
|
163
163
|
<% end %>
|
164
164
|
|
165
|
-
<%= f.field_container :display_labels, class: ['
|
165
|
+
<%= f.field_container :display_labels, class: ['col-6'] do %>
|
166
166
|
<%= f.label :display_labels, Spree.t('admin.cms.image_gallery.display_labels') %>
|
167
167
|
<%= f.select(:display_labels,
|
168
168
|
spree_humanize_dropdown_values('Spree::Cms::Sections::ImageGallery',
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<div id="left_image_details" class="card p-3">
|
4
4
|
<div class="text-center">
|
5
5
|
<h4 class="pb-2"><%= Spree.t('admin.cms.side_by_side.left_image') %></h4>
|
6
|
-
<%= f.field_container :image_one
|
6
|
+
<%= f.field_container :image_one do %>
|
7
7
|
<% if @cms_section.image_one.attached? && @cms_section.image_one.variable? %>
|
8
8
|
<figure class="admin-img-holder">
|
9
9
|
<%= image_tag main_app.url_for(@cms_section.image_one.variant(resize: '244x104>')) %>
|
@@ -13,7 +13,7 @@
|
|
13
13
|
<%= image_tag main_app.url_for(@cms_section.image_one) %>
|
14
14
|
</figure>
|
15
15
|
<% end %>
|
16
|
-
<%= f.field_container :image_one, class: ['
|
16
|
+
<%= f.field_container :image_one, class: ['mb-0'] do %>
|
17
17
|
<%= f.file_field :image_one %>
|
18
18
|
<%= f.error_message_on :image_one %>
|
19
19
|
<% end %>
|
@@ -21,13 +21,13 @@
|
|
21
21
|
<% end %>
|
22
22
|
</div>
|
23
23
|
|
24
|
-
<%= f.field_container :title_one
|
24
|
+
<%= f.field_container :title_one do %>
|
25
25
|
<%= f.label :title_one, Spree.t('admin.cms.title') %>
|
26
26
|
<%= f.text_field :title_one, class: 'form-control' %>
|
27
27
|
<%= f.error_message_on :title_one %>
|
28
28
|
<% end %>
|
29
29
|
|
30
|
-
<%= f.field_container :subtitle_one
|
30
|
+
<%= f.field_container :subtitle_one do %>
|
31
31
|
<%= f.label :subtitle_one, Spree.t('admin.cms.subtitle') %>
|
32
32
|
<%= f.text_field :subtitle_one, class: 'form-control' %>
|
33
33
|
<%= f.error_message_on :subtitle_one %>
|
@@ -35,7 +35,7 @@
|
|
35
35
|
|
36
36
|
<div class="col-12"><hr></div>
|
37
37
|
<% unless rails_5? %>
|
38
|
-
<%= f.field_container :link_type_one
|
38
|
+
<%= f.field_container :link_type_one do %>
|
39
39
|
<%= f.label :link_type_one, Spree.t('admin.navigation.link_to') %>
|
40
40
|
<%= f.select(:link_type_one,
|
41
41
|
spree_humanize_dropdown_values('Spree::Cms::Sections::SideBySideImages',
|
@@ -54,7 +54,7 @@
|
|
54
54
|
<div id="right_image_details" class="card p-3">
|
55
55
|
<div class="text-center">
|
56
56
|
<h4 class="pb-2"><%= Spree.t('admin.cms.side_by_side.right_image') %></h4>
|
57
|
-
<%= f.field_container :image_two
|
57
|
+
<%= f.field_container :image_two do %>
|
58
58
|
<% if @cms_section.image_two.attached? && @cms_section.image_two.variable? %>
|
59
59
|
<figure class="admin-img-holder">
|
60
60
|
<%= image_tag main_app.url_for(@cms_section.image_two.variant(resize: '244x104>')) %>
|
@@ -64,7 +64,7 @@
|
|
64
64
|
<%= image_tag main_app.url_for(@cms_section.image_two) %>
|
65
65
|
</figure>
|
66
66
|
<% end %>
|
67
|
-
<%= f.field_container :image_two, class: ['
|
67
|
+
<%= f.field_container :image_two, class: ['mb-0'] do %>
|
68
68
|
<%= f.file_field :image_two %>
|
69
69
|
<%= f.error_message_on :image_two %>
|
70
70
|
<% end %>
|
@@ -72,13 +72,13 @@
|
|
72
72
|
<% end %>
|
73
73
|
</div>
|
74
74
|
|
75
|
-
<%= f.field_container :title_two
|
75
|
+
<%= f.field_container :title_two do %>
|
76
76
|
<%= f.label :title_two, Spree.t('admin.cms.title') %>
|
77
77
|
<%= f.text_field :title_two, class: 'form-control' %>
|
78
78
|
<%= f.error_message_on :title_two %>
|
79
79
|
<% end %>
|
80
80
|
|
81
|
-
<%= f.field_container :subtitle_two
|
81
|
+
<%= f.field_container :subtitle_two do %>
|
82
82
|
<%= f.label :subtitle_two, Spree.t('admin.cms.subtitle') %>
|
83
83
|
<%= f.text_field :subtitle_two, class: 'form-control' %>
|
84
84
|
<%= f.error_message_on :subtitle_two %>
|
@@ -87,7 +87,7 @@
|
|
87
87
|
<div class="col-12"><hr></div>
|
88
88
|
|
89
89
|
<% unless rails_5? %>
|
90
|
-
<%= f.field_container :link_type_two
|
90
|
+
<%= f.field_container :link_type_two do %>
|
91
91
|
<%= f.label :link_type_two, Spree.t('admin.navigation.link_to') %>
|
92
92
|
<%= f.select(:link_type_two,
|
93
93
|
spree_humanize_dropdown_values('Spree::Cms::Sections::SideBySideImages',
|
@@ -104,7 +104,7 @@
|
|
104
104
|
|
105
105
|
<div class="col-12"><hr></div>
|
106
106
|
<div class="col-6">
|
107
|
-
<%= f.field_container :fit
|
107
|
+
<%= f.field_container :fit do %>
|
108
108
|
<%= f.label :fit, Spree.t('admin.cms.fit') %>
|
109
109
|
<%= f.select(:fit, @cms_section.boundaries, {include_blank: false}, class: 'select2') %>
|
110
110
|
<%= f.error_message_on :fit %>
|
@@ -112,7 +112,7 @@
|
|
112
112
|
</div>
|
113
113
|
|
114
114
|
<div class="col-6">
|
115
|
-
<%= f.field_container :gutters
|
115
|
+
<%= f.field_container :gutters do %>
|
116
116
|
<%= f.label :gutters, Spree.t('admin.cms.set_gutters') %>
|
117
117
|
<%= f.select(:gutters, @cms_section.gutters_sizes, {include_blank: false}, class: 'select2') %>
|
118
118
|
<%= f.error_message_on :gutters %>
|
@@ -1,23 +1,23 @@
|
|
1
1
|
<div data-hook="admin_country_form_fields">
|
2
|
-
<%= f.field_container :name,
|
2
|
+
<%= f.field_container :name, 'data-hook' => 'name' do %>
|
3
3
|
<%= f.label :name, Spree.t(:name) %>
|
4
4
|
<%= f.text_field :name, class: 'form-control' %>
|
5
5
|
<%= f.error_message_on :name %>
|
6
6
|
<% end %>
|
7
7
|
|
8
|
-
<%= f.field_container :iso_name,
|
8
|
+
<%= f.field_container :iso_name, 'data-hook' => 'iso_name' do %>
|
9
9
|
<%= f.label :iso_name, Spree.t(:iso_name) %>
|
10
10
|
<%= f.text_field :iso_name, class: 'form-control' %>
|
11
11
|
<%= f.error_message_on :iso_name %>
|
12
12
|
<% end %>
|
13
13
|
|
14
|
-
<%= f.field_container :iso,
|
14
|
+
<%= f.field_container :iso, 'data-hook' => 'iso' do %>
|
15
15
|
<%= f.label :iso, Spree.t(:iso) %>
|
16
16
|
<%= f.text_field :iso, class: 'form-control' %>
|
17
17
|
<%= f.error_message_on :iso %>
|
18
18
|
<% end %>
|
19
19
|
|
20
|
-
<%= f.field_container :iso3,
|
20
|
+
<%= f.field_container :iso3, 'data-hook' => 'iso3' do %>
|
21
21
|
<%= f.label :iso3, Spree.t(:iso3) %>
|
22
22
|
<%= f.text_field :iso3, class: 'form-control' %>
|
23
23
|
<%= f.error_message_on :iso3 %>
|
@@ -22,7 +22,7 @@
|
|
22
22
|
<% end %>
|
23
23
|
</fieldset>
|
24
24
|
|
25
|
-
<%= f.field_container :stock_location
|
25
|
+
<%= f.field_container :stock_location do %>
|
26
26
|
<%= f.label :stock_location, Spree.t(:stock_location) %> <span class="required">*</span>
|
27
27
|
<%= f.select :stock_location_id, Spree::StockLocation.order_default.active.to_a.collect{|l|[l.name.humanize, l.id]}, {include_blank: true}, {class: 'select2-clear', "data-placeholder" => Spree.t(:select_a_stock_location)} %>
|
28
28
|
<%= f.error_message_on :stock_location %>
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<%= form_for :digital, url: admin_product_digitals_path(@product) do |f| %>
|
2
|
+
<% if variant.digital? %>
|
3
|
+
<div class="row">
|
4
|
+
<% variant.digitals.each do |digital| %>
|
5
|
+
<div class="col-12 col-md-6 mb-3 removable-dom-element">
|
6
|
+
<div class="d-flex flex-row align-items-center digital-container border rounded">
|
7
|
+
<div class="col p-0 delete-digital-icon-container">
|
8
|
+
<%= asset_icon(digital) %>
|
9
|
+
</div>
|
10
|
+
<div class="col p-2 delete-digital-info-container">
|
11
|
+
<span>Name:</span> <span class="text-secondary"><%= digital.attachment.filename %></span><br>
|
12
|
+
<span>Size:</span> <span class="text-secondary"><%= number_to_human_size(digital.attachment.byte_size) %></span>
|
13
|
+
</div>
|
14
|
+
<div class="col p-2 text-right delete-digital-button-container">
|
15
|
+
<%= link_to (svg_icon name: "close.svg", width: '20', height: '20'), admin_product_digital_url(@product, digital), data: { confirm: Spree.t('admin.digitals.delete_file_confirmation', filename: digital.attachment.filename) }, method: :delete, class: 'btn delete-resource delete-digital-asset' %>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
<% end %>
|
20
|
+
</div>
|
21
|
+
<% else %>
|
22
|
+
<div class="alert alert-info no-objects-found">
|
23
|
+
<%= Spree.t('admin.digitals.no_digital_assets_added') %>
|
24
|
+
</div>
|
25
|
+
<% end %>
|
26
|
+
|
27
|
+
<%= f.field_container :attachment, data: {controller: "upload-button"} do %>
|
28
|
+
<%= f.label :file, Spree.t('admin.digitals.add_new_file'), id: "digital_attachment_#{variant.id}" %> <span class="required">*</span><br>
|
29
|
+
<%= f.file_field :attachment, id: "digital_attachment_#{variant.id}", required: true, data: { action: "input->upload-button#buttonState" } %>
|
30
|
+
<%= hidden_field_tag 'digital[variant_id]', variant.id %>
|
31
|
+
<%= button Spree.t('admin.digitals.upload'), 'add.svg', 'submit', { data: { upload_button_target: "uploadButton" } } %>
|
32
|
+
<br>
|
33
|
+
<%= f.error_message_on :attachment %>
|
34
|
+
<% end %>
|
35
|
+
<% end %>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<%= render partial: 'spree/admin/shared/product_tabs', locals: { current: :digitals } %>
|
2
|
+
|
3
|
+
<div class="row">
|
4
|
+
<% if @product.has_variants? %>
|
5
|
+
<% @product.variants.each do |variant| %>
|
6
|
+
<div class="col-12 mb-5 ">
|
7
|
+
<div class="card">
|
8
|
+
<div class="card-header">
|
9
|
+
<h5 class="card-title mb-0"><%= variant.options_text %></h5>
|
10
|
+
</div>
|
11
|
+
<div class="card-body">
|
12
|
+
<div class="col-12 p-0">
|
13
|
+
<%= render 'form', variant: variant %>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
<% end %>
|
19
|
+
<% else %>
|
20
|
+
<div class="col-12">
|
21
|
+
<%= render 'form', variant: @product.master %>
|
22
|
+
</div>
|
23
|
+
<% end %>
|
24
|
+
</div>
|
25
|
+
|
@@ -67,7 +67,7 @@
|
|
67
67
|
|
68
68
|
<div class="card-body">
|
69
69
|
<div class="alert alert-warning col-12">
|
70
|
-
This can be
|
70
|
+
This can be overridden by individual Store settings
|
71
71
|
</div>
|
72
72
|
<div class="form-group">
|
73
73
|
<%= label_tag :currency, Spree.t(:default_currency) %>
|
@@ -75,27 +75,6 @@
|
|
75
75
|
</div>
|
76
76
|
</div>
|
77
77
|
</div>
|
78
|
-
|
79
|
-
<div class="card mb-3" id="general-settings-stores" data-hook="general_settings_stores">
|
80
|
-
<div class="card-header">
|
81
|
-
<h1 class="card-title mb-0 h5">
|
82
|
-
<%= Spree.t(:multiple_stores) %>
|
83
|
-
</h1>
|
84
|
-
</div>
|
85
|
-
<div class="card-body">
|
86
|
-
<div class="alert alert-warning col-12">
|
87
|
-
<%= Spree.t('show_store_selector.long') %>
|
88
|
-
</div>
|
89
|
-
<div class="form-group">
|
90
|
-
<div class="checkbox">
|
91
|
-
<label>
|
92
|
-
<%= check_box('', :show_store_selector, { checked: Spree::Config.show_store_selector }) %>
|
93
|
-
<%= Spree.t('show_store_selector.short') %>
|
94
|
-
</label>
|
95
|
-
</div>
|
96
|
-
</div>
|
97
|
-
</div>
|
98
|
-
</div>
|
99
78
|
</div>
|
100
79
|
</div>
|
101
80
|
|
@@ -6,13 +6,13 @@
|
|
6
6
|
<h5 class="mb-0"><%= Spree.t('admin.navigation.settings') %></h5>
|
7
7
|
</div>
|
8
8
|
<div class="card-body">
|
9
|
-
<%= f.field_container :item_type
|
9
|
+
<%= f.field_container :item_type do %>
|
10
10
|
<%= f.label :item_type, Spree.t('admin.navigation.item_type') %>
|
11
11
|
<%= f.select(:item_type, @menu_item_types, {include_blank: false}) %>
|
12
12
|
<%= f.error_message_on :item_type %>
|
13
13
|
<% end %>
|
14
14
|
|
15
|
-
<%= f.field_container :code
|
15
|
+
<%= f.field_container :code do %>
|
16
16
|
<%= f.label :code, Spree.t('admin.navigation.code') %>
|
17
17
|
<%= f.text_field :code, class: 'form-control' %>
|
18
18
|
<%= f.error_message_on :code %>
|
@@ -21,7 +21,7 @@
|
|
21
21
|
</small>
|
22
22
|
<% end %>
|
23
23
|
|
24
|
-
<%= f.field_container :parent_id
|
24
|
+
<%= f.field_container :parent_id do %>
|
25
25
|
<%= f.label :parent_id, Spree.t('admin.navigation.nested_under') %>
|
26
26
|
<%= f.select :parent_id, nested_set_options(@menu.menu_items, @menu_item) {|i| "#{'-' * i.level} #{i.name}" }, {include_blank: false}, {class: 'select2'} %>
|
27
27
|
<%= f.error_message_on :parent_id %>
|
@@ -39,13 +39,13 @@
|
|
39
39
|
<h5 class="mb-0"><%= Spree.t('admin.navigation.public_details') %></h5>
|
40
40
|
</div>
|
41
41
|
<div class="card-body">
|
42
|
-
<%= f.field_container :name
|
42
|
+
<%= f.field_container :name do %>
|
43
43
|
<%= f.label :name, raw(Spree.t(:name) + required_span_tag) %>
|
44
44
|
<%= f.text_field :name, class: 'form-control', required: true %>
|
45
45
|
<%= f.error_message_on :name %>
|
46
46
|
<% end %>
|
47
47
|
|
48
|
-
<%= f.field_container :subtitle
|
48
|
+
<%= f.field_container :subtitle do %>
|
49
49
|
<%= f.label :subtitle, Spree.t('admin.navigation.subtitle') %>
|
50
50
|
<%= f.text_field :subtitle, class: 'form-control' %>
|
51
51
|
<%= f.error_message_on :subtitle %>
|
@@ -93,7 +93,7 @@
|
|
93
93
|
<div class="card-body">
|
94
94
|
<div class="row">
|
95
95
|
<div class="col-12 col-md-6">
|
96
|
-
<%= f.field_container :linked_resource_type
|
96
|
+
<%= f.field_container :linked_resource_type do %>
|
97
97
|
<%= f.label :linked_resource_type, Spree.t('admin.navigation.link_to') %>
|
98
98
|
<%= f.select(:linked_resource_type, spree_humanize_dropdown_values('Spree::MenuItem', {const: 'LINKED_RESOURCE_TYPE'}), {include_blank: false}, class: 'link_switcher') %>
|
99
99
|
<%= f.error_message_on :linked_resource_type %>
|
@@ -1,17 +1,17 @@
|
|
1
1
|
<div data-hook="admin_menu_form_fields" class="row">
|
2
|
-
<%= f.field_container :name, class: ['
|
2
|
+
<%= f.field_container :name, class: ['col-12 col-md-4'] do %>
|
3
3
|
<%= f.label :name, raw(Spree.t(:name) + required_span_tag) %>
|
4
4
|
<%= f.text_field :name, class: 'form-control', required: true %>
|
5
5
|
<%= f.error_message_on :name %>
|
6
6
|
<% end %>
|
7
7
|
|
8
|
-
<%= f.field_container :location, class: ['
|
8
|
+
<%= f.field_container :location, class: ['col-12 col-md-4'] do %>
|
9
9
|
<%= f.label :location, Spree.t('location') %>
|
10
10
|
<%= f.select(:location, spree_humanize_dropdown_values('Spree::Menu', { const: 'MENU_LOCATIONS', paramterize_values: true }), {include_blank: false}, class: 'select2') %>
|
11
11
|
<%= f.error_message_on :location %>
|
12
12
|
<% end %>
|
13
13
|
|
14
|
-
<%= f.field_container :locale, class: ['
|
14
|
+
<%= f.field_container :locale, class: ['col-12 col-md-4'] do %>
|
15
15
|
<%= f.label :language %>
|
16
16
|
<%= f.select :locale, options_from_collection_for_select(all_locales_options, :last, :first, @menu.locale || I18n.locale), {}, { class: 'select2' } %>
|
17
17
|
<%= f.error_message_on :default_locale %>
|
@@ -3,25 +3,25 @@
|
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<div class="row">
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
6
|
+
<div class="col-12">
|
7
|
+
<div class="card mb-3">
|
8
|
+
<div class="card-header">
|
9
|
+
<h5 class="mb-0"><%= Spree.t('settings') %></h5>
|
10
|
+
</div>
|
11
|
+
<div class="card-body">
|
12
|
+
<%= render partial: 'spree/admin/shared/error_messages', locals: { target: @menu } %>
|
13
|
+
<%= form_for [:admin, @menu] do |f| %>
|
14
|
+
<%= render partial: 'form', locals: { f: f } %>
|
15
|
+
<div class="d-flex ">
|
16
|
+
<%= render partial: 'spree/admin/shared/edit_resource_links' %>
|
17
|
+
</div>
|
18
|
+
<% end %>
|
19
|
+
</div>
|
20
20
|
</div>
|
21
21
|
</div>
|
22
22
|
</div>
|
23
23
|
|
24
|
-
<div id="
|
24
|
+
<div id="sortableTreeArea">
|
25
25
|
<div class="row mt-2">
|
26
26
|
<div class="col-12">
|
27
27
|
<div class="card mb-3">
|
@@ -37,11 +37,11 @@
|
|
37
37
|
</div>
|
38
38
|
|
39
39
|
<% if @menu.root.present? %>
|
40
|
-
<div class="card-body p-0 bg-light">
|
41
|
-
<div
|
40
|
+
<div class="card-body p-0 bg-light" data-controller="sortable-tree" data-sortable-tree-handle-value=".move-handle">
|
41
|
+
<div data-sortable-tree-parent-id-value="<%= @menu.root.id %>">
|
42
42
|
<% if @menu.root.children.present? %>
|
43
43
|
<% @menu.root.children.each do |root_children| %>
|
44
|
-
<%=
|
44
|
+
<%= build_sortable_tree(@menu, root_children) %>
|
45
45
|
<% end %>
|
46
46
|
<% else %>
|
47
47
|
<div class="alert alert-info no-objects-found m-5">
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<div data-hook="admin_oauth_application_form_fields">
|
2
|
+
<%= f.field_container :name, 'data-hook' => "oauth_application_name" do %>
|
3
|
+
<%= f.label :name, Spree.t(:name) %> <span class="required">*</span>
|
4
|
+
<%= f.text_field :name, class: 'form-control', required: true %>
|
5
|
+
<%= f.error_message_on :name %>
|
6
|
+
<% end %>
|
7
|
+
|
8
|
+
<%= f.field_container :scopes, 'data-hook' => "oauth_application_scopes" do %>
|
9
|
+
<%= f.label :scopes, Spree.t(:scopes) %> <span class="required">*</span>
|
10
|
+
<%= f.text_field :scopes, class: 'form-control' %>
|
11
|
+
<%= f.error_message_on :scopes %>
|
12
|
+
<small class="form-text text-muted">
|
13
|
+
Possible values:
|
14
|
+
<ul>
|
15
|
+
<li><strong>admin read</strong> - read only access</li>
|
16
|
+
<li><strong>admin write</strong> - read and write access</li>
|
17
|
+
</ul>
|
18
|
+
</small>
|
19
|
+
<% end %>
|
20
|
+
|
21
|
+
<div data-hook="additional_oauth_application_fields"></div>
|
22
|
+
</div>
|
@@ -0,0 +1,38 @@
|
|
1
|
+
<%= turbo_stream.replace "new_oauth_application" do %>
|
2
|
+
<div data-controller="clipboard" class="mb-3 p-3 col-lg-7">
|
3
|
+
<div class="form-group">
|
4
|
+
<%= label_tag :client_id, 'Client ID' %>
|
5
|
+
<div class="input-group">
|
6
|
+
<%= text_area_tag :client_id, @object.uid, class: 'form-control bg-transparent p-0 mt-4 mr-4 border-0', rows: 2, data: { clipboard_target: 'source', action: 'clipboard#copy' }, readonly: true %>
|
7
|
+
<div class="input-append">
|
8
|
+
<button data-action="clipboard#copy" class="btn m-0 mt-4">
|
9
|
+
<%= svg_icon name: 'clone.svg', width: 18, height: 18 %>
|
10
|
+
<%= Spree.t(:copy_to_clipboard, scope: :admin ) %>
|
11
|
+
</button>
|
12
|
+
</div>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
|
17
|
+
<div data-controller="clipboard" class="mb-3 p-3 col-lg-7">
|
18
|
+
<div class="form-group">
|
19
|
+
<%= label_tag :client_secret, 'Client Secret' %>
|
20
|
+
<div class="input-group">
|
21
|
+
<%= text_area_tag :client_secret, @object.plaintext_secret, class: 'form-control bg-transparent p-0 mt-4 mr-4 border-0', rows: 2, data: { clipboard_target: 'source', action: 'clipboard#copy' }, readonly: true %>
|
22
|
+
<div class="input-append">
|
23
|
+
<button data-action="clipboard#copy" class="btn m-0 mt-4">
|
24
|
+
<%= svg_icon name: 'clone.svg', width: 18, height: 18 %>
|
25
|
+
<%= Spree.t(:copy_to_clipboard, scope: :admin ) %>
|
26
|
+
</button>
|
27
|
+
</div>
|
28
|
+
</div>
|
29
|
+
<small class="form-text text-muted mt-4">
|
30
|
+
This is your application's secret token, copy it now and keep it safe. It won't be shown again.
|
31
|
+
</small>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<hr />
|
36
|
+
|
37
|
+
<%= link_to 'Back to list', spree.admin_oauth_applications_url %>
|
38
|
+
<% end %>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<% content_for :page_title do %>
|
2
|
+
<%= link_to Spree.t('admin.oauth_applications.list'), spree.admin_oauth_applications_url %> /
|
3
|
+
<%= @oauth_application.name.capitalize %>
|
4
|
+
<% end %>
|
5
|
+
|
6
|
+
<%= render partial: 'spree/admin/shared/error_messages', locals: { target: @oauth_application } %>
|
7
|
+
|
8
|
+
<%= form_for [:admin, @oauth_application] do |f| %>
|
9
|
+
<fieldset>
|
10
|
+
<%= render partial: 'form', locals: { f: f } %>
|
11
|
+
<%= render partial: 'spree/admin/shared/edit_resource_links' %>
|
12
|
+
</fieldset>
|
13
|
+
<% end %>
|