active_leonardo 0.0.6 → 0.0.7

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.
@@ -76,7 +76,8 @@ class LeolayGenerator < Rails::Generators::Base
76
76
  template "styles/#{style_name}/stylesheets/app/_enviroment.css.scss", "app/assets/stylesheets/_enviroment.css.scss"
77
77
 
78
78
  copy_file "app/helpers/layout_helper.rb", "app/helpers/layout_helper.rb"
79
- directory "styles/#{style_name}/images/style", "app/assets/images/styles/#{style_name}"
79
+ directory "styles/#{style_name}/images", "app/assets/images/styles/#{style_name}"
80
+ copy_file "styles/#{style_name}/favicon.ico", "app/assets/images/favicon.ico"
80
81
 
81
82
  copy_file "styles/#{style_name}/views/layout/application.html.erb", "app/views/layouts/application.html.erb", :force => true
82
83
  copy_file "styles/#{style_name}/views/layout/_message.html.erb", "app/views/application/_message.html.erb"
@@ -92,6 +93,15 @@ class LeolayGenerator < Rails::Generators::Base
92
93
  end
93
94
  break if files.any?
94
95
  end
96
+ if options.authentication?
97
+ source_paths.each do |source_path|
98
+ files = Dir["#{source_path}/#{locale_path}/devise.??.yml"]
99
+ files.each do |f|
100
+ copy_file f, "#{locale_path}/#{File.basename(f)}"
101
+ end
102
+ break if files.any?
103
+ end
104
+ end
95
105
  end
96
106
 
97
107
  def setup_application
@@ -177,6 +187,12 @@ class LeolayGenerator < Rails::Generators::Base
177
187
  def role?(role)
178
188
  roles.include? role.to_s
179
189
  end
190
+ def roles?(*roles)
191
+ roles.each do |role|
192
+ return true if role? role
193
+ end
194
+ nil
195
+ end
180
196
  def admin?
181
197
  self.role? 'admin'
182
198
  end
@@ -7,7 +7,8 @@ module ActiveAdmin
7
7
  private
8
8
  def build_footer
9
9
  div :id => "footer" do
10
- para "#{CONFIG[:application][:name]} #{Rails.env} #{CONFIG[:application][:version]} <%= Time.now.year %>.".html_safe
10
+ para "#{CONFIG[:application][:name]} #{Rails.env} #{CONFIG[:application][:version]}, <%= Time.now.year %>.".html_safe
11
+ para style_image_tag "logo.png"
11
12
  end
12
13
  end
13
14
 
@@ -1,23 +1,28 @@
1
- @import "enviroment";
1
+ body.active_admin {
2
+ @import "enviroment";
2
3
 
3
- #active_admin_content {
4
- padding: 10px 10px;
5
- }
6
- .price {
7
- text-align: right;
8
- }
9
- table.index_table tr.odd.selected td {
10
- background: none repeat scroll 0 0 #FFFFBD;
11
- }
12
- table.index_table tr.even.selected td {
13
- background: none repeat scroll 0 0 #FFFFAC;
14
- }
15
- .table_tools_segmented_control li.selected {
16
- a {
17
- background-color: #E6E6E6;
18
- cursor: pointer;
4
+ #active_admin_content {
5
+ padding: 10px 10px;
19
6
  }
20
- a:hover {
21
- color: inherit;
7
+ .price {
8
+ text-align: right;
9
+ }
10
+ table.index_table tr.odd.selected td {
11
+ background: none repeat scroll 0 0 #FFFFBD;
12
+ }
13
+ table.index_table tr.even.selected td {
14
+ background: none repeat scroll 0 0 #FFFFAC;
15
+ }
16
+ .table_tools_segmented_control li.selected {
17
+ a {
18
+ background-color: #E6E6E6;
19
+ cursor: pointer;
20
+ }
21
+ a:hover {
22
+ color: inherit;
23
+ }
24
+ }
25
+ #footer {
26
+ text-align: center;
22
27
  }
23
28
  }
@@ -1,53 +1,53 @@
1
1
  @import "active_admin/mixins";
2
2
  @import "active_admin/base";
