Adding a direct link to shopfront to enterprise edit page for distributor enterprises

This commit is contained in:
Rob H
2014-06-18 12:37:26 +10:00
parent 45b16d52dd
commit 3884b0cc1b
2 changed files with 10 additions and 1 deletions

View File

@@ -49,6 +49,15 @@
= f.radio_button :visible, false
 
= f.label :visible, "Not Visible", :value => "false"
- if @enterprise.is_distributor
- # TODO: Angularise this
.row
.three.columns.alpha
%label Link to shop front
.with-tip{'data-powertip' => "A direct link to your shopfront on the Open Food Network."}
%a What's this?
.eight.columns.omega
= main_app.shop_enterprise_url(@enterprise)
= f.fields_for :address do |af|

View File

@@ -41,7 +41,7 @@ feature %q{
click_link 'Enterprises'
within("tr.enterprise-#{d.id}") do
page.should have_field "enterprise_set_collection_attributes_0_visible", checked: true
page.should have_checked_field "enterprise_set_collection_attributes_0_visible"
uncheck "enterprise_set_collection_attributes_0_visible"
end
click_button "Update"