mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-26 20:56:48 +00:00
193 lines
7.3 KiB
Plaintext
193 lines
7.3 KiB
Plaintext
- content_for :head do
|
|
= render 'shared/cms_elrte_head'
|
|
|
|
- content_for :page_actions do
|
|
%li= button_link_to "Back to enterprises list", main_app.admin_enterprises_path, icon: 'icon-arrow-left'
|
|
|
|
|
|
.fullwidth_inputs
|
|
%fieldset.eleven.columns.alpha.no-border-bottom
|
|
%legend Primary Details
|
|
.row
|
|
.alpha.eleven.columns
|
|
.three.columns.alpha
|
|
= f.label :name
|
|
.eight.columns.omega
|
|
= f.text_field :name, { placeholder: "eg. Professor Plum's Biodynamic Truffles" }
|
|
.row
|
|
.alpha.eleven.columns
|
|
.three.columns.alpha
|
|
= f.label :group_ids, 'Groups'
|
|
.with-tip{'data-powertip' => "Select any groups or regions that you are a member of. This will help customers find your enterprise."}
|
|
%a What's this?
|
|
|
|
.eight.columns.omega
|
|
= f.collection_select :group_ids, EnterpriseGroup.all, :id, :name, {}, class: "select2 fullwidth", multiple: true, placeholder: "Start typing to search available groups..."
|
|
.row
|
|
.three.columns.alpha
|
|
%label Enterprise Type(s)
|
|
.with-tip{'data-powertip' => "Select 'Producer' if you are a primary producer of food. Select 'Hub' if you want a shop-front. You can choose either or both."}
|
|
%a What's this?
|
|
.two.columns
|
|
= f.check_box :is_distributor, 'ng-model' => 'Enterprise.is_distributor'
|
|
|
|
= f.label :is_distributor, 'Hub'
|
|
.five.columns.omega
|
|
= f.check_box :is_primary_producer, 'ng-model' => 'Enterprise.is_primary_producer'
|
|
|
|
= f.label :is_primary_producer, 'Producer'
|
|
.row
|
|
.three.columns.alpha
|
|
%label Visible in search?
|
|
.with-tip{'data-powertip' => "Determines whether this enterprise will be visible to customers when searching the site."}
|
|
%a What's this?
|
|
.two.columns
|
|
= f.radio_button :visible, true
|
|
|
|
= f.label :visible, "Visible", :value => "true"
|
|
.five.columns.omega
|
|
= 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|
|
|
%fieldset.eleven.columns.alpha.no-border-bottom
|
|
%legend Address
|
|
.row
|
|
.three.columns.alpha
|
|
= af.label :address1
|
|
.eight.columns.omega
|
|
= af.text_field :address1, { placeholder: "eg. 123 High Street"}
|
|
.row
|
|
.alpha.three.columns
|
|
= af.label :address2
|
|
.eight.columns.omega
|
|
= af.text_field :address2
|
|
.row
|
|
.three.columns.alpha
|
|
= af.label :city, 'Suburb'
|
|
\/
|
|
= af.label :zipcode, 'Postcode'
|
|
.four.columns
|
|
= af.text_field :city, { placeholder: "eg. Northcote"}
|
|
.four.columns.omega
|
|
= af.text_field :zipcode, { placeholder: "eg. 3070"}
|
|
.row
|
|
.three.columns.alpha
|
|
= af.label :state_id, 'State'
|
|
\/
|
|
= af.label :country_id, 'Country'
|
|
.four.columns
|
|
= af.collection_select :state_id, af.object.country.states, :id, :name, {}, :class => "select2 fullwidth"
|
|
.four.columns.omega
|
|
= af.collection_select :country_id, available_countries, :id, :name, {}, :class => "select2 fullwidth"
|
|
%fieldset.eleven.columns.alpha.no-border-bottom
|
|
%legend Contact Details
|
|
.row
|
|
.alpha.three.columns
|
|
= f.label :contact, 'Name'
|
|
.omega.eight.columns
|
|
= f.text_field :contact, { placeholder: "eg. Gustav Plum"}
|
|
.row
|
|
.alpha.three.columns
|
|
= f.label :email
|
|
.omega.eight.columns
|
|
= f.text_field :email, { placeholder: "eg. gustav@truffles.com"}
|
|
.row
|
|
.alpha.three.columns
|
|
= f.label :phone
|
|
.omega.eight.columns
|
|
= f.text_field :phone, { placeholder: "eg. 98 7654 3210"}
|
|
%fieldset.eleven.columns.alpha.no-border-bottom
|
|
%legend Enterprise Details
|
|
.row
|
|
.alpha.three.columns
|
|
= f.label :abn, 'ABN'
|
|
.omega.eight.columns
|
|
= f.text_field :abn, { placeholder: "eg. 99 123 456 789"}
|
|
.row
|
|
.alpha.three.columns
|
|
= f.label :acn, 'ACN'
|
|
.omega.eight.columns
|
|
= f.text_field :acn, { placeholder: "eg. 123 456 789"}
|
|
.row
|
|
.alpha.three.columns
|
|
= f.label :website
|
|
.omega.eight.columns
|
|
= f.text_field :website, { placeholder: "eg. www.truffles.com"}
|
|
.row
|
|
.alpha.three.columns
|
|
= f.label :facebook, 'Facebook'
|
|
.omega.eight.columns
|
|
= f.text_field :facebook
|
|
.row
|
|
.alpha.three.columns
|
|
= f.label :instagram, 'Instagram'
|
|
.omega.eight.columns
|
|
= f.text_field :instagram
|
|
.row
|
|
.alpha.three.columns
|
|
= f.label :linkedin, 'LinkedIn'
|
|
.omega.eight.columns
|
|
= f.text_field :linkedin
|
|
.row
|
|
.alpha.three.columns
|
|
= f.label :twitter
|
|
.omega.eight.columns
|
|
= f.text_field :twitter, { placeholder: "eg. @the_prof" }
|
|
%fieldset.eleven.columns.alpha.no-border-bottom
|
|
%legend About Us
|
|
.row
|
|
.alpha.three.columns
|
|
= f.label :description, 'Short Description'
|
|
.omega.eight.columns
|
|
= f.text_field :description, placeholder: 'Tell us about your enterprise in one or two sentences'
|
|
.row
|
|
.alpha.three.columns
|
|
= f.label :long_description, 'About Us'
|
|
%br
|
|
Tell us about yourself. This information appears on your public profile (under "About Us")
|
|
.omega.eight.columns
|
|
= f.text_area :long_description, class: 'rich_text', placeholder: 'Tell us about yourself. This information appears on your public profile (under "About Us")'
|
|
.row
|
|
.alpha.three.columns
|
|
= f.label :distributor_info, 'How does your hub work?'
|
|
%br
|
|
%em (Hub only)
|
|
%br
|
|
Explain your distribution offer/s - this information appears on your public profile (under "How does it work?")
|
|
.omega.eight.columns
|
|
= f.text_area :distributor_info, class: 'rich_text', placeholder: 'Hub only: Explain your distribution offer/s - this is more detailed information that the user can access by clicking on "How does it work?"'
|
|
/ TODO: editor breaks scrolling with arrow keys
|
|
%fieldset.eleven.columns.alpha.no-border-bottom
|
|
%legend IMAGES
|
|
.row
|
|
.alpha.three.columns
|
|
= f.label :logo
|
|
%br
|
|
100 x 100 pixels
|
|
.omega.eight.columns
|
|
= image_tag @object.logo(:medium) if @object.logo.present?
|
|
= f.file_field :logo
|
|
.row
|
|
.alpha.three.columns
|
|
= f.label :promo_image, class: 'with-tip', 'data-powertip' => 'This image is displayed in "About Us"'
|
|
%br/
|
|
%span{ style: 'font-weight:bold' } PLEASE NOTE:
|
|
Any promo image uploaded here will be cropped to 1200 x 260.
|
|
The promo image is displayed at the top of an enterprise's profile page and pop-ups.
|
|
|
|
.omega.eight.columns
|
|
= image_tag @object.promo_image(:large) if @object.promo_image.present?
|
|
= f.file_field :promo_image
|