Skip to content

Instantly share code, notes, and snippets.

@ahoward
Created November 29, 2008 17:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahoward/30259 to your computer and use it in GitHub Desktop.
Save ahoward/30259 to your computer and use it in GitHub Desktop.
<%=
subnav(
'All teachers',
link_to('Create a new teacher', new_teacher_path),
link_to('Create new teachers in bulk', :action => 'add_teacher_accounts')
)
%>
<%=
table_(:class => 'simple'){
thead_{
td_{ 'Name' }
td_{ 'Nickname' }
td_{ 'Password' }
td_{ 'Email' }
td_(:colspan => 3, :style => 'text-align:center'){ 'Actions' }
}
@teachers.each_with_index do |teacher, i|
tr_(:class => i.parity){
td_{ teacher.username }
td_{ teacher.nickname }
td_{ teacher.password }
td_{ teacher.email }
td_{ link_to(:Show, teacher) }
td_{ link_to(:Edit, edit_teacher_path(teacher)) }
td_{ link_to(:Delete, teacher, :confirm => 'Are you sure?', :method => :delete) }
}
end
}
%>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment