<%=@user.name%>

  • › <%= link_to 'Edit Member', edit_admin_user_path(@user) %>
  • <% if @assignment.nil? %>
  • › <%= link_to 'Activate Member', :controller => 'users', :action => 'activate_member', :id => @user.id %>
  • <% else %>
  • › <%= link_to 'Deactivate Member', :controller => 'users', :action => 'deactivate_member', :id => @user.id %>
  • <% end %>
<% if !@user.address.nil? %> <%= @user.address.address1 %> <%= @user.address.address2 %>
<%= @user.address.city %>, <%= @user.address.state %> <%= @user.address.zipcode %>
<% end %> Email: <%= @user.email %>
<% Contact.find_all_by_user_id(@user.id).each do |c| %> <%= ContactType.find(c.contact_type_id).name %>: <%= number_to_phone("#{c.area}#{c.number}", :groupings => [3,3,4], :delimiter => '-') %>
<% end %>
Gender: <%= @user.gender %>
Blood Type: <%= @user.blood_type %>
Lean Muscle: <%= @user.lean_muscle_mass %>
<%= render 'notes_form', :page=>params[:page] %>

Active Programs

  • › <%= link_to 'Enroll Member', new_admin_enrollment_path(:id => @user.id) %>
<% @enrollments.each do |e| %> <% goal_sheet = GoalSheet.find_all_by_user_id(@user.id, :conditions => "program_id = #{e.program_id}", :limit => 1) %> <% end %>
Program Session Start Date End Date Goals
<%=e.program.name%> <%=e.session.strftime("%I:%M%p") if !e.session.blank?%> <%=e.start_date %> <%= (link_to 'View', goal_sheet, :id => goal_sheet[0].id ) if !goal_sheet.blank? %> | <%= (link_to 'Print (PDF)', :controller => '/goal_sheets', :action => 'show', :format=>'pdf', :id => goal_sheet[0].id) if !goal_sheet.blank?%> <%= link_to 'Edit', [:edit_admin, e] %> | <%= link_to 'Delete', [:admin, e], :confirm => 'Are you sure?', :method => :delete %>

Nutrition Plans

  • › <%= link_to "Create Nutritional Plan", new_admin_nutrition_plan_path(:id => @user.id) %>
<% @nutrition_plans.each do |np| %> <% end %>
Created Name Manage
<%= np.created_at.getlocal.strftime("%B %d, %Y - %r") %> <%= np.name %> <%= link_to "Print (PDF)", :controller => 'nutrition_plans', :action => 'build_nutrition', :id => np.id, :user_id => @user.id, :meal_plan_id => np.meal_plan_id, :supplement_plan_id => np.supplement_plan_id, :format => 'pdf'%> | <%= link_to 'Edit', [:edit_admin, np] %> | <%= link_to 'Delete', [:admin, np], :confirm => 'Are you sure?', :method => :delete %>

Meal Plans

  • › <%= link_to 'Create Meal Plan', new_admin_meal_plan_path(:id => @user.id) %>
<% @meal_plans.each do |m| %> <% end %>
Created Name # of Meals
<%=m.created_at.strftime("%B %d, %Y")%> <%=m.name.nil? ? 'No Name' : m.name %> <%=m.meal_specs.length%> <%= link_to 'Edit', [:edit_admin, m] %> | <%= link_to 'Delete', [:admin, m], :confirm => 'Are you sure?', :method => :delete %>
<% m.meal_specs.each do |s| %> <% end %>
Meal Protein Starchy Carb Fiberous Carb
<%= s.position %> <%= s.protein %> <%= s.starchy_carbs %> <%= s.fiberous_carbs %>

Supplement Plans

  • › <%= link_to 'Create Supplement Plan', new_admin_supplement_plan_path(:id => @user.id) %>
<% @supplement_plans.each do |s| %> <%end%>
Created Name
<%=s.created_at.strftime("%B %d, %Y")%> <%=s.name %> <%= link_to 'Edit', [:edit_admin, s] %> | <%= link_to 'Delete', [:admin, s], :confirm => 'Are you sure?', :method => :delete %>
<% s.user_supplements.each do |us| %> <% end %>
Supplement Amount Instruction
<%= Supplement.find(us.supplement_id).name rescue nil %> <%=us.amount%> <%= MeasurementUnit.find(us.measurement_unit_id).name %> <%= InstructionTime.find(us.instruction_time_id).name %>

Body Compositions

  • › <%= link_to "Create Body Composition", new_admin_composition_path(:id => @user.id)%>
Print Last: <%= select("composition", "id", (1..10), {}, {:onchange=>"document.location.href='#{SUBDIRECTORY}build_comp_history.pdf?id=#{@user.id}&num='+this.value"} ) %>
or Choose a Date Range: <%= text_field_tag 'start_date', '',:id=>'comp_start_date',:class=>'with_datepicker' %> - <%= text_field_tag 'end_date', '', :id=>'comp_end_date',:class=>'with_datepicker' %> <%= link_to_function 'OK', "document.location.href='#{SUBDIRECTORY}build_comp_history.pdf?id=#{@user.id}&start_date='+$('#comp_start_date').val()+'&end_date='+$('#comp_end_date').val()" %>

<% @comps.each do |c| %> <% body_fat = c.get_body_fat_percentage method = CompositionMethod.find(c.composition_method_id) %> <% end %>
Date Weight Fat Fat % Lean Muscle Mass
<%=c.created_at.strftime("%m/%d/%y")%> <% c.composition_photos.each do |cp| %> <%= link_to(image_tag(cp.photo.url(:small)), hack_photo_path(cp.photo)) %> <% end %> <%=format("%.1f", c.weight)%> lbs <%=format("%.2f", (c.weight - c.lean_muscle_mass))%> lbs <%=format("%.2f",body_fat)%>% <%= c.lean_muscle_mass %> lbs <%= link_to "+Photo", add_photo_admin_composition_path(c) %> | <%= link_to "Edit", [:edit_admin, c] %> | <%= link_to "Delete", [:admin,c], :confirm => 'Are you sure?', :method => :delete %>
<%= page_entries_info @comps %> <%= will_paginate @comps %>
 

Historical Body Fat %