hobo 2.0.0.pre5 → 2.0.0.pre6
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES-1.4.txt +11 -2
- data/CHANGES-2.0.markdown +11 -2
- data/VERSION +1 -1
- data/app/helpers/hobo_route_helper.rb +20 -11
- data/lib/generators/hobo/i18n/templates/hobo.es.yml +8 -8
- data/lib/generators/hobo/install_default_plugins/install_default_plugins_generator.rb +1 -1
- data/lib/hobo/controller/model.rb +1 -1
- data/lib/hobo/rapid/generators/rapid/pages.dryml.erb +183 -205
- metadata +8 -8
data/CHANGES-1.4.txt
CHANGED
@@ -595,7 +595,7 @@ Examples:
|
|
595
595
|
|
596
596
|
<form ajax hide="drop" show="&['slide', nil, 1000, 'alert(done);']"/>
|
597
597
|
|
598
|
-
These
|
598
|
+
These default effect is "no effect". They may be overridden by passing options to the page-script parameter of `<page>`:
|
599
599
|
|
600
600
|
<extend tag="page">
|
601
601
|
<old-page merge>
|
@@ -603,7 +603,11 @@ These two options have global defaults which are TBD. They may be overridden by
|
|
603
603
|
</old-page>
|
604
604
|
</extend>
|
605
605
|
|
606
|
-
|
606
|
+
If, after changing the default you wish to disable effects on one specific ajax element, pass false:
|
607
|
+
|
608
|
+
<form ajax hide="&false" show="&false" ...
|
609
|
+
|
610
|
+
Note that these effects require jQuery-UI. You will get Javascript errors if you attempt to use effects and do not have jQuery-UI installed.
|
607
611
|
|
608
612
|
### spinner options
|
609
613
|
{.todo}
|
@@ -721,6 +725,11 @@ to press 'return' to initiate the search. This should be easy to fix
|
|
721
725
|
in hjq-live-search.js -- the hard part will probably be in doing it in
|
722
726
|
a way that works in all possible browsers.
|
723
727
|
|
728
|
+
`live-search` requires an implementation of
|
729
|
+
`<search-results-container>`. Both hobo-jquery-ui and
|
730
|
+
hobo-bootstrap-ui provide implementations of
|
731
|
+
`<search-results-container>`.
|
732
|
+
|
724
733
|
### hot-input
|
725
734
|
{.done}
|
726
735
|
|
data/CHANGES-2.0.markdown
CHANGED
@@ -595,7 +595,7 @@ Examples:
|
|
595
595
|
|
596
596
|
<form ajax hide="drop" show="&['slide', nil, 1000, 'alert(done);']"/>
|
597
597
|
|
598
|
-
These
|
598
|
+
These default effect is "no effect". They may be overridden by passing options to the page-script parameter of `<page>`:
|
599
599
|
|
600
600
|
<extend tag="page">
|
601
601
|
<old-page merge>
|
@@ -603,7 +603,11 @@ These two options have global defaults which are TBD. They may be overridden by
|
|
603
603
|
</old-page>
|
604
604
|
</extend>
|
605
605
|
|
606
|
-
|
606
|
+
If, after changing the default you wish to disable effects on one specific ajax element, pass false:
|
607
|
+
|
608
|
+
<form ajax hide="&false" show="&false" ...
|
609
|
+
|
610
|
+
Note that these effects require jQuery-UI. You will get Javascript errors if you attempt to use effects and do not have jQuery-UI installed.
|
607
611
|
|
608
612
|
### spinner options
|
609
613
|
{.todo}
|
@@ -721,6 +725,11 @@ to press 'return' to initiate the search. This should be easy to fix
|
|
721
725
|
in hjq-live-search.js -- the hard part will probably be in doing it in
|
722
726
|
a way that works in all possible browsers.
|
723
727
|
|
728
|
+
`live-search` requires an implementation of
|
729
|
+
`<search-results-container>`. Both hobo-jquery-ui and
|
730
|
+
hobo-bootstrap-ui provide implementations of
|
731
|
+
`<search-results-container>`.
|
732
|
+
|
724
733
|
### hot-input
|
725
734
|
{.done}
|
726
735
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.0.0.
|
1
|
+
2.0.0.pre6
|
@@ -95,6 +95,15 @@ module HoboRouteHelper
|
|
95
95
|
options, params = options.partition_hash([:subsite, :method, :format])
|
96
96
|
options[:subsite] ||= self.subsite
|
97
97
|
|
98
|
+
action ||= case options[:method].to_s
|
99
|
+
when 'put'; :update
|
100
|
+
when 'post'; :create
|
101
|
+
when 'delete'; :destroy
|
102
|
+
else; obj.is_a?(Class) || obj.respond_to?(:length) ? :index : :show
|
103
|
+
end
|
104
|
+
|
105
|
+
params[:action] = action unless action.in?(IMPLICIT_ACTIONS)
|
106
|
+
|
98
107
|
if obj.respond_to?(:member_class)
|
99
108
|
if obj.respond_to?(:origin) && obj.origin
|
100
109
|
# Asking for URL of a collection, e.g. category/1/adverts or category/1/adverts/new
|
@@ -103,6 +112,7 @@ module HoboRouteHelper
|
|
103
112
|
owner_name = owner_name.singularize if refl.macro == :has_many
|
104
113
|
poly = [owner_name, obj.member_class]
|
105
114
|
params[:"#{owner_name}_id"] = obj.origin
|
115
|
+
action = "#{action}_for_#{owner_name}"
|
106
116
|
else
|
107
117
|
poly = [obj.member_class]
|
108
118
|
end
|
@@ -112,21 +122,20 @@ module HoboRouteHelper
|
|
112
122
|
|
113
123
|
poly = [options[:subsite]] + poly if options[:subsite]
|
114
124
|
|
115
|
-
action ||= case options[:method].to_s
|
116
|
-
when 'put'; :update
|
117
|
-
when 'post'; :create
|
118
|
-
when 'delete'; :destroy
|
119
|
-
else; obj.is_a?(Class) ? :index : :show
|
120
|
-
end
|
121
|
-
|
122
|
-
params[:action] = action unless action.in?(IMPLICIT_ACTIONS)
|
123
|
-
|
124
125
|
begin
|
125
126
|
url = polymorphic_path(poly, params)
|
126
127
|
# validate URL, since polymorphic URL may return a URL for a
|
127
128
|
# different method
|
128
|
-
|
129
|
-
url
|
129
|
+
# use starts_with because recognize path may return new_for_owner, for example
|
130
|
+
recognized_params = Rails.application.routes.recognize_path(url, {:method => options[:method]})
|
131
|
+
if recognized_params[:action] == action.to_s
|
132
|
+
url
|
133
|
+
else
|
134
|
+
# we get here if the action name is modified: do_signup, etc.
|
135
|
+
recognized_params[:action] = action
|
136
|
+
url2 = url_for(recognized_params)
|
137
|
+
url==url2 ? url : nil
|
138
|
+
end
|
130
139
|
rescue NoMethodError => e # raised if polymorphic_url fails
|
131
140
|
nil
|
132
141
|
rescue ArgumentError => e # raised from polymorphic_url
|
@@ -13,7 +13,7 @@ es:
|
|
13
13
|
# if you uncomment the following you will loose the automatic selection of dinamically pluralized nav-tabs
|
14
14
|
# if you need a different title you should implement a different way to select the tab on your own
|
15
15
|
#title: "Indice %{model}"
|
16
|
-
heading: "
|
16
|
+
heading: "Índice %{model}"
|
17
17
|
|
18
18
|
new:
|
19
19
|
title: "Nuevo Registro de %{model}"
|
@@ -52,7 +52,7 @@ es:
|
|
52
52
|
name: "Nombre"
|
53
53
|
password: "Contraseña"
|
54
54
|
remember_me: "Recuerda mis datos"
|
55
|
-
login: "
|
55
|
+
login: "Identificación"
|
56
56
|
signup: "Inscripción"
|
57
57
|
forgot_password: &forgot_password "¿Contraseña olvidada?"
|
58
58
|
|
@@ -71,7 +71,7 @@ es:
|
|
71
71
|
forgot_password_sent:
|
72
72
|
title: "Contraseña olvidada - Correo Eléctronico enviado"
|
73
73
|
heading: "Contraseña olvidada - Correo Eléctronico enviado"
|
74
|
-
text: "El mensaje con las
|
74
|
+
text: "El mensaje con las instrucciones para generar una nueva contraseña ha sido enviado a %{email_address}
|
75
75
|
Si no lo recibe, por favor verifique el filtro anti-spam."
|
76
76
|
|
77
77
|
account_disabled_page:
|
@@ -117,13 +117,13 @@ es:
|
|
117
117
|
creator:
|
118
118
|
error: "El creator %{name} no se pudo executar.\n%{errors}"
|
119
119
|
transition:
|
120
|
-
error: "La transición %{name} no se pudo
|
120
|
+
error: "La transición %{name} no se pudo ejecutar.\n%{errors}"
|
121
121
|
update:
|
122
122
|
no_attribute_error: "Ninguna actualización esta especificada en los parámetros"
|
123
123
|
success: "Los cambios a %{model} han sido guardados"
|
124
124
|
error: "Ha habido un problema con ese cambio.\n%{errors}"
|
125
125
|
destroy:
|
126
|
-
success: "La borradura de %{model} ha sido
|
126
|
+
success: "La borradura de %{model} ha sido tenido éxito."
|
127
127
|
signup:
|
128
128
|
success: "¡Gracias por inscribirse!"
|
129
129
|
must_activate: "Tiene que activar la cuenta antes de iniciar la sesión. Por favor verifique su correo eléctronico."
|
@@ -135,7 +135,7 @@ es:
|
|
135
135
|
permission_denied: "¡Permiso denegado!"
|
136
136
|
not_found: "La página solicitada no se encuentra."
|
137
137
|
unauthenticated: "No se pudo autenticar."
|
138
|
-
validate_password: "debe contener
|
138
|
+
validate_password: "debe contener al menos 6 caracteres, letras mayúsculas y minúsculas"
|
139
139
|
current_password_is_not_correct: "no está correcta"
|
140
140
|
you_are_site_admin: "Ahora usted es el administrador del sitio."
|
141
141
|
you_signed_up: "Usted se inscribió."
|
@@ -154,7 +154,7 @@ es:
|
|
154
154
|
# you better define the heading.* in the specific collection namespace
|
155
155
|
#heading:
|
156
156
|
add_form_heading: "Añadir %{model}"
|
157
|
-
empty_message: "
|
157
|
+
empty_message: "Ningún registro"
|
158
158
|
|
159
159
|
# default hobo form translation
|
160
160
|
form:
|
@@ -178,7 +178,7 @@ es:
|
|
178
178
|
live_search:
|
179
179
|
label: "Buscar"
|
180
180
|
results_label: "Buscar Resultados"
|
181
|
-
close_button: "
|
181
|
+
close_button: "cerrar"
|
182
182
|
no_results: "No se encuentran resultados."
|
183
183
|
|
184
184
|
dev_user_changer:
|
@@ -18,7 +18,7 @@ module Hobo
|
|
18
18
|
say "Installing hobo_jquery plugin..."
|
19
19
|
install_plugin_helper('hobo_jquery', nil, opts.merge(:skip_gem => true))
|
20
20
|
say "Installing hobo_jquery_ui plugin..."
|
21
|
-
install_plugin_helper('hobo_jquery_ui', nil, opts
|
21
|
+
install_plugin_helper('hobo_jquery_ui', nil, opts)
|
22
22
|
|
23
23
|
say "Installing #{opts[:theme]} theme..."
|
24
24
|
inject_css_require("jquery-ui/#{opts[:ui_theme]}", opts[:subsite], nil)
|
@@ -591,7 +591,7 @@ module Hobo
|
|
591
591
|
end
|
592
592
|
|
593
593
|
|
594
|
-
def create_response(new_action, options={})
|
594
|
+
def create_response(new_action=:new, options={})
|
595
595
|
valid = valid? # valid? can be expensive
|
596
596
|
if params[:render]
|
597
597
|
if (params[:render_options] && params[:render_options][:errors_ok]) || valid
|
@@ -32,54 +32,52 @@ model_key = model.to_s.underscore
|
|
32
32
|
<page merge title="#{ht '<%= model_key %>.index.title', :default=>[model.model_name.human(:count=>100)] }">
|
33
33
|
<body: class="index-page <%= model_class %>" param/>
|
34
34
|
|
35
|
-
<content: param>
|
36
|
-
<
|
37
|
-
<
|
38
|
-
<
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
<
|
44
|
-
<
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
<section param="content-body">
|
35
|
+
<content-header: param>
|
36
|
+
<h2 param="heading">
|
37
|
+
<ht key="<%= model_key %>.index.heading">
|
38
|
+
<model-name-human model="&model"/>
|
39
|
+
</ht>
|
40
|
+
</h2>
|
41
|
+
|
42
|
+
<p param="count" if>
|
43
|
+
<ht key="<%= model_key %>.collection.count" count="&collection_count">
|
44
|
+
<count summary/>
|
45
|
+
</ht>
|
46
|
+
</p>
|
47
|
+
</content-header:>
|
48
|
+
|
49
|
+
<content-body: param>
|
51
50
|
<% if new_link -%>
|
52
|
-
|
53
|
-
|
54
|
-
|
51
|
+
<a action="new" to="&model" param="new-link">
|
52
|
+
<ht key="<%= model_key %>.actions.new">New <%=model_name %></ht>
|
53
|
+
</a>
|
55
54
|
<% end -%>
|
56
55
|
|
57
56
|
<% if view_hints.paginate? -%>
|
58
|
-
|
57
|
+
<page-nav param="top-page-nav"/>
|
59
58
|
|
60
59
|
<% end -%>
|
61
60
|
<% if view_hints.sortable? -%>
|
62
|
-
|
61
|
+
<sortable-collection param="collection"/>
|
63
62
|
<% else -%>
|
64
|
-
|
63
|
+
<collection param/>
|
65
64
|
<% end -%>
|
66
65
|
|
67
66
|
<% if view_hints.paginate? -%>
|
68
|
-
|
67
|
+
<page-nav param="bottom-page-nav"/>
|
69
68
|
|
70
69
|
<% end -%>
|
71
70
|
|
72
71
|
<% if new_form -%>
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
72
|
+
<div param="new-form">
|
73
|
+
<h3 param="new-form-heading">
|
74
|
+
<ht key="<%= model_key %>.form.new.heading">New <%= model_name %></ht>
|
75
|
+
</h3>
|
76
|
+
<form with="&@invalid_record || new_for_current_user(<%= model %>)" param/>
|
77
|
+
</div>
|
79
78
|
|
80
79
|
<% end -%>
|
81
|
-
|
82
|
-
</content:>
|
80
|
+
</content-body:>
|
83
81
|
</page>
|
84
82
|
</def>
|
85
83
|
|
@@ -88,21 +86,19 @@ model_key = model.to_s.underscore
|
|
88
86
|
<page merge title="#{ht '<%= model_key %>.new.title', :default=>[' New <%= sq_escape(model_name) %>'] }">
|
89
87
|
<body: class="new-page <%= model_class %>" param/>
|
90
88
|
|
91
|
-
<content: param>
|
92
|
-
<
|
93
|
-
<
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
<
|
101
|
-
<
|
102
|
-
|
103
|
-
|
104
|
-
</section>
|
105
|
-
</content:>
|
89
|
+
<content-header: param>
|
90
|
+
<h2 param="heading">
|
91
|
+
<ht key="<%= model_key %>.new.heading">
|
92
|
+
New <%= model_name %>
|
93
|
+
</ht>
|
94
|
+
</h2>
|
95
|
+
</content-header:>
|
96
|
+
|
97
|
+
<content-body: param>
|
98
|
+
<form param>
|
99
|
+
<submit: label="#{ht '<%= model_key %>.actions.create', :default=>['Create <%= sq_escape(model_name) %>']}"/>
|
100
|
+
</form>
|
101
|
+
</content-body:>
|
106
102
|
</page>
|
107
103
|
</def>
|
108
104
|
|
@@ -135,113 +131,105 @@ unless model.view_hints.secondary_children.empty?
|
|
135
131
|
end
|
136
132
|
-%>
|
137
133
|
<def tag="show-page" for="<%= model.name %>">
|
138
|
-
<page merge title="#{ht '<%=model_key %>.show.title', :default=>['<%=sq_escape model_name %>'], :name => name(:no_wrapper => true) }">
|
134
|
+
<page merge title="#{ht '<%=model_key %>.show.title', :default=>['<%=sq_escape model_name %>'], :name => name(:no_wrapper => true) }"<%= ' without-aside' unless aside_collections %> >
|
139
135
|
|
140
136
|
<body: class="show-page <%= model_class %>" param/>
|
141
137
|
|
142
|
-
<content: param>
|
143
|
-
<% if aside_collections -%>
|
144
|
-
<section-group>
|
145
|
-
<section param="main-content">
|
146
|
-
<% end -%>
|
147
|
-
<header param="content-header">
|
138
|
+
<content-header: param>
|
148
139
|
<% if back_link -%>
|
149
|
-
|
140
|
+
<a:<%= back_link %> param="parent-link">« <ht key="<%= model_key %>.actions.back_to_parent" parent="<%= back_link_human_name %>" name="&this">Back to <name/></ht></a:<%= back_link %>>
|
150
141
|
<% end -%>
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
142
|
+
<h2 param="heading">
|
143
|
+
<ht key="<%= model_key %>.show.heading" name="#{name(:no_wrapper => true)}">
|
144
|
+
<%= model_name %> <name/>
|
145
|
+
</ht>
|
146
|
+
</h2>
|
156
147
|
<% if boolean_fields -%>
|
157
148
|
|
158
|
-
|
149
|
+
<record-flags fields="<%= boolean_fields * ', ' %>" param/>
|
159
150
|
<% end -%>
|
160
151
|
<% if creator_link -%>
|
161
152
|
|
162
|
-
|
153
|
+
<a:<%= model.creator_attribute %> param="creator-link"/>
|
163
154
|
<% elsif creator -%>
|
164
155
|
|
165
|
-
|
156
|
+
<view:get-creator param="creator-name"/>
|
166
157
|
<% end -%>
|
167
158
|
<% if edit_link -%>
|
168
159
|
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
160
|
+
<a action="edit" if="&can_edit?" param="edit-link">
|
161
|
+
<ht key="<%= model_key %>.actions.edit" name="#{name(:no_wrapper => true)}">
|
162
|
+
Edit <%= model_name %>
|
163
|
+
</ht>
|
164
|
+
</a>
|
174
165
|
<% end -%>
|
175
|
-
|
166
|
+
</content-header:>
|
176
167
|
|
177
|
-
|
168
|
+
<content-body: param>
|
178
169
|
<% if main_content -%>
|
179
|
-
|
170
|
+
<view:<%= main_content %> param="description" />
|
180
171
|
<% end -%>
|
181
172
|
<% if show_fields.any? -%>
|
182
|
-
|
173
|
+
<field-list fields="<%= show_fields * ', ' %>" param/>
|
183
174
|
<% end -%>
|
184
175
|
<% if collection -%>
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
176
|
+
<section param="collection-section">
|
177
|
+
<h3 param="collection-heading">
|
178
|
+
<ht key="<%= collection_class.to_s.underscore %>.collection.heading" count="&this.<%= collection.to_s %>.count" >
|
179
|
+
<human-collection-name collection="<%= collection %>" your/>
|
180
|
+
</ht>
|
181
|
+
</h3>
|
191
182
|
|
192
183
|
<% if sortable_collection?(collection) -%>
|
193
|
-
|
184
|
+
<sortable-collection:<%= collection %> param="collection"/>
|
194
185
|
<% else -%>
|
195
|
-
|
186
|
+
<collection:<%= collection %> param/>
|
196
187
|
<% end -%>
|
197
188
|
<% if add_link -%>
|
198
189
|
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
190
|
+
<a:<%= collection %> action="new" if="&can_create?(@<%= model.name.underscore %>.<%= collection %>)" param="new-link">
|
191
|
+
<ht key="<%= collection_class.to_s.underscore %>.actions.new" count="1">
|
192
|
+
New <%= collection_class.to_s.titleize %>
|
193
|
+
</ht>
|
194
|
+
</a:<%= collection %>>
|
204
195
|
<% elsif add_form -%>
|
205
196
|
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
197
|
+
<section param="add-to-collection" if="&can_create?(@<%= model.name.underscore %>.<%= collection %>)">
|
198
|
+
<h3 param="add-form-heading">
|
199
|
+
<ht key="<%= collection_class.to_s.underscore %>.collection.add_form_heading" count="1">
|
200
|
+
Add <%= a_or_an collection_class.to_s.titleize %>
|
201
|
+
</ht>
|
202
|
+
</h3>
|
203
|
+
<form with="&@<%= collection_class.name.underscore %> || new_for_current_user(@<%= model.name.underscore %>.<%= collection %>)" owner="<%= owner %>" without-cancel param>
|
204
|
+
<field-list: skip="<%= owner %>"/>
|
205
|
+
<submit: label="#{ht '<%= sq_escape collection_class.to_s.underscore %>.actions.add', :default=>['Add'] }"/>
|
206
|
+
</form>
|
207
|
+
</section>
|
217
208
|
<% end -%>
|
218
|
-
|
209
|
+
</section>
|
219
210
|
<% end -%>
|
220
|
-
|
211
|
+
</content-body:>
|
221
212
|
<% if aside_collections -%>
|
222
|
-
</section>
|
223
213
|
|
224
|
-
|
214
|
+
<aside: param>
|
225
215
|
<% for refl, reverse_refl in aside_collections -%>
|
226
216
|
<% if reverse_refl && linkable?(refl.klass, :"index_for_#{reverse_refl.name}") -%>
|
227
|
-
|
228
|
-
|
229
|
-
|
217
|
+
<collection-preview:<%= refl.name %>.recent param="<%= refl.name %>-preview">
|
218
|
+
<heading-content:><human-collection-name with="&this.origin" collection="<%= refl.name %>" your/></heading-content:>
|
219
|
+
</collection-preview:<%= refl.name %>.recent>
|
230
220
|
<% else -%>
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
221
|
+
<section param="<%= refl.name %>-collection-section">
|
222
|
+
<h3 param="<%= refl.name %>-collection-heading">
|
223
|
+
<ht key="<%= refl.klass.to_s.underscore %>.collection.heading" count="&this.<%= refl.name.to_s %>.count" >
|
224
|
+
<human-collection-name collection="<%= refl.name %>" your/>
|
225
|
+
</ht>
|
226
|
+
</h3>
|
227
|
+
<collection:<%= refl.name %> param="<%= refl.name %>-collection"/>
|
228
|
+
</section>
|
239
229
|
<% end -%>
|
240
230
|
<% end -%>
|
241
|
-
|
242
|
-
</section-group>
|
231
|
+
</aside:>
|
243
232
|
<% end -%>
|
244
|
-
</content:>
|
245
233
|
|
246
234
|
</page>
|
247
235
|
</def>
|
@@ -255,20 +243,18 @@ name_attribute = model.name_attribute
|
|
255
243
|
|
256
244
|
<body: class="edit-page <%= model_class %>" param/>
|
257
245
|
|
258
|
-
<content
|
259
|
-
<
|
260
|
-
<
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
</section>
|
246
|
+
<content-header: param>
|
247
|
+
<h2 param="heading">
|
248
|
+
<ht key="<%= model_key %>.edit.heading" name="#{name(:no_wrapper => true)}">
|
249
|
+
Edit <%= model_name %>
|
250
|
+
</ht>
|
251
|
+
</h2>
|
252
|
+
<delete-button label="#{ht '<%= model_key %>.actions.delete', :default=>['Remove This <%= sq_escape model_name %>']}" param/>
|
253
|
+
</content-header:>
|
267
254
|
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
</content:>
|
255
|
+
<content-body: param>
|
256
|
+
<form param/>
|
257
|
+
</content-body:>
|
272
258
|
|
273
259
|
</page>
|
274
260
|
</def>
|
@@ -292,48 +278,46 @@ new_link = :new.in?(actions)
|
|
292
278
|
<def tag="index-for-<%= owner.dasherize %>-page" for="<%= model.name %>">
|
293
279
|
<page merge title="#{ht '<%= model_key %>.index_for_owner.title', :count=>100, :default=>['<%= sq_escape(model_name(:plural)) %> for']} #{name :with => @<%= owner %>, :no_wrapper => true}">
|
294
280
|
<body: class="index-for-owner-page <%= owner.dasherize %> <%= model_class %>" param/>
|
295
|
-
<content: param>
|
296
|
-
<header param="content-header">
|
281
|
+
<content-header: param>
|
297
282
|
<% if linkable_owner -%>
|
298
|
-
|
299
|
-
|
300
|
-
|
283
|
+
<div param="back-to">
|
284
|
+
<t key="hobo.actions.back">Back to</t> <a with="&@<%= owner %>"/>
|
285
|
+
</div>
|
301
286
|
<% end -%>
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
287
|
+
<h2 param="heading" if="&@owner">
|
288
|
+
<ht key="<%= model_key %>.index_for_owner.heading" count="&@<%= owner %>.<%= collection_name %>.count">
|
289
|
+
<human-collection-name with="&@<%= owner %>" collection="<%= collection_name %>" your/>
|
290
|
+
</ht>
|
291
|
+
</h2>
|
307
292
|
<% unless owner_is_user %>
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
293
|
+
<h3 param="subheading">
|
294
|
+
<ht key="<%= model_key %>.index_for_owner.subheading">
|
295
|
+
For:
|
296
|
+
</ht>
|
297
|
+
<<%= owner_tag %> with="&@<%= owner %>"/>
|
298
|
+
</h3>
|
314
299
|
<% end -%>
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
300
|
+
<p param="count" if>
|
301
|
+
<ht key="<%= model_key %>.collection.count" count="&collection_count">
|
302
|
+
<count summary/>
|
303
|
+
</ht>
|
304
|
+
</p>
|
305
|
+
</content-header:>
|
306
|
+
|
307
|
+
<content-body: param>
|
323
308
|
<% if new_link -%>
|
324
|
-
|
325
|
-
|
326
|
-
|
309
|
+
<a action="new" to="&@<%= owner %>.<%= collection_name %>" param="new-link">
|
310
|
+
<ht key="<%= model_key %>.actions.new" >New <%=model_name %></ht>
|
311
|
+
</a>
|
327
312
|
|
328
313
|
<% end -%>
|
329
314
|
|
330
|
-
|
315
|
+
<page-nav param="top-page-nav"/>
|
331
316
|
|
332
|
-
|
317
|
+
<collection param/>
|
333
318
|
|
334
|
-
|
335
|
-
|
336
|
-
</content:>
|
319
|
+
<page-nav param="bottom-page-nav"/>
|
320
|
+
</content-body:>
|
337
321
|
</page>
|
338
322
|
</def>
|
339
323
|
<% end -%>
|
@@ -345,28 +329,26 @@ new_link = :new.in?(actions)
|
|
345
329
|
<page merge title="#{ht '<%=model_key %>.new_for_owner.title', :default=>['New <%= sq_escape model_name %> for']} #{name :with => @<%= owner %>}">
|
346
330
|
<body: class="new-for-owner-page <% owner.dasherize %> <%= model_class %>" param/>
|
347
331
|
|
348
|
-
<content: param>
|
349
|
-
<
|
350
|
-
<
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
<
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
<
|
364
|
-
<
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
</section>
|
369
|
-
</content:>
|
332
|
+
<content-header: param>
|
333
|
+
<h2 param="heading">
|
334
|
+
<ht key="<%= model_key %>.new_for_owner.heading">
|
335
|
+
New <%= collection_name.singularize.titleize %>
|
336
|
+
</ht>
|
337
|
+
</h2>
|
338
|
+
<h3 param="subheading">
|
339
|
+
<ht key="<%= model_key %>.new_for_owner.subheading">
|
340
|
+
For:
|
341
|
+
</ht>
|
342
|
+
<<%= owner_tag %> with="&@<%= owner %>"/>
|
343
|
+
</h3>
|
344
|
+
</content-header:>
|
345
|
+
|
346
|
+
<content-body: param>
|
347
|
+
<form owner="<%= owner %>" method="post" param>
|
348
|
+
<field-list: skip="<%= owner %>"/>
|
349
|
+
<submit: label="#{ht '<%=model_key %>.actions.create', :default=>['Create <%= sq_escape model_name %>']}"/>
|
350
|
+
</form>
|
351
|
+
</content-body:>
|
370
352
|
</page>
|
371
353
|
</def>
|
372
354
|
<% end -%>
|
@@ -381,19 +363,17 @@ new_link = :new.in?(actions)
|
|
381
363
|
|
382
364
|
<body: class="lifecycle-start-page <%= creator.dasherize %>-page" param/>
|
383
365
|
|
384
|
-
<content: param>
|
385
|
-
<
|
386
|
-
<
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
</header>
|
366
|
+
<content-header: param>
|
367
|
+
<h2 param="heading">
|
368
|
+
<ht key="<%= model_key %>.<%= creator.underscore %>.heading">
|
369
|
+
<%= creator.titleize %>
|
370
|
+
</ht>
|
371
|
+
</h2>
|
372
|
+
</content-header:>
|
392
373
|
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
</content:>
|
374
|
+
<content-body: param>
|
375
|
+
<<%= creator.dasherize %>-form param="form"/>
|
376
|
+
</content-body:>
|
397
377
|
|
398
378
|
</page>
|
399
379
|
</def>
|
@@ -406,19 +386,17 @@ new_link = :new.in?(actions)
|
|
406
386
|
|
407
387
|
<body: class="lifecycle-transition-page <%= transition.dasherize -%>-page" param/>
|
408
388
|
|
409
|
-
<content
|
410
|
-
<
|
411
|
-
<
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
</section>
|
421
|
-
</content:>
|
389
|
+
<content-header: param>
|
390
|
+
<h2 param="heading">
|
391
|
+
<ht key="<%= model_key %>.<%= transition.underscore %>.heading">
|
392
|
+
<%= transition.titleize %>
|
393
|
+
</ht>
|
394
|
+
</h2>
|
395
|
+
</content-header:>
|
396
|
+
|
397
|
+
<content-body: param>
|
398
|
+
<<%= transition.dasherize %>-form param="form"/>
|
399
|
+
</content-body:>
|
422
400
|
|
423
401
|
</page>
|
424
402
|
</def>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hobo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.
|
4
|
+
version: 2.0.0.pre6
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-11-
|
12
|
+
date: 2012-11-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: hobo_support
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 2.0.0.
|
21
|
+
version: 2.0.0.pre6
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - '='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 2.0.0.
|
29
|
+
version: 2.0.0.pre6
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: hobo_fields
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -34,7 +34,7 @@ dependencies:
|
|
34
34
|
requirements:
|
35
35
|
- - '='
|
36
36
|
- !ruby/object:Gem::Version
|
37
|
-
version: 2.0.0.
|
37
|
+
version: 2.0.0.pre6
|
38
38
|
type: :runtime
|
39
39
|
prerelease: false
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -42,7 +42,7 @@ dependencies:
|
|
42
42
|
requirements:
|
43
43
|
- - '='
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version: 2.0.0.
|
45
|
+
version: 2.0.0.pre6
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
47
|
name: dryml
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
@@ -50,7 +50,7 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - '='
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: 2.0.0.
|
53
|
+
version: 2.0.0.pre6
|
54
54
|
type: :runtime
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -58,7 +58,7 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 2.0.0.
|
61
|
+
version: 2.0.0.pre6
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
63
|
name: will_paginate
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|