sunrise-cms 0.5.0.rc5 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/app/assets/stylesheets/sunrise/customize.css +55 -1
- data/app/controllers/sunrise/manager_controller.rb +0 -1
- data/app/views/sunrise/manager/show.html.erb +1 -1
- data/lib/generators/sunrise/templates/models/sunrise/sunrise_structure.rb +1 -1
- data/lib/sunrise/config/model.rb +0 -16
- data/lib/sunrise/models/asset.rb +1 -1
- data/lib/sunrise/version.rb +1 -1
- data/spec/dummy/log/test.log +7053 -0
- metadata +5 -73
- data/spec/tmp/app/models/defaults/ability.rb +0 -18
- data/spec/tmp/app/models/defaults/asset.rb +0 -7
- data/spec/tmp/app/models/defaults/attachment_file.rb +0 -5
- data/spec/tmp/app/models/defaults/avatar.rb +0 -7
- data/spec/tmp/app/models/defaults/picture.rb +0 -7
- data/spec/tmp/app/models/defaults/position_type.rb +0 -7
- data/spec/tmp/app/models/defaults/role_type.rb +0 -8
- data/spec/tmp/app/models/defaults/settings.rb +0 -3
- data/spec/tmp/app/models/defaults/structure.rb +0 -9
- data/spec/tmp/app/models/defaults/structure_type.rb +0 -9
- data/spec/tmp/app/models/defaults/user.rb +0 -13
- data/spec/tmp/app/models/sunrise/sunrise_navigation.rb +0 -14
- data/spec/tmp/app/models/sunrise/sunrise_page.rb +0 -10
- data/spec/tmp/app/models/sunrise/sunrise_structure.rb +0 -35
- data/spec/tmp/app/models/sunrise/sunrise_user.rb +0 -50
- data/spec/tmp/app/uploaders/attachment_file_uploader.rb +0 -5
- data/spec/tmp/app/uploaders/avatar_uploader.rb +0 -15
- data/spec/tmp/app/uploaders/picture_uploader.rb +0 -15
- data/spec/tmp/app/views/layouts/application.html.erb +0 -22
- data/spec/tmp/app/views/pages/show.html.erb +0 -2
- data/spec/tmp/app/views/shared/_notice.html.erb +0 -17
- data/spec/tmp/config/application.rb +0 -63
- data/spec/tmp/config/database.yml.sample +0 -34
- data/spec/tmp/config/initializers/sunrise.rb +0 -18
- data/spec/tmp/config/logrotate-config.sample +0 -9
- data/spec/tmp/config/nginx-config.sample +0 -99
- data/spec/tmp/config/routes.rb +0 -9
- data/spec/tmp/db/seeds.rb +0 -31
- data/spec/tmp/spec/controllers/pages_controller_spec.rb +0 -22
- data/spec/tmp/spec/controllers/welcome_controller_spec.rb +0 -18
- data/spec/tmp/spec/factories/structure_factory.rb +0 -22
- data/spec/tmp/spec/factories/user_factory.rb +0 -61
- data/spec/tmp/spec/spec_helper.rb +0 -37
- data/spec/tmp/spec/support/helpers/controller_macros.rb +0 -52
@@ -166,4 +166,58 @@ input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focu
|
|
166
166
|
.field_with_errors span.error {
|
167
167
|
color: #ff0000;
|
168
168
|
font-size: 12px;
|
169
|
-
}
|
169
|
+
}
|
170
|
+
|
171
|
+
div.input.check_boxes span.checkbox {
|
172
|
+
display: block;
|
173
|
+
}
|
174
|
+
|
175
|
+
div.input.check_boxes span.checkbox label {
|
176
|
+
display: inline;
|
177
|
+
}
|
178
|
+
|
179
|
+
/* Boolean checkbox */
|
180
|
+
div.input.boolean {
|
181
|
+
float: left;
|
182
|
+
}
|
183
|
+
div.input.boolean label {
|
184
|
+
margin: 0;
|
185
|
+
}
|
186
|
+
div.input.boolean {
|
187
|
+
display: block;
|
188
|
+
overflow: hidden;
|
189
|
+
margin: 0 3px 3px;
|
190
|
+
background: #f3f3f3;
|
191
|
+
border: solid 1px #dbdbdb;
|
192
|
+
border-radius: 2px;
|
193
|
+
-moz-border-radius: 2px;
|
194
|
+
padding: 0 10px;
|
195
|
+
line-height: 24px;
|
196
|
+
font-size: 10px;
|
197
|
+
color: #616161;
|
198
|
+
text-decoration: none;
|
199
|
+
font-weight: bold;
|
200
|
+
}
|
201
|
+
div.input.boolean:hover {
|
202
|
+
border: solid 1px #c6c6c6;
|
203
|
+
color: #444;
|
204
|
+
-moz-box-shadow: 0 2px 3px #e6e6e6;
|
205
|
+
-webkit-box-shadow: 0 2px 3px #e6e6e6;
|
206
|
+
box-shadow: 0 2px 3px #e6e6e6;
|
207
|
+
}
|
208
|
+
div.input.boolean:active {
|
209
|
+
border: solid 1px #b25cb9;
|
210
|
+
color: #444;
|
211
|
+
-webkit-box-shadow: none;
|
212
|
+
-moz-box-shadow: none;
|
213
|
+
box-shadow: none;
|
214
|
+
}
|
215
|
+
div.input.boolean input, div.input.boolean label {
|
216
|
+
display: block;
|
217
|
+
float: left;
|
218
|
+
}
|
219
|
+
div.input.boolean input {
|
220
|
+
margin: 5px 5px 0 0;
|
221
|
+
padding: 5px 0; /* for Opera, need to test */
|
222
|
+
}
|
223
|
+
/* End boolean checkbox */
|
@@ -93,7 +93,6 @@ module Sunrise
|
|
93
93
|
def find_model
|
94
94
|
@abstract_model = Utils.get_model(params[:model_name], params)
|
95
95
|
raise ActionController::RoutingError.new("Sunrise model #{params[:model_name]} not found") if @abstract_model.nil?
|
96
|
-
self.class.send(:add_template_helper, Sunrise::Config::Model._helpers) if @abstract_model.config.helpers?
|
97
96
|
@abstract_model
|
98
97
|
end
|
99
98
|
|
@@ -24,7 +24,7 @@ class SunriseStructure < Sunrise::AbstractModel
|
|
24
24
|
field :parent_id, :collection => lambda { Structure.nested_set_options() {|i| "#{'–' * i.depth} #{i.title}"} }, :if => lambda { |s| s.moveable? }
|
25
25
|
field :kind, :collection => lambda { StructureType.all }, :include_blank => false
|
26
26
|
field :position, :collection => lambda { PositionType.all }, :include_blank => false
|
27
|
-
field :is_visible
|
27
|
+
field :is_visible
|
28
28
|
|
29
29
|
group :meta_tags, :holder => :sidebar do
|
30
30
|
field :tag_title
|
data/lib/sunrise/config/model.rb
CHANGED
@@ -10,13 +10,10 @@ module Sunrise
|
|
10
10
|
class Model < Base
|
11
11
|
attr_reader :sections
|
12
12
|
|
13
|
-
class_attribute :_helpers
|
14
|
-
self._helpers = Module.new
|
15
13
|
|
16
14
|
def initialize(abstract_model, parent = nil, options = nil)
|
17
15
|
super
|
18
16
|
@sections ||= {}
|
19
|
-
@has_helpers = false
|
20
17
|
end
|
21
18
|
|
22
19
|
register_instance_option(:label) do
|
@@ -47,19 +44,6 @@ module Sunrise
|
|
47
44
|
@associations ||= @sections.select { |key, value| key.to_s.include?('association_') }.values
|
48
45
|
end
|
49
46
|
|
50
|
-
def helpers(&block)
|
51
|
-
if block_given?
|
52
|
-
@has_helpers = true
|
53
|
-
self.class._helpers.module_eval &block
|
54
|
-
end
|
55
|
-
|
56
|
-
self.class._helpers
|
57
|
-
end
|
58
|
-
|
59
|
-
def helpers?
|
60
|
-
@has_helpers
|
61
|
-
end
|
62
|
-
|
63
47
|
# Register accessors for all the sections in this namespace
|
64
48
|
[:list, :show, :edit, :association].each do |section|
|
65
49
|
klass = "Sunrise::Config::#{section.to_s.classify}".constantize
|
data/lib/sunrise/models/asset.rb
CHANGED
data/lib/sunrise/version.rb
CHANGED