the_role 1.6.7 → 1.6.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,6 @@
1
1
  class Admin::RoleSectionsController < ApplicationController
2
+ include TheRole::Requires
3
+
2
4
  layout 'the_role'
3
5
 
4
6
  before_filter :login_required
@@ -1,4 +1,5 @@
1
1
  class Admin::RolesController < ApplicationController
2
+ include TheRole::Requires
2
3
  layout 'the_role'
3
4
 
4
5
  before_filter :login_required
@@ -1,42 +1,42 @@
1
1
  es:
2
2
  the_role:
3
- role_created: El papel de la establecida
4
- role_updated: El papel de la actualización
5
- role_deleted: El papel de la eliminada
6
- section_created: Sección establecida
7
- section_not_created: Sección no se crea
8
- section_rule_created: La regla fue creada
9
- section_rule_not_created: La regla no se crea
10
- section_rule_on: Regla de acceso incluye
11
- section_rule_off: Acceso para discapacitados Regla
12
- state_not_changed: Las reglas del estado no se modifican
13
- section_deleted: una sección eliminada
14
- section_not_deleted: Esta sección no se quita
15
- section_rule_deleted: La regla se retira
16
- section_rule_not_deleted: La regla se retira
3
+ role_created: Establecer el rol
4
+ role_updated: Actualizar el rol
5
+ role_deleted: Eliminar el rol
6
+ section_created: Crear sección
7
+ section_not_created: Sección no creada
8
+ section_rule_created: Sección de roles creado
9
+ section_rule_not_created: Sección de roles no creado
10
+ section_rule_on: Rol de acceso incluye
11
+ section_rule_off: Deshabilitar el rol
12
+ state_not_changed: Rol de estado no se ha modificado
13
+ section_deleted: sección eliminada
14
+ section_not_deleted: Sección no se ha sido eliminada
15
+ section_rule_deleted: Regla eliminada
16
+ section_rule_not_deleted: Regla no ha sido eliminada
17
17
 
18
18
  admin:
19
19
  roles:
20
20
  new:
21
- create: Crear un nuevo papel
22
- name: El nombre de la función (una cadena de caracteres latinos + subrayado)
23
- title: el papel del título
24
- description: El papel de la
21
+ create: Crear un nuevo rol
22
+ name: El nombre de la función (una cadena de caracteres simples + subrayado)
23
+ title: título del rol
24
+ description: Descripción del rol
25
25
  role:
26
26
  role_name: 'Nombre del rol'
27
27
  title: 'Título'
28
28
  role_description: 'Descripción'
29
- delete_section: Suprimir sección
30
- section_delete_confirm: "¿Quiere borrar la partición?"
29
+ delete_section: Eliminar sección
30
+ section_delete_confirm: "¿Quiere borrar la sección?"
31
31
  rule_delete_confirm: "¿Quieres eliminar una regla?"
32
32
  enable: Habilitar
33
- disable: Desactiva
34
- delete_rule: Eliminar una regla
33
+ disable: Desactivar
34
+ delete_rule: Eliminar regla
35
35
  new_section_placeholder: Nombre de un nuevo tema
36
- create_section: Crear una partición
37
- new_rule_placeholder: El nombre de la nueva norma
36
+ create_section: "Crear una sección"
37
+ new_rule_placeholder: El nombre de la nueva regla
38
38
  create_rule: Nueva regla
39
39
  sidebar:
40
40
  roles_list: Lista de funciones
41
- new_role: Crear una nueva praivlo
42
- delete_role_confirm: "Retire el papel? Puede ser peligroso! ¿Está seguro?"
41
+ new_role: Crear nuevo rol
42
+ delete_role_confirm: "Quitar el rol? Puede ser peligroso! ¿Está seguro?"
@@ -1,3 +1,3 @@
1
1
  module TheRole
2
- VERSION = "1.6.7"
2
+ VERSION = "1.6.8"
3
3
  end
