hobo 0.5.3 → 0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/hobo +18 -4
- data/hobo_files/plugin/CHANGES.txt +511 -0
- data/hobo_files/plugin/README +8 -3
- data/hobo_files/plugin/Rakefile +81 -0
- data/hobo_files/plugin/generators/hobo/hobo_generator.rb +4 -4
- data/hobo_files/plugin/generators/hobo/templates/guest.rb +1 -1
- data/hobo_files/plugin/generators/hobo_front_controller/hobo_front_controller_generator.rb +1 -1
- data/hobo_files/plugin/generators/hobo_front_controller/templates/index.dryml +16 -22
- data/hobo_files/plugin/generators/hobo_front_controller/templates/login.dryml +4 -6
- data/hobo_files/plugin/generators/hobo_front_controller/templates/search.dryml +6 -5
- data/hobo_files/plugin/generators/hobo_front_controller/templates/signup.dryml +4 -6
- data/hobo_files/plugin/generators/hobo_migration/hobo_migration_generator.rb +237 -0
- data/hobo_files/plugin/generators/hobo_migration/templates/migration.rb +9 -0
- data/hobo_files/plugin/generators/hobo_model/USAGE +2 -3
- data/hobo_files/plugin/generators/hobo_model/hobo_model_generator.rb +1 -14
- data/hobo_files/plugin/generators/hobo_model/templates/fixtures.yml +1 -6
- data/hobo_files/plugin/generators/hobo_model/templates/model.rb +10 -4
- data/hobo_files/plugin/generators/hobo_rapid/hobo_rapid_generator.rb +7 -6
- data/hobo_files/plugin/generators/hobo_rapid/templates/hobo_base.css +68 -0
- data/hobo_files/plugin/generators/hobo_rapid/templates/hobo_rapid.css +93 -0
- data/hobo_files/plugin/generators/hobo_rapid/templates/hobo_rapid.js +11 -6
- data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/public/images/plus.png +0 -0
- data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/public/stylesheets/application.css +24 -14
- data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/views/application.dryml +28 -44
- data/hobo_files/plugin/generators/hobo_user_model/USAGE +2 -12
- data/hobo_files/plugin/generators/hobo_user_model/hobo_user_model_generator.rb +1 -14
- data/hobo_files/plugin/generators/hobo_user_model/templates/fixtures.yml +0 -6
- data/hobo_files/plugin/generators/hobo_user_model/templates/model.rb +8 -1
- data/hobo_files/plugin/init.rb +6 -2
- data/hobo_files/plugin/lib/active_record/has_many_association.rb +23 -12
- data/hobo_files/plugin/lib/extensions.rb +134 -40
- data/hobo_files/plugin/lib/extensions/test_case.rb +0 -1
- data/hobo_files/plugin/lib/hobo.rb +77 -46
- data/hobo_files/plugin/lib/hobo/authenticated_user.rb +24 -2
- data/hobo_files/plugin/lib/hobo/authentication_support.rb +2 -1
- data/hobo_files/plugin/lib/hobo/controller.rb +35 -12
- data/hobo_files/plugin/lib/hobo/define_tags.rb +4 -4
- data/hobo_files/plugin/lib/hobo/dryml.rb +33 -51
- data/hobo_files/plugin/lib/hobo/dryml/dryml_builder.rb +47 -34
- data/hobo_files/plugin/lib/hobo/dryml/scoped_variables.rb +37 -0
- data/hobo_files/plugin/lib/hobo/dryml/taglib.rb +27 -5
- data/hobo_files/plugin/lib/hobo/dryml/template.rb +545 -302
- data/hobo_files/plugin/lib/hobo/dryml/template_environment.rb +305 -135
- data/hobo_files/plugin/lib/hobo/email_address.rb +5 -0
- data/hobo_files/plugin/lib/hobo/field_spec.rb +66 -0
- data/hobo_files/plugin/lib/hobo/hobo_helper.rb +325 -0
- data/hobo_files/plugin/lib/hobo/html_string.rb +2 -0
- data/hobo_files/plugin/lib/hobo/lazy_hash.rb +13 -1
- data/hobo_files/plugin/lib/hobo/markdown_string.rb +3 -1
- data/hobo_files/plugin/lib/hobo/model.rb +185 -66
- data/hobo_files/plugin/lib/hobo/model_controller.rb +56 -49
- data/hobo_files/plugin/lib/hobo/password_string.rb +2 -0
- data/hobo_files/plugin/lib/hobo/plugins.rb +75 -0
- data/hobo_files/plugin/lib/hobo/rapid_helper.rb +98 -0
- data/hobo_files/plugin/lib/hobo/static_tags +0 -3
- data/hobo_files/plugin/lib/hobo/textile_string.rb +11 -1
- data/hobo_files/plugin/lib/hobo/undefined.rb +1 -1
- data/hobo_files/plugin/lib/rexml.rb +166 -75
- data/hobo_files/plugin/spec/fixtures/users.yml +9 -0
- data/hobo_files/plugin/spec/spec.opts +6 -0
- data/hobo_files/plugin/spec/spec_helper.rb +28 -0
- data/hobo_files/plugin/spec/unit/hobo/dryml/template_spec.rb +650 -0
- data/hobo_files/plugin/tags/core.dryml +58 -4
- data/hobo_files/plugin/tags/rapid.dryml +289 -135
- data/hobo_files/plugin/tags/rapid_document_tags.dryml +49 -0
- data/hobo_files/plugin/tags/rapid_editing.dryml +92 -69
- data/hobo_files/plugin/tags/rapid_forms.dryml +242 -0
- data/hobo_files/plugin/tags/rapid_navigation.dryml +65 -65
- data/hobo_files/plugin/tags/rapid_pages.dryml +197 -124
- data/hobo_files/plugin/tags/rapid_support.dryml +23 -0
- metadata +29 -22
- data/hobo_files/plugin/generators/hobo_model/templates/migration.rb +0 -13
- data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/default_mapping.rb +0 -11
- data/hobo_files/plugin/generators/hobo_user_model/templates/migration.rb +0 -15
- data/hobo_files/plugin/lib/hobo/HtmlString +0 -3
- data/hobo_files/plugin/lib/hobo/controller_helpers.rb +0 -135
- data/hobo_files/plugin/lib/hobo/core.rb +0 -475
- data/hobo_files/plugin/lib/hobo/rapid.rb +0 -447
- data/hobo_files/plugin/test/hobo_dryml_template_test.rb +0 -7
- data/hobo_files/plugin/test/hobo_test.rb +0 -7
@@ -2,94 +2,94 @@
|
|
2
2
|
Main nav bar, account nav bar (login, signup...), page nav
|
3
3
|
-->
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
<
|
11
|
-
|
12
|
-
|
13
|
-
<else>
|
14
|
-
<nav_item content_option="item_el" class="#klass">
|
15
|
-
<a href="#this[:href]" content_option="link"><%= c %></a>
|
16
|
-
</nav_item>
|
17
|
-
</else>
|
18
|
-
</repeat>
|
19
|
-
<tagbody/>
|
20
|
-
</nav_container>
|
5
|
+
<!--- General Navigation -->
|
6
|
+
|
7
|
+
<def tag="navigation" attrs="current">
|
8
|
+
<ul merge_attrs>
|
9
|
+
<set_scoped current_navigation="¤t">
|
10
|
+
<tagbody/>
|
11
|
+
</set_scoped>
|
12
|
+
</ul>
|
21
13
|
</def>
|
22
14
|
|
15
|
+
<def tag="nav_item">
|
16
|
+
<set body="&tagbody.call"/>
|
17
|
+
<li class="#{'current' if (c = scope.current_navigation) && c.downcase == body.downcase.strip}"
|
18
|
+
merge_attrs="&attributes - attrs_for(:a)">
|
19
|
+
<a merge_attrs="&attributes & attrs_for(:a)"><%= body %></a>
|
20
|
+
</li>
|
21
|
+
</def>
|
23
22
|
|
24
|
-
<def tag="nav_container"><ul xattrs=""><tagbody/></ul></def>
|
25
|
-
|
26
|
-
|
27
|
-
<def tag="nav_item"><li xattrs=""><tagbody/></li></def>
|
28
23
|
|
24
|
+
<!--- Account Navigation (log in / out / signup) -->
|
29
25
|
|
30
|
-
<def tag="
|
31
|
-
<
|
32
|
-
<
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
<
|
37
|
-
|
38
|
-
|
26
|
+
<def tag="account_nav">
|
27
|
+
<ul class="account_nav">
|
28
|
+
<if test="&logged_in?">
|
29
|
+
<li class='nav_item'>Logged in as <view:login with="¤t_user"/></li>
|
30
|
+
<li class='nav_item'><a href="&logout_url">Log out</a></li>
|
31
|
+
</if>
|
32
|
+
<else>
|
33
|
+
<li class='nav_item'><a href="&login_url">Log in</a></li>
|
34
|
+
<li if="&defined_route? :signup" class='nav_item'><a href="&signup_url">Sign up</a></li>
|
35
|
+
</else>
|
36
|
+
</ul>
|
39
37
|
</def>
|
40
38
|
|
41
39
|
|
42
|
-
|
43
|
-
<% opts = { :page => @pages.current.previous }.merge(query_params || {}) %>
|
44
|
-
<%= link_to(tagbody ? tagbody.call : '« Previous page', opts) if @pages and @pages.current.previous %>
|
45
|
-
</def>
|
46
|
-
|
40
|
+
<!--- Pagination Navigation -->
|
47
41
|
|
48
|
-
<def tag="
|
49
|
-
|
50
|
-
|
42
|
+
<def tag="page_nav" attrs="params">
|
43
|
+
<page_n_of_count/> -
|
44
|
+
<first_page_link params="¶ms">|<</first_page_link>
|
45
|
+
<previous_page_link params="¶ms">Previous</previous_page_link>
|
46
|
+
<next_page_link params="¶ms">Next</next_page_link>
|
47
|
+
<last_page_link params="¶ms">>|</last_page_link>
|
51
48
|
</def>
|
52
49
|
|
53
50
|
|
54
|
-
<def tag="
|
55
|
-
|
56
|
-
<%= link_to(tagbody ? tagbody.call : '« First page', opts) if @pages and @pages.current != @pages.first %>
|
51
|
+
<def tag="page_n_of_count">
|
52
|
+
Page <%= @pages.current_page.number %> of <%= @pages.length %>
|
57
53
|
</def>
|
58
54
|
|
59
55
|
|
60
|
-
<def tag="
|
61
|
-
|
62
|
-
|
56
|
+
<def tag="previous_page_link" attrs="params">
|
57
|
+
<a if="&@pages && @pages.current.previous"
|
58
|
+
href="&url_for({ :page => @pages.current.previous }.merge(params || {}))">
|
59
|
+
<tagbody>« Previous page</tagbody>
|
60
|
+
</a>
|
63
61
|
</def>
|
64
62
|
|
65
63
|
|
66
|
-
<def tag="
|
67
|
-
|
64
|
+
<def tag="next_page_link" attrs="params">
|
65
|
+
<a if="&@pages && @pages.current.next"
|
66
|
+
href="&url_for({ :page => @pages.current.previous }.merge(params || {}))">
|
67
|
+
<tagbody>Next page &raqou;</tagbody>
|
68
|
+
</a>
|
68
69
|
</def>
|
69
70
|
|
70
71
|
|
71
|
-
<def tag="
|
72
|
-
<if
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
<previous_page_link query_params="#query_params">Previous</previous_page_link>
|
77
|
-
<next_page_link query_params="#query_params">Next</next_page_link>
|
78
|
-
<last_page_link query_params="#query_params">>|</last_page_link>
|
79
|
-
</p>
|
80
|
-
</if>
|
72
|
+
<def tag="first_page_link" attrs="params">
|
73
|
+
<a if="&@pages && @pages.first_page"
|
74
|
+
href="&url_for({ :page => @pages.current.previous }.merge(params || {}))">
|
75
|
+
<tagbody>« First page</tagbody>
|
76
|
+
</a>
|
81
77
|
</def>
|
82
78
|
|
83
|
-
|
84
|
-
|
79
|
+
|
80
|
+
<def tag="last_page_link" attrs="params">
|
81
|
+
<a if="&@pages && @pages.last_page"
|
82
|
+
href="&url_for({ :page => @pages.current.previous }.merge(params || {}))">
|
83
|
+
<tagbody>Last page »</tagbody>
|
84
|
+
</a>
|
85
85
|
</def>
|
86
86
|
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
</
|
87
|
+
<!-- magic nav, just to get you started -->
|
88
|
+
<!-- write your own navigation using the <navigation> tag -->
|
89
|
+
<def tag="magic_nav">
|
90
|
+
<navigation merge_attrs>
|
91
|
+
<nav_item href="#{base_url}/">Home</nav_item>
|
92
|
+
<nav_item repeat="&Hobo.models[0..2]"><name/></nav_item>
|
93
|
+
<nav_item href="&search_url" if="&defined_route? :search">Search</nav_item>
|
94
|
+
</navigation>
|
95
95
|
</def>
|
@@ -1,175 +1,248 @@
|
|
1
|
-
<def tag="
|
2
|
-
|
1
|
+
<def tag="BasePage" attrs="title, doctype">
|
2
|
+
<doctype version="&doctype || 'HTML 4.01 STRICT'"/>
|
3
3
|
<html>
|
4
|
-
<head>
|
5
|
-
<title><%=
|
6
|
-
|
7
|
-
|
8
|
-
|
4
|
+
<head param>
|
5
|
+
<title param><%= title %></title>
|
6
|
+
<do param="stylesheets">
|
7
|
+
<stylesheet name="hobo_base"/>
|
8
|
+
<stylesheet name="application"/>
|
9
|
+
</do>
|
10
|
+
<do param="scripts">
|
11
|
+
<%= javascript_include_tag :defaults %>
|
12
|
+
</do>
|
9
13
|
</head>
|
10
|
-
<body onload="Hobo.applyEvents();"
|
11
|
-
<div content_option="header"/>
|
12
|
-
<div content_option="intro"/>
|
13
|
-
<div content_option="main"/>
|
14
|
-
<div content_option="footer"/>
|
14
|
+
<body onload="Hobo.applyEvents();" param>
|
15
15
|
</body>
|
16
16
|
</html>
|
17
17
|
</def>
|
18
18
|
|
19
|
+
<def tag="Page">
|
20
|
+
<BasePage merge>
|
21
|
+
<stylesheets>
|
22
|
+
<stylesheet name="hobo_base"/>
|
23
|
+
<stylesheet name="hobo_rapid"/>
|
24
|
+
<stylesheet name="application"/>
|
25
|
+
</stylesheets>
|
26
|
+
<scripts>
|
27
|
+
<default_tagbody/>
|
28
|
+
<hobo_rapid_javascripts param/>
|
29
|
+
</scripts>
|
30
|
+
|
31
|
+
<body param>
|
32
|
+
<div class="page_wrapper" param="wrapper">
|
33
|
+
<ajax_progress/>
|
34
|
+
<header id="page_header" param>
|
35
|
+
<div class="logo" param="logo"><image src="logo.png"/></div>
|
36
|
+
<nav param>
|
37
|
+
<magic_nav class="main_nav" param="main_mav"/>
|
38
|
+
<account_nav if="&respond_to? :login_url" param/>
|
39
|
+
</nav>
|
40
|
+
</header>
|
41
|
+
<flash_message param/>
|
42
|
+
<div id="page_main" param="main"></div>
|
43
|
+
<footer id="page_footer" param/>
|
44
|
+
</div>
|
45
|
+
</body>
|
46
|
+
</BasePage>
|
47
|
+
</def>
|
19
48
|
|
20
|
-
<def tag="
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
<h1><%= model_name.pluralize %></h1>
|
26
|
-
</:intro>
|
49
|
+
<def tag="PageForIndex"><Page merge/></def>
|
50
|
+
<def tag="PageForNew"><Page merge/></def>
|
51
|
+
<def tag="PageForShow"><Page merge/></def>
|
52
|
+
<def tag="PageForNewInCollection"><Page merge/></def>
|
53
|
+
<def tag="PageForShowCollection"><Page merge/></def>
|
27
54
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
55
|
+
<def tag="IndexPage">
|
56
|
+
<% model_name = @model.name.titleize %>
|
57
|
+
<PageForIndex title="All #{model_name.pluralize}" merge>
|
58
|
+
<body class="rapid_generic_page"/>
|
59
|
+
<main>
|
60
|
+
<header>
|
61
|
+
<heading><%= model_name.pluralize %></heading>
|
62
|
+
</header>
|
63
|
+
|
64
|
+
<nav param="top_page_nav"><page_nav/></nav>
|
65
|
+
|
66
|
+
<panel param="main" class="main">
|
67
|
+
<header param="main_header">
|
68
|
+
<h2><count label="&model_name"/></h2>
|
69
|
+
</header>
|
70
|
+
<section param="main_section">
|
71
|
+
<Table param>
|
72
|
+
<tr><td><a/></td><td><delete_button update="item_count"/></td></tr>
|
73
|
+
</Table>
|
35
74
|
</section>
|
36
75
|
|
37
|
-
<
|
38
|
-
<section replace_option="page_nav">
|
39
|
-
<div class="page_links">
|
40
|
-
<page_nav/>
|
41
|
-
</div>
|
42
|
-
</section>
|
43
|
-
</if>
|
76
|
+
<nav param="bottom_page_nav"><page_nav/></nav>
|
44
77
|
|
45
|
-
<
|
46
|
-
<p><new_object_link for="#@model"/></p>
|
47
|
-
</section_if>
|
78
|
+
<section param="new_link"><a to="&@model" action="new"/></section>
|
48
79
|
</panel>
|
49
|
-
|
50
|
-
</
|
80
|
+
</main>
|
81
|
+
</PageForIndex>
|
51
82
|
</def>
|
52
83
|
|
53
84
|
|
54
|
-
<def tag="
|
55
|
-
<
|
56
|
-
|
57
|
-
|
58
|
-
|
85
|
+
<def tag="NewPage">
|
86
|
+
<PageForNew title="New #{human_type}" merge>
|
87
|
+
<body class="rapid_generic_page"/>
|
88
|
+
<main>
|
89
|
+
<header>
|
90
|
+
<heading>New <human_type/></heading>
|
91
|
+
</header>
|
59
92
|
|
60
|
-
|
61
|
-
|
62
|
-
<h2 replace_option="pannel_heading">Details</h2>
|
93
|
+
<panel param="main" class="main">
|
94
|
+
<header param="main_header"><h2>Details</h2></header>
|
63
95
|
<section>
|
64
|
-
<
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
<submit label="Create" class="create_button" replace_option="submit_button"/>
|
71
|
-
</object_form>
|
96
|
+
<error_messages param="error_messages"/>
|
97
|
+
|
98
|
+
<form>
|
99
|
+
<FieldList skip_associations="has_many"/>
|
100
|
+
<submit label="Create" param/>
|
101
|
+
</form>
|
72
102
|
</section>
|
73
103
|
</panel>
|
74
|
-
|
75
|
-
|
76
|
-
</page>
|
104
|
+
</main>
|
105
|
+
</PageForNew>
|
77
106
|
</def>
|
78
107
|
|
79
108
|
|
80
|
-
<def tag="
|
109
|
+
<def tag="ShowPage">
|
81
110
|
<% has_many_assocs = this.class.reflections.values.map do |refl|
|
82
111
|
this.send(refl.name) if Hobo.simple_has_many_association?(refl)
|
83
112
|
end.compact
|
84
113
|
%>
|
85
|
-
<
|
86
|
-
|
87
|
-
|
88
|
-
<
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
<panel
|
94
|
-
<
|
114
|
+
<PageForShow merge>
|
115
|
+
<body class="rapid_generic_page"/>
|
116
|
+
<main>
|
117
|
+
<header>
|
118
|
+
<heading><human_type/><if test="&this.respond_to? :name">: <editor:name/></if></heading>
|
119
|
+
<p><delete_button in_place="&false"/></p>
|
120
|
+
</header>
|
121
|
+
|
122
|
+
<panel param="main_panel">
|
123
|
+
<header param="main_header"><h2>Details</h2></header>
|
95
124
|
<section>
|
96
|
-
<
|
125
|
+
<FieldList skip="name" tag="editor" param/>
|
97
126
|
</section>
|
98
127
|
|
99
|
-
<
|
100
|
-
<repeat
|
101
|
-
<p><
|
128
|
+
<section param="new_links">
|
129
|
+
<repeat with="&has_many_assocs">
|
130
|
+
<p><a action="new"/></p>
|
102
131
|
</repeat>
|
103
|
-
</
|
132
|
+
</section>
|
104
133
|
</panel>
|
105
|
-
|
106
|
-
|
107
|
-
</page>
|
134
|
+
</main>
|
135
|
+
</PageForShow>
|
108
136
|
</def>
|
109
137
|
|
110
138
|
|
111
|
-
<def tag="
|
112
|
-
<
|
113
|
-
|
114
|
-
|
115
|
-
<
|
116
|
-
|
117
|
-
|
139
|
+
<def tag="NewInCollectionPage">
|
140
|
+
<PageForNewInCollection title="New #{human_type}" merge>
|
141
|
+
<body class="rapid_generic_page"/>
|
142
|
+
<main>
|
143
|
+
<header>
|
144
|
+
<h1>New <human_type/></h1>
|
145
|
+
<h2>For: <a with="&@owner" /></h2>
|
146
|
+
</header>
|
118
147
|
|
119
|
-
|
120
|
-
|
121
|
-
|
148
|
+
<panel param="main">
|
149
|
+
<header param="main_header">
|
150
|
+
<h2>Details</h2>
|
151
|
+
</header>
|
122
152
|
<section>
|
123
|
-
<
|
124
|
-
<%= error_messages_for 'this' %>
|
125
|
-
</div>
|
126
|
-
|
127
|
-
<object_form hidden_fields="*">
|
128
|
-
<object_table associations="belongs_to" replace_option="fields"/>
|
129
|
-
<submit label='#"Add to #{display_name(:obj => @owner, :no_span => true)}"'
|
130
|
-
replace_option="submit_button"/>
|
131
|
-
</object_form>
|
132
|
-
</section>
|
153
|
+
<error_messages param="error_messages"/>
|
133
154
|
|
155
|
+
<form>
|
156
|
+
<FieldList associations="belongs_to"/>
|
157
|
+
<submit label='Add to #{name(:with => @owner, :no_wrapper => true)}'
|
158
|
+
param="submit_button"/>
|
159
|
+
</form>
|
160
|
+
</section>
|
134
161
|
</panel>
|
135
|
-
|
136
|
-
|
137
|
-
</page>
|
162
|
+
</main>
|
163
|
+
</PageForNewInCollection>
|
138
164
|
</def>
|
139
165
|
|
140
166
|
|
141
|
-
<def tag="
|
142
|
-
<% title = "#{@reflection.name.to_s.titleize} for #{
|
143
|
-
<
|
167
|
+
<def tag="ShowCollectionPage">
|
168
|
+
<% title = "#{@reflection.name.to_s.titleize} for #{name(:with => @owner)}" %>
|
169
|
+
<PageForShowCollection title="&title" merge>
|
170
|
+
<body class="rapid_generic_page"/>
|
171
|
+
<main>
|
172
|
+
<header>
|
173
|
+
<h1><%= title %></h1>
|
174
|
+
<h2>Back to <a with="&@owner"/></h2>
|
175
|
+
</header>
|
144
176
|
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
177
|
+
<panel param="main">
|
178
|
+
<header param="main_header">
|
179
|
+
<count with="&@pages.item_count" label="&@reflection.klass.name.titleize"/>
|
180
|
+
</header>
|
181
|
+
|
182
|
+
<nav param="top_page_nav"><page_nav/></nav>
|
149
183
|
|
150
|
-
<:main>
|
151
|
-
<panel replace_option="main_panel">
|
152
|
-
<h2 replace_option="panel_heading"><count label="#@reflection.klass.name.titleize"/></h2>
|
153
184
|
<section>
|
154
|
-
<
|
155
|
-
<
|
156
|
-
|
185
|
+
<Table param="Table">
|
186
|
+
<tr>
|
187
|
+
<if test="can_view?">
|
188
|
+
<td><a/></td><td><delete_button/></td>
|
189
|
+
</if>
|
190
|
+
</tr>
|
191
|
+
</Table>
|
157
192
|
</section>
|
158
193
|
|
159
|
-
<
|
160
|
-
<section replace_option="page_nav">
|
161
|
-
<div class="page_links">
|
162
|
-
<page_nav/>
|
163
|
-
</div>
|
164
|
-
</section>
|
165
|
-
</if>
|
194
|
+
<nav param="bottom_page_nav"><page_nav param/></nav>
|
166
195
|
|
167
|
-
<if
|
168
|
-
<section
|
169
|
-
<
|
196
|
+
<if test="&Hobo.simple_has_many_association?(@association)">
|
197
|
+
<section param="new_link">
|
198
|
+
<a to="&@associaton.new"/>
|
170
199
|
</section>
|
171
200
|
</if>
|
172
201
|
</panel>
|
173
|
-
|
174
|
-
</
|
202
|
+
</main>
|
203
|
+
</PageForShowCollection>
|
204
|
+
</def>
|
205
|
+
|
206
|
+
<def tag="doctype" attrs="version"><%=
|
207
|
+
case version.upcase
|
208
|
+
when "HTML 4.01 STRICT"
|
209
|
+
'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" ' +
|
210
|
+
'"http://www.w3.org/TR/html4/strict.dtd">'
|
211
|
+
when "HTML 4.01 TRANSITIONAL"
|
212
|
+
'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" ' +
|
213
|
+
'"http://www.w3.org/TR/html4/loose.dtd">'
|
214
|
+
when "XHTML 1.0 STRICT"
|
215
|
+
'!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" ' +
|
216
|
+
'"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'
|
217
|
+
when "XHTML 1.0 TRANSITIONAL"
|
218
|
+
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ' +
|
219
|
+
'"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'
|
220
|
+
when "XHTML 1.1"
|
221
|
+
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" ' +
|
222
|
+
'"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">'
|
223
|
+
end
|
224
|
+
%></def>
|
225
|
+
|
226
|
+
<def tag="stylesheet" attrs="name,media">
|
227
|
+
<link href="#{base_url}/stylesheets/#{name}.css" media="#{ media || 'all' }" rel="stylesheet" type="text/css" />
|
175
228
|
</def>
|
229
|
+
|
230
|
+
<def tag="flash_message" attr="type">
|
231
|
+
<% type = type ? type.to_sym : :notice %>
|
232
|
+
<div class="flash" if="&flash[type]"><%= flash[type] %></div>
|
233
|
+
</def>
|
234
|
+
|
235
|
+
<def tag="ajax_progress">
|
236
|
+
<div id='ajax_progress'>
|
237
|
+
<div>
|
238
|
+
<span id="ajax_progress_text"></span><theme_image src="spinner.gif"/>
|
239
|
+
</div>
|
240
|
+
</div>
|
241
|
+
</def>
|
242
|
+
|
243
|
+
<def tag="error_messages">
|
244
|
+
<div class="error_messages">
|
245
|
+
<%= error_messages_for 'this' %>
|
246
|
+
</div>
|
247
|
+
</def>
|
248
|
+
|