hobo 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- data/hobo_files/plugin/CHANGES.txt +220 -23
- data/hobo_files/plugin/generators/hobo_front_controller/templates/index.dryml +18 -25
- data/hobo_files/plugin/generators/hobo_migration/hobo_migration_generator.rb +20 -15
- data/hobo_files/plugin/generators/hobo_model/templates/model.rb +3 -3
- data/hobo_files/plugin/generators/hobo_rapid/hobo_rapid_generator.rb +3 -3
- data/hobo_files/plugin/generators/hobo_rapid/templates/hobo-rapid.css +1 -2
- data/hobo_files/plugin/generators/hobo_rapid/templates/hobo-rapid.js +21 -4
- data/hobo_files/plugin/generators/hobo_rapid/templates/themes/clean/public/images/fieldbg.gif +0 -0
- data/hobo_files/plugin/generators/hobo_rapid/templates/themes/clean/public/images/spinner.gif +0 -0
- data/hobo_files/plugin/generators/hobo_rapid/templates/themes/clean/public/stylesheets/application.css +154 -26
- data/hobo_files/plugin/generators/hobo_rapid/templates/themes/clean/public/stylesheets/rapid-ui.css +144 -0
- data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/views/application.dryml +1 -1
- data/hobo_files/plugin/generators/hobo_user_controller/templates/controller.rb +1 -1
- data/hobo_files/plugin/generators/hobo_user_model/templates/model.rb +8 -11
- data/hobo_files/plugin/init.rb +0 -2
- data/hobo_files/plugin/lib/active_record/has_many_association.rb +0 -9
- data/hobo_files/plugin/lib/active_record/has_many_through_association.rb +0 -10
- data/hobo_files/plugin/lib/hobo.rb +57 -44
- data/hobo_files/plugin/lib/hobo/bundle.rb +222 -0
- data/hobo_files/plugin/lib/hobo/controller.rb +2 -5
- data/hobo_files/plugin/lib/hobo/dryml.rb +8 -7
- data/hobo_files/plugin/lib/hobo/dryml/dryml_builder.rb +10 -21
- data/hobo_files/plugin/lib/hobo/dryml/taglib.rb +107 -80
- data/hobo_files/plugin/lib/hobo/dryml/template.rb +27 -20
- data/hobo_files/plugin/lib/hobo/enum_string.rb +1 -1
- data/hobo_files/plugin/lib/hobo/field_declaration_dsl.rb +7 -0
- data/hobo_files/plugin/lib/hobo/guest.rb +4 -0
- data/hobo_files/plugin/lib/hobo/hobo_helper.rb +37 -9
- data/hobo_files/plugin/lib/hobo/model.rb +79 -17
- data/hobo_files/plugin/lib/hobo/model_controller.rb +59 -60
- data/hobo_files/plugin/lib/hobo/model_router.rb +16 -4
- data/hobo_files/plugin/lib/hobo/rapid_helper.rb +2 -1
- data/hobo_files/plugin/lib/hobo/user.rb +10 -7
- data/hobo_files/plugin/lib/hobo/user_controller.rb +6 -6
- data/hobo_files/plugin/{tags → taglibs}/core.dryml +5 -4
- data/hobo_files/plugin/{tags → taglibs}/rapid.dryml +54 -7
- data/hobo_files/plugin/{tags → taglibs}/rapid_document_tags.dryml +0 -0
- data/hobo_files/plugin/{tags → taglibs}/rapid_editing.dryml +4 -2
- data/hobo_files/plugin/{tags → taglibs}/rapid_forms.dryml +1 -4
- data/hobo_files/plugin/{tags → taglibs}/rapid_navigation.dryml +1 -2
- data/hobo_files/plugin/taglibs/rapid_pages.dryml +411 -0
- data/hobo_files/plugin/{tags → taglibs}/rapid_plus.dryml +0 -0
- data/hobo_files/plugin/{tags → taglibs}/rapid_support.dryml +9 -6
- data/hobo_files/plugin/tasks/fix_dryml.rake +0 -1
- metadata +16 -14
- data/hobo_files/plugin/generators/hobo_rapid/templates/themes/clean/public/stylesheets/rapid_ui.css +0 -167
- data/hobo_files/plugin/lib/hobo/plugins.rb +0 -75
- data/hobo_files/plugin/tags/rapid_pages.dryml +0 -341
File without changes
|
@@ -1,17 +1,20 @@
|
|
1
|
-
<def tag="with-fields" attrs="fields, skip, skip-associations, include-timestamps, force-all"><%
|
2
|
-
field_names = if
|
1
|
+
<def tag="with-fields" attrs="fields, associations, skip, skip-associations, include-timestamps, force-all"><%
|
2
|
+
field_names = if associations == "has_many"
|
3
|
+
this.class.reflections.values.select { |refl| refl.macro == :has_many }.map { |refl| refl.name.to_s }
|
4
|
+
|
5
|
+
elsif fields.nil? || fields == "*" || fields.is_a?(Class)
|
3
6
|
klass = fields.is_a?(Class) ? fields : this.class
|
4
7
|
columns = klass.content_columns.every(:name)
|
5
8
|
columns -= %w{created_at updated_at created_on updated_on} unless
|
6
9
|
include_timestamps
|
7
10
|
|
8
11
|
if skip_associations == "has_many"
|
9
|
-
assocs = this.class.reflections.values.reject {|r| r.macro == :has_many }.
|
12
|
+
assocs = this.class.reflections.values.reject {|r| r.macro == :has_many }.map &its.name.to_s
|
10
13
|
columns + assocs
|
11
14
|
elsif skip_associations
|
12
15
|
columns
|
13
16
|
else
|
14
|
-
assocs = klass.reflections.values.
|
17
|
+
assocs = klass.reflections.values.map &its.name.to_s
|
15
18
|
columns + assocs
|
16
19
|
end
|
17
20
|
else
|
@@ -29,12 +32,12 @@
|
|
29
32
|
columns -= %w{created_at updated_at created_on updated_on} unless include_timestamps
|
30
33
|
|
31
34
|
if skip_associations == "has_many"
|
32
|
-
assocs = this.reflections.values.reject {|r| r.macro == :has_many }.
|
35
|
+
assocs = this.reflections.values.reject {|r| r.macro == :has_many }.map &its.name.to_s
|
33
36
|
columns + assocs
|
34
37
|
elsif skip_associations
|
35
38
|
columns
|
36
39
|
else
|
37
|
-
assocs = klass.reflections.values.
|
40
|
+
assocs = klass.reflections.values.map &its.name.to_s
|
38
41
|
columns + assocs
|
39
42
|
end
|
40
43
|
else
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
|
|
3
3
|
specification_version: 1
|
4
4
|
name: hobo
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.7.
|
7
|
-
date: 2007-12-
|
6
|
+
version: 0.7.1
|
7
|
+
date: 2007-12-23 00:00:00 +00:00
|
8
8
|
summary: The web app builder for Rails
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -76,11 +76,13 @@ files:
|
|
76
76
|
- hobo_files/plugin/generators/hobo_rapid/templates/themes/clean
|
77
77
|
- hobo_files/plugin/generators/hobo_rapid/templates/themes/clean/public
|
78
78
|
- hobo_files/plugin/generators/hobo_rapid/templates/themes/clean/public/images
|
79
|
+
- hobo_files/plugin/generators/hobo_rapid/templates/themes/clean/public/images/fieldbg.gif
|
79
80
|
- hobo_files/plugin/generators/hobo_rapid/templates/themes/clean/public/images/pencil.png
|
80
81
|
- hobo_files/plugin/generators/hobo_rapid/templates/themes/clean/public/images/small_close.png
|
82
|
+
- hobo_files/plugin/generators/hobo_rapid/templates/themes/clean/public/images/spinner.gif
|
81
83
|
- hobo_files/plugin/generators/hobo_rapid/templates/themes/clean/public/stylesheets
|
82
84
|
- hobo_files/plugin/generators/hobo_rapid/templates/themes/clean/public/stylesheets/application.css
|
83
|
-
- hobo_files/plugin/generators/hobo_rapid/templates/themes/clean/public/stylesheets/
|
85
|
+
- hobo_files/plugin/generators/hobo_rapid/templates/themes/clean/public/stylesheets/rapid-ui.css
|
84
86
|
- hobo_files/plugin/generators/hobo_rapid/templates/themes/clean/views
|
85
87
|
- hobo_files/plugin/generators/hobo_rapid/templates/themes/clean/views/application.dryml
|
86
88
|
- hobo_files/plugin/generators/hobo_rapid/templates/themes/default
|
@@ -148,6 +150,7 @@ files:
|
|
148
150
|
- hobo_files/plugin/lib/extensions.rb
|
149
151
|
- hobo_files/plugin/lib/hobo
|
150
152
|
- hobo_files/plugin/lib/hobo/authentication_support.rb
|
153
|
+
- hobo_files/plugin/lib/hobo/bundle.rb
|
151
154
|
- hobo_files/plugin/lib/hobo/composite_model.rb
|
152
155
|
- hobo_files/plugin/lib/hobo/controller.rb
|
153
156
|
- hobo_files/plugin/lib/hobo/dryml
|
@@ -178,7 +181,6 @@ files:
|
|
178
181
|
- hobo_files/plugin/lib/hobo/model_support.rb
|
179
182
|
- hobo_files/plugin/lib/hobo/password_string.rb
|
180
183
|
- hobo_files/plugin/lib/hobo/percentage.rb
|
181
|
-
- hobo_files/plugin/lib/hobo/plugins.rb
|
182
184
|
- hobo_files/plugin/lib/hobo/predicate_dispatch.rb
|
183
185
|
- hobo_files/plugin/lib/hobo/proc_binding.rb
|
184
186
|
- hobo_files/plugin/lib/hobo/rapid_helper.rb
|
@@ -195,16 +197,16 @@ files:
|
|
195
197
|
- hobo_files/plugin/LICENSE.txt
|
196
198
|
- hobo_files/plugin/Rakefile
|
197
199
|
- hobo_files/plugin/README
|
198
|
-
- hobo_files/plugin/
|
199
|
-
- hobo_files/plugin/
|
200
|
-
- hobo_files/plugin/
|
201
|
-
- hobo_files/plugin/
|
202
|
-
- hobo_files/plugin/
|
203
|
-
- hobo_files/plugin/
|
204
|
-
- hobo_files/plugin/
|
205
|
-
- hobo_files/plugin/
|
206
|
-
- hobo_files/plugin/
|
207
|
-
- hobo_files/plugin/
|
200
|
+
- hobo_files/plugin/taglibs
|
201
|
+
- hobo_files/plugin/taglibs/core.dryml
|
202
|
+
- hobo_files/plugin/taglibs/rapid.dryml
|
203
|
+
- hobo_files/plugin/taglibs/rapid_document_tags.dryml
|
204
|
+
- hobo_files/plugin/taglibs/rapid_editing.dryml
|
205
|
+
- hobo_files/plugin/taglibs/rapid_forms.dryml
|
206
|
+
- hobo_files/plugin/taglibs/rapid_navigation.dryml
|
207
|
+
- hobo_files/plugin/taglibs/rapid_pages.dryml
|
208
|
+
- hobo_files/plugin/taglibs/rapid_plus.dryml
|
209
|
+
- hobo_files/plugin/taglibs/rapid_support.dryml
|
208
210
|
- hobo_files/plugin/tasks
|
209
211
|
- hobo_files/plugin/tasks/dump_fixtures.rake
|
210
212
|
- hobo_files/plugin/tasks/environments.rake
|
data/hobo_files/plugin/generators/hobo_rapid/templates/themes/clean/public/stylesheets/rapid_ui.css
DELETED
@@ -1,167 +0,0 @@
|
|
1
|
-
.flash {
|
2
|
-
background: #92ab6e;
|
3
|
-
padding: 10px;
|
4
|
-
margin-top: 5px;
|
5
|
-
border-top: 2px solid #829862;
|
6
|
-
border-bottom: 2px solid #829862;
|
7
|
-
}
|
8
|
-
|
9
|
-
input.text, input.string, input.email_address, input.password, textarea {
|
10
|
-
border: 2px solid #444; padding: 1px;
|
11
|
-
}
|
12
|
-
input.file_upload {
|
13
|
-
background: #070707; border: 1px dotted #666;
|
14
|
-
color: white;
|
15
|
-
}
|
16
|
-
|
17
|
-
.button {
|
18
|
-
padding: 4px 8px;
|
19
|
-
color: white; /* background: #292929; border: 2px solid #444;*/ background: black; border: 1px solid #666;
|
20
|
-
font: 12px "Lucida Grande", Arial, sans-serif;
|
21
|
-
}
|
22
|
-
.button:hover {cursor: pointer;}
|
23
|
-
/*.delete_button {
|
24
|
-
border: none; background: url(../images/small_close.png) center bottom no-repeat;
|
25
|
-
width: 14px; height: 15px;
|
26
|
-
margin: 0; padding: 0; margin-left: 5px;
|
27
|
-
overflow: hidden; text-indent: -300px;
|
28
|
-
}*/
|
29
|
-
|
30
|
-
.in_place_textfield_bhv, .in_place_textarea_bhv, .in_place_html_textarea_bhv {
|
31
|
-
/* background: #070707; border: 1px dotted #666;*/
|
32
|
-
padding: 0 3px;
|
33
|
-
background-image: url(../images/pencil.png);
|
34
|
-
background-position: top right;
|
35
|
-
background-repeat: no-repeat;
|
36
|
-
}
|
37
|
-
.in_place_textfield_bhv {
|
38
|
-
padding-right: 20px;
|
39
|
-
}
|
40
|
-
|
41
|
-
.inplaceeditor-form input, .inplaceeditor-form textarea,
|
42
|
-
table.new_record textarea, table.new_record input {
|
43
|
-
background: #070707; border: 1px dotted #666;
|
44
|
-
padding: 3px; color: white; width: 100%;
|
45
|
-
}
|
46
|
-
.inplaceeditor-form, .inplaceeditor-form input {
|
47
|
-
display: inline;
|
48
|
-
}
|
49
|
-
|
50
|
-
.login-table, .login-table td {border: none;}
|
51
|
-
.login_table td.field_label { vertical-align: middle; }
|
52
|
-
.login-table tr td {
|
53
|
-
padding-bottom: 15px;
|
54
|
-
padding-right: 10px;
|
55
|
-
}
|
56
|
-
#login-form {
|
57
|
-
padding-top: 20px;
|
58
|
-
}
|
59
|
-
#login-form .submit_button {margin-left: 68px;}
|
60
|
-
|
61
|
-
/**** Admin ****/
|
62
|
-
|
63
|
-
.admin-banner {
|
64
|
-
background: #9d0018; border-top: 2px solid #7a0013; border-bottom: 2px solid #7a0013;
|
65
|
-
padding: 2px 0;
|
66
|
-
margin: 10px 0;
|
67
|
-
}
|
68
|
-
.admin-banner p, .admin-banner span {
|
69
|
-
font: 12px "Lucida Grande", Arial, sans-serif;
|
70
|
-
}
|
71
|
-
.admin-banner p, .admin-banner div {margin-bottom: 0;}
|
72
|
-
.admin-banner a {color: white; text-decoration: none; padding: 1px 5px; font-weight: bold;}
|
73
|
-
.admin-banner a:hover {color: #9d0018; background: white;}
|
74
|
-
.admin-banner .logged-in {
|
75
|
-
float: right;
|
76
|
-
}
|
77
|
-
|
78
|
-
/* rails error message */
|
79
|
-
.error_messages {
|
80
|
-
font-family: "Lucida Grande", arial, sans-serif;
|
81
|
-
background: #9d0018;
|
82
|
-
border: 1px solid #7a0013;
|
83
|
-
padding: 15px 30px;
|
84
|
-
color: white;
|
85
|
-
margin-bottom: 20px;
|
86
|
-
}
|
87
|
-
.error_messages h2 {
|
88
|
-
text-transform: none;
|
89
|
-
letter-spacing: normal;
|
90
|
-
color: white;
|
91
|
-
margin-bottom: 10px;
|
92
|
-
}
|
93
|
-
.error_messages li {
|
94
|
-
margin-left: 20px;
|
95
|
-
}
|
96
|
-
|
97
|
-
/********* everything below here came from hobo_rapid.css, needs looking at ********/
|
98
|
-
|
99
|
-
/**** Default styling for Rapid ****/
|
100
|
-
|
101
|
-
#ajax_progress {
|
102
|
-
color: grey;
|
103
|
-
float: right;
|
104
|
-
margin: 20px;
|
105
|
-
position: fixed;
|
106
|
-
background: white;
|
107
|
-
font-family: Tahoma "sans serif";
|
108
|
-
display: none;
|
109
|
-
z-index: 10;
|
110
|
-
}
|
111
|
-
|
112
|
-
#ajax_progress div {
|
113
|
-
border: 1px dashed grey;
|
114
|
-
margin: 10px;
|
115
|
-
padding: 3px;
|
116
|
-
/* padding-top: -15px;*/
|
117
|
-
}
|
118
|
-
|
119
|
-
#ajax_progress img {
|
120
|
-
padding-left: 6px;
|
121
|
-
vertical-align: middle;
|
122
|
-
}
|
123
|
-
|
124
|
-
|
125
|
-
/* Scriptaculous Autocompleter ---*/
|
126
|
-
|
127
|
-
div.completions_popup {
|
128
|
-
position:absolute;
|
129
|
-
width:250px;
|
130
|
-
background-color:white;
|
131
|
-
border:1px solid #888;
|
132
|
-
margin:0px;
|
133
|
-
padding:0px;
|
134
|
-
}
|
135
|
-
div.completions_popup ul {
|
136
|
-
list-style-type:none;
|
137
|
-
margin:0px;
|
138
|
-
padding:0px;
|
139
|
-
}
|
140
|
-
div.completions_popup ul li.selected { background-color: #ffb;}
|
141
|
-
div.completions_popup ul li {
|
142
|
-
list-style-type:none;
|
143
|
-
display:block;
|
144
|
-
margin:0;
|
145
|
-
padding:2px;
|
146
|
-
cursor:pointer;
|
147
|
-
}
|
148
|
-
|
149
|
-
|
150
|
-
.field_list { width:95%; }
|
151
|
-
.field_list td { padding: 5px; vertical-align: middle; }
|
152
|
-
.field_list td.field_label {
|
153
|
-
text-align: left; width: 1px; white-space: nowrap; vertical-align: top;
|
154
|
-
padding-top: 10px; padding-bottom: 10px;
|
155
|
-
}
|
156
|
-
/*.field_list input[type=text] { width: 100%; }*/
|
157
|
-
/*.field_list input, .field_list textarea { margin: -2px 0 0 0; }*/
|
158
|
-
.field_list textarea { width: 100%; margin: 0; }
|
159
|
-
/*table.login-table input {font-size: 16px; color: black;}*/
|
160
|
-
|
161
|
-
/*input[type=text].wide { width: 100%; }*/
|
162
|
-
textarea { height: 200px; }
|
163
|
-
textarea.wide { width: 100%; }
|
164
|
-
textarea.tall { height: 350px; }
|
165
|
-
|
166
|
-
.field_list input.percentage {width: 25px; display: inline; margin-right: 5px; padding: 1px 3px;}
|
167
|
-
|
@@ -1,75 +0,0 @@
|
|
1
|
-
module ::Hobo::Plugins
|
2
|
-
class HoboPlugin
|
3
|
-
|
4
|
-
def initialize(opt={})
|
5
|
-
@opt = opt
|
6
|
-
set_up_options(self.class::PLUGIN_DEFAULTS)
|
7
|
-
|
8
|
-
send @opt[:setup_using] || :default
|
9
|
-
end
|
10
|
-
|
11
|
-
def set_up_options(*defaults)
|
12
|
-
@opt = @opt.reverse_merge(*defaults)
|
13
|
-
make_variations(self.class::PLUGIN_SYMBOLS)
|
14
|
-
end
|
15
|
-
|
16
|
-
def make_variations(h)
|
17
|
-
h.each do |name|
|
18
|
-
if @opt[name] && @opt[name] != false
|
19
|
-
# start with :product_category
|
20
|
-
|
21
|
-
# add :product_categories
|
22
|
-
@opt[name.to_s.pluralize.to_sym] = @opt[name].to_s.pluralize.to_sym
|
23
|
-
|
24
|
-
# :ProductCategory
|
25
|
-
@opt[name.to_s.camelize.to_sym] = @opt[name].to_s.camelize.to_sym
|
26
|
-
|
27
|
-
# :ProductCategories
|
28
|
-
@opt[name.to_s.camelize.pluralize.to_sym] = @opt[name].to_s.camelize.pluralize.to_sym
|
29
|
-
|
30
|
-
# :ProductCategoriesController
|
31
|
-
@opt[(name.to_s.camelize.pluralize+'Controller').to_sym] =
|
32
|
-
(@opt[name].to_s.camelize.pluralize+'Controller').to_sym
|
33
|
-
else
|
34
|
-
@opt[name.to_s.pluralize.to_sym] = false
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
def hobo_model(name, &b)
|
40
|
-
make_class(@opt ? @opt[name] : name, ActiveRecord::Base) do
|
41
|
-
hobo_model
|
42
|
-
class_eval &b if b
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
def resource_controller(name, &b)
|
47
|
-
make_class @opt[name], ApplicationController do
|
48
|
-
hobo_model_controller
|
49
|
-
|
50
|
-
class_eval &b if b
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
def make_class(class_name, base_class, &b)
|
55
|
-
opt = @opt
|
56
|
-
c = Class.new(base_class)
|
57
|
-
silence_warnings { Object.const_set(class_name, c) }
|
58
|
-
c.class_eval do
|
59
|
-
@plugin_opt = opt
|
60
|
-
def self.sym
|
61
|
-
@plugin_opt
|
62
|
-
end
|
63
|
-
def self.has_feature(name)
|
64
|
-
@plugin_opt[name]
|
65
|
-
end
|
66
|
-
def sym
|
67
|
-
self.class.sym
|
68
|
-
end
|
69
|
-
end
|
70
|
-
c.class_eval &b if b
|
71
|
-
c
|
72
|
-
end
|
73
|
-
|
74
|
-
end
|
75
|
-
end
|
@@ -1,341 +0,0 @@
|
|
1
|
-
<def tag="base-page" attrs="title, doctype">
|
2
|
-
<% title ||= request.request_uri %>
|
3
|
-
<doctype version="&doctype || 'HTML 4.01 STRICT'"/>
|
4
|
-
<html>
|
5
|
-
<head param>
|
6
|
-
<title param><%= title %></title>
|
7
|
-
<do param="stylesheets">
|
8
|
-
<stylesheet name="reset"/>
|
9
|
-
<stylesheet name="application"/>
|
10
|
-
</do>
|
11
|
-
<do param="scripts">
|
12
|
-
<javascript name="prototype,effects,dragdrop,controls,application"/>
|
13
|
-
</do>
|
14
|
-
</head>
|
15
|
-
<body onload="Hobo.applyEvents();" param>
|
16
|
-
</body>
|
17
|
-
</html>
|
18
|
-
</def>
|
19
|
-
|
20
|
-
|
21
|
-
<def tag="page">
|
22
|
-
<base-page merge>
|
23
|
-
<stylesheets: param>
|
24
|
-
<stylesheet name="reset"/>
|
25
|
-
<stylesheet name="hobo-rapid"/>
|
26
|
-
<stylesheet name="application"/>
|
27
|
-
</stylesheets>
|
28
|
-
|
29
|
-
<scripts: param>
|
30
|
-
<javascript name="prototype, effects, dragdrop, controls, lowpro, hobo-rapid, application"/>
|
31
|
-
<hobo-rapid-javascripts param/>
|
32
|
-
</scripts>
|
33
|
-
|
34
|
-
<body: param>
|
35
|
-
<div class="page-wrapper" param="wrapper">
|
36
|
-
<ajax-progress/>
|
37
|
-
<header class="page-header" param>
|
38
|
-
<nav param>
|
39
|
-
<magic-nav class="main-nav" param="main-nav"/>
|
40
|
-
<account-nav if="&Hobo::UserController.user_models.first" param/>
|
41
|
-
</nav>
|
42
|
-
</header>
|
43
|
-
<section class="page-content" param="content">
|
44
|
-
<header class="content-header" param="content-header"/>
|
45
|
-
<flash-message param/>
|
46
|
-
<section class="content-body" param="content-body"/>
|
47
|
-
<footer class="content-footer" param="content-footer"/>
|
48
|
-
</section>
|
49
|
-
<footer class="page-footer" param/>
|
50
|
-
</div>
|
51
|
-
</body>
|
52
|
-
</base-page>
|
53
|
-
</def>
|
54
|
-
|
55
|
-
<def tag="page-without-aside" alias-of="page"/>
|
56
|
-
<def tag="page-with-aside">
|
57
|
-
<page-without-aside merge>
|
58
|
-
<content:>
|
59
|
-
<section class="main-content" param="main-content">
|
60
|
-
<default-tagbody for="content"/>
|
61
|
-
</section>
|
62
|
-
<aside class="aside-content" param/>
|
63
|
-
</content>
|
64
|
-
</page-without-aside>
|
65
|
-
</def>
|
66
|
-
|
67
|
-
|
68
|
-
<def tag="page-for-index"><page merge/></def>
|
69
|
-
<def tag="page-for-new"><page merge/></def>
|
70
|
-
<def tag="page-for-show"><page merge/></def>
|
71
|
-
<def tag="page-for-edit"><page merge/></def>
|
72
|
-
<def tag="page-for-new-in-collection"><page merge/></def>
|
73
|
-
<def tag="page-for-show-collection"><page merge/></def>
|
74
|
-
|
75
|
-
|
76
|
-
<def tag="index-page">
|
77
|
-
<% model_name = @model.name.titleize %>
|
78
|
-
<page-for-index title="All #{model_name.pluralize}" merge>
|
79
|
-
<body: class="index-page #{@model.name.underscore.pluralize}" param/>
|
80
|
-
<content-header: param>
|
81
|
-
<heading param><%= model_name.pluralize %></heading>
|
82
|
-
<p class="note" param>There <do with="&@model"><count part="item-count" prefix="are"/></do></p>
|
83
|
-
</content-header>
|
84
|
-
|
85
|
-
<content-body: param>
|
86
|
-
<nav param="top-pagination-nav"><page-nav/></nav>
|
87
|
-
|
88
|
-
<table param>
|
89
|
-
<tr:><td><a/></td><td><delete-button update="item-count"/></td></tr>
|
90
|
-
</table>
|
91
|
-
|
92
|
-
<nav param="bottom-pagination-nav"><page-nav/></nav>
|
93
|
-
</content-body>
|
94
|
-
|
95
|
-
<content-footer: param>
|
96
|
-
<a to="&@model" action="new" param="new-link"/>
|
97
|
-
</content-footer>
|
98
|
-
</page-for-index>
|
99
|
-
</def>
|
100
|
-
|
101
|
-
|
102
|
-
<def tag="new-page">
|
103
|
-
<page-for-new title="New #{type_name}" merge>
|
104
|
-
<body: class="new-page #{type_name.underscore}" param/>
|
105
|
-
<content-header: param>
|
106
|
-
<heading param>New <type-name title/></heading>
|
107
|
-
</content-header>
|
108
|
-
|
109
|
-
<content-body: param>
|
110
|
-
<error-messages param/>
|
111
|
-
|
112
|
-
<form param>
|
113
|
-
<field-list skip-associations="has_many" param/>
|
114
|
-
<submit label="Create" param/>
|
115
|
-
</form>
|
116
|
-
</content-body>
|
117
|
-
</page-for-new>
|
118
|
-
</def>
|
119
|
-
|
120
|
-
|
121
|
-
<def tag="show-page">
|
122
|
-
<% has_many_assocs = this.class.reflections.values.map do |refl|
|
123
|
-
this.send(refl.name) if Hobo.simple_has_many_association?(refl)
|
124
|
-
end.compact
|
125
|
-
%>
|
126
|
-
<page-for-show merge title="#{name :no_wrapper => true}">
|
127
|
-
<body: class="show-page #{type_name.underscore}" param/>
|
128
|
-
<content-header: param>
|
129
|
-
<heading param><type-name/><if test="&this.respond_to? :name">: <editor:name/></if></heading>
|
130
|
-
<delete-button in-place="&false" param/>
|
131
|
-
</content-header>
|
132
|
-
|
133
|
-
<content-body: param>
|
134
|
-
<field-list skip="name" tag="editor" param/>
|
135
|
-
|
136
|
-
<nav param="new-links">
|
137
|
-
<ul with="&has_many_assocs">
|
138
|
-
<li:><a action="new"/></li>
|
139
|
-
</ul>
|
140
|
-
</nav>
|
141
|
-
</content-body>
|
142
|
-
</page-for-show>
|
143
|
-
</def>
|
144
|
-
|
145
|
-
|
146
|
-
<def tag="edit-page">
|
147
|
-
<page-for-edit merge>
|
148
|
-
<body: class="edit-page #{this.class.name.underscore}" param/>
|
149
|
-
<content-header: param>
|
150
|
-
<heading><type-name/><if test="&this.respond_to? :name">: <name/></if></heading>
|
151
|
-
<delete-button in-place="&false" param/>
|
152
|
-
</content-header>
|
153
|
-
|
154
|
-
<content-body: param>
|
155
|
-
<error-messages param/>
|
156
|
-
<form param>
|
157
|
-
<field-list skip-associations="has_many" param/>
|
158
|
-
<submit label="Save"/>
|
159
|
-
</form>
|
160
|
-
|
161
|
-
</content-body>
|
162
|
-
</page-for-edit>
|
163
|
-
</def>
|
164
|
-
|
165
|
-
|
166
|
-
<def tag="new-in-collection-page">
|
167
|
-
<page-for-new-in-collection title="New #{type_name}" merge>
|
168
|
-
<body: class="new-in-collection-page #{type_name(:with => @owner)} #{type_name}" param/>
|
169
|
-
<content-header: param>
|
170
|
-
<heading param>New <type-name/></heading>
|
171
|
-
<sub-heading param>For: <a with="&@owner" /></sub-heading>
|
172
|
-
</content-header>
|
173
|
-
|
174
|
-
<content-body: param>
|
175
|
-
<error-messages/>
|
176
|
-
|
177
|
-
<form param>
|
178
|
-
<field-list skip-associations="has_many" param/>
|
179
|
-
<submit label='Add to #{name(:with => @owner, :no_wrapper => true)}' param/>
|
180
|
-
</form>
|
181
|
-
</content-body>
|
182
|
-
</page-for-new-in-collection>
|
183
|
-
</def>
|
184
|
-
|
185
|
-
|
186
|
-
<def tag="show-collection-page">
|
187
|
-
<% title = "#{@reflection.name.to_s.titleize} for #{name(:with => @owner)}" %>
|
188
|
-
<page-for-show-collection title="&title" merge>
|
189
|
-
<body: class="show-collection-page #{type_name(:with => @owner)} #{type_name(:pluralize => true)}"
|
190
|
-
param/>
|
191
|
-
<content-header: param>
|
192
|
-
<nav>Back to <a with="&@owner"/></nav>
|
193
|
-
<heading><%= title %></heading>
|
194
|
-
<sub-heading><count with="&@pages.item_count" label="&@reflection.klass.name.titleize"/></sub-heading>
|
195
|
-
</content-header>
|
196
|
-
|
197
|
-
<content-body: param>
|
198
|
-
<nav param="top-pagination-nav"><page-nav/></nav>
|
199
|
-
|
200
|
-
<table param="Table">
|
201
|
-
<tr:>
|
202
|
-
<if test="&can_view?">
|
203
|
-
<td><a/></td><td><delete-button/></td>
|
204
|
-
</if>
|
205
|
-
</tr>
|
206
|
-
</table>
|
207
|
-
|
208
|
-
<nav param="bottom-pagination-nav"><page-nav param/></nav>
|
209
|
-
|
210
|
-
<nav if="&Hobo.simple_has_many_association?(@association)" param="new-link">
|
211
|
-
<a to="&@association" action="new"/>
|
212
|
-
</nav>
|
213
|
-
</content-body>
|
214
|
-
</page-for-show-collection>
|
215
|
-
</def>
|
216
|
-
|
217
|
-
|
218
|
-
<def tag="login-page" attrs="remember-me">
|
219
|
-
<page title="Log In" merge>
|
220
|
-
<body: class="login-page" param/>
|
221
|
-
<nav: replace/>
|
222
|
-
<content-header: param>
|
223
|
-
<heading param>Log In</heading>
|
224
|
-
</content-header>
|
225
|
-
|
226
|
-
<content-body: param>
|
227
|
-
<form action="&request.request_uri" param>
|
228
|
-
<labelled-item-list>
|
229
|
-
<labelled-item>
|
230
|
-
<item-label param="login-label"><%= model.login_attr.to_s.titleize %></item-label>
|
231
|
-
<item-value><input type="text" name="login" id="login" param="login-input" /></item-value>
|
232
|
-
</labelled-item>
|
233
|
-
|
234
|
-
<labelled-item>
|
235
|
-
<item-label param="password-label">Password</item-label>
|
236
|
-
<item-value><input type="password" name="password" id="password" param="password-input"/></item-value>
|
237
|
-
</labelled-item>
|
238
|
-
|
239
|
-
<labelled-item if="&remember_me">
|
240
|
-
<item-label class="field-label" param="remember-me-label">Remember me:</item-label>
|
241
|
-
<item-value><input type="checkbox" name="remember_me" id="remember-me" param="remember-me-input"/></item-value>
|
242
|
-
</labelled-item>
|
243
|
-
</labelled-item-list>
|
244
|
-
<submit label='Log in' param/>
|
245
|
-
</form>
|
246
|
-
</content-body>
|
247
|
-
</page>
|
248
|
-
</def>
|
249
|
-
|
250
|
-
|
251
|
-
<def tag="signup-page">
|
252
|
-
<page title="Sign Up" merge>
|
253
|
-
<body: class="signup-page" param/>
|
254
|
-
<nav: replace/>
|
255
|
-
<content-header: param>
|
256
|
-
<heading param>Sign Up</heading>
|
257
|
-
</content-header>
|
258
|
-
|
259
|
-
<content-body: param>
|
260
|
-
<error-messages/>
|
261
|
-
<form action="&request.request_uri" param>
|
262
|
-
<field-list fields="login, password, password_confirmation" param>
|
263
|
-
<password-confirmation-label:>Confirm Password</password-confirmation-label>
|
264
|
-
</field-list>
|
265
|
-
|
266
|
-
<submit label='Sign Up'/>
|
267
|
-
</form>
|
268
|
-
</content-body>
|
269
|
-
|
270
|
-
</page>
|
271
|
-
</def>
|
272
|
-
|
273
|
-
|
274
|
-
<def tag="permission-denied-page">
|
275
|
-
<page merge>
|
276
|
-
<content-header: param>
|
277
|
-
<heading param>That operation is not allowed</heading>
|
278
|
-
</content-header>
|
279
|
-
</page>
|
280
|
-
</def>
|
281
|
-
|
282
|
-
<def tag="not-found-page">
|
283
|
-
<page merge>
|
284
|
-
<content-header: param>
|
285
|
-
<heading param>The page you were looking for could not be found</heading>
|
286
|
-
</content-header>
|
287
|
-
</page>
|
288
|
-
</def>
|
289
|
-
|
290
|
-
<def tag="doctype" attrs="version"><%=
|
291
|
-
case version.upcase
|
292
|
-
when "HTML 4.01 STRICT"
|
293
|
-
'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" ' +
|
294
|
-
'"http://www.w3.org/TR/html4/strict.dtd">'
|
295
|
-
when "HTML 4.01 TRANSITIONAL"
|
296
|
-
'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" ' +
|
297
|
-
'"http://www.w3.org/TR/html4/loose.dtd">'
|
298
|
-
when "XHTML 1.0 STRICT"
|
299
|
-
'!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" ' +
|
300
|
-
'"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'
|
301
|
-
when "XHTML 1.0 TRANSITIONAL"
|
302
|
-
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ' +
|
303
|
-
'"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'
|
304
|
-
when "XHTML 1.1"
|
305
|
-
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" ' +
|
306
|
-
'"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">'
|
307
|
-
end
|
308
|
-
%></def>
|
309
|
-
|
310
|
-
<def tag="stylesheet" attrs="name, media">
|
311
|
-
<repeat with="&comma_split(name)">
|
312
|
-
<link href="#{base_url}/stylesheets/#{this}.css" media="#{ media || 'all' }"
|
313
|
-
rel="stylesheet" type="text/css" />
|
314
|
-
</repeat>
|
315
|
-
</def>
|
316
|
-
|
317
|
-
<def tag="javascript" attrs="name">
|
318
|
-
<if test="&name.is_a?(Symbol)">
|
319
|
-
<%= javascript_include_tag name %>
|
320
|
-
</if>
|
321
|
-
<else>
|
322
|
-
<repeat with="&comma_split(name)">
|
323
|
-
<%= javascript_include_tag this %>
|
324
|
-
</repeat>
|
325
|
-
</else>
|
326
|
-
</def>
|
327
|
-
|
328
|
-
<def tag="flash-message" attrs="type">
|
329
|
-
<% type = type ? type.to_sym : :notice %>
|
330
|
-
<div class="flash #{type}" if="&flash[type]" merge-attrs><%= flash[type] %></div>
|
331
|
-
</def>
|
332
|
-
|
333
|
-
<def tag="ajax-progress">
|
334
|
-
<div id="ajax-progress">
|
335
|
-
<div>
|
336
|
-
<span id="ajax-progress-text"></span>
|
337
|
-
</div>
|
338
|
-
</div>
|
339
|
-
</def>
|
340
|
-
|
341
|
-
|