aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoachim Filip Ignacy Bartosik <jbartosik@gmail.com>2010-05-27 18:04:51 +0200
committerJoachim Filip Ignacy Bartosik <jbartosik@gmail.com>2010-06-08 19:57:23 +0200
commitd8c6c62d1c73e6da20a1551d1f59122e852dd6f8 (patch)
tree9c34035686599f20948c1ba1cd78167823570d87 /app/views/taglibs
parentFix bug in spec support functions (diff)
downloadrecruiting-webapp-d8c6c62d1c73e6da20a1551d1f59122e852dd6f8.tar.gz
recruiting-webapp-d8c6c62d1c73e6da20a1551d1f59122e852dd6f8.tar.bz2
recruiting-webapp-d8c6c62d1c73e6da20a1551d1f59122e852dd6f8.zip
Easier question answering
Show question above answer. On question show page link to your answer for this question (if you answered it) or to create your answer for this question (if you didn't).
Diffstat (limited to 'app/views/taglibs')
-rw-r--r--app/views/taglibs/application.dryml4
-rw-r--r--app/views/taglibs/detailed.dryml21
-rw-r--r--app/views/taglibs/forms.dryml12
3 files changed, 36 insertions, 1 deletions
diff --git a/app/views/taglibs/application.dryml b/app/views/taglibs/application.dryml
index 2da222f..d981b3b 100644
--- a/app/views/taglibs/application.dryml
+++ b/app/views/taglibs/application.dryml
@@ -7,5 +7,7 @@
<set-theme name="clean"/>
<def tag="app-name">Gentoo Recruiters App</def>
-<include src="pages"/>
<include src="cards"/>
+<include src="forms"/>
+<include src="detailed"/>
+<include src="pages"/>
diff --git a/app/views/taglibs/detailed.dryml b/app/views/taglibs/detailed.dryml
new file mode 100644
index 0000000..0a93a5d
--- /dev/null
+++ b/app/views/taglibs/detailed.dryml
@@ -0,0 +1,21 @@
+<def tag="detailed" polymorphic>You should define detailed tag if you want to use it</def>
+
+<def tag="detailed" for="Question">
+ <h2><name/><a action="edit" if="&can_edit?">(Edit)</a></h2>
+ <view:content/>
+</def>
+
+<def tag="detailed" for="Answer">
+ <h2>
+ Answer of
+ <with:owner><name/></with>
+ for question
+ "<with:question><name/></with>
+ <a action="edit" if="&can_edit?">(Edit)</a>
+ </h2>
+ <h5>Question:</h5>
+ <with:question><view:content/></with>
+
+ <h5>Answer:</h5>
+ <view:content/>
+</def>
diff --git a/app/views/taglibs/forms.dryml b/app/views/taglibs/forms.dryml
new file mode 100644
index 0000000..1c1140c
--- /dev/null
+++ b/app/views/taglibs/forms.dryml
@@ -0,0 +1,12 @@
+<def tag="form" for="Answer">
+ <form merge param="default">
+ <error-messages param/>
+ <input:question type="hidden"/>
+ <field-list fields="content">
+ <content-label:>Your Answer:</content-label:>
+ </field-list>
+ <div param="actions">
+ <submit label="#{ht 'answers.actions.save', :default=>['Save']}" param/><or-cancel param="cancel"/>
+ </div>
+ </form>
+</def>