spec/dummy/app/views/labs/search.html.haml in medivo-0.1.3 vs spec/dummy/app/views/labs/search.html.haml in medivo-0.1.4
- old
+ new
@@ -1,8 +1,9 @@
// sample template for rendering lab info
%script{:id=>"lab_item_template", :type=>"text/x-handlebars-template"}
%li.lab_info
+ = radio_button_tag :selected_lab, "{{data/id}}", 'yes'
.lab_image
%img{:src=>"{{icon}}", :width=>'12px'}
%div
.lab_name
{{data/lab_name}}
@@ -13,11 +14,11 @@
.link
// create your own /labs/select via :post method
= form_for :lab, :url=>'/select', :method=>'post' do |f|
%input{ :type=>:hidden, :name => 'id', :value=>"{{data/id}}" }
%input{ :type=>:hidden, :name => 'lab_id', :value=>"{{data/lab_id}}" }
- %input{ :type=>:hidden, :name => 'lab_code', :value=>"{{data/code}}" }
+ %input{ :type=>:hidden, :name => 'lab_code', :value=>"{{data/code}}", :id=>'lab_code' }
%input{ :type=>:hidden, :name => 'lab_info[name]', :value=>"{{data/lab_name}}" }
%input{ :type=>:hidden, :name => 'lab_info[address]', :value=>"{{address_without_comma}}" }
%input{ :type=>:hidden, :name => 'lab_info[city]', :value=>"{{titleize data/city}}" }
%input{ :type=>:hidden, :name => 'lab_info[state]', :value=>"{{data/state}}" }
%input{ :type=>:hidden, :name => 'lab_info[zip]', :value=>"{{data/zip}}" }
@@ -30,12 +31,11 @@
// lab list display .. using ul/li style but you can change that
#lab_list_container{ 'data-labs'=>@lab_data.to_json }
%ul#lab_list
- %p{:style => 'padding-left:50px;'}
- = link_to 'View more locations', '#', :id => 'more_labs_list_toggler'
+ = link_to 'View more locations', '#', :id => 'more_labs_list_toggler', :style => 'padding-left:50px;'
// form for ajax lab searches ..the code to handle return data is in app/assets/medivo/labs/handle_ajax.coffee
= form_tag(medivo.data_labs_path, :method=>:get, :id=>'lab_data_search', :remote=>true) do
%div
Enter a new Zip Code
@@ -46,27 +46,27 @@
= submit_tag "Search", :id=> :find_labs, :class=>'button'
// sample template for rendering appointment info
%script{:id=>"appointment_item_template", :type=>"text/x-handlebars-template"}
- %br
- %input{ :type=>'radio', :name=>"appointment_time", :value=>"{{data}}"} {{formattedDate}}
+ %li.appointment_time
+ %input{ :type=>'radio', :name=>"appointment_time", :value=>"{{data}}"} {{formattedDate}}
Search for appointment times
// appointment list display
#appointment_list_container
%ul#appointment_list
- %p{:style => 'display:none;padding-left:50px;'}
- = link_to 'View more times', '#', :id => 'more_appointment_list_toggler'
+ // if you want to allow the showing of more appointment times
+ = link_to 'View more times', '#', :id => 'more_appointment_list_toggler', :style => 'display:none;padding-left:50px;'
// form for ajax appointment searches ..the code to handle return data is in app/assets/medivo/lab_appointments/handlers.coffee
= form_tag(medivo.data_appointments_path, :method=>:get, :id=>'appointment_data_search', :remote=>true) do
%div
Enter a Date
.error_message
- = text_field_tag :date, (Date.today+3.days).strftime("%m/%d/%Y")
+ = text_field_tag :appointment_date, (Date.today+3.days).strftime("%m/%d/%Y")
= hidden_field_tag :lab_code, '' # you have to fill this in dynamically with a lab_code
%p
= submit_tag "Search for appointments", :id=> :find_appointments, :class=>'button'