app/helpers/coaches_helper.rb
# custom dialog link copy from link_to_dialog but routed to proper controler ------
custom dialog link copy from link_to_dialog but routed to proper controler
custom dialog link copy from link_to_dialog but routed to proper controler
def link_to_coaches_dialog(name, reference, type, athlete_id, workout_reference, date)
  title = date
  if type == "edit" 
    request = '/log_entries/'+reference+'/edit/'+workout_reference
    link_to(name, 'simple_dialog_link("'+request+'", "'+title+'")', :class => "dialog_link")
  elsif type == "graph"
    request = '/graph/'+reference
    link_to(name, 'simple_dialog_link("'+request+'", "'+title+'")')
  elsif type == "new" 
    request = '/log_entries/new/'+reference+'/'+athlete_id
      link_to(Date.parse(reference).day, 'simple_dialog_link("'+request+'", "'+title+'")', :class => "puh")
  end
end
def link_to_coaches_dialog ( name , reference , type , athlete_id , workout_reference , date ) title = date if type == "edit" request = '/log_entries/' + reference + '/edit/' + workout_reference link_to ( name , 'simple_dialog_link("' + request + '", "' + title + '")' , :class => "dialog_link" ) elsif type == "graph" request = '/graph/' + reference link_to ( name , 'simple_dialog_link("' + request + '", "' + title + '")' ) elsif type == "new" request = '/log_entries/new/' + reference + '/' + athlete_id link_to ( Date . parse ( reference ) . day , 'simple_dialog_link("' + request + '", "' + title + '")' , :class => "puh" ) end end
custom dialog link copy from link_to_dialog but routed to proper controler
custom dialog link copy from link_to_dialog but routed to proper controler
# link_to_dialog(link_name, entry_id, edit) # link_to_dialog(window_title, date, new, cal, athlete_id) #have to make the "new dialog" suround the total div
name
reference
type
athlete_id
workout_reference
date