kwartz 3.0.0 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (179) hide show
  1. data/ChangeLog +36 -1
  2. data/LGPL +504 -0
  3. data/README.txt +16 -2
  4. data/bin/kwartz +1 -1
  5. data/doc-api/classes/Kwartz.html +47 -1
  6. data/doc-api/classes/Kwartz/Assertion.html +6 -6
  7. data/doc-api/classes/Kwartz/AssertionError.html +6 -6
  8. data/doc-api/classes/Kwartz/AttrInfo.html +42 -42
  9. data/doc-api/classes/Kwartz/BaseError.html +12 -12
  10. data/doc-api/classes/Kwartz/BaseTranslator.html +210 -43
  11. data/doc-api/classes/Kwartz/CharacterType.html +24 -24
  12. data/doc-api/classes/Kwartz/CommandOptionError.html +7 -7
  13. data/doc-api/classes/Kwartz/CommandOptions.html +49 -49
  14. data/doc-api/classes/Kwartz/Config.html +6 -1
  15. data/doc-api/classes/Kwartz/ConvertError.html +14 -14
  16. data/doc-api/classes/Kwartz/Converter.html +31 -30
  17. data/doc-api/classes/Kwartz/CssStyleParser.html +79 -57
  18. data/doc-api/classes/Kwartz/Defun.html +313 -0
  19. data/doc-api/classes/Kwartz/DocumentRuleset.html +58 -58
  20. data/doc-api/classes/Kwartz/ElementExpander.html +32 -32
  21. data/doc-api/classes/Kwartz/ElementInfo.html +29 -29
  22. data/doc-api/classes/Kwartz/ElementRuleset.html +126 -96
  23. data/doc-api/classes/Kwartz/EperlHandler.html +108 -84
  24. data/doc-api/classes/Kwartz/EperlTranslator.html +7 -7
  25. data/doc-api/classes/Kwartz/ErubisHandler.html +2 -2
  26. data/doc-api/classes/Kwartz/ErubisTranslator.html +8 -8
  27. data/doc-api/classes/Kwartz/ErubyHandler.html +2 -220
  28. data/doc-api/classes/Kwartz/ErubyTranslator.html +7 -7
  29. data/doc-api/classes/Kwartz/ExpandStatement.html +20 -20
  30. data/doc-api/classes/Kwartz/Handler.html +122 -117
  31. data/doc-api/classes/Kwartz/HandlerArgument.html +215 -0
  32. data/doc-api/classes/Kwartz/Helper.html +112 -0
  33. data/doc-api/classes/Kwartz/Helper/ActionViewHelper.html +221 -0
  34. data/doc-api/classes/Kwartz/Helper/RailsTemplate.html +630 -0
  35. data/doc-api/classes/Kwartz/JstlHandler.html +208 -193
  36. data/doc-api/classes/Kwartz/JstlTranslator.html +15 -15
  37. data/doc-api/classes/Kwartz/KwartzError.html +6 -6
  38. data/doc-api/classes/Kwartz/Main.html +39 -23
  39. data/doc-api/classes/Kwartz/NativeExpression.html +18 -18
  40. data/doc-api/classes/Kwartz/NativeStatement.html +25 -25
  41. data/doc-api/classes/Kwartz/Node.html +6 -6
  42. data/doc-api/classes/Kwartz/PIErubisHandler.html +113 -0
  43. data/doc-api/classes/Kwartz/PIErubisTranslator.html +200 -0
  44. data/doc-api/classes/Kwartz/ParseError.html +6 -6
  45. data/doc-api/classes/Kwartz/PhpHandler.html +102 -83
  46. data/doc-api/classes/Kwartz/PhpTranslator.html +14 -14
  47. data/doc-api/classes/Kwartz/PresentationLogicParser.html +136 -128
  48. data/doc-api/classes/Kwartz/PrintStatement.html +19 -19
  49. data/doc-api/classes/Kwartz/RailsHandler.html +121 -118
  50. data/doc-api/classes/Kwartz/RailsTranslator.html +7 -7
  51. data/doc-api/classes/Kwartz/RubyHandler.html +349 -0
  52. data/doc-api/classes/Kwartz/RubyStyleParser.html +85 -85
  53. data/doc-api/classes/Kwartz/RubyTranslator.html +218 -0
  54. data/doc-api/classes/Kwartz/StatementHelper.html +479 -0
  55. data/doc-api/classes/Kwartz/StrutsTranslator.html +12 -12
  56. data/doc-api/classes/Kwartz/TagInfo.html +28 -28
  57. data/doc-api/classes/Kwartz/TextConverter.html +28 -28
  58. data/doc-api/classes/Kwartz/Translator.html +42 -42
  59. data/doc-api/classes/Kwartz/Util.html +284 -0
  60. data/doc-api/created.rid +1 -1
  61. data/doc-api/files/__/README_txt.html +30 -3
  62. data/doc-api/files/kwartz/assert_rb.html +1 -1
  63. data/doc-api/files/kwartz/binding/eperl_rb.html +2 -2
  64. data/doc-api/files/kwartz/binding/erubis_rb.html +3 -3
  65. data/doc-api/files/kwartz/binding/eruby_rb.html +3 -2
  66. data/doc-api/files/kwartz/binding/jstl_rb.html +2 -2
  67. data/doc-api/files/kwartz/binding/php_rb.html +2 -2
  68. data/doc-api/files/kwartz/binding/pierubis_rb.html +116 -0
  69. data/doc-api/files/kwartz/binding/rails_rb.html +2 -2
  70. data/doc-api/files/kwartz/binding/ruby_rb.html +115 -0
  71. data/doc-api/files/kwartz/binding/struts_rb.html +1 -1
  72. data/doc-api/files/kwartz/config_rb.html +2 -2
  73. data/doc-api/files/kwartz/converter_rb.html +3 -2
  74. data/doc-api/files/kwartz/defun_rb.html +116 -0
  75. data/doc-api/files/kwartz/error_rb.html +1 -1
  76. data/doc-api/files/kwartz/helper/rails_rb.html +123 -0
  77. data/doc-api/files/kwartz/main_rb.html +5 -2
  78. data/doc-api/files/kwartz/node_rb.html +2 -2
  79. data/doc-api/files/kwartz/parser_rb.html +2 -2
  80. data/doc-api/files/kwartz/translator_rb.html +2 -2
  81. data/doc-api/files/kwartz/util/assert-text-equal_rb.html +1 -1
  82. data/doc-api/files/kwartz/util/testcase-helper_rb.html +2 -2
  83. data/doc-api/files/kwartz/util_rb.html +107 -0
  84. data/doc-api/files/kwartz_rb.html +3 -2
  85. data/doc-api/fr_class_index.html +11 -0
  86. data/doc-api/fr_file_index.html +5 -0
  87. data/doc-api/fr_method_index.html +242 -190
  88. data/doc/p-pattern.html +94 -94
  89. data/doc/reference.html +847 -612
  90. data/doc/users-guide.html +744 -241
  91. data/examples/rails1/README +2 -2
  92. data/examples/rails1/application_helper.rb +2 -27
  93. data/examples/rails1/link_to.plogic +5 -5
  94. data/examples/rails1/list.plogic +2 -2
  95. data/examples/rails2/app/controllers/application.rb +14 -0
  96. data/examples/rails2/app/controllers/groups_controller.rb +47 -0
  97. data/examples/rails2/app/controllers/members_controller.rb +56 -0
  98. data/examples/rails2/app/helpers/application_helper.rb +6 -0
  99. data/examples/rails2/app/helpers/groups_helper.rb +2 -0
  100. data/examples/rails2/app/helpers/members_helper.rb +2 -0
  101. data/examples/rails2/app/models/group.rb +2 -0
  102. data/examples/rails2/app/models/member.rb +3 -0
  103. data/examples/rails2/app/views/groups/_form.html +30 -0
  104. data/examples/rails2/app/views/groups/_form.plogic +11 -0
  105. data/examples/rails2/app/views/groups/_link.plogic +19 -0
  106. data/examples/rails2/app/views/groups/_read.plogic +7 -0
  107. data/examples/rails2/app/views/groups/edit.cfg.yaml +2 -0
  108. data/examples/rails2/app/views/groups/edit.html +26 -0
  109. data/examples/rails2/app/views/groups/edit.plogic +9 -0
  110. data/examples/rails2/app/views/groups/list.html +48 -0
  111. data/examples/rails2/app/views/groups/list.plogic +32 -0
  112. data/examples/rails2/app/views/groups/new.cfg.yaml +2 -0
  113. data/examples/rails2/app/views/groups/new.html +27 -0
  114. data/examples/rails2/app/views/groups/new.plogic +9 -0
  115. data/examples/rails2/app/views/groups/show.html +27 -0
  116. data/examples/rails2/app/views/groups/show.plogic +2 -0
  117. data/examples/rails2/app/views/layouts/groups.html +23 -0
  118. data/examples/rails2/app/views/layouts/groups.plogic +11 -0
  119. data/examples/rails2/app/views/layouts/members.html +23 -0
  120. data/examples/rails2/app/views/layouts/members.plogic +11 -0
  121. data/examples/rails2/app/views/layouts/members2.html +24 -0
  122. data/examples/rails2/app/views/layouts/members2.plogic +11 -0
  123. data/examples/rails2/app/views/members/_form.plogic +27 -0
  124. data/examples/rails2/app/views/members/_link.plogic +19 -0
  125. data/examples/rails2/app/views/members/_read.plogic +29 -0
  126. data/examples/rails2/app/views/members/edit.cfg.yaml +6 -0
  127. data/examples/rails2/app/views/members/edit.html +27 -0
  128. data/examples/rails2/app/views/members/edit.plogic +10 -0
  129. data/examples/rails2/app/views/members/list.html +53 -0
  130. data/examples/rails2/app/views/members/list.plogic +32 -0
  131. data/examples/rails2/app/views/members/new.html +61 -0
  132. data/examples/rails2/app/views/members/new.plogic +17 -0
  133. data/examples/rails2/app/views/members/show.html +41 -0
  134. data/examples/rails2/app/views/members/show.plogic +3 -0
  135. data/examples/rails2/db/create-tables.mysql.sql +27 -0
  136. data/examples/rails2/db/create-tables.pgsql.sql +27 -0
  137. data/examples/rails2/db/insert-data.sql +21 -0
  138. data/examples/rails2/db/tabledef.yaml +51 -0
  139. data/kwartz.gemspec +4 -4
  140. data/lib/kwartz.rb +10 -2
  141. data/lib/kwartz/assert.rb +1 -1
  142. data/lib/kwartz/binding/eperl.rb +85 -61
  143. data/lib/kwartz/binding/erubis.rb +6 -8
  144. data/lib/kwartz/binding/eruby.rb +5 -120
  145. data/lib/kwartz/binding/jstl.rb +116 -101
  146. data/lib/kwartz/binding/php.rb +79 -60
  147. data/lib/kwartz/binding/pierubis.rb +58 -0
  148. data/lib/kwartz/binding/rails.rb +45 -42
  149. data/lib/kwartz/binding/ruby.rb +193 -0
  150. data/lib/kwartz/binding/struts.rb +1 -1
  151. data/lib/kwartz/config.rb +4 -3
  152. data/lib/kwartz/converter.rb +231 -68
  153. data/lib/kwartz/defun.rb +126 -0
  154. data/lib/kwartz/error.rb +1 -1
  155. data/lib/kwartz/helper/rails.rb +437 -0
  156. data/lib/kwartz/main.rb +30 -38
  157. data/lib/kwartz/node.rb +46 -31
  158. data/lib/kwartz/parser.rb +43 -15
  159. data/lib/kwartz/translator.rb +104 -6
  160. data/lib/kwartz/util.rb +113 -0
  161. data/lib/kwartz/util/assert-text-equal.rb +1 -1
  162. data/lib/kwartz/util/testcase-helper.rb +26 -8
  163. data/test/test-compile.rb +3 -3
  164. data/test/test-compile.yaml +135 -5
  165. data/test/test-converter.rb +16 -8
  166. data/test/test-converter.yaml +307 -76
  167. data/test/test-directives.rb +1 -1
  168. data/test/test-directives.yaml +964 -979
  169. data/test/test-main.rb +61 -146
  170. data/test/test-main.yaml +235 -0
  171. data/test/test-parser.rb +10 -12
  172. data/test/test-parser.yaml +484 -326
  173. data/test/test-rails.rb +1 -1
  174. data/test/test-rails.yaml +37 -37
  175. data/test/test-ruleset.rb +1 -1
  176. data/test/test-ruleset.yaml +34 -40
  177. data/test/test.rb +1 -1
  178. metadata +82 -3
  179. data/COPYING +0 -340