data/lib/the_role.rb CHANGED
@@ -1,6 +1,4 @@
1
1
  require 'haml'
2
- require 'sass'
3
- require 'less-rails'
4
2
 
5
3
  require 'the_role/param_helper'
6
4
  require 'the_role/hash'
data/the_role.gemspec CHANGED
@@ -19,10 +19,4 @@ Gem::Specification.new do |s|
19
19
  s.require_paths = ["lib"]
20
20
 
21
21
  s.add_dependency 'haml'
22
- s.add_dependency 'sass'
23
- s.add_dependency 'sass-rails'
24
- s.add_dependency 'coffee-rails'
25
- # less for tw bootstrap
26
- s.add_dependency 'therubyracer'
27
- s.add_dependency 'less-rails'
28
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: the_role
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.7
4
+ version: 1.6.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-25 00:00:00.000000000 Z
12
+ date: 2012-07-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: haml
16
- requirement: &6144180 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,62 +21,12 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *6144180
25
- - !ruby/object:Gem::Dependency
26
- name: sass
27
- requirement: &6143740 !ruby/object:Gem::Requirement
28
- none: false
29
- requirements:
30
- - - ! '>='
31
- - !ruby/object:Gem::Version
32
- version: '0'
33
- type: :runtime
34
- prerelease: false
35
- version_requirements: *6143740
36
- - !ruby/object:Gem::Dependency
37
- name: sass-rails
38
- requirement: &6143300 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
39
25
  none: false
40
26
  requirements:
41
27
  - - ! '>='
42
28
  - !ruby/object:Gem::Version
43
29
  version: '0'
44
- type: :runtime
45
- prerelease: false
46
- version_requirements: *6143300
47
- - !ruby/object:Gem::Dependency
48
- name: coffee-rails
49
- requirement: &6142860 !ruby/object:Gem::Requirement
50
- none: false
51
- requirements:
52
- - - ! '>='
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- type: :runtime
56
- prerelease: false
57
- version_requirements: *6142860
58
- - !ruby/object:Gem::Dependency
59
- name: therubyracer
60
- requirement: &6142420 !ruby/object:Gem::Requirement
61
- none: false
62
- requirements:
63
- - - ! '>='
64
- - !ruby/object:Gem::Version
65
- version: '0'
66
- type: :runtime
67
- prerelease: false
68
- version_requirements: *6142420
69
- - !ruby/object:Gem::Dependency
70
- name: less-rails
71
- requirement: &6141900 !ruby/object:Gem::Requirement
72
- none: false
73
- requirements:
74
- - - ! '>='
75
- - !ruby/object:Gem::Version
76
- version: '0'
77
- type: :runtime
78
- prerelease: false
79
- version_requirements: *6141900
80
30
  description: Authorization lib for Rails 3 with Web Interface, aka CanCan killer
81
31
  email:
82
32
  - zykin-ilya@ya.ru
@@ -95,23 +45,10 @@ files:
95
45
  - app/assets/javascripts/bootstrap-alert.js
96
46
  - app/assets/javascripts/bootstrap-dropdown.js
97
47
  - app/assets/stylesheets/admin_the_role.css
98
- - app/assets/stylesheets/alerts.less
99
- - app/assets/stylesheets/button-groups.less
100
- - app/assets/stylesheets/buttons.less
101
- - app/assets/stylesheets/close.less
102
- - app/assets/stylesheets/custom.scss
103
- - app/assets/stylesheets/dropdowns.less
104
- - app/assets/stylesheets/forms.less
105
- - app/assets/stylesheets/grid.less
106
- - app/assets/stylesheets/headers.scss
107
- - app/assets/stylesheets/layouts.less
108
- - app/assets/stylesheets/mix.scss
109
- - app/assets/stylesheets/mixins.less
48
+ - app/assets/stylesheets/custom.css
49
+ - app/assets/stylesheets/headers.css
110
50
  - app/assets/stylesheets/reset.css
