diff options
author | Joachim Filip Ignacy Bartosik <jbartosik@gmail.com> | 2010-07-20 15:08:39 +0200 |
---|---|---|
committer | Joachim Filip Ignacy Bartosik <jbartosik@gmail.com> | 2010-07-27 23:02:44 +0200 |
commit | ec4e7b5e431d7fcfb8cd7d2f390811894fcda52d (patch) | |
tree | b701a49af6477fa14dc641df809459272405fdfa | |
parent | Clean comments view (and slightly change it) (diff) | |
download | recruiting-webapp-ec4e7b5e431d7fcfb8cd7d2f390811894fcda52d.tar.gz recruiting-webapp-ec4e7b5e431d7fcfb8cd7d2f390811894fcda52d.tar.bz2 recruiting-webapp-ec4e7b5e431d7fcfb8cd7d2f390811894fcda52d.zip |
Move reference answer to <detailed> tag for answer.
-rw-r--r-- | app/views/answers/show.dryml | 12 | ||||
-rw-r--r-- | app/views/taglibs/detailed.dryml | 13 |
2 files changed, 13 insertions, 12 deletions
diff --git a/app/views/answers/show.dryml b/app/views/answers/show.dryml index ce0936b..cfc2c35 100644 --- a/app/views/answers/show.dryml +++ b/app/views/answers/show.dryml @@ -1,17 +1,7 @@ <show-page> <content:> <detailed/> - <a href="&new_comment_for_answer_path(this.id)" if="&this.owner.mentor_is?(current_user)">Comment this answer</a> - <with with="&this.question.reference_answer"> - <card if="&this.try.viewable_by? current_user"> - <header:> - <h5>Reference answer:</h5> - </header:> - <body:> - <view:content/> - </body:> - </card> - </with> <collection:comments/> + <a href="&new_comment_for_answer_path(this.id)" if="&this.owner.mentor_is?(current_user)">Comment this answer</a> </content> </show-page> diff --git a/app/views/taglibs/detailed.dryml b/app/views/taglibs/detailed.dryml index 690126a..3fa6e5c 100644 --- a/app/views/taglibs/detailed.dryml +++ b/app/views/taglibs/detailed.dryml @@ -24,8 +24,19 @@ <h5>Answer:</h5> <if:approved>Approved</if> - <else:approved>Not approved</else> + <else>Not approved</else> <view:content/> + + <with with="&this.question.reference_answer"> + <card if="&can_view?"> + <header:> + <h5>Reference answer:</h5> + </header:> + <body:> + <view:content/> + </body:> + </card> + </with> </def> <def tag="detailed" for="MultipleChoiceAnswer"> |