@@ -9,8 +9,8 @@ Manifest:
9
9
  * reader.plogic - common presentation logic for show.rhtml and list.rhtml
10
10
  * writer.plogic - common presentation logic for new.rhtml and edit.rhtml
11
11
  * layout.plogic - presentation logic for layout.rhtml
12
- * link_to.plogic - presentation logic for 'start_link_to' helper
13
- * application_helper.rb - helper module in which 'start_link_to' is defined
12
+ * link_to.plogic - presentation logic for 'start_link_tag' helper
13
+ * application_helper.rb - helper module in which 'start_link_tag' is defined
14
14
 
15
15
  * edit.html, edit.plogic - presentation data/logic file for edit.rhtml
16
16
  * new.html, new.plogic - presentation data/logic file for new.rhtml
@@ -1,31 +1,6 @@
1
1
  # Methods added to this helper will be available to all templates in the application.
2
2
 
3
-
3
+ require 'kwartz/helper/rails'
4
4
  module ApplicationHelper
5
-
6
-
7
- ##
8
- ## print only start-tag
9
- ##
10
- ## ex.
11
- ## <%= start_link_to :action=>'new' %>Create new member</a>
12
- ## #=> <a href="/member/new">Create new member</a>
13
- ##
14
- def start_link_to(options = {}, html_options = nil, *parameters_for_method_reference)
15
- s = link_to('', options, html_options, *parameters_for_method_reference)
16
- s.sub!(/<\/a>\z/, '')
17
- end
18
- alias anchor start_link_to
19
-
20
-
21
- ##
22
- ## print only start tag
23
- ##
24
- def start_link_to_remote(options = {}, html_options = {})
25
- s = link_to_remote(options, html_options)
26
- s.sub!(/<\/a>\z/, '')
27
- end
28
- alias anchor_remote start_link_to_remote
29
-
30
-
5
+ include Kwartz::Helper::ActionViewHelper
31
6
  end
