activeadmin-settings 0.1.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/README.md +11 -1
- data/activeadmin-settings.gemspec +0 -3
- data/app/controller/activeadmin_settings/admin_users_controller.rb +27 -0
- data/app/controller/activeadmin_settings/settings_controller.rb +12 -0
- data/app/views/admin/settings/_admin.html.erb +42 -0
- data/app/views/admin/settings/_admin_form.html.erb +22 -0
- data/app/views/admin/settings/_admins_table.html.erb +16 -0
- data/app/views/admin/settings/_index.html.erb +20 -0
- data/app/views/admin/settings/_settings_table.html.erb +48 -0
- data/config/routes.rb +4 -0
- data/lib/activeadmin-settings.rb +22 -3
- data/lib/activeadmin-settings/helper.rb +5 -2
- data/lib/activeadmin-settings/version.rb +1 -1
- data/lib/generators/activeadmin_settings/install_generator.rb +4 -5
- data/lib/generators/activeadmin_settings/templates/admin/settings.rb +17 -38
- data/lib/generators/activeadmin_settings/templates/config/activeadmin_settings.yml +8 -6
- data/lib/generators/activeadmin_settings/templates/models/setting.rb +3 -3
- data/lib/tasks/activeadmin_settings.rake +15 -0
- data/vendor/assets/javascripts/activeadmin_settings.js.coffee +2 -32
- data/vendor/assets/javascripts/activeadmin_settings/admins.js.coffee +80 -0
- data/vendor/assets/javascripts/activeadmin_settings/flashes.js.coffee +6 -0
- data/vendor/assets/javascripts/activeadmin_settings/settings.js.coffee +32 -0
- data/vendor/assets/javascripts/activeadmin_settings/tabs.js.coffee +6 -0
- data/vendor/assets/javascripts/jquery.easytabs.js +679 -0
- data/vendor/assets/stylesheets/activeadmin_settings.css.scss +14 -1
- metadata +16 -5
- data/app/views/admin/settings/_value.html.erb +0 -21
- data/lib/generators/activeadmin_settings/templates/admin/admin_users.rb +0 -23
@@ -4,14 +4,27 @@
|
|
4
4
|
|
5
5
|
.update_setting_link { display: none; }
|
6
6
|
tr td .form {
|
7
|
-
display:none;
|
7
|
+
//display:none;
|
8
8
|
.label { display:none; }
|
9
9
|
.file .label { display:inline; }
|
10
10
|
.inputs { margin-bottom:0; }
|
11
11
|
input[type="text"], textarea { width:90%; }
|
12
|
+
textarea { height:100px; }
|
12
13
|
}
|
13
14
|
}
|
14
15
|
|
15
16
|
#admins {
|
16
17
|
tr th:last-child { width:15%; }
|
18
|
+
|
19
|
+
.form { display:none; }
|
20
|
+
.form_actions { display:none; }
|
21
|
+
}
|
22
|
+
|
23
|
+
ul.tabs {
|
24
|
+
margin-bottom: 14px;
|
25
|
+
}
|
26
|
+
|
27
|
+
.flashes {
|
28
|
+
position: absolute;
|
29
|
+
width: 100%;
|
17
30
|
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activeadmin-settings
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1
|
4
|
+
version: 0.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-07-
|
12
|
+
date: 2012-07-31 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Easy to use general purpose settings backend for activeadmin
|
15
15
|
email:
|
@@ -22,20 +22,31 @@ files:
|
|
22
22
|
- README.md
|
23
23
|
- Rakefile
|
24
24
|
- activeadmin-settings.gemspec
|
25
|
-
- app/
|
25
|
+
- app/controller/activeadmin_settings/admin_users_controller.rb
|
26
|
+
- app/controller/activeadmin_settings/settings_controller.rb
|
27
|
+
- app/views/admin/settings/_admin.html.erb
|
28
|
+
- app/views/admin/settings/_admin_form.html.erb
|
29
|
+
- app/views/admin/settings/_admins_table.html.erb
|
30
|
+
- app/views/admin/settings/_index.html.erb
|
31
|
+
- app/views/admin/settings/_settings_table.html.erb
|
32
|
+
- config/routes.rb
|
26
33
|
- lib/activeadmin-settings.rb
|
27
34
|
- lib/activeadmin-settings/.DS_Store
|
28
35
|
- lib/activeadmin-settings/engine.rb
|
29
36
|
- lib/activeadmin-settings/helper.rb
|
30
37
|
- lib/activeadmin-settings/version.rb
|
31
38
|
- lib/generators/activeadmin_settings/install_generator.rb
|
32
|
-
- lib/generators/activeadmin_settings/templates/admin/admin_users.rb
|
33
39
|
- lib/generators/activeadmin_settings/templates/admin/settings.rb
|
34
40
|
- lib/generators/activeadmin_settings/templates/config/activeadmin_settings.yml
|
35
41
|
- lib/generators/activeadmin_settings/templates/models/setting.rb
|
36
42
|
- lib/generators/activeadmin_settings/templates/uploaders/settings_file_uploader.rb
|
37
43
|
- lib/tasks/activeadmin_settings.rake
|
38
44
|
- vendor/assets/javascripts/activeadmin_settings.js.coffee
|
45
|
+
- vendor/assets/javascripts/activeadmin_settings/admins.js.coffee
|
46
|
+
- vendor/assets/javascripts/activeadmin_settings/flashes.js.coffee
|
47
|
+
- vendor/assets/javascripts/activeadmin_settings/settings.js.coffee
|
48
|
+
- vendor/assets/javascripts/activeadmin_settings/tabs.js.coffee
|
49
|
+
- vendor/assets/javascripts/jquery.easytabs.js
|
39
50
|
- vendor/assets/javascripts/jquery.form.js
|
40
51
|
- vendor/assets/stylesheets/activeadmin_settings.css.scss
|
41
52
|
homepage: https://github.com/alexkravets/activeadmin-settings
|
@@ -52,7 +63,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
52
63
|
version: '0'
|
53
64
|
segments:
|
54
65
|
- 0
|
55
|
-
hash:
|
66
|
+
hash: 1834773827984310643
|
56
67
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
57
68
|
none: false
|
58
69
|
requirements:
|
@@ -1,21 +0,0 @@
|
|
1
|
-
<div class="value <%= setting.type %>">
|
2
|
-
<%= setting.value %>
|
3
|
-
</div>
|
4
|
-
|
5
|
-
<div class="form">
|
6
|
-
<%= semantic_form_for setting,
|
7
|
-
:method => :put,
|
8
|
-
:url => admin_setting_path(setting) do |f| %>
|
9
|
-
<%= f.inputs do %>
|
10
|
-
<% case setting.type %>
|
11
|
-
<% when "file" %>
|
12
|
-
<%= f.input :file %>
|
13
|
-
<%= f.input :remove_file, :as => :boolean %>
|
14
|
-
<% when "text" %>
|
15
|
-
<%= f.input :string, :as => :text %>
|
16
|
-
<% else %>
|
17
|
-
<%= f.input :string, :placeholder => "Default: " + setting.default_value %>
|
18
|
-
<% end %>
|
19
|
-
<% end %>
|
20
|
-
<% end %>
|
21
|
-
</div>
|
@@ -1,23 +0,0 @@
|
|
1
|
-
ActiveAdmin.register AdminUser, :as => "Admin" do
|
2
|
-
menu :parent => "Settings", :priority => 2
|
3
|
-
|
4
|
-
index do
|
5
|
-
column :email
|
6
|
-
default_actions
|
7
|
-
end
|
8
|
-
|
9
|
-
show :title => :email do
|
10
|
-
panel("Admin Details") do
|
11
|
-
attributes_table_for resource, :id, :email
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
form do |f|
|
16
|
-
f.inputs "Credentials" do
|
17
|
-
f.input :email
|
18
|
-
f.input :password
|
19
|
-
f.input :password_confirmation
|
20
|
-
end
|
21
|
-
f.buttons
|
22
|
-
end
|
23
|
-
end
|