%= form_for @program_log do |f| %>
<% if @program_log.errors.any? %>
<%= pluralize(@program_log.errors.count, "error") %> prohibited this program log from being saved:
<% @food.errors.full_messages.each do |msg| %>
- <%= msg %>
<% end %>
<% end %>
<% if !@program_log.id.blank? %>
- <%= link_to "Print Entry (PDF)", :controller => 'program_logs', :action => 'print_journal_entry', :eid => session[:enrollment_id], :user_id => current_user.id, :id => @program_log.id, :format => 'pdf'%>
<% end %>
<%= params[:date] ? Time.mktime(@year,@month,@day).strftime('%A %B %d, %Y') : Time.now.localtime.strftime('%A, %B %d, %Y') %>
<%= collection_select("enrollment", "id",
Enrollment.find_all_by_user_id(current_user),
"id", "program_name",
{:selected=> get_current_enrollment_or_nil },
{:onchange=>"document.location.href='?eid='+this.value"}
) %>
<%= f.hidden_field :date, :value => (params[:date] ? params[:date] : Time.now.localtime.strftime("%m-%d-%Y")) %>
<%= f.hidden_field :enrollment_id, :value => session[:enrollment_id] %>
Performance
- <%= f.label :overall_score %> <%= f.select :score, %w[0 1 2 3 4 5] %>
- <%= f.label :time_up %> <%= f.time_select :time_up, { :default => Time.now.change(:hour => 5), :simple_time_select => true, :minute_interval => 15, :time_separator => "" } %>
- <%= f.label :time_down %> <%= f.time_select :time_down, { :default => Time.now.change(:hour => 22), :simple_time_select => true, :minute_interval => 15, :time_separator => "" } %>
What did you do great today?
<%= f.text_area :greatness, :size => '50x6' %>
What can you improve on for tomorrow?
<%= f.text_area :improvements, :size => '50x6' %>
Additional Comments/Notes:
<%= f.text_area :general, :size => '50x6' %>
Training
Rate your personal level of intensity in any classes or cardio you've performed today.
- <%= f.label :workout_intensity %> <%= f.select :training_score, %w[0 1 2 3 4 5] %>
- <%= f.label :workout_comments %> <%= f.text_area :training_comments, :size => '50x6' %>
- <%= f.label :cardio_intensity %> <%= f.select :cardio_score, %w[0 1 2 3 4 5] %>
- <%= f.label :cardio_comments %> <%= f.text_area :cardio_comments, :size => '50x6' %>
Nutrition
Rate your daily adherence to the following nutritional elements.
- <%= f.label :meals %> <%= f.select :diet_score, %w[0 1 2 3 4 5], :selected => @program_log.diet_score %>
- <%= f.label :supplements %> <%= f.select :supplement_score, %w[0 1 2 3 4 5] %>
- <%= f.label :water %> <%= f.select :water_score, %w[0 1 2 3 4 5] %>
Meal Logs
Record each meal and/or accompanying supplement(s) you consume throughout the day.
<%= f.fields_for :meal_log_items do |builder| %>
<%= render 'meal_log_item_fields', :f => builder %>
<% end %>
- <%= link_to_add_fields "Add Meal", f, :meal_log_items %>
<%= f.submit %>
<% end %>