- current_teachers = portal_clazz.teachers.sort { |a,b| (a.user.last_name <=> b.user.last_name) }
- if current_teachers.length > 0
  %ul
    - current_teachers.each do |portal_teacher|
      %li
        = portal_teacher.name
        - reason = portal_clazz.reason_user_cannot_remove_teacher_from_class(current_visitor, portal_teacher)
        - if !reason
          - if portal_teacher.user_id == current_visitor.id
            - confirm = Portal::Clazz.WARNING_REMOVE_TEACHER_CURRENT_USER(portal_clazz.name)
          - else
            - confirm = Portal::Clazz.CONFIRM_REMOVE_TEACHER(portal_teacher.name, portal_clazz.name)
          = remote_link_button "delete.png", :url => {:action=>'remove_teacher', :id => portal_clazz, :teacher_id => portal_teacher.id}, :confirm => confirm, :method => :delete, :title => "Remove #{portal_teacher.name} from #{portal_clazz.name}"
        - else
          %span{:class => "rollover remove"}
            remove teacher
-else
  %div No teachers assigned to this class

- current_teachers = portal_clazz.teachers.sort { |a,b| (a.user.last_name <=> b.user.last_name) }
- if current_teachers.length > 0
  %ul
    - current_teachers.each do |portal_teacher|
      %li
        = portal_teacher.name
        - reason = portal_clazz.reason_user_cannot_remove_teacher_from_class(current_visitor, portal_teacher)
        - if !reason
          - if portal_teacher.user_id == current_visitor.id
            - confirm = Portal::Clazz.WARNING_REMOVE_TEACHER_CURRENT_USER(portal_clazz.name)
          - else
            - confirm = Portal::Clazz.CONFIRM_REMOVE_TEACHER(portal_teacher.name, portal_clazz.name)
          = remote_link_button "delete.png", :url => {:action=>'remove_teacher', :id => portal_clazz, :teacher_id => portal_teacher.id}, :confirm => confirm, :method => :delete, :title => "Remove #{portal_teacher.name} from #{portal_clazz.name}"
        - else
          %span{:class => "rollover"}
            = image_tag "delete_grey.png", :title => reason
-else
  %div No teachers assigned to this class

Revert to using image for delete button in class teacher list.
Revert to using image for delete button in class teacher list.