@@ -1,19 +1,19 @@
1
1
  #link_to_list {
2
- stag: start_link_to :action=>'list';
2
+ stag: start_link_tag :action=>'list';
3
3
  }
4
4
 
5
5
  #link_to_new {
6
- stag: start_link_to :action=>'new';
6
+ stag: start_link_tag :action=>'new';
7
7
  }
8
8
 
9
9
  #link_to_show {
10
- stag: start_link_to :action=>'show', :id=>@member.id;
10
+ stag: start_link_tag :action=>'show', :id=>@member.id;
11
11
  }
12
12
 
13
13
  #link_to_edit {
14
- stag: start_link_to :action=>'edit', :id=>@member.id;
14
+ stag: start_link_tag :action=>'edit', :id=>@member.id;
15
15
  }
16
16
 
17
17
  #link_to_destroy {
18
- stag: start_link_to({:action=>'destroy', :id=>@member.id}, :confirm=>'Are you sure?');
18
+ stag: start_link_tag({:action=>'destroy', :id=>@member.id}, :confirm=>'Are you sure?');
19
19
  }
@@ -10,7 +10,7 @@
10
10
  }
11
11
 
12
12
  #prev_page {
13
- elem: start_link_to({:page=>@member_pages.current.previous});
13
+ elem: start_link_tag({:page=>@member_pages.current.previous});
14
14
  logic: {
15
15
  if @member_pages.current.previous
16
16
  _elem
@@ -19,7 +19,7 @@
19
19
  }
