manage 1.3.40 → 1.3.41
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +20 -20
- data/Rakefile +31 -31
- data/app/assets/javascripts/manage/collection_actions.js.coffee +30 -30
- data/app/assets/javascripts/manage/handlers.js.coffee +46 -46
- data/app/assets/javascripts/manage/table_checkboxes.js.coffee +11 -11
- data/app/controllers/manage/application_controller.rb +13 -13
- data/app/controllers/manage/dashboards_controller.rb +4 -4
- data/app/controllers/manage/responder.rb +11 -11
- data/app/controllers/manage/sessions_controller.rb +11 -11
- data/app/helpers/manage/application_helper.rb +42 -42
- data/app/helpers/manage/form_helper.rb +21 -21
- data/app/helpers/manage/resource_helper.rb +77 -77
- data/app/models/admin_user.rb +4 -4
- data/app/views/layouts/manage/_main_menu.html.slim +52 -52
- data/app/views/layouts/manage/sign_in.html.slim +30 -30
- data/app/views/manage/resource/_form.html.slim +4 -4
- data/app/views/manage/resource/index/_collection_actions.html.slim +2 -2
- data/app/views/manage/resource/index/_count.html.slim +6 -6
- data/app/views/manage/resource/show.html.slim +10 -10
- data/app/views/manage/sessions/new.html.slim +10 -10
- data/config/initializers/devise.rb +247 -247
- data/config/initializers/session_store.rb +3 -3
- data/config/initializers/simple_form.rb +145 -145
- data/config/initializers/simple_form_foundation.rb +26 -26
- data/config/locales/devise.en.yml +59 -59
- data/config/locales/en.yml +20 -20
- data/config/routes.rb +10 -10
- data/db/migrate/20131204142720_create_admin_users.rb +24 -24
- data/lib/manage/engine.rb +21 -21
- data/lib/manage/fields.rb +6 -6
- data/lib/manage/version.rb +1 -1
- data/lib/manage.rb +5 -5
- data/lib/tasks/manage_tasks.rake +15 -15
- data/lib/templates/erb/scaffold/_form.html.erb +13 -13
- data/spec/controllers/manage/resource_controller_spec.rb +29 -29
- data/spec/dummy/README.rdoc +28 -28
- data/spec/dummy/Rakefile +6 -6
- data/spec/dummy/app/assets/javascripts/application.js +13 -13
- data/spec/dummy/app/assets/stylesheets/application.css +13 -13
- data/spec/dummy/app/controllers/application_controller.rb +5 -5
- data/spec/dummy/app/controllers/manage/posts_controller.rb +4 -4
- data/spec/dummy/app/helpers/application_helper.rb +2 -2
- data/spec/dummy/app/models/post.rb +3 -3
- data/spec/dummy/app/models/user.rb +5 -5
- data/spec/dummy/app/views/layouts/application.html.erb +14 -14
- data/spec/dummy/bin/bundle +3 -3
- data/spec/dummy/bin/rails +4 -4
- data/spec/dummy/bin/rake +4 -4
- data/spec/dummy/config/application.rb +24 -24
- data/spec/dummy/config/boot.rb +5 -5
- data/spec/dummy/config/database.yml +25 -25
- data/spec/dummy/config/environment.rb +5 -5
- data/spec/dummy/config/environments/development.rb +29 -29
- data/spec/dummy/config/environments/production.rb +80 -80
- data/spec/dummy/config/environments/test.rb +36 -36
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -7
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -4
- data/spec/dummy/config/initializers/inflections.rb +16 -16
- data/spec/dummy/config/initializers/mime_types.rb +5 -5
- data/spec/dummy/config/initializers/secret_token.rb +12 -12
- data/spec/dummy/config/initializers/session_store.rb +3 -3
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -14
- data/spec/dummy/config/locales/en.yml +23 -23
- data/spec/dummy/config/routes.rb +10 -10
- data/spec/dummy/config.ru +4 -4
- data/spec/dummy/db/migrate/20130716083410_init_migration.rb +21 -21
- data/spec/dummy/db/schema.rb +53 -53
- data/spec/dummy/public/404.html +58 -58
- data/spec/dummy/public/422.html +58 -58
- data/spec/dummy/public/500.html +57 -57
- data/spec/fields/reader_spec.rb +79 -79
- data/spec/spec_helper.rb +24 -24
- metadata +30 -30
data/app/models/admin_user.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
class AdminUser < ActiveRecord::Base
|
2
|
-
devise :database_authenticatable, :registerable, :lockable, :timeoutable,
|
3
|
-
:recoverable, :rememberable, :trackable, :validatable
|
4
|
-
end
|
1
|
+
class AdminUser < ActiveRecord::Base
|
2
|
+
devise :database_authenticatable, :registerable, :lockable, :timeoutable,
|
3
|
+
:recoverable, :rememberable, :trackable, :validatable
|
4
|
+
end
|
@@ -1,52 +1,52 @@
|
|
1
|
-
// Override me in /views/layouts/manage/main_menu
|
2
|
-
|
3
|
-
ul.right
|
4
|
-
li.divider.hide-for-small
|
5
|
-
li = link_to current_user.email, current_user
|
6
|
-
li.divider.hide-for-small
|
7
|
-
li = link_to 'users', users_path
|
8
|
-
li.divider.hide-for-small
|
9
|
-
li = link_to AdminUser.model_name.human(count:2), admin_users_path
|
10
|
-
li.divider.hide-for-small
|
11
|
-
li.has-dropdown
|
12
|
-
a href="#" Main Item 1
|
13
|
-
ul.dropdown
|
14
|
-
li
|
15
|
-
label Dropdown Level 1 Label
|
16
|
-
li.has-dropdown
|
17
|
-
a href="#" Dropdown Level 1a
|
18
|
-
ul.dropdown
|
19
|
-
li
|
20
|
-
a href="#" Dropdown Level 2a
|
21
|
-
li
|
22
|
-
a href="#" Dropdown Level 2b
|
23
|
-
li.has-dropdown
|
24
|
-
a href="#">Dropdown Level 2c
|
25
|
-
ul.dropdown
|
26
|
-
li
|
27
|
-
a href="#" Dropdown Level 3a
|
28
|
-
li
|
29
|
-
a href="#" Dropdown Level 3b
|
30
|
-
li
|
31
|
-
a href="#" Dropdown Level 3c
|
32
|
-
li
|
33
|
-
a href="#" Dropdown Level 2d
|
34
|
-
li
|
35
|
-
a href="#" Dropdown Level 2e
|
36
|
-
li
|
37
|
-
a href="#" Dropdown Level 2f
|
38
|
-
li
|
39
|
-
a href="#" Dropdown Level 1b
|
40
|
-
li
|
41
|
-
a href="#" Dropdown Level 1c
|
42
|
-
li.divider
|
43
|
-
li
|
44
|
-
label Dropdown Level 1 Label
|
45
|
-
li
|
46
|
-
a href="#" Dropdown Level 1d
|
47
|
-
li
|
48
|
-
a href="#" Dropdown Level 1e
|
49
|
-
li
|
50
|
-
a href="#" Dropdown Level 1f
|
51
|
-
li.has-form
|
52
|
-
a.button href="http://foundation.zurb.com/docs" Sample button
|
1
|
+
// Override me in /views/layouts/manage/main_menu
|
2
|
+
|
3
|
+
ul.right
|
4
|
+
li.divider.hide-for-small
|
5
|
+
li = link_to current_user.email, current_user
|
6
|
+
li.divider.hide-for-small
|
7
|
+
li = link_to 'users', users_path
|
8
|
+
li.divider.hide-for-small
|
9
|
+
li = link_to AdminUser.model_name.human(count:2), admin_users_path
|
10
|
+
li.divider.hide-for-small
|
11
|
+
li.has-dropdown
|
12
|
+
a href="#" Main Item 1
|
13
|
+
ul.dropdown
|
14
|
+
li
|
15
|
+
label Dropdown Level 1 Label
|
16
|
+
li.has-dropdown
|
17
|
+
a href="#" Dropdown Level 1a
|
18
|
+
ul.dropdown
|
19
|
+
li
|
20
|
+
a href="#" Dropdown Level 2a
|
21
|
+
li
|
22
|
+
a href="#" Dropdown Level 2b
|
23
|
+
li.has-dropdown
|
24
|
+
a href="#">Dropdown Level 2c
|
25
|
+
ul.dropdown
|
26
|
+
li
|
27
|
+
a href="#" Dropdown Level 3a
|
28
|
+
li
|
29
|
+
a href="#" Dropdown Level 3b
|
30
|
+
li
|
31
|
+
a href="#" Dropdown Level 3c
|
32
|
+
li
|
33
|
+
a href="#" Dropdown Level 2d
|
34
|
+
li
|
35
|
+
a href="#" Dropdown Level 2e
|
36
|
+
li
|
37
|
+
a href="#" Dropdown Level 2f
|
38
|
+
li
|
39
|
+
a href="#" Dropdown Level 1b
|
40
|
+
li
|
41
|
+
a href="#" Dropdown Level 1c
|
42
|
+
li.divider
|
43
|
+
li
|
44
|
+
label Dropdown Level 1 Label
|
45
|
+
li
|
46
|
+
a href="#" Dropdown Level 1d
|
47
|
+
li
|
48
|
+
a href="#" Dropdown Level 1e
|
49
|
+
li
|
50
|
+
a href="#" Dropdown Level 1f
|
51
|
+
li.has-form
|
52
|
+
a.button href="http://foundation.zurb.com/docs" Sample button
|
@@ -1,30 +1,30 @@
|
|
1
|
-
html
|
2
|
-
head
|
3
|
-
meta charset="utf-8"
|
4
|
-
meta name="viewport" content="width=device-width, initial-scale=1.0"
|
5
|
-
title Manage
|
6
|
-
= stylesheet_link_tag "manage/application", media: "all"
|
7
|
-
= javascript_include_tag "modernizr.min.js"
|
8
|
-
|
9
|
-
= stylesheet_link_tag "manage/custom", media: "all"
|
10
|
-
|
11
|
-
= csrf_meta_tags
|
12
|
-
|
13
|
-
body class="simple" data-locale=I18n.locale
|
14
|
-
section.main
|
15
|
-
#flash
|
16
|
-
- flash.each do |key, value|
|
17
|
-
- key = 'info' if key == :notice
|
18
|
-
- key = 'alert' if key == :error
|
19
|
-
div data-alert="" class="alert-box #{key}"
|
20
|
-
- if value.is_a?(Array)
|
21
|
-
- value.each do |element|
|
22
|
-
p #{element.html_safe}
|
23
|
-
- elsif value.is_a?(String)
|
24
|
-
p #{value.html_safe}
|
25
|
-
a.close href="#" ×
|
26
|
-
|
27
|
-
= yield
|
28
|
-
|
29
|
-
= javascript_include_tag "manage/application"
|
30
|
-
|
1
|
+
html
|
2
|
+
head
|
3
|
+
meta charset="utf-8"
|
4
|
+
meta name="viewport" content="width=device-width, initial-scale=1.0"
|
5
|
+
title Manage
|
6
|
+
= stylesheet_link_tag "manage/application", media: "all"
|
7
|
+
= javascript_include_tag "modernizr.min.js"
|
8
|
+
|
9
|
+
= stylesheet_link_tag "manage/custom", media: "all"
|
10
|
+
|
11
|
+
= csrf_meta_tags
|
12
|
+
|
13
|
+
body class="simple" data-locale=I18n.locale
|
14
|
+
section.main
|
15
|
+
#flash
|
16
|
+
- flash.each do |key, value|
|
17
|
+
- key = 'info' if key == :notice
|
18
|
+
- key = 'alert' if key == :error
|
19
|
+
div data-alert="" class="alert-box #{key}"
|
20
|
+
- if value.is_a?(Array)
|
21
|
+
- value.each do |element|
|
22
|
+
p #{element.html_safe}
|
23
|
+
- elsif value.is_a?(String)
|
24
|
+
p #{value.html_safe}
|
25
|
+
a.close href="#" ×
|
26
|
+
|
27
|
+
= yield
|
28
|
+
|
29
|
+
= javascript_include_tag "manage/application"
|
30
|
+
|
@@ -1,4 +1,4 @@
|
|
1
|
-
= manage_form_for [ resource ] do |f|
|
2
|
-
- edit_fields.each do |field|
|
3
|
-
= f.input field
|
4
|
-
= f.submit class: 'button small'
|
1
|
+
= manage_form_for [ resource ] do |f|
|
2
|
+
- edit_fields.each do |field|
|
3
|
+
= f.input field
|
4
|
+
= f.submit class: 'button small'
|
@@ -1,3 +1,3 @@
|
|
1
|
-
- if collection.count > 0 and collection_actions(collection).present?
|
2
|
-
.panel.collection_actions
|
1
|
+
- if collection.count > 0 and collection_actions(collection).present?
|
2
|
+
.panel.collection_actions
|
3
3
|
= collection_actions(collection)
|
@@ -1,6 +1,6 @@
|
|
1
|
-
.panel
|
2
|
-
dl.sub-nav
|
3
|
-
dt Count:
|
4
|
-
dd.active
|
5
|
-
= collection.total_count
|
6
|
-
|
1
|
+
.panel
|
2
|
+
dl.sub-nav
|
3
|
+
dt Count:
|
4
|
+
dd.active
|
5
|
+
= collection.total_count
|
6
|
+
|
@@ -1,11 +1,11 @@
|
|
1
|
-
nav
|
2
|
-
= [ link_to(t('manage.actions.index', model: resource_class.model_name.human(count: 2)), resource.class, class: 'button small secondary'),
|
3
|
-
link_to(t('manage.actions.edit'), [:edit, resource], class: 'button small'),
|
4
|
-
resource_actions(resource),
|
5
|
-
].compact.join(' ').html_safe
|
6
|
-
|
7
|
-
article
|
8
|
-
dl
|
9
|
-
- resource_class.attribute_names.each do |attr|
|
10
|
-
dt= resource_class.human_attribute_name(attr)
|
1
|
+
nav
|
2
|
+
= [ link_to(t('manage.actions.index', model: resource_class.model_name.human(count: 2)), resource.class, class: 'button small secondary'),
|
3
|
+
link_to(t('manage.actions.edit'), [:edit, resource], class: 'button small'),
|
4
|
+
resource_actions(resource),
|
5
|
+
].compact.join(' ').html_safe
|
6
|
+
|
7
|
+
article
|
8
|
+
dl
|
9
|
+
- resource_class.attribute_names.each do |attr|
|
10
|
+
dt= resource_class.human_attribute_name(attr)
|
11
11
|
dd= resource.public_send(attr)
|
@@ -1,10 +1,10 @@
|
|
1
|
-
h2 = t('.sign_in')
|
2
|
-
|
3
|
-
= simple_form_for(resource, :as => resource_name, :url => admin_user_session_path) do |f|
|
4
|
-
.form-inputs
|
5
|
-
= f.input :email, :required => false, :autofocus => true
|
6
|
-
= f.input :password, :required => false
|
7
|
-
= f.input :remember_me, :as => :boolean if devise_mapping.rememberable?
|
8
|
-
.form-actions
|
9
|
-
= f.submit t('devise.users.registrations.login')
|
10
|
-
|
1
|
+
h2 = t('.sign_in')
|
2
|
+
|
3
|
+
= simple_form_for(resource, :as => resource_name, :url => admin_user_session_path) do |f|
|
4
|
+
.form-inputs
|
5
|
+
= f.input :email, :required => false, :autofocus => true
|
6
|
+
= f.input :password, :required => false
|
7
|
+
= f.input :remember_me, :as => :boolean if devise_mapping.rememberable?
|
8
|
+
.form-actions
|
9
|
+
= f.submit t('devise.users.registrations.login')
|
10
|
+
|