111
- - app/assets/stylesheets/role_set.less
112
- - app/assets/stylesheets/scaffolding.less
113
- - app/assets/stylesheets/variables.less
114
- - app/assets/stylesheets/wells.less
51
+ - app/assets/stylesheets/role_base.css
115
52
  - app/controllers/admin/role_sections_controller.rb
116
53
  - app/controllers/admin/roles_controller.rb
117
54
  - app/views/admin/roles/_form.haml
@@ -159,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
159
96
  version: '0'
160
97
  requirements: []
161
98
  rubyforge_project: the_role
162
- rubygems_version: 1.8.15
99
+ rubygems_version: 1.8.24
163
100
  signing_key:
164
101
  specification_version: 3
165
102
  summary: Authorization lib for Rails 3 with Web Interface, aka CanCan killer
@@ -1,58 +0,0 @@
1
- // ALERT STYLES
2
- // ------------
3
-
4
- // Base alert styles
5
- .alert {
6
- padding: 8px 35px 8px 14px;
7
- margin-bottom: @baseLineHeight;
8
- text-shadow: 0 1px 0 rgba(255,255,255,.5);
9
- background-color: @warningBackground;
10
- border: 1px solid @warningBorder;
11
- .border-radius(4px);
12
- color: @warningText;
13
- }
14
- .alert-heading {
15
- color: inherit;
16
- }
17
-
18
- // Adjust close link position
19
- .alert .close {
20
- position: relative;
21
- top: -2px;
22
- right: -21px;
23
- line-height: 18px;
24
- }
25
-
26
- // Alternate styles
27
- // ----------------
28
-
29
- .alert-success {
30
- background-color: @successBackground;
31
- border-color: @successBorder;
32
- color: @successText;
33
- }
34
- .alert-danger,
35
- .alert-error {
36
- background-color: @errorBackground;
37
- border-color: @errorBorder;
38
- color: @errorText;
39
- }
40
- .alert-info {
41
- background-color: @infoBackground;
42
- border-color: @infoBorder;
43
- color: @infoText;
44
- }
45
-
46
- // Block alerts
47
- // ------------------------
48
- .alert-block {
49
- padding-top: 14px;
50
- padding-bottom: 14px;
51
- }
52
- .alert-block > p,
53
- .alert-block > ul {
54
- margin-bottom: 0;
55
- }
56
- .alert-block p + p {
57
- margin-top: 5px;
58
- }
@@ -1,191 +0,0 @@
1
- // BUTTON GROUPS
2
- // -------------
3
-
4
-
5
- // Make the div behave like a button
6
- .btn-group {
7
- position: relative;
8
- .clearfix(); // clears the floated buttons
9
- .ie7-restore-left-whitespace();
10
- }
11
-
12
- // Space out series of button groups
13
- .btn-group + .btn-group {
14
- margin-left: 5px;
15
- }
16
-
17
- // Optional: Group multiple button groups together for a toolbar
18
- .btn-toolbar {
19
- margin-top: @baseLineHeight / 2;
20
- margin-bottom: @baseLineHeight / 2;
21
- .btn-group {
22
- display: inline-block;
23
- .ie7-inline-block();
24
- }
25
- }
26
-
27
- // Float them, remove border radius, then re-add to first and last elements
28
- .btn-group > .btn {
29
- position: relative;
30
- float: left;
31
- margin-left: -1px;
32
- .border-radius(0);
33
- }
34
- // Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match
35
- .btn-group > .btn:first-child {
36
- margin-left: 0;
37
- -webkit-border-top-left-radius: 4px;
38
- -moz-border-radius-topleft: 4px;
39
- border-top-left-radius: 4px;
40
- -webkit-border-bottom-left-radius: 4px;
41
- -moz-border-radius-bottomleft: 4px;
42
- border-bottom-left-radius: 4px;
43
- }
44
- // Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it
45
- .btn-group > .btn:last-child,
46
- .btn-group > .dropdown-toggle {
47
- -webkit-border-top-right-radius: 4px;
48
- -moz-border-radius-topright: 4px;
49
- border-top-right-radius: 4px;
50
- -webkit-border-bottom-right-radius: 4px;
51
- -moz-border-radius-bottomright: 4px;
52
- border-bottom-right-radius: 4px;
53
- }
54
- // Reset corners for large buttons
55
- .btn-group > .btn.large:first-child {
56
- margin-left: 0;
57
- -webkit-border-top-left-radius: 6px;
58
- -moz-border-radius-topleft: 6px;
59
- border-top-left-radius: 6px;
60
- -webkit-border-bottom-left-radius: 6px;
61
- -moz-border-radius-bottomleft: 6px;
62
- border-bottom-left-radius: 6px;
63
- }
64
- .btn-group > .btn.large:last-child,
65
- .btn-group > .large.dropdown-toggle {
66
- -webkit-border-top-right-radius: 6px;
67
- -moz-border-radius-topright: 6px;
68
- border-top-right-radius: 6px;
69
- -webkit-border-bottom-right-radius: 6px;
70
- -moz-border-radius-bottomright: 6px;
71
- border-bottom-right-radius: 6px;
72
- }
73
-
74
- // On hover/focus/active, bring the proper btn to front
75
- .btn-group > .btn:hover,
76
- .btn-group > .btn:focus,
77
- .btn-group > .btn:active,
78
- .btn-group > .btn.active {
79
- z-index: 2;
80
- }
81
-
82
- // On active and open, don't show outline
83
- .btn-group .dropdown-toggle:active,
84
- .btn-group.open .dropdown-toggle {
85
- outline: 0;
86
- }
87
-
88
-
89
-
90
- // Split button dropdowns
91
- // ----------------------
92
-
93
- // Give the line between buttons some depth
94
- .btn-group > .dropdown-toggle {
95
- padding-left: 8px;
96
- padding-right: 8px;
97
- .box-shadow(~"inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05)");
98
- *padding-top: 4px;
99
- *padding-bottom: 4px;
100
- }
101
- .btn-group > .btn-mini.dropdown-toggle {
102
- padding-left: 5px;
103
- padding-right: 5px;
104
- }
105
- .btn-group > .btn-small.dropdown-toggle {
106
- *padding-top: 4px;
107
- *padding-bottom: 4px;
108
- }
109
- .btn-group > .btn-large.dropdown-toggle {
110
- padding-left: 12px;
111
- padding-right: 12px;
112
- }
113
-
114
- .btn-group.open {
115
-
116
- // The clickable button for toggling the menu
117
- // Remove the gradient and set the same inset shadow as the :active state
118
- .dropdown-toggle {
119
- background-image: none;
120
- .box-shadow(~"inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05)");
121
- }
122
-
123
- // Keep the hover's background when dropdown is open
124
- .btn.dropdown-toggle {
125
- background-color: @btnBackgroundHighlight;
126
- }
127
- .btn-primary.dropdown-toggle {
128
- background-color: @btnPrimaryBackgroundHighlight;
129
- }
130
- .btn-warning.dropdown-toggle {
131
- background-color: @btnWarningBackgroundHighlight;
132
- }
133
- .btn-danger.dropdown-toggle {
134
- background-color: @btnDangerBackgroundHighlight;
135
- }
136
- .btn-success.dropdown-toggle {
137
- background-color: @btnSuccessBackgroundHighlight;
138
- }
139
- .btn-info.dropdown-toggle {
140
- background-color: @btnInfoBackgroundHighlight;
141
- }
142
- .btn-inverse.dropdown-toggle {
143
- background-color: @btnInverseBackgroundHighlight;
144
- }
145
- }
146
-
147
-
148
- // Reposition the caret
149
- .btn .caret {
150
- margin-top: 7px;
151
- margin-left: 0;
152
- }
153
- .btn:hover .caret,
154
- .open.btn-group .caret {
155
- .opacity(100);
156
- }
157
- // Carets in other button sizes
158
- .btn-mini .caret {
159
- margin-top: 5px;
160
- }
161
- .btn-small .caret {
162
- margin-top: 6px;
163
- }
164
- .btn-large .caret {
165
- margin-top: 6px;
166
- border-left-width: 5px;
167
- border-right-width: 5px;
168
- border-top-width: 5px;
169
- }
170
- // Upside down carets for .dropup
171
- .dropup .btn-large .caret {
172
- border-bottom: 5px solid @black;
173
- border-top: 0;
174
- }
175
-
176
-
177
-
178
- // Account for other colors
179
- .btn-primary,
180
- .btn-warning,
181
- .btn-danger,
182
- .btn-info,
183
- .btn-success,
184
- .btn-inverse {
185
- .caret {
186
- border-top-color: @white;
187
- border-bottom-color: @white;
188
- .opacity(75);
189
- }
190
- }
191
-
@@ -1,191 +0,0 @@
1
- // BUTTON STYLES
2
- // -------------
3
-
4
-
5
- // Base styles
6
- // --------------------------------------------------
7
-
8
- // Core
9
- .btn {
10
- display: inline-block;
11
- .ie7-inline-block();
12
- padding: 4px 10px 4px;
13
- margin-bottom: 0; // For input.btn
14
- font-size: @baseFontSize;
15
- line-height: @baseLineHeight;
16
- *line-height: 20px;
17
- color: @grayDark;
18
- text-align: center;
19
- text-shadow: 0 1px 1px rgba(255,255,255,.75);
20
- vertical-align: middle;
21
- cursor: pointer;
22
- .buttonBackground(@btnBackground, @btnBackgroundHighlight);
23
- border: 1px solid @btnBorder;
24
- *border: 0; // Remove the border to prevent IE7's black border on input:focus
25
- border-bottom-color: darken(@btnBorder, 10%);
26
- .border-radius(4px);
27
- .ie7-restore-left-whitespace(); // Give IE7 some love
28
- .box-shadow(~"inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05)");
29
- }
30
-
31
- // Hover state
32
- .btn:hover {
33
- color: @grayDark;
34
- text-decoration: none;
35
- background-color: darken(@white, 10%);
36
- *background-color: darken(@white, 15%); /* Buttons in IE7 don't get borders, so darken on hover */
37
- background-position: 0 -15px;
38
-
39
- // transition is only when going to hover, otherwise the background
40
- // behind the gradient (there for IE<=9 fallback) gets mismatched
41
- .transition(background-position .1s linear);
42
- }
43
-
44
- // Focus state for keyboard and accessibility
45
- .btn:focus {
46
- .tab-focus();
47
- }
48
-
49
- // Active state
50
- .btn.active,
51
- .btn:active {
52
- background-color: darken(@white, 10%);
53
- background-color: darken(@white, 15%) e("\9");
54
- background-image: none;
55
- outline: 0;
56
- .box-shadow(~"inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05)");
57
- }
58
-
59
- // Disabled state
60
- .btn.disabled,
61
- .btn[disabled] {
62
- cursor: default;
63
- background-color: darken(@white, 10%);
64
- background-image: none;
65
- .opacity(65);
66
- .box-shadow(none);
67
- }
68
-
69
-
70
- // Button Sizes
71
- // --------------------------------------------------
72
-
73
- // Large
74
- .btn-large {
75
- padding: 9px 14px;
76
- font-size: @baseFontSize + 2px;
77
- line-height: normal;
78
- .border-radius(5px);
79
- }
80
- .btn-large [class^="icon-"] {
81
- margin-top: 1px;
82
- }
83
-
84
- // Small
85
- .btn-small {
86
- padding: 5px 9px;
87
- font-size: @baseFontSize - 2px;
88
- line-height: @baseLineHeight - 2px;
89
- }
90
- .btn-small [class^="icon-"] {
91
- margin-top: -1px;
92
- }
93
-
94
- // Mini
95
- .btn-mini {
96
- padding: 2px 6px;
97
- font-size: @baseFontSize - 2px;
98
- line-height: @baseLineHeight - 4px;
99
- }
100
-
101
-
102
- // Alternate buttons
103
- // --------------------------------------------------
104
-
105
- // Set text color
106
- // -------------------------
107
- .btn-primary,
108
- .btn-primary:hover,
109
- .btn-warning,
110
- .btn-warning:hover,
111
- .btn-danger,
112
- .btn-danger:hover,
113
- .btn-success,
114
- .btn-success:hover,
115
- .btn-info,
116
- .btn-info:hover,
117
- .btn-inverse,
118
- .btn-inverse:hover {
119
- color: @white;
120
- text-shadow: 0 -1px 0 rgba(0,0,0,.25);
121
- }
122
- // Provide *some* extra contrast for those who can get it
123
- .btn-primary.active,
124
- .btn-warning.active,
125
- .btn-danger.active,
126
- .btn-success.active,
127
- .btn-info.active,
128
- .btn-inverse.active {
129
- color: rgba(255,255,255,.75);
130
- }
131
-
132
- // Set the backgrounds
133
- // -------------------------
134
- .btn {
135
- // reset here as of 2.0.3 due to Recess property order
136
- border-color: #ccc;
137
- border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);
138
- }
139
- .btn-primary {
140
- .buttonBackground(@btnPrimaryBackground, @btnPrimaryBackgroundHighlight);
141
- }
142
- // Warning appears are orange
143
- .btn-warning {
144
- .buttonBackground(@btnWarningBackground, @btnWarningBackgroundHighlight);
145
- }
146
- // Danger and error appear as red
147
- .btn-danger {
148
- .buttonBackground(@btnDangerBackground, @btnDangerBackgroundHighlight);
149
- }
150
- // Success appears as green
151
- .btn-success {
152
- .buttonBackground(@btnSuccessBackground, @btnSuccessBackgroundHighlight);
153
- }
154
- // Info appears as a neutral blue
155
- .btn-info {
156
- .buttonBackground(@btnInfoBackground, @btnInfoBackgroundHighlight);
157
- }
158
- // Inverse appears as dark gray
159
- .btn-inverse {
160
- .buttonBackground(@btnInverseBackground, @btnInverseBackgroundHighlight);
161
- }
162
-
163
-
164
- // Cross-browser Jank
165
- // --------------------------------------------------
166
-
167
- button.btn,
168
- input[type="submit"].btn {
169
-
170
- // Firefox 3.6 only I believe
171
- &::-moz-focus-inner {
172
- padding: 0;
173
- border: 0;
174
- }
175
-
176
- // IE7 has some default padding on button controls
177
- *padding-top: 2px;
178
- *padding-bottom: 2px;
179
- &.btn-large {
180
- *padding-top: 7px;
181
- *padding-bottom: 7px;
182
- }
183
- &.btn-small {
184
- *padding-top: 3px;
185
- *padding-bottom: 3px;
186
- }
187
- &.btn-mini {
188
- *padding-top: 1px;
189
- *padding-bottom: 1px;
190
- }
191
- }
@@ -1,29 +0,0 @@
1
- // CLOSE ICONS
2
- // -----------
3
-
4
- .close {
5
- float: right;
6
- font-size: 20px;
7
- font-weight: bold;
8
- line-height: @baseLineHeight;
9
- color: @black;
10
- text-shadow: 0 1px 0 rgba(255,255,255,1);
11
- .opacity(20);
12
- &:hover {
13
- color: @black;
14
- text-decoration: none;
15
- cursor: pointer;
16
- .opacity(40);
17
- }
18
- }
19
-
20
- // Additional properties for button version
21
- // iOS requires the button element instead of an anchor tag.
22
- // If you want the anchor version, it requires `href="#"`.
23
- button.close {
24
- padding: 0;
25
- cursor: pointer;
26
- background: transparent;
27
- border: 0;
28
- -webkit-appearance: none;
29
- }