bootswatch_rails 3.3.0.4 → 3.3.0.5

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.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/lib/bootswatch_rails/version.rb +1 -1
  3. data/lib/generators/bootswatch_rails/install/templates/head.html.erb +1 -0
  4. data/lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/edit.html.erb +1 -0
  5. data/lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/index.html.erb +1 -0
  6. data/lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/new.html.erb +1 -0
  7. data/lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb +1 -0
  8. data/lib/generators/bootswatch_rails/sorcery/sorcery_generator.rb +19 -24
  9. data/lib/generators/bootswatch_rails/sorcery/templates/_form.html.erb +3 -0
  10. data/lib/generators/bootswatch_rails/sorcery/templates/change.html.erb +1 -0
  11. data/lib/generators/bootswatch_rails/sorcery/templates/edit.html.erb +1 -0
  12. data/lib/generators/bootswatch_rails/sorcery/templates/index.html.erb +9 -0
  13. data/lib/generators/bootswatch_rails/sorcery/templates/log_in.html.erb +1 -0
  14. data/lib/generators/bootswatch_rails/sorcery/templates/new.html.erb +1 -0
  15. data/lib/generators/bootswatch_rails/sorcery/templates/password.html.erb +1 -0
  16. data/lib/generators/bootswatch_rails/sorcery/templates/show.html.erb +7 -0
  17. data/lib/generators/bootswatch_rails/sorcery/templates/sorcery.de.yml +1 -36
  18. data/lib/generators/bootswatch_rails/sorcery/templates/user_migration.rb +15 -0
  19. data/lib/generators/bootswatch_rails/sorcery/templates/user_model.rb +0 -6
  20. data/lib/generators/bootswatch_rails/sorcery/templates/users_controller.rb +1 -1
  21. data/vendor/assets/stylesheets/cosmo.css +21 -0
  22. data/vendor/assets/stylesheets/cyborg.css +26 -0
  23. data/vendor/assets/stylesheets/darkly.css +26 -0
  24. data/vendor/assets/stylesheets/flatly.css +26 -0
  25. data/vendor/assets/stylesheets/lumen.css +26 -0
  26. data/vendor/assets/stylesheets/paper.css +12 -4
  27. data/vendor/assets/stylesheets/slate.css +26 -0
  28. data/vendor/assets/stylesheets/superhero.css +26 -0
  29. metadata +2 -9
  30. data/lib/generators/bootswatch_rails/sorcery/templates/ability_migration.rb +0 -28
  31. data/lib/generators/bootswatch_rails/sorcery/templates/ability_model.rb +0 -3
  32. data/lib/generators/bootswatch_rails/sorcery/templates/assignment_migration.rb +0 -10
  33. data/lib/generators/bootswatch_rails/sorcery/templates/assignment_model.rb +0 -4
  34. data/lib/generators/bootswatch_rails/sorcery/templates/role_migration.rb +0 -11
  35. data/lib/generators/bootswatch_rails/sorcery/templates/role_model.rb +0 -5
  36. data/lib/generators/bootswatch_rails/sorcery/templates/roles_controller.rb +0 -80
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 146e09c0bf1abcabc3d6d87f3bbd3036575897c6
4
- data.tar.gz: 1e233be8a713f31131520741f9320010806c565e
3
+ metadata.gz: 0d0d6efb0c4b56a2af9105b3c8167d0de16b0af0
4
+ data.tar.gz: b15a82573f9e3e328dca1173468ec18e15c05fd4
5
5
  SHA512:
6
- metadata.gz: d2dbc2d8b5b14ebfe17a980ccae826883dd05ea78809ee7e8c9b412a0656b3d81b0a20773e08d5f9ed65afb1658ea3d4e7ca1f9d70678bf67ab05cfbce82878d
7
- data.tar.gz: 3e8f4c4fe612de084ac4065d4ea5296687d6d67543fa35bd96d7df86c1ac134930bf1f42f7872f8b912ac797a121ec3005949c4b760c1d87792a8a10fc807626
6
+ metadata.gz: 0921b682e32e3b93677183b82e5de17177b6e95e4040e87b6ee603ff144342ff5d9a08c0a7e235d5abe1aa4d463f5f7f452dbb56555163638a90a2053223daa9
7
+ data.tar.gz: 54ebe17cd7b7d9b826e3bee0f7166f3542ec2ab27c68402e0e86f2923a281b3e38387c5f99a5cd7fbebcd15c053c5a427e5858e2ce7d1b490132baa4c1e1df5f
@@ -2,7 +2,7 @@ module BootswatchRails
2
2
  BOOTSTRAP = "3.3.0"
3
3
  BOOTSWATCH = "3.2.0"
4
4
  FONT_AWESOME = "4.2.0"
