diff options
Diffstat (limited to 'src/guff/views/ecrs')
-rw-r--r-- | src/guff/views/ecrs/test-blog.ecr (renamed from src/guff/views/ecrs/test.ecr) | 42 |
1 files changed, 6 insertions, 36 deletions
diff --git a/src/guff/views/ecrs/test.ecr b/src/guff/views/ecrs/test-blog.ecr index d36b62c..f28966a 100644 --- a/src/guff/views/ecrs/test.ecr +++ b/src/guff/views/ecrs/test-blog.ecr @@ -1,40 +1,10 @@ <h1><%= h(TITLE) %></h1> <% - [{ - id: "draft", - name: "Draft Posts", - - actions: [{ - id: "posted", - name: "Post", - }, { - id: "deleted", - name: "Delete", - }], - }, { - id: "posted", - name: "Posted", - - actions: [{ - id: "draft", - name: "Draft", - }, { - id: "deleted", - name: "Delete", - }], - }, { - id: "deleted", - name: "Deleted Posts", - - actions: [{ - id: "draft", - name: "Draft", - }], - }].each do |kind| + POST_SETS.each do |set| %> <h2><%= - h(kind[:name] as String) + h(set[:name] as String) %></h2> <table> @@ -48,7 +18,7 @@ </tr> </thead> - <tbody><% posts(kind[:id] as String).rows.each do |post| %> + <tbody><% posts(set[:id] as String).rows.each do |post| %> <tr> <td><%= h(post.row["post_id"].to_s) @@ -66,11 +36,11 @@ post.row["body"].to_s %></td> - <% (kind[:actions] as Array(Hash(Symbol, String))).each do |a| %> + <% (set[:actions] as Array(Hash(Symbol, String))).each do |a| %> <td> <form method='post' - action='/test/set_state' + action='/test/blog/set_state' > <input type='hidden' @@ -100,7 +70,7 @@ <div class='section'> <form method='post' - action='/test/add_post' + action='/test/blog/add_post' > <label for='post-name'> Name |