diff options
author | Joachim Filip Ignacy Bartosik <jbartosik@gmail.com> | 2011-07-23 19:10:18 +0200 |
---|---|---|
committer | Joachim Filip Ignacy Bartosik <jbartosik@gmail.com> | 2011-07-23 19:10:18 +0200 |
commit | 94f2ab8beeda417b8e7dc6e6406d8ac29f02ccb5 (patch) | |
tree | a6a807327ed9301c7f1119effa4a93ed4713660c | |
parent | Fix grammar error (diff) | |
download | recruiting-webapp-94f2ab8beeda417b8e7dc6e6406d8ac29f02ccb5.tar.gz recruiting-webapp-94f2ab8beeda417b8e7dc6e6406d8ac29f02ccb5.tar.bz2 recruiting-webapp-94f2ab8beeda417b8e7dc6e6406d8ac29f02ccb5.zip |
Don't show "Start mentoring this recruit" button on non-recruit pages
Fix bug:
https://bugs.gentoo.org/show_bug.cgi?id=355723
-rw-r--r-- | app/views/users/show.dryml | 2 | ||||
-rw-r--r-- | features/clean_ui.feature | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/app/views/users/show.dryml b/app/views/users/show.dryml index b7bd5fe..f91b0f1 100644 --- a/app/views/users/show.dryml +++ b/app/views/users/show.dryml @@ -15,7 +15,7 @@ <actions:><submit label="This recruit needs your acceptance"/></actions:> </form> - <if test="&this.editable_by?(current_user, :mentor)"> + <if test="&this.editable_by?(current_user, :mentor) and this.role.is_recruit?"> <form if="&this.mentor.nil?"> <input value="¤t_user.id" type="hidden" name="user[mentor_id]"/> <submit label="Start mentoring this recruit"/> diff --git a/features/clean_ui.feature b/features/clean_ui.feature index fd11103..053b5b1 100644 --- a/features/clean_ui.feature +++ b/features/clean_ui.feature @@ -125,3 +125,10 @@ Feature: Clean UI Given I am logged in as "mentor" who is "mentor" And user "mentor2" is mentor of "recruit" Then I should see explanation that I can't become mentor for "recruit" + + + Scenario: Don't show "recruit this recruit" button on non-recruit pages + Given I am logged in as "recruiter" who is "recruiter" + And user "recruiter2" who is "recruiter" + When I am on show "recruiter2" user page + Then I should not see tag <input class="button submit-button" type="submit" value="Start mentoring this recruit"> |