5
- VERSION = "3.3.0.4"
5
+ VERSION = "3.3.0.5"
6
6
 
7
7
  THEMES = [:cerulean, :cosmo, :custom, :cyborg, :darkly, :flatly, :journal, :lumen, :paper, :readable, :sandstone, :simplex, :slate, :spacelab, :superhero, :united, :yeti]
8
8
  DEFAULT = 0
@@ -2,6 +2,7 @@
2
2
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
3
3
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
4
4
 
5
+ <%%= favicon_link_tag 'favicon.ico' %>
5
6
  <title><%%= content_for?(:title) ? yield(:title) : app_name %></title>
6
7
 
7
8
  <%%= stylesheet_link_tag 'application', media: 'all'<%= turbolinks %> %>
@@ -1,4 +1,5 @@
1
1
  <%%- page_title t('activerecord.models.<%= singular_table_name %>.one') -%>
2
2
  <h2><%%= t('headers.edit', name: t('activerecord.models.<%= singular_table_name %>.one')) %></h2>
3
+ <%%- content_for(:help) { "<%= singular_table_name %>_edit" } -%>
3
4
 
4
5
  <%%= render 'form' %>
@@ -1,5 +1,6 @@
1
1
  <%%- page_title t('activerecord.models.<%= singular_table_name %>.other') -%>
2
2
  <h2><%%= t('headers.index', name: t('activerecord.models.<%= singular_table_name %>.other')) %></h2>
3
+ <%%- content_for(:help) { "<%= singular_table_name %>_index" } -%>
3
4
 
4
5
  <table class="table table-striped table-hover">
5
6
  <thead>
@@ -1,4 +1,5 @@
1
1
  <%%- page_title t('activerecord.models.<%= singular_table_name %>.one') -%>
2
2
  <h2><%%= t('headers.new', name: t('activerecord.models.<%= singular_table_name %>.one')) %></h2>
3
+ <%%- content_for(:help) { "<%= singular_table_name %>_new" } -%>
3
4
 
4
5
  <%%= render 'form' %>
@@ -1,5 +1,6 @@
1
1
  <%%- page_title t('activerecord.models.<%= singular_table_name %>.one') -%>
2
2
  <h2><%%= t('headers.show', name: t('activerecord.models.<%= singular_table_name %>.one')) %></h2>
3
+ <%%- content_for(:help) { "<%= singular_table_name %>_show" } -%>
3
4
 
4
5
  <table class="table table-striped table-hover">
5
6
  <tbody>
@@ -3,15 +3,17 @@ require 'rails/generators/active_record'
3
3
  module BootswatchRails
4
4
  module Generators
5
5
  class SorceryGenerator < ActiveRecord::Generators::Base
6
- desc "Install authentication (with Sorcery) and (optional) authorization."
6
+ desc "Install authentication (with Sorcery) and setup users."
7
7
  argument :name, type: :string, default: "user",
8
8
  banner: "name of the user model"
9
9
  class_option :picture, type: :boolean, default: false,
10
10
  desc: 'Add picture to user (needs carrierwave)'
11
11
  class_option :gravatar, type: :boolean, default: false,
12
12
  desc: 'Add Gravatar image to user (uses email)'
13
- class_option :authorization, type: :boolean, default: false,
14
- desc: 'Add dynamic athorization on top of authentication'
13
+ class_option :authority, type: :boolean, default: false,
14
+ desc: 'Add athorization (requires authority gem)'
15
+ class_option :add_attr, type: :array, banner: "FIELD[:TYPE][:INDEX] ...",
16
+ desc: 'Setup additional attributes for user model'
15
17
  class_option :user_activation, type: :boolean, default: false,
16
18
  desc: 'User activation by email with optional success email'
17
19
  class_option :reset_password, type: :boolean, default: false,
@@ -34,18 +36,10 @@ module BootswatchRails
34
36
 
35
37
  def add_migrations
36
38
  migration_template "user_migration.rb", "db/migrate/create_#{table_name}.rb"
37
- return unless options.authorization?
38
- migration_template "role_migration.rb", "db/migrate/create_roles.rb"
39
- migration_template "assignment_migration.rb", "db/migrate/create_assignments.rb"
40
- migration_template "ability_migration.rb", "db/migrate/create_abilities.rb"
41
39
  end
42
40
 
43
41
  def add_models
44
42
  template "user_model.rb", "app/models/#{name}.rb"
45
- return unless options.authorization?
46
- template "role_model.rb", "app/models/role.rb"
47
- template "assignment_model.rb", "app/models/assignment.rb"
48
- template "ability_model.rb", "app/models/ability.rb"
49
43
  end
50
44
 
51
45
  def add_uploader
@@ -66,11 +60,6 @@ module BootswatchRails
66
60
 