20
20
 
21
21
  #next_page {
22
- elem: start_link_to({:page=>@member_pages.current.next});
22
+ elem: start_link_tag({:page=>@member_pages.current.next});
23
23
  logic: {
24
24
  if @member_pages.current.next
25
25
  _elem
@@ -0,0 +1,14 @@
1
+ # Filters added to this controller will be run for all controllers in the application.
2
+ # Likewise, all the methods added will be available for all controllers.
3
+ class ApplicationController < ActionController::Base
4
+ end
5
+
6
+ require 'kwartz/helper/rails'
7
+ ActionView::Base.register_template_handler('html', Kwartz::Helper::RailsTemplate)
8
+ #Kwartz::Helper::RailsTemplate.lang = 'rails' # or 'eruby', 'ruby', 'erubis', 'pierubis'
9
+ #Kwartz::Helper::RailsTemplate.pdata_suffix = '.html'
10
+ #Kwartz::Helper::RailsTemplate.plogic_suffix = '.plogic'
11
+ #Kwartz::Helper::RailsTemplate.default_properties = { :escape=>false }
12
+ #Kwartz::Helper::RailsTemplate.use_cache = true
13
+ #Kwartz::Helper::RailsTemplate.debug = true
14
+
@@ -0,0 +1,47 @@
1
+ class GroupsController < ApplicationController
2
+ def index
3
+ list
4
+ render :action => 'list'
5
+ end
6
+
7
+ def list
8
+ @group_pages, @groups = paginate :groups, :per_page => 10
9
+ end
10
+
11
+ def show
12
+ @group = Group.find(params[:id])
13
+ end
14
+
15
+ def new
16
+ @group = Group.new
17
+ end
18
+
19
+ def create
20
+ @group = Group.new(params[:group])
21
+ if @group.save
22
+ flash[:notice] = 'Group was successfully created.'
23
+ redirect_to :action => 'list'
24
+ else
25
+ render :action => 'new'
26
+ end
27
+ end
28
+
29
+ def edit
30
+ @group = Group.find(params[:id])
31
+ end
32
+
33
+ def update
34
+ @group = Group.find(params[:id])
35
+ if @group.update_attributes(params[:group])
36
+ flash[:notice] = 'Group was successfully updated.'
37
+ redirect_to :action => 'show', :id => @group
38
+ else
39
+ render :action => 'edit'
40
+ end
41
+ end
42
+
43
+ def destroy
44
+ Group.find(params[:id]).destroy
45
+ redirect_to :action => 'list'
46
+ end
47
+ end
@@ -0,0 +1,56 @@
1
+ class MembersController < ApplicationController
2
+ def index
3
+ list
4
+ render :action => 'list'
5
+ end
6
+
7
+ def list
8
+ @member_pages, @members = paginate :members, :per_page => 10
9
+ end
10
+
11
+ def show
12
+ @member = Member.find(params[:id])
13
+ end
14
+
15
+ def new
16
+ @member = Member.new
17
+ @group_select_options = group_select_options()
18
+ end
19
+
20
+ def create
21
+ @member = Member.new(params[:member])
22
+ if @member.save
23
+ flash[:notice] = 'Member was successfully created.'
24
+ redirect_to :action => 'list'
25
+ else
26
+ render :action => 'new'
27
+ end
28
+ end
29
+
30
+ def edit
31
+ @member = Member.find(params[:id])
32
+ @group_select_options = group_select_options()
33
+ end
34
+
35
+ def update
36
+ @member = Member.find(params[:id])
37
+ if @member.update_attributes(params[:member])
38
+ flash[:notice] = 'Member was successfully updated.'
39
+ redirect_to :action => 'show', :id => @member
40
+ else
41
+ render :action => 'edit'
42
+ end
43
+ end
44
+
45
+ def destroy
46
+ Member.find(params[:id]).destroy
47
+ redirect_to :action => 'list'
48
+ end
49
+
50
+ private
51
+
52
+ def group_select_options
53
+ Group.find_all().collect {|g| [g.name, g.id]}
54
+ end
55
+
56
+ end
@@ -0,0 +1,6 @@
1
+ # Methods added to this helper will be available to all templates in the application.
2
+
3
+ require 'kwartz/helper/rails'
4
+ module ApplicationHelper
5
+ include Kwartz::Helper::ActionViewHelper
6
+ end
@@ -0,0 +1,2 @@
1
+ module GroupsHelper
2
+ end
@@ -0,0 +1,2 @@
1
+ module MembersHelper
2
+ end
@@ -0,0 +1,2 @@
1
+ class Group < ActiveRecord::Base
2
+ end
@@ -0,0 +1,3 @@
1
+ class Member < ActiveRecord::Base
2
+ belongs_to :group
3
+ end
@@ -0,0 +1,30 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
+ <html>
3
+ <head>
4
+ <title>Enter group</title>
5
+ </head>
6
+ <body>
7
+
8
+ <form action="enter">
9
+ <div id="form_content">
10
+
11
+ <div id="mark:error_messages">
12
+ </div>
13
+
14
+ <!--[form:groups]-->
15
+ <p>
16
+ <label for="group_name">Name</label><br>
17
+ <input type="text" id="group_name">
18
+ </p>
19
+ <p>
20
+ <label for="group_desc">Desc</label><br>
21
+ <input type="text" id="group_desc">
22
+ </p>
23
+ <!--[eoform:groups]-->
24
+
25
+ </div>
26
+ <input type="submit">
27
+ </form>
28
+
29
+ </body>
30
+ </html>
@@ -0,0 +1,11 @@
1
+ #error_messages {
2
+ elem: error_messages_for 'group';
3
+ }
4
+
5
+ #group_name {
6
+ elem: text_field 'group', 'name';
7
+ }
8
+
9
+ #group_desc {
10
+ elem: text_field 'group', 'desc';
11
+ }
@@ -0,0 +1,19 @@
1
+ #link_to_list {
2
+ stag: start_link_tag :action=>'list';
3
+ }
4
+
5
+ #link_to_new {
6
+ stag: start_link_tag :action=>'new';
7
+ }
8
+
9
+ #link_to_show {
10
+ stag: start_link_tag :action=>'show', :id=>@group;
11
+ }
12
+
13
+ #link_to_edit {
14
+ stag: start_link_tag :action=>'edit', :id=>@group;
15
+ }
16
+
17
+ #link_to_destroy {
18
+ stag: start_link_tag({:action=>'destroy', :id=>@group}, :confirm=>'Are you sure?');
19
+ }
@@ -0,0 +1,7 @@
1
+ #group_name {
2
+ Value: @group.name;
3
+ }
4
+
5
+ #group_desc {
6
+ Value: @group.desc;
7
+ }
@@ -0,0 +1,2 @@
1
+ import_pdata: [ _form.html ]
2
+ import_plogic: [ _form.plogic ]
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
+ <html>
3
+ <head>
4
+ <title>Editing group</title>
5
+ </head>
6
+ <body>
7
+ <h1 id="page_title">Editing group</h1>
8
+
9
+ <div id="page_content">
10
+
11
+ <form action="update" id="start_form">
12
+
13
+ <div id="replace_element_with_content:form_content">
14
+ .... replaced with content of 'id="form_content"' ....
15
+ </div>
16
+
17
+ <input type="submit" value="Edit" id="submit">
18
+ </form>
19
+
20
+ <a href="#" id="link_to_show">Show</a> |
21
+ <a href="#" id="link_to_list">Back</a>
22
+
23
+ </div>
24
+
25
+ </body>
26
+ </html>
@@ -0,0 +1,9 @@
1
+ @import '_link.plogic';
2
+
3
+ #start_form {
4
+ stag: start_form_tag :action=>'update', :id=>@group;
5
+ }
6
+
7
+ #submit {
8
+ elem: submit_tag 'Edit';
9
+ }
@@ -0,0 +1,48 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
+ <html>
3
+ <head>
4
+ <title>Listing group</title>
5
+ </head>
6
+ <body>
7
+
8
+ <h1 id="page_title">Listing groups</h1>
9
+
10
+ <div id="page_content">
11
+
12
+ <table summary="group list">
13
+ <thead>
14
+ <tr>
15
+ <th>Name</th>
16
+ <th>Desc</th>
17
+ </tr>
18
+ </thead>
19
+ <tbody>
20
+ <tr id="mark:groups">
21
+ <td id="mark:group_name">group name</td>
22
+ <td id="mark:group_desc">group description</td>
23
+ <td>
24
+ <a href="#" id="mark:link_to_show">Show</a>
25
+ <a href="#" id="mark:link_to_edit">Edit</a>
26
+ <a href="#" id="mark:link_to_destroy">Destroy</a>
27
+ </td>
28
+ </tr>
29
+ </tbody>
30
+ </table>
31
+
32
+ <p>
33
+ <a href="#" id="link_to_prev_page">Previous page</a>
34
+ <a href="#" id="link_to_next_page">Next page</a>
35
+ </p>
36
+
37
+ <p>
38
+ <a href="#" id="link_to_new">New group</a>
39
+ </p>
40
+
41
+ <p>
42
+ <a href="#" id="link_to_members">Go to members</a>
43
+ </p>
44
+
45
+ </div>
46
+
47
+ </body>
48
+ </html>
@@ -0,0 +1,32 @@
1
+ @import '_link.plogic';
2
+ @import '_read.plogic';
3
+
4
+ #groups {
5
+ logic: {
6
+ for @group in @groups
7
+ _elem
8
+ end
9
+ }
10
+ }
11
+
12
+ #link_to_prev_page {
13
+ stag: start_link_tag :page=>@group_pages.current.previous;
14
+ logic: {
15
+ if @group_pages.current.previous
16
+ _elem
17
+ end
18
+ }
19
+ }
20
+
21
+ #link_to_next_page {
22
+ stag: start_link_tag :page=>@group_pages.current.next;
23
+ logic: {
24
+ if @group_pages.current.next
25
+ _elem
26
+ end
27
+ }
28
+ }
29
+
30
+ #link_to_members {
31
+ stag: start_link_tag :action=>'list', :controller=>'members';
32
+ }
@@ -0,0 +1,2 @@
1
+ import_pdata: [ _form.html ]
2
+ import_plogic: [ _form.plogic ]
@@ -0,0 +1,27 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
+ <html>
3
+ <head>
4
+ <title>New group</title>
5
+ </head>
6
+ <body>
7
+
8
+ <h1 id="page_title">New group</h1>
9
+
10
+ <div id="page_content">
11
+
12
+ <form action="create" id="mark:start_form">
13
+
14
+ <div id="replace_element_with_content:form_content">
15
+ .... replaced with content of 'id="form_content"' ....
16
+ </div>
17
+
18
+ <input type="submit" value="Create" id="mark:submit">
19
+
20
+ </form>
21
+
22
+ <a href="#" id="mark:link_to_list">Back</a>
23
+
24
+ </div>
25
+
26
+ </body>
27
+ </html>