blob: 2e305782e4538655b18fe8619e71c0f44b981c5a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
<show-page>
<content-body:>
<detailed show-title/>
<if test="&this.content.nil?">
<h2><name/><a action="edit" if="&can_edit?">(Edit)</a></h2>
This question doesn't have content yet.
<if test="&can_edit?">
<ul>
<li><a href="&new_question_content_text_for_question_path(this.id)">Add text content</a></li>
<li><a href="&new_question_content_multiple_choice_for_question_path(this.id)">Add multiple choice content</a></li>
<li><a href="&new_question_content_email_for_question_path(this.id)">Add email content</a></li>
</ul>
</if>
</if>
<else>
<if with="&this.answer_of(current_user)">
<a href="&answer_path(this)">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._?.viewable_by? current_user">
<br/>
<a href="&answer_path(this.reference_answer)">View reference answer</a>.
</if>
</content-body:>
</show-page>
|