67
61
  def add_controllers
68
62
  template "users_controller.rb", "app/controllers/#{table_name}_controller.rb"
69
- return unless options.authorization?
70
- # TODO
71
- # template "roles_controller.rb", "app/controllers/roles_controller.rb"
72
- # template "assignments_controller.rb", "app/controllers/assignments_controller.rb"
73
- # template "abilities_controller.rb", "app/controllers/abilities_controller.rb"
74
63
  end
75
64
 
76
65
  def add_views
@@ -79,8 +68,6 @@ module BootswatchRails
79
68
  views.each do |view|
80
69
  template "#{view}.html.erb", "app/views/#{table_name}/#{view}.html.erb"
81
70
  end
82
- return unless options.authorization?
83
- # TODO
84
71
  end
85
72
 
86
73
  def add_routes
@@ -111,12 +98,6 @@ module BootswatchRails
111
98
  " get '/logout' => '#{table_name}#log_out', as: :logout, format: false",
112
99
  ""
113
100
  ]
114
- lines << [
115
- " resources :roles",
116
- " resources :assignments",
117
- " resources :abilities",
118
- ""
119
- ] if options.authorization?
120
101
  route lines.join("\n")
121
102
  end
122
103
 
@@ -151,6 +132,17 @@ module BootswatchRails
151
132
 
152
133
  protected
153
134
 
135
+ def added_fields
136
+ list = options.add_attr || []
137
+ array = []
138
+ list.each do |entry|
139
+ name, type, index = entry.split(':')
140
+ type, index = ["string", type] if %w(index uniq).include? type
141
+ array << [name, type, index]
142
+ end
143
+ array
144
+ end
145
+
154
146
  def submodules
155
147
  modules = []
156
148
  modules << ":user_activation" if options.user_activation?
@@ -180,6 +172,9 @@ module BootswatchRails
180
172
  text = ":email, :name, :phone, :comment, :theme, " +
181
173
  ":active, :sysadm, :password, :password_confirmation"
182
174
  text += ", :picture, :picture_cache" if options.picture?
175
+ added_fields.each do |field|
176
+ text += ", #{field[0]}"
177
+ end
183
178
  text
184
179
  end
185
180
  end
@@ -28,6 +28,9 @@
28
28
  <%%- if current_<%= name %>.sysadm and @<%= name %> != current_<%= name %> -%>
29
29
  <%%= f.input :sysadm %>
30
30
  <%%- end -%>
31
+ <%- added_fields.each do |field| -%>
32
+ <%%= f.input :<%= field[0] %> %>
33
+ <%- end -%>
31
34
 
32
35
  <%%= f.button :submit, class: 'btn btn-primary' %>
33
36
  <%%- if @<%= name %>.new_record? -%>
@@ -1,5 +1,6 @@
1
1
  <%%- page_title t('sorcery.reset.choose') -%>
2
2
  <h2><%%= t('sorcery.reset.choose') %></h2>
3
+ <%%- content_for(:help) { "<%= name %>_change" } -%>
3
4
 
4
5
  <%%= simple_form_for(@<%= name %>, url: {action: "refresh"}) do |f| %>
5
6
  <%%= f.error_notification %>
@@ -1,4 +1,5 @@
1
1
  <%%- page_title t('headers.edit', name: t('activerecord.models.<%= name %>.one')) -%>
2
2
  <h2><%%= t('headers.edit', name: t('activerecord.models.<%= name %>.one')) %></h2>
3
+ <%%- content_for(:help) { "<%= name %>_edit" } -%>
3
4
 
4
5
  <%%= render 'form' %>
@@ -1,5 +1,6 @@
1
1
  <%%- page_title t('headers.index', name: t('activerecord.models.<%= name %>.other')) -%>
2
2
  <h2><%%= t('headers.index', name: t('activerecord.models.<%= name %>.other')) %></h2>
3
+ <%%- content_for(:help) { "<%= name %>_index" } -%>
3
4
 
4
5
  <table class="table table-striped table-hover">
5
6
  <thead>
@@ -14,6 +15,9 @@
14
15
  <th><%%= t('activerecord.attributes.<%= name %>.gravatar') %></th>
15
16
  <%- end -%>
16
17
  <th><%%= t('activerecord.attributes.<%= name %>.active') %></th>
18
+ <%- added_fields.each do |field| -%>
19
+ <th><%%= t('activerecord.attributes.<%= name %>.<%= field[0] %>') %></th>
20
+ <%- end -%>
17
21
  <th class="index-actions"><%%= t('actions.title') %></th>
18
22
  </tr>
19
23
  </thead>
@@ -45,6 +49,11 @@
45
49
  (<%%= t('activerecord.attributes.<%= name %>.sysadm') %>)
