kwartz 3.0.0 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +36 -1
- data/LGPL +504 -0
- data/README.txt +16 -2
- data/bin/kwartz +1 -1
- data/doc-api/classes/Kwartz.html +47 -1
- data/doc-api/classes/Kwartz/Assertion.html +6 -6
- data/doc-api/classes/Kwartz/AssertionError.html +6 -6
- data/doc-api/classes/Kwartz/AttrInfo.html +42 -42
- data/doc-api/classes/Kwartz/BaseError.html +12 -12
- data/doc-api/classes/Kwartz/BaseTranslator.html +210 -43
- data/doc-api/classes/Kwartz/CharacterType.html +24 -24
- data/doc-api/classes/Kwartz/CommandOptionError.html +7 -7
- data/doc-api/classes/Kwartz/CommandOptions.html +49 -49
- data/doc-api/classes/Kwartz/Config.html +6 -1
- data/doc-api/classes/Kwartz/ConvertError.html +14 -14
- data/doc-api/classes/Kwartz/Converter.html +31 -30
- data/doc-api/classes/Kwartz/CssStyleParser.html +79 -57
- data/doc-api/classes/Kwartz/Defun.html +313 -0
- data/doc-api/classes/Kwartz/DocumentRuleset.html +58 -58
- data/doc-api/classes/Kwartz/ElementExpander.html +32 -32
- data/doc-api/classes/Kwartz/ElementInfo.html +29 -29
- data/doc-api/classes/Kwartz/ElementRuleset.html +126 -96
- data/doc-api/classes/Kwartz/EperlHandler.html +108 -84
- data/doc-api/classes/Kwartz/EperlTranslator.html +7 -7
- data/doc-api/classes/Kwartz/ErubisHandler.html +2 -2
- data/doc-api/classes/Kwartz/ErubisTranslator.html +8 -8
- data/doc-api/classes/Kwartz/ErubyHandler.html +2 -220
- data/doc-api/classes/Kwartz/ErubyTranslator.html +7 -7
- data/doc-api/classes/Kwartz/ExpandStatement.html +20 -20
- data/doc-api/classes/Kwartz/Handler.html +122 -117
- data/doc-api/classes/Kwartz/HandlerArgument.html +215 -0
- data/doc-api/classes/Kwartz/Helper.html +112 -0
- data/doc-api/classes/Kwartz/Helper/ActionViewHelper.html +221 -0
- data/doc-api/classes/Kwartz/Helper/RailsTemplate.html +630 -0
- data/doc-api/classes/Kwartz/JstlHandler.html +208 -193
- data/doc-api/classes/Kwartz/JstlTranslator.html +15 -15
- data/doc-api/classes/Kwartz/KwartzError.html +6 -6
- data/doc-api/classes/Kwartz/Main.html +39 -23
- data/doc-api/classes/Kwartz/NativeExpression.html +18 -18
- data/doc-api/classes/Kwartz/NativeStatement.html +25 -25
- data/doc-api/classes/Kwartz/Node.html +6 -6
- data/doc-api/classes/Kwartz/PIErubisHandler.html +113 -0
- data/doc-api/classes/Kwartz/PIErubisTranslator.html +200 -0
- data/doc-api/classes/Kwartz/ParseError.html +6 -6
- data/doc-api/classes/Kwartz/PhpHandler.html +102 -83
- data/doc-api/classes/Kwartz/PhpTranslator.html +14 -14
- data/doc-api/classes/Kwartz/PresentationLogicParser.html +136 -128
- data/doc-api/classes/Kwartz/PrintStatement.html +19 -19
- data/doc-api/classes/Kwartz/RailsHandler.html +121 -118
- data/doc-api/classes/Kwartz/RailsTranslator.html +7 -7
- data/doc-api/classes/Kwartz/RubyHandler.html +349 -0
- data/doc-api/classes/Kwartz/RubyStyleParser.html +85 -85
- data/doc-api/classes/Kwartz/RubyTranslator.html +218 -0
- data/doc-api/classes/Kwartz/StatementHelper.html +479 -0
- data/doc-api/classes/Kwartz/StrutsTranslator.html +12 -12
- data/doc-api/classes/Kwartz/TagInfo.html +28 -28
- data/doc-api/classes/Kwartz/TextConverter.html +28 -28
- data/doc-api/classes/Kwartz/Translator.html +42 -42
- data/doc-api/classes/Kwartz/Util.html +284 -0
- data/doc-api/created.rid +1 -1
- data/doc-api/files/__/README_txt.html +30 -3
- data/doc-api/files/kwartz/assert_rb.html +1 -1
- data/doc-api/files/kwartz/binding/eperl_rb.html +2 -2
- data/doc-api/files/kwartz/binding/erubis_rb.html +3 -3
- data/doc-api/files/kwartz/binding/eruby_rb.html +3 -2
- data/doc-api/files/kwartz/binding/jstl_rb.html +2 -2
- data/doc-api/files/kwartz/binding/php_rb.html +2 -2
- data/doc-api/files/kwartz/binding/pierubis_rb.html +116 -0
- data/doc-api/files/kwartz/binding/rails_rb.html +2 -2
- data/doc-api/files/kwartz/binding/ruby_rb.html +115 -0
- data/doc-api/files/kwartz/binding/struts_rb.html +1 -1
- data/doc-api/files/kwartz/config_rb.html +2 -2
- data/doc-api/files/kwartz/converter_rb.html +3 -2
- data/doc-api/files/kwartz/defun_rb.html +116 -0
- data/doc-api/files/kwartz/error_rb.html +1 -1
- data/doc-api/files/kwartz/helper/rails_rb.html +123 -0
- data/doc-api/files/kwartz/main_rb.html +5 -2
- data/doc-api/files/kwartz/node_rb.html +2 -2
- data/doc-api/files/kwartz/parser_rb.html +2 -2
- data/doc-api/files/kwartz/translator_rb.html +2 -2
- data/doc-api/files/kwartz/util/assert-text-equal_rb.html +1 -1
- data/doc-api/files/kwartz/util/testcase-helper_rb.html +2 -2
- data/doc-api/files/kwartz/util_rb.html +107 -0
- data/doc-api/files/kwartz_rb.html +3 -2
- data/doc-api/fr_class_index.html +11 -0
- data/doc-api/fr_file_index.html +5 -0
- data/doc-api/fr_method_index.html +242 -190
- data/doc/p-pattern.html +94 -94
- data/doc/reference.html +847 -612
- data/doc/users-guide.html +744 -241
- data/examples/rails1/README +2 -2
- data/examples/rails1/application_helper.rb +2 -27
- data/examples/rails1/link_to.plogic +5 -5
- data/examples/rails1/list.plogic +2 -2
- data/examples/rails2/app/controllers/application.rb +14 -0
- data/examples/rails2/app/controllers/groups_controller.rb +47 -0
- data/examples/rails2/app/controllers/members_controller.rb +56 -0
- data/examples/rails2/app/helpers/application_helper.rb +6 -0
- data/examples/rails2/app/helpers/groups_helper.rb +2 -0
- data/examples/rails2/app/helpers/members_helper.rb +2 -0
- data/examples/rails2/app/models/group.rb +2 -0
- data/examples/rails2/app/models/member.rb +3 -0
- data/examples/rails2/app/views/groups/_form.html +30 -0
- data/examples/rails2/app/views/groups/_form.plogic +11 -0
- data/examples/rails2/app/views/groups/_link.plogic +19 -0
- data/examples/rails2/app/views/groups/_read.plogic +7 -0
- data/examples/rails2/app/views/groups/edit.cfg.yaml +2 -0
- data/examples/rails2/app/views/groups/edit.html +26 -0
- data/examples/rails2/app/views/groups/edit.plogic +9 -0
- data/examples/rails2/app/views/groups/list.html +48 -0
- data/examples/rails2/app/views/groups/list.plogic +32 -0
- data/examples/rails2/app/views/groups/new.cfg.yaml +2 -0
- data/examples/rails2/app/views/groups/new.html +27 -0
- data/examples/rails2/app/views/groups/new.plogic +9 -0
- data/examples/rails2/app/views/groups/show.html +27 -0
- data/examples/rails2/app/views/groups/show.plogic +2 -0
- data/examples/rails2/app/views/layouts/groups.html +23 -0
- data/examples/rails2/app/views/layouts/groups.plogic +11 -0
- data/examples/rails2/app/views/layouts/members.html +23 -0
- data/examples/rails2/app/views/layouts/members.plogic +11 -0
- data/examples/rails2/app/views/layouts/members2.html +24 -0
- data/examples/rails2/app/views/layouts/members2.plogic +11 -0
- data/examples/rails2/app/views/members/_form.plogic +27 -0
- data/examples/rails2/app/views/members/_link.plogic +19 -0
- data/examples/rails2/app/views/members/_read.plogic +29 -0
- data/examples/rails2/app/views/members/edit.cfg.yaml +6 -0
- data/examples/rails2/app/views/members/edit.html +27 -0
- data/examples/rails2/app/views/members/edit.plogic +10 -0
- data/examples/rails2/app/views/members/list.html +53 -0
- data/examples/rails2/app/views/members/list.plogic +32 -0
- data/examples/rails2/app/views/members/new.html +61 -0
- data/examples/rails2/app/views/members/new.plogic +17 -0
- data/examples/rails2/app/views/members/show.html +41 -0
- data/examples/rails2/app/views/members/show.plogic +3 -0
- data/examples/rails2/db/create-tables.mysql.sql +27 -0
- data/examples/rails2/db/create-tables.pgsql.sql +27 -0
- data/examples/rails2/db/insert-data.sql +21 -0
- data/examples/rails2/db/tabledef.yaml +51 -0
- data/kwartz.gemspec +4 -4
- data/lib/kwartz.rb +10 -2
- data/lib/kwartz/assert.rb +1 -1
- data/lib/kwartz/binding/eperl.rb +85 -61
- data/lib/kwartz/binding/erubis.rb +6 -8
- data/lib/kwartz/binding/eruby.rb +5 -120
- data/lib/kwartz/binding/jstl.rb +116 -101
- data/lib/kwartz/binding/php.rb +79 -60
- data/lib/kwartz/binding/pierubis.rb +58 -0
- data/lib/kwartz/binding/rails.rb +45 -42
- data/lib/kwartz/binding/ruby.rb +193 -0
- data/lib/kwartz/binding/struts.rb +1 -1
- data/lib/kwartz/config.rb +4 -3
- data/lib/kwartz/converter.rb +231 -68
- data/lib/kwartz/defun.rb +126 -0
- data/lib/kwartz/error.rb +1 -1
- data/lib/kwartz/helper/rails.rb +437 -0
- data/lib/kwartz/main.rb +30 -38
- data/lib/kwartz/node.rb +46 -31
- data/lib/kwartz/parser.rb +43 -15
- data/lib/kwartz/translator.rb +104 -6
- data/lib/kwartz/util.rb +113 -0
- data/lib/kwartz/util/assert-text-equal.rb +1 -1
- data/lib/kwartz/util/testcase-helper.rb +26 -8
- data/test/test-compile.rb +3 -3
- data/test/test-compile.yaml +135 -5
- data/test/test-converter.rb +16 -8
- data/test/test-converter.yaml +307 -76
- data/test/test-directives.rb +1 -1
- data/test/test-directives.yaml +964 -979
- data/test/test-main.rb +61 -146
- data/test/test-main.yaml +235 -0
- data/test/test-parser.rb +10 -12
- data/test/test-parser.yaml +484 -326
- data/test/test-rails.rb +1 -1
- data/test/test-rails.yaml +37 -37
- data/test/test-ruleset.rb +1 -1
- data/test/test-ruleset.yaml +34 -40
- data/test/test.rb +1 -1
- metadata +82 -3
- data/COPYING +0 -340
data/examples/rails1/README
CHANGED
@@ -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 '
|
13
|
-
* application_helper.rb - helper module in which '
|
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:
|
2
|
+
stag: start_link_tag :action=>'list';
|
3
3
|
}
|
4
4
|
|
5
5
|
#link_to_new {
|
6
|
-
stag:
|
6
|
+
stag: start_link_tag :action=>'new';
|
7
7
|
}
|
8
8
|
|
9
9
|
#link_to_show {
|
10
|
-
stag:
|
10
|
+
stag: start_link_tag :action=>'show', :id=>@member.id;
|
11
11
|
}
|
12
12
|
|
13
13
|
#link_to_edit {
|
14
|
-
stag:
|
14
|
+
stag: start_link_tag :action=>'edit', :id=>@member.id;
|
15
15
|
}
|
16
16
|
|
17
17
|
#link_to_destroy {
|
18
|
-
stag:
|
18
|
+
stag: start_link_tag({:action=>'destroy', :id=>@member.id}, :confirm=>'Are you sure?');
|
19
19
|
}
|
data/examples/rails1/list.plogic
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
}
|
11
11
|
|
12
12
|
#prev_page {
|
13
|
-
elem:
|
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:
|
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,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,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,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,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,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>
|