Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Linked users to people view.

  • Loading branch information...
commit f1ced0226641ce5779ff837f0c84f4d75bfae8e8 1 parent f5a08bd
@raskhadafi raskhadafi authored
View
2  app/views/users/_user.html.haml
@@ -1,5 +1,5 @@
%tr[user]
- %td= link_to user, user, {'data-href-container' => 'tr'}
+ %td= link_to user, user.person, {'data-href-container' => 'tr'}
%td= user.email
%td= user.roles.map{|role| t(role.name, :scope => 'cancan.roles')}.join(', ')
%td= user.created_at.to_date
View
2  config/navigation/main_navigation.rb
@@ -31,7 +31,7 @@
person.item :student_index, t_model(Student), students_path, :highlights_on => /^\/students(\/|$)/, :if => lambda { can?(:index, Student) }
person.item :teacher_index, t_model(Teacher), teachers_path, :highlights_on => /^\/teachers(\/|$)/, :if => lambda { can?(:index, Teacher) }
person.item :parent_index, t_model(Parent), parents_path, :highlights_on => /^\/parents(\/|$)/, :if => lambda { can?(:index, Parent) }
- person.item :person_index, t('learnyt.all'), people_path, :if => lambda { can?(:index, Person) }
+ person.item :person_index, t('learnyt.all'), people_path, :highlights_on => /^\/people(\/|$)/, :if => lambda { can?(:index, Person) }
person.item :correspondence, t('correspondence', :scope => :main_navigation), e_mails_path, :if => lambda { can?(:index, EMail) } do |correspondence|
correspondence.item :correspondence_e_mail_index, t(:e_mail_index, :scope => :main_navigation), e_mails_path, :highlights_on => /\/e_mails/, :if => lambda { can?(:index, EMail) }
#correspondence.item :correspondence_post_mail_index, t(:post_mail_index, :scope => :main_navigation), '/'
Please sign in to comment.
Something went wrong with that request. Please try again.