46
50
  <%%- end -%>
47
51
  </td>
52
+ <%- added_fields.each do |field| -%>
53
+ <td>
54
+ <%%= <%= name %>.<%= field[0] %> %>
55
+ </td>
56
+ <%- end -%>
48
57
  <td class="index-actions">
49
58
  <%%= link_to t('actions.show'), <%= name %>, class: 'btn btn-default btn-xs' %>
50
59
  <%%- if current_<%= name %>.sysadm or <%= name %> == current_<%= name %> -%>
@@ -1,5 +1,6 @@
1
1
  <%%- page_title t('sorcery.header') -%>
2
2
  <h2><%%= t('sorcery.header') %></h2>
3
+ <%%- content_for(:help) { "<%= name %>_login" } -%>
3
4
 
4
5
  <%%= simple_form_for(@<%= name %>, url: {action: "access"}) do |f| %>
5
6
  <%%= f.error_notification %>
@@ -1,4 +1,5 @@
1
1
  <%%- page_title t('headers.new', name: t('activerecord.models.<%= name %>.one')) -%>
2
2
  <h2><%%= t('headers.new', name: t('activerecord.models.<%= name %>.one')) %></h2>
3
+ <%%- content_for(:help) { "<%= name %>_new" } -%>
3
4
 
4
5
  <%%= render 'form' %>
@@ -1,5 +1,6 @@
1
1
  <%%- page_title t('sorcery.reset.header') -%>
2
2
  <h2><%%= t('sorcery.reset.header') %></h2>
3
+ <%%- content_for(:help) { "<%= name %>_password" } -%>
3
4
 
4
5
  <%%= simple_form_for(@<%= name %>, url: {action: "reset"}) do |f| %>
5
6
  <%%= f.error_notification %>
@@ -1,5 +1,6 @@
1
1
  <%%- page_title @<%= name %>.name -%>
2
2
  <h2><%%= @<%= name %>.name %></h2>
3
+ <%%- content_for(:help) { "<%= name %>_show" } -%>
3
4
 
4
5
  <table class="table table-striped table-hover">
5
6
  <tbody>
@@ -45,6 +46,12 @@
45
46
  <td><%%= t('activerecord.attributes.<%= name %>.sysadm') %></td>
46
47
  <td><%%= @<%= name %>.sysadm ? t('simple_form.yes') : t('simple_form.no') %></td>
47
48
  </tr>
49
+ <%- added_fields.each do |field| -%>
50
+ <tr>
51
+ <td><%%= t('activerecord.attributes.<%= name %>.<%= field[0] %>') %></td>
52
+ <td><%%= @<%= name %>.<%= field[0] %> %></td>
53
+ </tr>
54
+ <%- end -%>
48
55
  <%- if options.activity_logging? -%>
49
56
  <%%- if @<%= name %>.last_login_at.present? -%>
50
57
  <tr>
@@ -34,17 +34,7 @@ de:
34
34
  <%= name %>:
35
35
  one: "Benutzer"
36
36
  other: "Benutzer"
37
- <%- if options.authorization? -%>
38
- role:
39
- one: "Rolle"
40
- other: "Rollen"
41
- assignment:
42
- one: "Rollenzuordnung"
43
- other: "Rollenzuordnungen"
44
- ability:
45
- one: "Fähigkeit"
46
- other: Fähigkeiten"
47
- <%- end -%>
37
+ new: "Neuer Benutzer"
48
38
  attributes:
49
39
  <%= name %>:
50
40
  email: "E-Mail"
@@ -75,29 +65,4 @@ de:
75
65
  failed_logins_count: "Fehlversuche Anmeldung"
76
66
  lock_expires_at: "Gesperrt bis"
77
67
  <%- end -%>
78
- <%- if options.authorization? -%>
79
- role:
80
- name: "Bezeichnung"
81
- assignment:
82
- <%= name %>: "Benutzer"
83
- role: "Rolle"
84
- ability:
85
- resource: "Tabelle"
86
- create_new: "Neu Anlegen"
87
- read_own: "Lesen Eigene"
88
- read_any: "Lesen Alle"
89
- update_own: "Edit Eigene"
90
- update_any: "Edit Alle"
91
- delete_own: "Löschen Eigene"
92
- delete_any: "Löschen Alle"
93
- user1_own: "Zusatz1 Eigene"
94
- user1_any: "Zusatz1 Alle"
95
- user1_name: "Zusatz1 Name"
96
- user2_own: "Zusatz2 Eigene"
97
- user2_any: "Zusatz2 Alle"
98
- user2_name: "Zusatz2 Name"
99
- user3_own: "Zusatz3 Eigene"
100
- user3_any: "Zusatz3 Alle"
101
- user3_name: "Zusatz3 Name"
102
- <%- end -%>
103
68
 
