Mercurial > libervia-templates
annotate default/input/comment.html @ 10:8b5615a1bf3d
articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 27 Apr 2017 01:07:28 +0200 |
parents | default/input/comments.html@f1c773126f23 |
children | 8cdcbe0d7dee |
rev | line source |
---|---|
10
8b5615a1bf3d
articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents:
7
diff
changeset
|
1 {% import 'input/form.html' as form %} |
8b5615a1bf3d
articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents:
7
diff
changeset
|
2 |
8b5615a1bf3d
articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents:
7
diff
changeset
|
3 {% macro head(service, node) %} |
8b5615a1bf3d
articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents:
7
diff
changeset
|
4 {# include data needed to identify the node to use for commenting #} |
8b5615a1bf3d
articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents:
7
diff
changeset
|
5 <input type="hidden" name="type" value="comment"> |
7
f1c773126f23
input/comments: comments input macros, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
6 <input type="hidden" name="service" value="{{service}}"> |
f1c773126f23
input/comments: comments input macros, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
7 <input type="hidden" name="node" value="{{node}}"> |
10
8b5615a1bf3d
articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents:
7
diff
changeset
|
8 {% endmacro %} |
8b5615a1bf3d
articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents:
7
diff
changeset
|
9 |
8b5615a1bf3d
articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents:
7
diff
changeset
|
10 {% macro body(rows=10, cols=50) %} |
8b5615a1bf3d
articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents:
7
diff
changeset
|
11 <textarea name="body" rows="{{rows}}" cols="{{cols}}"></textarea> |
8b5615a1bf3d
articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents:
7
diff
changeset
|
12 {% endmacro %} |
8b5615a1bf3d
articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents:
7
diff
changeset
|
13 |
8b5615a1bf3d
articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents:
7
diff
changeset
|
14 {% macro submit() %} |
7
f1c773126f23
input/comments: comments input macros, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
15 <input type="submit" value="Send"> |
f1c773126f23
input/comments: comments input macros, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
16 {% endmacro %} |
10
8b5615a1bf3d
articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents:
7
diff
changeset
|
17 |
8b5615a1bf3d
articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents:
7
diff
changeset
|
18 {% macro comment(service, node, action='') %} |
8b5615a1bf3d
articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents:
7
diff
changeset
|
19 {% call form.form(action=action) %} |
8b5615a1bf3d
articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents:
7
diff
changeset
|
20 {{ head(service, node) }} |
8b5615a1bf3d
articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents:
7
diff
changeset
|
21 {{ body() }} |
8b5615a1bf3d
articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents:
7
diff
changeset
|
22 {{ submit() }} |
8b5615a1bf3d
articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents:
7
diff
changeset
|
23 {% endcall %} |
8b5615a1bf3d
articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents:
7
diff
changeset
|
24 {% endmacro %} |