3
- @import "enviroment";
4
- #body {
5
- @import "active_admin/pages/logged_out";
6
- }
7
3
 
8
- #header {
9
- #session {
10
- display: inline-block;
11
- color: #cdcdcd;
12
- float: right;
13
- margin-right: 20px;
14
- margin-bottom: 0px;
15
- padding-top: 3px;
16
- font-size: 1em;
17
- font-weight: normal;
4
+ body.active_admin {
5
+ @import "enviroment";
6
+ @import "active_admin/pages/logged_out";
7
+ #header {
8
+ #session {
9
+ display: inline-block;
10
+ color: #cdcdcd;
11
+ float: right;
12
+ margin-right: 20px;
13
+ margin-bottom: 0px;
14
+ padding-top: 3px;
15
+ font-size: 1em;
16
+ font-weight: normal;
17
+ }
18
+ }
19
+ body.logged_out #content_wrapper {
20
+ width: 600px;
21
+ }
22
+ ul li {
23
+ list-style-type: circle;
18
24
  }
19
- }
20
- body.logged_out #content_wrapper {
21
- width: 600px;
22
- }
23
- ul li {
24
- list-style-type: circle;
25
- }
26
25
 
27
- #login {
28
- form {
29
- input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], textarea {
30
- //width: 76%;
31
- //border: 1px solid #c9d0d6;
32
- //@include rounded;
33
- //font-size: 0.95em;
34
- //@include sans-family;
35
- //outline: none;
36
- padding: 8px 7px;
26
+ #login {
27
+ form {
28
+ input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], textarea {
29
+ //width: 76%;
30
+ //border: 1px solid #c9d0d6;
31
+ //@include rounded;
32
+ //font-size: 0.95em;
33
+ //@include sans-family;
34
+ //outline: none;
35
+ padding: 8px 7px;
37
36
 
38
- //&:focus {
39
- // border: 1px solid #99a2aa;
40
- // @include shadow(0,0,4px,#99a2aa);
37
+ //&:focus {
38
+ // border: 1px solid #99a2aa;
39
+ // @include shadow(0,0,4px,#99a2aa);
40
+ //}
41
+ }
42
+ input[type=submit] {
43
+ @include dark-button;
44
+ margin-left: 20px;
45
+ //padding: 4px 8px;
46
+ }
47
+ //.buttons {
48
+ // margin-top: 15px;
49
+ // //input[type=submit] { margin-right: 10px; }
41
50
  //}
42
51
  }
43
- input[type=submit] {
44
- @include dark-button;
45
- margin-left: 20px;
46
- //padding: 4px 8px;
47
- }
48
- //.buttons {
49
- // margin-top: 15px;
50
- // //input[type=submit] { margin-right: 10px; }
51
- //}
52
52
  }
53
- }
53
+ }
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_leonardo
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 6
10
- version: 0.0.6
9
+ - 7
10
+ version: 0.0.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Marco Mastrodonato
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-01-14 00:00:00 Z
18
+ date: 2013-01-16 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: rails
@@ -125,10 +125,10 @@ files:
125
125
  - lib/generators/leolay/templates/spec/factories.rb
126
126
  - lib/generators/leolay/templates/spec/helpers/application_helpers.rb
127
127
  - lib/generators/leolay/templates/spec/support/devise.rb
128
+ - lib/generators/leolay/templates/styles/active/favicon.ico
129
+ - lib/generators/leolay/templates/styles/active/images/ico_v.png
130
+ - lib/generators/leolay/templates/styles/active/images/ico_x.png
128
131
  - lib/generators/leolay/templates/styles/active/images/logo.png
129
- - lib/generators/leolay/templates/styles/active/images/style/ico_v.png
130
- - lib/generators/leolay/templates/styles/active/images/style/ico_x.png
131
- - lib/generators/leolay/templates/styles/active/images/style/Thumbs.db
132
132
  - lib/generators/leolay/templates/styles/active/stylesheets/app/custom_active_admin.css.scss
133
133
  - lib/generators/leolay/templates/styles/active/stylesheets/app/stylesheet.css.scss
134
134
  - lib/generators/leolay/templates/styles/active/stylesheets/app/_enviroment.css.scss