@@ -11,6 +11,12 @@ class <%= migration_name.camelize %> < ActiveRecord::Migration
11
11
  t.integer :theme, default: BootswatchRails::DEFAULT
12
12
  t.boolean :active, default: true
13
13
  t.boolean :sysadm, default: false
14
+ <%- if added_fields.any? -%>
15
+
16
+ <%- added_fields.each do |field| -%>
17
+ t.<%= field[1] %> :<%= field[0] %>
18
+ <%- end -%>
19
+ <%- end -%>
14
20
 
15
21
  t.string :crypted_password, null: false
16
22
  t.string :salt, null: false
@@ -46,6 +52,15 @@ class <%= migration_name.camelize %> < ActiveRecord::Migration
46
52
 
47
53
  add_index :<%= table_name %>, :email, unique: true
48
54
  add_index :<%= table_name %>, :sysadm
55
+ <%- if added_fields.any? -%>
56
+ <%- added_fields.each do |field| -%>
57
+ <%- if field[2] == "uniq" -%>
58
+ add_index :<%= table_name %>, :<%= field[0] %>, unique: true
59
+ <%- elsif field[2] == "index" -%>
60
+ add_index :<%= table_name %>, :<%= field[0] %>
61
+ <%- end -%>
62
+ <%- end -%>
63
+ <%- end -%>
49
64
  <%- if options.user_activation? -%>
50
65
  add_index :<%= table_name %>, :activation_token
51
66
  <%- end -%>
@@ -10,12 +10,6 @@ class <%= class_name %> < ActiveRecord::Base
10
10
  scope :active, -> { where(active: true) }
11
11
  scope :sysadms, -> { where(sysadm: true) }
12
12
 
13
- <%- if options.authorization? -%>
14
- has_many :assignments
15
- has_many :roles, through: :assignments
16
- has_many :abilities, through: :roles
17
-
18
- <%- end -%>
19
13
  <%- if options.picture? -%>
20
14
  mount_uploader :picture, PictureUploader
21
15
 
@@ -1,6 +1,6 @@
1
1
  class <%= controller_name.camelize %> < ApplicationController
2
2
  force_ssl if: :ssl_configured?
3
- skip_before_filter :require_login, only: [:log_in, :access, :password, :reset, :change, :refresh, :log_out]
3
+ skip_before_action :require_login, only: [:log_in, :access, :password, :reset, :change, :refresh, :log_out]
4
4
  before_action :set_<%= name %>, only: [:show, :edit, :update, :destroy]
5
5
 
6
6
  # GET /<%= table_name %>
@@ -6447,6 +6447,27 @@ table .info a,
6447
6447
  .panel-default .close {
6448
6448
  color: #333333;
6449
6449
  }
6450
+ a.list-group-item-success.active {
6451
+ background-color: #3fb618;
6452
+ }
6453
+ a.list-group-item-success.active:hover,
6454
+ a.list-group-item-success.active:focus {
6455
+ background-color: #379f15;
6456
+ }
6457
+ a.list-group-item-warning.active {
6458
+ background-color: #ff7518;
6459
+ }
6460
+ a.list-group-item-warning.active:hover,
6461
+ a.list-group-item-warning.active:focus {
6462
+ background-color: #fe6600;
6463
+ }
6464
+ a.list-group-item-danger.active {
6465
+ background-color: #ff0039;
6466
+ }
6467
+ a.list-group-item-danger.active:hover,
6468
+ a.list-group-item-danger.active:focus {
6469
+ background-color: #e60033;
6470
+ }
6450
6471
  .modal .close {
6451
6472
  color: #333333;
6452
6473
  }
@@ -6424,6 +6424,32 @@ a.thumbnail:focus,
6424
6424
  a.thumbnail.active {
6425
6425
  border-color: #282828;
6426
6426
  }
6427
+ a.list-group-item.active,
6428
+ a.list-group-item.active:hover,
6429
+ a.list-group-item.active:focus {
6430
+ border-color: #282828;
6431
+ }
6432
+ a.list-group-item-success.active {
6433
+ background-color: #77b300;
6434
+ }
6435
+ a.list-group-item-success.active:hover,
6436
+ a.list-group-item-success.active:focus {
6437
+ background-color: #669a00;
6438
+ }
6439
+ a.list-group-item-warning.active {
6440
+ background-color: #ff8800;
6441
+ }
6442
+ a.list-group-item-warning.active:hover,
6443
+ a.list-group-item-warning.active:focus {
6444
+ background-color: #e67a00;
6445
+ }
6446
+ a.list-group-item-danger.active {
6447
+ background-color: #cc0000;
6448
+ }
6449
+ a.list-group-item-danger.active:hover,
6450
+ a.list-group-item-danger.active:focus {
6451
+ background-color: #b30000;
6452
+ }
6427
6453
  .jumbotron h1,
