diff options
author | Joachim Filip Ignacy Bartosik <jbartosik@gmail.com> | 2010-07-29 17:36:20 +0200 |
---|---|---|
committer | Joachim Filip Ignacy Bartosik <jbartosik@gmail.com> | 2010-07-29 18:42:05 +0200 |
commit | 5115549f869e391592da1a0628fa3cad5a694fe9 (patch) | |
tree | 118801be64927394ec78082419de1c48a31d5f25 /app | |
parent | <view> for CheckList now checks if user can view it (diff) | |
download | recruiting-webapp-5115549f869e391592da1a0628fa3cad5a694fe9.tar.gz recruiting-webapp-5115549f869e391592da1a0628fa3cad5a694fe9.tar.bz2 recruiting-webapp-5115549f869e391592da1a0628fa3cad5a694fe9.zip |
Properly show 'Answer it!' links
Diffstat (limited to 'app')
-rw-r--r-- | app/views/questions/show.dryml | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/app/views/questions/show.dryml b/app/views/questions/show.dryml index 964971b..0c3fc71 100644 --- a/app/views/questions/show.dryml +++ b/app/views/questions/show.dryml @@ -1,15 +1,6 @@ <show-page> <content:> <detailed show-title/> - <if with="&this.answer_of(current_user)"> - <a>View you answer</a>' - </if> - <else> - <if test="& current_user.signed_up? && this.content.try.new_answer_of(current_user)"> - <a href="&new_answer_for_question_path(this.id)" >Answer it!</a> - </if> - </else> - <if test="&this.content.nil?"> <h2><name/><a action="edit" if="&can_edit?">(Edit)</a></h2> This question doesn't have content yet. @@ -21,7 +12,14 @@ </if> </if> <else> - <a href="&new_answer_for_question_path(this.id)" >Answer it!</a> + <if with="&this.answer_of(current_user)"> + <a>View you answer</a>' + </if> + <else> + <if test="& current_user.signed_up? && this.content.try.new_answer_of(current_user)"> + <a href="&new_answer_for_question_path(this.id)">Answer it!</a> + </if> + </else> </else> <if test="&this.reference_answer.try.viewable_by? current_user"> <br/> |