sunrise-cms 0.5.0.rc5 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. data/app/assets/stylesheets/sunrise/customize.css +55 -1
  2. data/app/controllers/sunrise/manager_controller.rb +0 -1
  3. data/app/views/sunrise/manager/show.html.erb +1 -1
  4. data/lib/generators/sunrise/templates/models/sunrise/sunrise_structure.rb +1 -1
  5. data/lib/sunrise/config/model.rb +0 -16
  6. data/lib/sunrise/models/asset.rb +1 -1
  7. data/lib/sunrise/version.rb +1 -1
  8. data/spec/dummy/log/test.log +7053 -0
  9. metadata +5 -73
  10. data/spec/tmp/app/models/defaults/ability.rb +0 -18
  11. data/spec/tmp/app/models/defaults/asset.rb +0 -7
  12. data/spec/tmp/app/models/defaults/attachment_file.rb +0 -5
  13. data/spec/tmp/app/models/defaults/avatar.rb +0 -7
  14. data/spec/tmp/app/models/defaults/picture.rb +0 -7
  15. data/spec/tmp/app/models/defaults/position_type.rb +0 -7
  16. data/spec/tmp/app/models/defaults/role_type.rb +0 -8
  17. data/spec/tmp/app/models/defaults/settings.rb +0 -3
  18. data/spec/tmp/app/models/defaults/structure.rb +0 -9
  19. data/spec/tmp/app/models/defaults/structure_type.rb +0 -9
  20. data/spec/tmp/app/models/defaults/user.rb +0 -13
  21. data/spec/tmp/app/models/sunrise/sunrise_navigation.rb +0 -14
  22. data/spec/tmp/app/models/sunrise/sunrise_page.rb +0 -10
  23. data/spec/tmp/app/models/sunrise/sunrise_structure.rb +0 -35
  24. data/spec/tmp/app/models/sunrise/sunrise_user.rb +0 -50
  25. data/spec/tmp/app/uploaders/attachment_file_uploader.rb +0 -5
  26. data/spec/tmp/app/uploaders/avatar_uploader.rb +0 -15
  27. data/spec/tmp/app/uploaders/picture_uploader.rb +0 -15
  28. data/spec/tmp/app/views/layouts/application.html.erb +0 -22
  29. data/spec/tmp/app/views/pages/show.html.erb +0 -2
  30. data/spec/tmp/app/views/shared/_notice.html.erb +0 -17
  31. data/spec/tmp/config/application.rb +0 -63
  32. data/spec/tmp/config/database.yml.sample +0 -34
  33. data/spec/tmp/config/initializers/sunrise.rb +0 -18
  34. data/spec/tmp/config/logrotate-config.sample +0 -9
  35. data/spec/tmp/config/nginx-config.sample +0 -99
  36. data/spec/tmp/config/routes.rb +0 -9
  37. data/spec/tmp/db/seeds.rb +0 -31
  38. data/spec/tmp/spec/controllers/pages_controller_spec.rb +0 -22
  39. data/spec/tmp/spec/controllers/welcome_controller_spec.rb +0 -18
  40. data/spec/tmp/spec/factories/structure_factory.rb +0 -22
  41. data/spec/tmp/spec/factories/user_factory.rb +0 -61
  42. data/spec/tmp/spec/spec_helper.rb +0 -37
  43. 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
 
@@ -1,4 +1,4 @@
1
- <div class="wrapper without-panel">
1
+ <div class="wrapper without-panel" style="padding-top:193px;line-height:2;">
2
2
  <div class="edit-bl">
3
3
  <div class="bot-bg">
4
4
  <div class="block-title"><%= @record.send(abstract_model.config.object_label_method) %>:</div>
@@ -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, :as => :boolean
27
+ field :is_visible
28
28
 
29
29
  group :meta_tags, :holder => :sidebar do
30
30
  field :tag_title
@@ -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
@@ -119,7 +119,7 @@ module Sunrise
119
119
  end
120
120
 
121
121
  def uploader_can?(action, request)
122
- ability = Ability.new(request.env['warden'].user)
122
+ ability = ::Ability.new(request.env['warden'].user)
123
123
  ability.can? action.to_sym, self
124
124
  end
125
125
 
@@ -1,3 +1,3 @@
1
1
  module Sunrise
2
- VERSION = "0.5.0.rc5".freeze
2
+ VERSION = "0.5.0".freeze
3
3
  end