Skip to content

Commit

Permalink
refs #124: add hints to conference user form
Browse files Browse the repository at this point in the history
  • Loading branch information
manno committed Mar 20, 2014
1 parent a4ad807 commit 3574af3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/views/users/_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
- if can? :assign_user_roles, User
- if @user.is_crew?
= dynamic_association :conference_users, t(:conference_user), f
- else
%p.inline-hint You need to save before adding conferences to a crew member.
= f.buttons do
= f.commit_button :button_html => {:class => "btn primary"}
= link_to "Cancel", :back, :class => "btn"
5 changes: 4 additions & 1 deletion app/views/users/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
%p
%b Role:
= @user.role
-if @user.is_crew?
-if @user.is_crew? and @user.conference_users.empty?
%p
This user is not yet part of any conference crew.
-elsif @user.is_crew?
%ul
- @user.conference_users.each do |cu|
%li= cu.conference.acronym + " - " + cu.role
Expand Down

0 comments on commit 3574af3

Please sign in to comment.