Advertisement
Guest User

Untitled

a guest
May 25th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.01 KB | None | 0 0
  1. <!--- Main form start here -->
  2. <div class="body_bg">
  3. <%= form_for ([:users, @business]), :html => { :multipart =>true } do |f| %>
  4. <% if @business.errors.any? %>
  5. <div id="error_explanation">
  6. <ul>
  7. <% @business.errors.full_messages.each do |message| %>
  8. <li class="error"><%= message %></li>
  9. <% end %>
  10. </ul>
  11. </div>
  12. <% end %>
  13. <!-- Form container start here -->
  14. <div class="main_oth_section">
  15. <div class="liting_oth_inner">
  16. <div class="left_section_listing">
  17. <!-- Business name start here -->
  18. <div class="list_top">
  19. <h3>List a stylish business</h3>
  20. <em><%= link_to "What defines stylish?", main_site_page_path(:slug => "what-define-styles"), :target=>"_blank" %></em>
  21. <div class="input_bus_oth">
  22. <div class="business_name_oth">
  23. <%= f.text_field :name, :class => "form-control demo", autofocus: true, placeholder: 'Business Name*' %>
  24. </div>
  25. <div class="business_type_oth selectpicker_inner">
  26. <%= f.label :business_type_id, 'Business Type *', class: 'lbl_carrot' %>
  27. <%= f.select :business_type_id, BusinessType.all.map { |t| [t.name.humanize, t.id] },{include_blank: "Business Type"}, :class=>"selectpicker" %>
  28. <span style="display:none;" for="business_business_type" generated="true" class="error">Select business type</span>
  29. </div>
  30. </div>
  31. <div class="input_bus_oth">
  32. <span class="required_text">* = required</span>
  33. </div>
  34. </div>
  35. <!-- Business box2 start here -->
  36. <div class="list_top">
  37. <h3>Business Details</h3>
  38. <div class="country_oth">
  39. <div class="business_type_oth selectpicker_inner">
  40. <%= f.label :country_id, 'Country *', class: 'lbl_carrot' %>
  41. <%= f.select :country_id, Country.all.map { |c| [c.iso_code+' - '+c.name, c.id] }, {:selected=>'', include_blank: 'Please choose*'}, :class => 'selectpicker' %>
  42. </div>
  43. </div>
  44.  
  45. <div class="add_list_oth">
  46. <!-- Map and location start here -->
  47. <div id="map_view">
  48. <div class="add_list_input_left login_row_oth add_mobile">
  49. <%= f.label :address, 'Address *', class:"lbl_carrot" %>
  50. <%= f.text_field :address, :class => 'form-control demo', :id=>"f_address", placeholder: 'Type in the address or move the pin below.*' %>
  51. <%= f.hidden_field :latitude, :id=>"f_lat" %>
  52. <%= f.hidden_field :longitude, :id=>"f_lng" %>
  53. </div>
  54. <div class="update_profile_btn locate_btn"><input type="button" value="Locate" id='f_btn_locate'></div>
  55. <select id="reverseGeocode" style="display:none;">
  56. <option value="false">No</option>
  57. <option value="true" selected>Yes</option>
  58. </select>
  59. <div class="map_oth" id="map"></div>
  60. </div> <!-- map end here -->
  61.  
  62. <div class="map_oth" id="homepage_online">
  63. <div class="homepage add_list_input_left login_row_oth add_list_input_left_2 list_tel ">
  64. <%= f.label :homepage, 'Homepage *', class:"lbl_carrot" %>
  65. <%= f.text_field :homepage, :class => 'form-control demo', :id=>"website", placeholder: 'www.stylecarte.com' %>
  66. </div>
  67. <div class="add_list_input_left list_tel list_tel_margin login_row_oth width_change_width">
  68. <%= f.label :email, 'Email', class:"lbl_carrot" %>
  69. <%= f.text_field :email, placeholder: "example@example.com", :class=>"form-control demo" %>
  70. </div>
  71. </div>
  72. <div class="map_oth">
  73. <div class="add_list_input_left list_tel login_row_oth width_change_width">
  74. <%= f.label :telephone, 'Telephone', class:"lbl_carrot" %>
  75. <%= f.text_field :telephone, :class => 'form-control demo', placeholder: "+_ _ ()_ _ _ _ _ _ _" %>
  76. <div id="errmsg"></div>
  77. </div>
  78. </div>
  79. <div class="map_oth">
  80. <div class="social_left">
  81. <em><%= image_tag "facebook_listing.png" %></em>
  82. <%= f.text_field :facebook, :class => 'form-control', placeholder: "www.facebook.com/stylecarte" %>
  83. </div>
  84. <div class="social_left social_right">
  85. <em><%= image_tag "twitter_icon_listing.png" %></em>
  86. <%= f.text_field :twitter, :class => 'form-control', placeholder: "www.twitter.com/stylecarte" %>
  87. </div>
  88. </div>
  89. <div class="map_oth">
  90. <div class="social_left">
  91. <em><%= image_tag "instagram.png" %></em>
  92. <%= f.text_field :instagram, :class => 'form-control', placeholder: "www.instagram.com/stylecarte" %>
  93. </div>
  94. <div class="social_left social_right">
  95. <em><%= image_tag "pinterest.png" %></em>
  96. <%= f.text_field :pinterest, :class => 'form-control', placeholder: "www.pinterest.com/stylecarte" %>
  97. </div>
  98. </div>
  99. <div class="map_oth">
  100. <div class="social_left">
  101. <em><%= image_tag "google_plus.png" %></em>
  102. <%= f.text_field :google, :class => 'form-control', placeholder: "www.plus.google.com/+stylecarte" %>
  103. </div>
  104. </div>
  105. <!-- Appointment Timing Section Start -->
  106. <div id="opening_times">
  107. <h4 class="heading_box">Opening Times *</h4>
  108. <div id="loadDiv">
  109. <%= f.fields_for :business_timings do |builder| %>
  110. <%= render 'timing_fields', :f=>builder %>
  111. <% end %>
  112. </div>
  113. </div>
  114.  
  115. <div class="list_top">
  116. <h3>Listing Details *</h3>
  117. <table class="table table_listing table_category_listing">
  118. <thead>
  119. <tr>
  120. <th>Main<sup>1</sup></th>
  121. <th>For</th>
  122. <th>What</th>
  123. <th>Refine</th>
  124. <th>Filters
  125. <em class="color_change"><a href="javascript:void(0);" data-toggle="popover" title="What is filters?" data-content="What is filters?"><%= image_tag ("tool_tip.png")%></a></em></th>
  126. </tr>
  127. </thead>
  128. <tbody>
  129. <% if params[:action] == "edit"
  130. i = 1
  131. @business.business_categories.each do |b_cat|
  132. if(!b_cat.looking_for.nil?)
  133. %>
  134. <label class="error-new" id="cat_error"></label>
  135. <tr id="cat_<%= i %>" class="category">
  136. <td width="8%"><div class="custum-radio-new">
  137. <%= radio_button_tag("business[business_categories_attributes]["+i.to_s+"][is_featured]", 1, checked = false, :id =>'business_1', :class=>"customRadio cat_feature_img session")%><em></em></div></td>
  138. <td width="25%">
  139. <div class="selectpicker_table" id="parentCat_<%= i %>"><%= b_cat.get_category_name(b_cat.category) %></div>
  140. <a id="<%= b_cat.id %>" href="javascript:void(0);" class="delete_cat remove_field" data-bus='<%= @business.id %>'>Remove</a>
  141. </td>
  142. <td width="20%">
  143. <div class="selectpicker_table" id="secLvlCat_<%= i %>"><%= b_cat.get_category_name(b_cat.what) %></div>
  144. </td>
  145. <td width="25%">
  146. <div class="selectpicker_table" id="childCat_<%= i %>"><%= b_cat.get_category_name(b_cat.refine) %></div>
  147. </td>
  148. <td width="17%" id="filter_<%= i %>" class="multiselect_listing"></td>
  149. </tr>
  150. <% end
  151. i = i+1
  152. end
  153. else %>
  154. <label class="error-new" id="cat_error"></label>
  155. <tr id="cat_1" class="category">
  156. <td width="8%"><div class="custum-radio-new">
  157. <%= radio_button_tag("business[business_categories_attributes][1][is_featured]", 1, checked = true, :id =>'business_1', :class=>"customRadio cat_feature_img session")%><em></em></div></td>
  158. <td width="25%">
  159. <div class="selectpicker_table list-dtail mainCat" id="parentCat_1">
  160. </div>
  161. </td>
  162. <td width="20%">
  163. <div class="selectpicker_table secLvlCat" id="secLvlCat_1"></div>
  164. </td>
  165. <td width="25%">
  166. <div class="selectpicker_table childCat" id="childCat_1"><div>
  167. </td>
  168. <td width="17%" id="filter_1"></td>
  169. </tr>
  170. <% end %>
  171. </tbody>
  172. </table>
  173. <span class="div_add_more"><a href="javascript:void(0);" id="addMoreCat" class="addMoreTime"> + Add more category</a></span>
  174. <span class="required_text">1 = main category sold; the category’s icon will be displayed within listing * = required</span>
  175. <span class="required_text"> 3 **= Please hold the CRTL or Command button down when choosing several options for filters.</span>
  176. </div>
  177. <div class="clearfix"></div>
  178.  
  179.  
  180.  
  181. </div> <!-- add list end here -->
  182.  
  183. </div>
  184. </div>
  185. <div class="right_section_listing">
  186. <div class="list_top">
  187. <h3>Images</h3>
  188. <p class="contnt_listing">Please attach at least one image. To list a website please create a screenshot below. Read more <a href="javascript:void(0);">here</a> about how to choose and shoot the most powerful images.</p>
  189. <div class="add_list_oth">
  190. <div class="upload_section login_row_oth upload_section_label">
  191. <label class="uploadImg">Upload Image </label>
  192. </div>
  193. <div class="radio_btn_oth_row">
  194. <div class="radio_oth_account listing_btn_upload">
  195. <div class="radio_inner_row"><label><input type="radio" name="browser" value="business" id="my_image" class="my_image"checked="checked"><em>Browse my Images</em></label></div>
  196. </div>
  197. <div class="radio_oth_account listing_btn_upload">
  198. <div class="radio_inner_row"><label><input type="radio" name="browser" value="business" id="web_image" class="my_image"><em>Load from a Web Address</em></label></div>
  199. </div>
  200. <div class="radio_oth_account listing_btn_upload create_row">
  201. <div class="radio_inner_row"><label><input type="radio" name="browser" value="business" id="web_screensort" class="my_image"><em>Create a Website Screenshot</em></label></div>
  202. </div>
  203. <div class="clearfix"></div>
  204. </div>
  205. <div id="screensort_image">
  206. <div class="take_link_section">
  207. <div class="business_name_oth link_input">
  208. <input type="text" name="web_screenshot" placeholder="http://" class="form-control demo" id="web_screenshot">
  209. </div>
  210. <div class="update_profile_btn take_btn"><input type="button" id="take_screenshot" value="Take Screenshot"></div>
  211. <em>You can upload from any of the above sources, up to four photos in total.</em>
  212. </div>
  213. <div class="upload_image_section">
  214. </div>
  215. </div>
  216. <div class="upload_image_section">
  217. <div id="browse_images">
  218. <div class="upload_image_section">
  219. <h4>Uploaded Images</h4>
  220. <!--div class="add_list_input_left input_upload color_gry login_row_oth profile_int list-dtail"-->
  221. <div class="add_list_input_left input_upload login_row_oth">
  222. <label>Image</label>
  223. <%= file_field_tag "images[]", type: :file, multiple: true, :id=>"images" %>
  224. <div class="extension_error"></div>
  225. <span id="error1"></span>
  226. </div>
  227. <div class='add_list_input_left input_upload login_row_oth'>
  228. <label class='color_gry'>Photo Credit </label>
  229. <%= text_field_tag "img_credit[]", nil, :class => 'commonClass form-control' %>
  230. </div>
  231. <div id="fileExtension_error" class="error-new"></div>
  232. <div class="dvPreview" id="dvPreview"></div>
  233. </div>
  234. </div>
  235. <% if params[:action] == 'edit' %>
  236. <div id="devise_error_msg">
  237. <% flash.each do |key, value| %>
  238. <div class="alert alert-info alert-<%= key %>">
  239. <a href="#" data-dismiss="alert" class="close">×</a>
  240. <%= value %>
  241. </div>
  242. <% end %>
  243. </div>
  244. <div class="thumbnail">
  245. <% @pictures.each do |pic| %>
  246. <div class="div_images">
  247. <%= image_tag pic.photo.url(:medium) %>
  248. <span class="remove_icon_listing">
  249. <a id="<%= pic.id %>" href="javascript:void(0);" class="delete_photo" data-bus='<%= @business.id %>'><%= image_tag 'close_icon' %></a>
  250. </span>
  251. </div>
  252. <span><%= pic.photo_credit %></span>
  253. <% end %>
  254. </div>
  255. <% end %>
  256. </div>
  257. <div id="upload_image_section">
  258. <div class="take_link_section">
  259. <div class="business_name_oth link_input">
  260. <input type="text" class="form-control demo" placeholder="http://" name="images_from_web" id="web_img">
  261. </div>
  262. <div class="update_profile_btn take_btn"><input type="button" value="Find Images" id="images_from_web"></div>
  263. <em>You can upload from any of the above sources, up to four photos in total.</em>
  264. </div>
  265. <div class="upload_image_section" id="result_images_from_web">
  266.  
  267. </div>
  268. </div>
  269. </div>
  270. <!-- Business Styles Section Start -->
  271. <div class="list_top">
  272. <h3>Style of the Business, Atmosphere and Products<sup>2</sup></h3>
  273. <label class="error-new" id="style_error"></label>
  274. <div class="check_box_outer login_check_box listing_check_box listing_check_box_upload">
  275.  
  276. <% ary = Array.new
  277. @business.business_styles.each do |styles|
  278. ary << styles.style_id
  279. end
  280. %>
  281. <% if !@styles.nil? %>
  282. <% i = 0
  283. @styles.each do |style| %>
  284. <div class="check_box_upload">
  285. <%=check_box_tag "business[business_styles_attributes][#{i}][style_id]" , style.id, ary.include?(style.id) ? true : false %><label for="<%= "business_business_styles_attributes_#{i}_style_id" %>"> <%= style.name.capitalize %></label>
  286. </div>
  287. <% i += 1
  288. end %>
  289. <% end %>
  290. </div>
  291. <!-- Add Styles Section Start -->
  292. <div class="map_oth">
  293. <div class="textarea_bottom login_row_oth">
  294. <label class="lbl_carrot">Add other styles</label>
  295. <%= text_area_tag "name", nil, "data-role"=>"tagsinput", class: "form-control", :placeholder=>'Separate additional style with comma. Once approved they will be added permanently' %>
  296. <p class="add-style-info">Separate additional style with comma. Once approved they will be added permanently</p>
  297. </div>
  298. </div>
  299. <span class="required_text">2 = at least one style has to be chosen</span>
  300. </div>
  301. <div class="clearfix"></div>
  302. </div>
  303. <!-- Right Section Business End -->
  304. </div>
  305. <div class="clearfix"></div>
  306. </div>
  307. </div>
  308. <!-- Form Container End Here -->
  309. <div class="bottom_btn_oth">
  310. <div class="main_oth_section">
  311. <div class="btn_inner_row">
  312. <div class="save_btn"><%= f.submit 'Save' %></div>
  313. <div class="cancel_btn"><%= link_to 'Back', root_path %></div>
  314. </div>
  315. </div>
  316. </div>
  317. <%end%>
  318. </div>
  319. <!--- Main Form Ends Here -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement