Permalink
Browse files

Tabbed edit with ajax realized for model student.

  • Loading branch information...
raskhadafi committed Dec 18, 2010
1 parent 51ed064 commit 0d5fc86771f68cd45c7096e5c4248dae84b4ff7e
Showing with 9 additions and 0 deletions.
  1. +7 −0 app/views/students/_edit.html.haml
  2. +2 −0 app/views/students/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 .student'].html(render('edit'))
+page.call('addTabsBehaviour')

0 comments on commit 0d5fc86

Please sign in to comment.