-
Notifications
You must be signed in to change notification settings - Fork 2
/
33-story-status-ajaxified.patch
26 lines (19 loc) · 1.15 KB
/
33-story-status-ajaxified.patch
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
story-status-ajaxified
From: Bryan Larsen <[email protected]>
Now there is a status selector on the 'story/edit' page. It would be nice though if we had an ajaxified editor right on the story 'show' page. Edit `app/views/stories/show.dryml` to be:
SHOW_PATCH
What did that do? `<show-page>` uses a tag `<field-list>` to render a table of fields. DRYML's parameter mechanism allows the caller to customize the parameters that are passed to `<field-list>`. On our story page the field-list contains only the status field. By default `<field-list>` uses the `<view>` tag to render read-only views of the fields, but that can be changed by passing a tag name to the `tag` attribute. We're passing `editor` which is a tag for creating ajax-style in-place editors.
---
app/views/stories/show.dryml | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
create mode 100644 app/views/stories/show.dryml
diff --git a/app/views/stories/show.dryml b/app/views/stories/show.dryml
new file mode 100644
index 0000000..51e3dd9
--- /dev/null
+++ b/app/views/stories/show.dryml
@@ -0,0 +1,3 @@
+<show-page>
+ <field-list: tag="editor"/>
+</show-page>
\ No newline at end of file