Skip to content

Commit

Permalink
Hid link to new achievement conditions if none are valid
Browse files Browse the repository at this point in the history
  • Loading branch information
dariusf committed Jul 14, 2015
1 parent 4e7efae commit 7621b53
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/views/course/achievements/_form.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
aria-haspopup="true"]
span = t('course.condition.new.header')
ul.dropdown-menu.dropdown-menu-right aria-labelledby="new-condition-dropdown-btn"
li = link_to t('course.condition.achievements.new.header'),
new_course_achievement_condition_achievement_path(current_course,
@achievement)
- if valid_achievement_conditions(@achievement).any?
li = link_to t('course.condition.achievements.new.header'),
new_course_achievement_condition_achievement_path(current_course,
@achievement)
li = link_to t('course.condition.levels.new.header'),
new_course_achievement_condition_level_path(current_course,
@achievement)
Expand Down

0 comments on commit 7621b53

Please sign in to comment.