6428
6454
  .jumbotron h2,
6429
6455
  .jumbotron h3,
@@ -6542,6 +6542,32 @@ textarea:focus {
6542
6542
  -webkit-box-shadow: none;
6543
6543
  box-shadow: none;
6544
6544
  }
6545
+ a.list-group-item.active,
6546
+ a.list-group-item.active:hover,
6547
+ a.list-group-item.active:focus {
6548
+ border-color: #464545;
6549
+ }
6550
+ a.list-group-item-success.active {
6551
+ background-color: #00bc8c;
6552
+ }
6553
+ a.list-group-item-success.active:hover,
6554
+ a.list-group-item-success.active:focus {
6555
+ background-color: #00a379;
6556
+ }
6557
+ a.list-group-item-warning.active {
6558
+ background-color: #f39c12;
6559
+ }
6560
+ a.list-group-item-warning.active:hover,
6561
+ a.list-group-item-warning.active:focus {
6562
+ background-color: #e08e0b;
6563
+ }
6564
+ a.list-group-item-danger.active {
6565
+ background-color: #e74c3c;
6566
+ }
6567
+ a.list-group-item-danger.active:hover,
6568
+ a.list-group-item-danger.active:focus {
6569
+ background-color: #e43725;
6570
+ }
6545
6571
  .popover {
6546
6572
  color: #ffffff;
6547
6573
  }
@@ -6518,6 +6518,32 @@ input:focus {
6518
6518
  -webkit-box-shadow: none;
6519
6519
  box-shadow: none;
6520
6520
  }
6521
+ a.list-group-item.active,
6522
+ a.list-group-item.active:hover,
6523
+ a.list-group-item.active:focus {
6524
+ border-color: #ecf0f1;
6525
+ }
6526
+ a.list-group-item-success.active {
6527
+ background-color: #18bc9c;
6528
+ }
6529
+ a.list-group-item-success.active:hover,
6530
+ a.list-group-item-success.active:focus {
6531
+ background-color: #15a589;
6532
+ }
6533
+ a.list-group-item-warning.active {
6534
+ background-color: #f39c12;
6535
+ }
6536
+ a.list-group-item-warning.active:hover,
6537
+ a.list-group-item-warning.active:focus {
6538
+ background-color: #e08e0b;
6539
+ }
6540
+ a.list-group-item-danger.active {
6541
+ background-color: #e74c3c;
6542
+ }
6543
+ a.list-group-item-danger.active:hover,
6544
+ a.list-group-item-danger.active:focus {
6545
+ background-color: #e43725;
6546
+ }
6521
6547
  .panel-default .close {
6522
6548
  color: #2c3e50;
6523
6549
  }
@@ -6659,6 +6659,32 @@ label {
6659
6659
  -webkit-box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.05);
6660
6660
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.05);
6661
6661
  }
6662
+ a.list-group-item.active,
6663
+ a.list-group-item.active:hover,
6664
+ a.list-group-item.active:focus {
6665
+ border-color: #dddddd;
6666
+ }
6667
+ a.list-group-item-success.active {
6668
+ background-color: #28b62c;
6669
+ }
6670
+ a.list-group-item-success.active:hover,
6671
+ a.list-group-item-success.active:focus {
6672
+ background-color: #23a127;
6673
+ }
6674
+ a.list-group-item-warning.active {
6675
+ background-color: #ff851b;
6676
+ }
6677
+ a.list-group-item-warning.active:hover,
6678
+ a.list-group-item-warning.active:focus {
6679
+ background-color: #ff7701;
6680
+ }
6681
+ a.list-group-item-danger.active {
6682
+ background-color: #ff4136;
6683
+ }
6684
+ a.list-group-item-danger.active:hover,
6685
+ a.list-group-item-danger.active:focus {
6686
+ background-color: #ff291c;
6687
+ }
6662
6688
  .jumbotron {
6663
6689
  border: 1px solid #e7e7e7;
6664
6690
  -webkit-box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.05);
@@ -6565,10 +6565,18 @@ input[type=number][readonly],
6565
6565
  }
6566
6566
  select,
6567
6567
  select.form-control {
6568
- background-color: #fff;
6569
- border: 1px solid #ddd;
6570
- -webkit-box-shadow: none;
6571
- box-shadow: none;
6568
+ border: 0;
6569
+ border-radius: 0;
6570
+ -webkit-appearance: none;
6571
+ -webkit-box-shadow: inset 0 -1px 0 #dddddd;
6572
+ box-shadow: inset 0 -1px 0 #dddddd;
6573
+ font-size: 16px;
6574
+ padding-left: 0px;
6575
+ }
6576
+ select:focus,
6577
+ select.form-control:focus {
6578
+ -webkit-box-shadow: inset 0 -2px 0 #2196f3;
6579
+ box-shadow: inset 0 -2px 0 #2196f3;
6572
6580
  }
