Files
openfoodnetwork/app/views/spree/admin/overview/single_enterprise_dashboard.html.haml
Frank West 8324b00999 Renames product bulk edit action to index
When a user hit cancel while editing a product it took them to the spree
products index page instead of the bulk edit page. The button was part
of a shared view for all resources so changing it's actions were not
readily available.

It was suggested that instead of carrying our own separate controller
action we could just override the index action of the products
controller with the bulk edit functionality instead. This has the
advantage of removing some overrides and allows us to not add
additional overrides in the future.
2018-06-19 17:51:23 +10:00

94 lines
2.5 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
- content_for :page_title do
= @enterprise.name
%span.small<
= "(#{enterprise_type_name(@enterprise)})"
- content_for :page_actions do
%li#user_guide_link
= render 'admin/shared/user_guide_link'
:javascript
function toggleType(){
if( $('#package_selection').is(":visible") ){
$('button#toggle_type i').switchClass("icon-chevron-up","icon-chevron-down")
}
else {
$('button#toggle_type i').switchClass("icon-chevron-down","icon-chevron-up")
}
$("#package_selection").slideToggle()
}
%li#package_button
%button#toggle_type{ onClick: 'toggleType()' }
= t "change_package"
%i.icon-chevron-down
#package_selection{ hidden: true }
= render partial: "/admin/enterprises/change_type_form"
- if !@enterprise.visible
.alert-box
%strong
= t "spree_admin_single_enterprise_hint"
%strong= "#{t 'manage'} #{@enterprise.name}."
%a.close{ href: "#" } ×
.row
.alpha.seven.columns.dashboard_item.single-ent#map
.header
%h3
%span.icon-map-marker
= t "your_profil_live"
%p
= t "on_ofn_map"
.list
/-# Can we pass an anchor here to zoom to our enterprise?
%a.button.bottom{href: main_app.map_path, target: '_blank'}
= t "see"
= @enterprise.name
= t "live"
%span.icon-arrow-right
.two.columns
&nbsp;
.seven.columns.omega.dashboard_item.single-ent#edit
.header
%h3
%span.icon-edit
= t "edit_profile_details"
%p
= t "edit_profile_details_etc"
.list
%a.button.bottom{href: main_app.edit_admin_enterprise_path(@enterprise)}
= t "manage"
= @enterprise.name
%span.icon-arrow-right
.row
- if can? :admin, Spree::Product
.seven.columns.alpha.dashboard_item.single-ent#products
.header
%h3
%span.icon-th-large
= t "add_and_manage_products"
.list
%a.button.bottom{href: admin_products_path}
= t "manage_products"
%span.icon-arrow-right
.two.columns
&nbsp;
- if can? :admin, OrderCycle
.seven.columns.omega.dashboard_item.single-ent#order_cycles
.header
%h3
%span.icon-shopping-cart
= t "add_and_manage_order_cycles"
.list
%a.button.bottom{href: main_app.admin_order_cycles_path}
= t "manage_order_cycles"
%span.icon-arrow-right
= render 'spree/admin/shared/trial_progress_bar', enterprise: @enterprise