diff options
author | Joachim Filip Ignacy Bartosik <jbartosik@gmail.com> | 2011-07-23 19:51:52 +0200 |
---|---|---|
committer | Joachim Filip Ignacy Bartosik <jbartosik@gmail.com> | 2011-07-23 20:00:56 +0200 |
commit | e6a17027c55ab3ded54b282685aab264318c7c7e (patch) | |
tree | 1641b0a5883f5467462fa1d9b8d7743473d54f83 | |
parent | Don't show "Start mentoring this recruit" button on non-recruit pages (diff) | |
download | recruiting-webapp-e6a17027c55ab3ded54b282685aab264318c7c7e.tar.gz recruiting-webapp-e6a17027c55ab3ded54b282685aab264318c7c7e.tar.bz2 recruiting-webapp-e6a17027c55ab3ded54b282685aab264318c7c7e.zip |
Show links to answers on user questions listing
Fix bug:
https://bugs.gentoo.org/show_bug.cgi?id=355721
-rw-r--r-- | app/views/taglibs/cards.dryml | 4 | ||||
-rw-r--r-- | features/question_listing.feature | 16 |
2 files changed, 18 insertions, 2 deletions
diff --git a/app/views/taglibs/cards.dryml b/app/views/taglibs/cards.dryml index 16f96f4..6b144aa 100644 --- a/app/views/taglibs/cards.dryml +++ b/app/views/taglibs/cards.dryml @@ -2,8 +2,8 @@ <card class="question" param="default" merge> <header: param> <h4 param="heading"><a><name/></a></h4> - <if with="&this.answered?(user || current_user)"> - answered + <if test="&this.answered?(user || current_user)"> + answered (<a with="&this.answer_of(user || current_user)">view answer</a>) </if> </header:> </card> diff --git a/features/question_listing.feature b/features/question_listing.feature index 0e1c02b..42e7129 100644 --- a/features/question_listing.feature +++ b/features/question_listing.feature @@ -43,3 +43,19 @@ Feature: Viewing question listings Then I should see "q3" And I should not see following: |q1|q2| + + + Scenario: On user page show links to answers + Given I am logged in as "recruiter" who is "recruiter" + And following questions: + |q1|cat1| + |q2|cat1| + And user "recruit" has category "cat1" + And answer of "recruit" for question "q1" + + When I am on show "recruit" user page + And I follow "Questions user should answer" + And I follow "view answer" + + Then I should be on answer of "recruit" for question "q1" page + |