6573
6581
  .has-warning input,
6574
6582
  .has-warning .form-control,
@@ -6704,6 +6704,32 @@ a.thumbnail:focus,
6704
6704
  a.thumbnail.active {
6705
6705
  border-color: #0c0d0e;
6706
6706
  }
6707
+ a.list-group-item.active,
6708
+ a.list-group-item.active:hover,
6709
+ a.list-group-item.active:focus {
6710
+ border-color: rgba(0, 0, 0, 0.6);
6711
+ }
6712
+ a.list-group-item-success.active {
6713
+ background-color: #62c462;
6714
+ }
6715
+ a.list-group-item-success.active:hover,
6716
+ a.list-group-item-success.active:focus {
6717
+ background-color: #4fbd4f;
6718
+ }
6719
+ a.list-group-item-warning.active {
6720
+ background-color: #f89406;
6721
+ }
6722
+ a.list-group-item-warning.active:hover,
6723
+ a.list-group-item-warning.active:focus {
6724
+ background-color: #df8505;
6725
+ }
6726
+ a.list-group-item-danger.active {
6727
+ background-color: #ee5f5b;
6728
+ }
6729
+ a.list-group-item-danger.active:hover,
6730
+ a.list-group-item-danger.active:focus {
6731
+ background-color: #ec4844;
6732
+ }
6707
6733
  .jumbotron {
6708
6734
  border: 1px solid rgba(0, 0, 0, 0.6);
6709
6735
  }
@@ -6494,6 +6494,32 @@ label,
6494
6494
  -webkit-box-shadow: none;
6495
6495
  box-shadow: none;
6496
6496
  }
