Permalink
Browse files

Tabbed edit view with ajax realized for model teacher.

  • Loading branch information...
1 parent 0d5fc86 commit 6426b05a416ce44672cb6dfb51dc8ee328039e5d @raskhadafi raskhadafi committed Dec 18, 2010
Showing with 9 additions and 0 deletions.
  1. +7 −0 app/views/teachers/_edit.html.haml
  2. +2 −0 app/views/teachers/edit.js.rjs
@@ -0,0 +1,7 @@
+%div[resource]
+ = ui_tabs [ |
+ {:name => 'form_address', :partial => 'people/tab_form_address' }, |
+ {:name => 'form_remarks', :partial => 'people/tab_form_remarks' }, |
+ {:name => 'form_user', :partial => 'people/tab_form_user', :if => lambda { resource.user } }, |
+ {:name => 'create_user', :partial => 'people/tab_create_user', :unless => lambda { resource.user } } |
+ ] |
@@ -0,0 +1,2 @@
+page['#content .teacher'].html(render('edit'))
+page.call('addTabsBehaviour')

0 comments on commit 6426b05

Please sign in to comment.