Gentoo Archives: gentoo-commits

From: "Petteri Räty" <betelgeuse@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/recruiting-webapp:master commit in: app/views/users/, features/
Date: Mon, 01 Aug 2011 14:19:53
Message-Id: 94f2ab8beeda417b8e7dc6e6406d8ac29f02ccb5.betelgeuse@gentoo
1 commit: 94f2ab8beeda417b8e7dc6e6406d8ac29f02ccb5
2 Author: Joachim Filip Ignacy Bartosik <jbartosik <AT> gmail <DOT> com>
3 AuthorDate: Sat Jul 23 17:10:18 2011 +0000
4 Commit: Petteri Räty <betelgeuse <AT> gentoo <DOT> org>
5 CommitDate: Sat Jul 23 17:10:18 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/recruiting-webapp.git;a=commit;h=94f2ab8b
7
8 Don't show "Start mentoring this recruit" button on non-recruit pages
9
10 Fix bug:
11
12 https://bugs.gentoo.org/show_bug.cgi?id=355723
13
14 ---
15 app/views/users/show.dryml | 2 +-
16 features/clean_ui.feature | 7 +++++++
17 2 files changed, 8 insertions(+), 1 deletions(-)
18
19 diff --git a/app/views/users/show.dryml b/app/views/users/show.dryml
20 index b7bd5fe..f91b0f1 100644
21 --- a/app/views/users/show.dryml
22 +++ b/app/views/users/show.dryml
23 @@ -15,7 +15,7 @@
24 <actions:><submit label="This recruit needs your acceptance"/></actions:>
25 </form>
26
27 - <if test="&this.editable_by?(current_user, :mentor)">
28 + <if test="&this.editable_by?(current_user, :mentor) and this.role.is_recruit?">
29 <form if="&this.mentor.nil?">
30 <input value="&current_user.id" type="hidden" name="user[mentor_id]"/>
31 <submit label="Start mentoring this recruit"/>
32
33 diff --git a/features/clean_ui.feature b/features/clean_ui.feature
34 index fd11103..053b5b1 100644
35 --- a/features/clean_ui.feature
36 +++ b/features/clean_ui.feature
37 @@ -125,3 +125,10 @@ Feature: Clean UI
38 Given I am logged in as "mentor" who is "mentor"
39 And user "mentor2" is mentor of "recruit"
40 Then I should see explanation that I can't become mentor for "recruit"
41 +
42 +
43 + Scenario: Don't show "recruit this recruit" button on non-recruit pages
44 + Given I am logged in as "recruiter" who is "recruiter"
45 + And user "recruiter2" who is "recruiter"
46 + When I am on show "recruiter2" user page
47 + Then I should not see tag <input class="button submit-button" type="submit" value="Start mentoring this recruit">