6497
+ a.list-group-item.active,
6498
+ a.list-group-item.active:hover,
6499
+ a.list-group-item.active:focus {
6500
+ border: none;
6501
+ }
6502
+ a.list-group-item-success.active {
6503
+ background-color: #5cb85c;
6504
+ }
6505
+ a.list-group-item-success.active:hover,
6506
+ a.list-group-item-success.active:focus {
6507
+ background-color: #4cae4c;
6508
+ }
6509
+ a.list-group-item-warning.active {
6510
+ background-color: #f0ad4e;
6511
+ }
6512
+ a.list-group-item-warning.active:hover,
6513
+ a.list-group-item-warning.active:focus {
6514
+ background-color: #eea236;
6515
+ }
6516
+ a.list-group-item-danger.active {
6517
+ background-color: #d9534f;
6518
+ }
6519
+ a.list-group-item-danger.active:hover,
6520
+ a.list-group-item-danger.active:focus {
6521
+ background-color: #d43f3a;
6522
+ }
6497
6523
  .panel {
6498
6524
  border: none;
6499
6525
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootswatch_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.0.4
4
+ version: 3.3.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Volker Wiegand
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-03 00:00:00.000000000 Z
11
+ date: 2014-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -125,10 +125,6 @@ files:
125
125
  - lib/generators/bootswatch_rails/skip_login/skip_login_generator.rb
126
126
  - lib/generators/bootswatch_rails/sorcery/sorcery_generator.rb
127
127
  - lib/generators/bootswatch_rails/sorcery/templates/_form.html.erb
128
- - lib/generators/bootswatch_rails/sorcery/templates/ability_migration.rb
129
- - lib/generators/bootswatch_rails/sorcery/templates/ability_model.rb
130
- - lib/generators/bootswatch_rails/sorcery/templates/assignment_migration.rb
131
- - lib/generators/bootswatch_rails/sorcery/templates/assignment_model.rb
132
128
  - lib/generators/bootswatch_rails/sorcery/templates/change.html.erb
133
129
  - lib/generators/bootswatch_rails/sorcery/templates/edit.html.erb
134
130
  - lib/generators/bootswatch_rails/sorcery/templates/gravatar_helper.rb
@@ -139,9 +135,6 @@ files:
139
135
  - lib/generators/bootswatch_rails/sorcery/templates/password.html.erb
140
136
  - lib/generators/bootswatch_rails/sorcery/templates/picture_uploader.rb
141
137
  - lib/generators/bootswatch_rails/sorcery/templates/reset_password_email.html.erb
142
- - lib/generators/bootswatch_rails/sorcery/templates/role_migration.rb
143
- - lib/generators/bootswatch_rails/sorcery/templates/role_model.rb
144
- - lib/generators/bootswatch_rails/sorcery/templates/roles_controller.rb
145
138
  - lib/generators/bootswatch_rails/sorcery/templates/show.html.erb
146
139
  - lib/generators/bootswatch_rails/sorcery/templates/sorcery.de.yml
147
140
  - lib/generators/bootswatch_rails/sorcery/templates/user_mailer.rb
@@ -1,28 +0,0 @@
1
- class CreateAbilities < ActiveRecord::Migration
2
- def change
3
- create_table :abilities do |t|
4
- t.belongs_to :role, index: true
5
- t.string :resource, null: false
6
- t.boolean :create_new, default: false
7
- t.boolean :read_own, default: false
8
- t.boolean :read_any, default: false
9
- t.boolean :update_own, default: false
10
- t.boolean :update_any, default: false
11
- t.boolean :delete_own, default: false
12
- t.boolean :delete_any, default: false
13
- t.boolean :user1_own, default: false
14
- t.boolean :user1_any, default: false
15
- t.string :user1_name
16
- t.boolean :user2_own, default: false
17
- t.boolean :user2_any, default: false
18
- t.string :user2_name
19
- t.boolean :user3_own, default: false
20
- t.boolean :user3_any, default: false
21
- t.string :user3_name
22
-
23
- t.timestamps
24
- end
25
-
26
- add_index :abilities, :resource, unique: true
27
- end
28
- end
@@ -1,3 +0,0 @@
1
- class Ability < ActiveRecord::Base
2
- belongs_to :role
3
- end
@@ -1,10 +0,0 @@
1
- class CreateAssignments < ActiveRecord::Migration
2
- def change
3
- create_table :assignments do |t|
4
- t.belongs_to :<%= name %>, index: true
5
- t.belongs_to :role, index: true
6
-
7
- t.timestamps
8
- end
9
- end
10
- end
@@ -1,4 +0,0 @@
1
- class Assignment < ActiveRecord::Base
2
- belongs_to :<%= name %>
3
- belongs_to :role
4
- end
@@ -1,11 +0,0 @@
1
- class CreateRoles < ActiveRecord::Migration
2
- def change
3
- create_table :roles do |t|
4
- t.string :name, null: false
5
-
6
- t.timestamps
7
- end
8
-
9
- add_index :roles, :name, unique: true
10
- end
11
- end
@@ -1,5 +0,0 @@
1
- class Role < ActiveRecord::Base
2
- has_many :assignments
3
- has_many :<%= table_name %>, through: :assignments
4
- has_many :abilities
5
- end
@@ -1,80 +0,0 @@
1
- class RolesController < ApplicationController
2
- force_ssl if: :ssl_configured?
3
- before_action :set_role, only: [:show, :edit, :update, :destroy]
4
-
5
- # GET /roles
6
- # GET /roles.json
7
- def index
8
- @roles = Role.all
9
- end
10
-
11
- # GET /roles/1
12
- # GET /roles/1.json
13
- def show
14
- end
15
-
16
- # GET /roles/new
17
- def new
18
- @role = Role.new
19
- end
20
-
21
- # GET /roles/1/edit
22
- def edit
23
- end
24
-
25
- # POST /roles
26
- # POST /roles.json
27
- def create
28
- @role = Role.new(role_params)
29
-
30
- respond_to do |format|
31
- if @role.save
32
- format.html { redirect_to @role, notice: 'Role was successfully created.' }
33
- format.json { render :show, status: :created, location: @role }
34
- else
35
- format.html { render :new }
36
- format.json { render json: @role.errors, status: :unprocessable_entity }
37
- end
38
- end
39
- end
40
-
41
- # PATCH/PUT /roles/1
42
- # PATCH/PUT /roles/1.json
43
- def update
44
- respond_to do |format|
45
- if @role.update(role_params)
46
- format.html { redirect_to @role, notice: 'Role was successfully updated.' }
47
- format.json { render :show, status: :ok, location: @role }
48
- else
49
- format.html { render :edit }
50
- format.json { render json: @role.errors, status: :unprocessable_entity }
51
- end
52
- end
53
- end
54
-
55
- # DELETE /roles/1
56
- # DELETE /roles/1.json
57
- def destroy
58
- @role.destroy
59
- respond_to do |format|
60
- format.html { redirect_to roles_url, notice: 'Role was successfully destroyed.' }
61
- format.json { head :no_content }
62
- end
63
- end
64
-
65
- private
66
- # Always enforce SSL for this controller
67
- def ssl_configured?
68
- Rails.env.production?
69
- end
70
-
71
- # Use callbacks to share common setup or constraints between actions.
72
- def set_role
73
- @role = Role.find(params[:id])
74
- end
75
-
76
- # Never trust parameters from the scary internet, only allow the white list through.
77
- def role_params
78
- params.require(:role).permit(:name)
79
- end
80
- end