- if current_user
  %p
    -#= link_to 'Browse games', games_path
  %h3 Courses
  - Script.all.each do |script|
    = link_to script.name, script_level_path(script, ScriptLevel::NEXT)
    %br/

  - if current_user.teachers.length > 0
    %h3 Teacher
    - current_user.teachers.each do |teacher|
      = teacher.name
      %br/
    %br/
    Add a teacher
    = form_for([Follower.new]) do |f|
      .field
        = f.label :email
        = text_field_tag :email
      .actions
        = f.submit

  = link_to "Add a teacher", root_path

  - if current_user.students.length > 0
    %h3 Students
    - current_user.students.each do |student|
      = student.name
      %br/
    %br/

- else
  = link_to "Sign up", new_user_registration_path
  ,
  = link_to "sign in", new_user_session_path
  , or try out our
  = link_to "demo", script_level_path(Script.first, ScriptLevel::NEXT)


- if current_user
  %p
    -#= link_to 'Browse games', games_path
  %h3 Courses
  - Script.all.each do |script|
    = link_to script.name, script_level_path(script, ScriptLevel::NEXT)
    %br/

  - if current_user.teachers.length > 0
    %h3 Teacher
    - current_user.teachers.each do |teacher|
      = teacher.name
      %br/
    %br/
  Add a teacher by email address:
  = form_for([Follower.new]) do |f|
    .field
      = text_field_tag :email
    .actions
      = f.submit

  - if current_user.students.length > 0
    %h3 Students
    - current_user.students.each do |student|
      = student.name
      %br/
    %br/

- else
  = link_to "Sign up", new_user_registration_path
  ,
  = link_to "sign in", new_user_session_path
  , or try out our
  = link_to "demo", script_level_path(Script.first, ScriptLevel::NEXT)


Allow people without teachers to add a teacher by email
Allow people without teachers to add a teacher by email
