easy_admin_ui 0.7.6 → 0.8.0
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +37 -42
- data/README.md +10 -3
- data/app/helpers/easy_admin_ui/easy_admin_ui_helper.rb +19 -14
- data/app/views/easy_admin_ui/edit.html.erb +1 -1
- data/app/views/easy_admin_ui/new.html.erb +1 -1
- data/lib/easy_admin_ui/version.rb +1 -1
- metadata +16 -16
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 16e3bf359e8a3396b8021e0bba260be86c3325d7
|
|
4
|
+
data.tar.gz: e2e1327ac46ec96fd1c68541ae1551fa7b9ef3ff
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 12659990cddcb1b86e67452e579cedf5d7b3b484dc73b70f30b0396cb8a0038d120b17946315e474620703ebf66c9825662ac81a1bf2e1b9709b745f903abcb7
|
|
7
|
+
data.tar.gz: 1a5533bc1e07342f60370ef3929d682492300b77be045677514fda01e8b83a65c31e1d62fde8bbc767892dd9d8edc7092e83cbf5ac014a586fa6ee101c22a850
|
data/Gemfile.lock
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
easy_admin_ui (0.
|
|
4
|
+
easy_admin_ui (0.8.0)
|
|
5
5
|
kaminari (>= 0.12.4)
|
|
6
6
|
rails (>= 4.0.0)
|
|
7
7
|
|
|
8
8
|
GEM
|
|
9
9
|
remote: https://rubygems.org/
|
|
10
10
|
specs:
|
|
11
|
-
actionmailer (4.1.
|
|
12
|
-
actionpack (= 4.1.
|
|
13
|
-
actionview (= 4.1.
|
|
14
|
-
mail (~> 2.5.4)
|
|
15
|
-
actionpack (4.1.
|
|
16
|
-
actionview (= 4.1.
|
|
17
|
-
activesupport (= 4.1.
|
|
11
|
+
actionmailer (4.1.8)
|
|
12
|
+
actionpack (= 4.1.8)
|
|
13
|
+
actionview (= 4.1.8)
|
|
14
|
+
mail (~> 2.5, >= 2.5.4)
|
|
15
|
+
actionpack (4.1.8)
|
|
16
|
+
actionview (= 4.1.8)
|
|
17
|
+
activesupport (= 4.1.8)
|
|
18
18
|
rack (~> 1.5.2)
|
|
19
19
|
rack-test (~> 0.6.2)
|
|
20
|
-
actionview (4.1.
|
|
21
|
-
activesupport (= 4.1.
|
|
20
|
+
actionview (4.1.8)
|
|
21
|
+
activesupport (= 4.1.8)
|
|
22
22
|
builder (~> 3.1)
|
|
23
23
|
erubis (~> 2.7.0)
|
|
24
|
-
activemodel (4.1.
|
|
25
|
-
activesupport (= 4.1.
|
|
24
|
+
activemodel (4.1.8)
|
|
25
|
+
activesupport (= 4.1.8)
|
|
26
26
|
builder (~> 3.1)
|
|
27
|
-
activerecord (4.1.
|
|
28
|
-
activemodel (= 4.1.
|
|
29
|
-
activesupport (= 4.1.
|
|
27
|
+
activerecord (4.1.8)
|
|
28
|
+
activemodel (= 4.1.8)
|
|
29
|
+
activesupport (= 4.1.8)
|
|
30
30
|
arel (~> 5.0.0)
|
|
31
|
-
activesupport (4.1.
|
|
31
|
+
activesupport (4.1.8)
|
|
32
32
|
i18n (~> 0.6, >= 0.6.9)
|
|
33
33
|
json (~> 1.7, >= 1.7.7)
|
|
34
34
|
minitest (~> 5.1)
|
|
@@ -45,37 +45,35 @@ GEM
|
|
|
45
45
|
sinatra (>= 1.2.7)
|
|
46
46
|
hike (1.2.3)
|
|
47
47
|
httpclient (2.3.4.1)
|
|
48
|
-
i18n (0.
|
|
48
|
+
i18n (0.7.0)
|
|
49
49
|
json (1.8.1)
|
|
50
|
-
kaminari (0.
|
|
50
|
+
kaminari (0.16.1)
|
|
51
51
|
actionpack (>= 3.0.0)
|
|
52
52
|
activesupport (>= 3.0.0)
|
|
53
|
-
mail (2.
|
|
54
|
-
mime-types (
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
minitest (5.3.5)
|
|
53
|
+
mail (2.6.3)
|
|
54
|
+
mime-types (>= 1.16, < 3)
|
|
55
|
+
mime-types (2.4.3)
|
|
56
|
+
minitest (5.5.0)
|
|
58
57
|
multi_json (1.10.1)
|
|
59
58
|
nesty (1.0.2)
|
|
60
|
-
polyglot (0.3.5)
|
|
61
59
|
rack (1.5.2)
|
|
62
60
|
rack-protection (1.5.2)
|
|
63
61
|
rack
|
|
64
62
|
rack-test (0.6.2)
|
|
65
63
|
rack (>= 1.0)
|
|
66
|
-
rails (4.1.
|
|
67
|
-
actionmailer (= 4.1.
|
|
68
|
-
actionpack (= 4.1.
|
|
69
|
-
actionview (= 4.1.
|
|
70
|
-
activemodel (= 4.1.
|
|
71
|
-
activerecord (= 4.1.
|
|
72
|
-
activesupport (= 4.1.
|
|
64
|
+
rails (4.1.8)
|
|
65
|
+
actionmailer (= 4.1.8)
|
|
66
|
+
actionpack (= 4.1.8)
|
|
67
|
+
actionview (= 4.1.8)
|
|
68
|
+
activemodel (= 4.1.8)
|
|
69
|
+
activerecord (= 4.1.8)
|
|
70
|
+
activesupport (= 4.1.8)
|
|
73
71
|
bundler (>= 1.3.0, < 2.0)
|
|
74
|
-
railties (= 4.1.
|
|
72
|
+
railties (= 4.1.8)
|
|
75
73
|
sprockets-rails (~> 2.0)
|
|
76
|
-
railties (4.1.
|
|
77
|
-
actionpack (= 4.1.
|
|
78
|
-
activesupport (= 4.1.
|
|
74
|
+
railties (4.1.8)
|
|
75
|
+
actionpack (= 4.1.8)
|
|
76
|
+
activesupport (= 4.1.8)
|
|
79
77
|
rake (>= 0.8.7)
|
|
80
78
|
thor (>= 0.18.1, < 2.0)
|
|
81
79
|
rake (10.1.1)
|
|
@@ -91,22 +89,19 @@ GEM
|
|
|
91
89
|
rack (~> 1.4)
|
|
92
90
|
rack-protection (~> 1.4)
|
|
93
91
|
tilt (~> 1.3, >= 1.3.4)
|
|
94
|
-
sprockets (2.12.
|
|
92
|
+
sprockets (2.12.3)
|
|
95
93
|
hike (~> 1.2)
|
|
96
94
|
multi_json (~> 1.0)
|
|
97
95
|
rack (~> 1.0)
|
|
98
96
|
tilt (~> 1.1, != 1.3.0)
|
|
99
|
-
sprockets-rails (2.
|
|
97
|
+
sprockets-rails (2.2.2)
|
|
100
98
|
actionpack (>= 3.0)
|
|
101
99
|
activesupport (>= 3.0)
|
|
102
|
-
sprockets (
|
|
100
|
+
sprockets (>= 2.8, < 4.0)
|
|
103
101
|
thor (0.19.1)
|
|
104
102
|
thread_safe (0.3.4)
|
|
105
103
|
tilt (1.4.1)
|
|
106
|
-
|
|
107
|
-
polyglot
|
|
108
|
-
polyglot (>= 0.3.1)
|
|
109
|
-
tzinfo (1.2.1)
|
|
104
|
+
tzinfo (1.2.2)
|
|
110
105
|
thread_safe (~> 0.1)
|
|
111
106
|
|
|
112
107
|
PLATFORMS
|
data/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# easy_admin_ui
|
|
2
2
|
|
|
3
|
-
A very simple admin UI. If you need something more fancy look
|
|
3
|
+
A very simple admin UI. If you need something more fancy look try https://github.com/sferik/rails_admin.
|
|
4
|
+
|
|
5
|
+
Docs are incomplete.
|
|
4
6
|
|
|
5
7
|
## Requirements
|
|
6
8
|
|
|
@@ -8,8 +10,7 @@ A very simple admin UI. If you need something more fancy look at ActiveScaffold.
|
|
|
8
10
|
* Rails 4.0 or later. (0.6.x works with 3.2.x)
|
|
9
11
|
* formtastic 2.2.1 or higher (specify it in your Gemfile if needed)
|
|
10
12
|
* kaminari
|
|
11
|
-
|
|
12
|
-
Requires jQuery.
|
|
13
|
+
* jQuery
|
|
13
14
|
|
|
14
15
|
## Note
|
|
15
16
|
|
|
@@ -54,6 +55,12 @@ Then you need a partial below users/ named '_user.html.erb':
|
|
|
54
55
|
])
|
|
55
56
|
-%>
|
|
56
57
|
|
|
58
|
+
For deeper nested resources simply use:
|
|
59
|
+
|
|
60
|
+
admin_show_link([user, article])
|
|
61
|
+
|
|
62
|
+
This also works for forms but you need to set
|
|
63
|
+
|
|
57
64
|
To add a class to your table cells just pass an array as done with the user.email
|
|
58
65
|
field in the above example.
|
|
59
66
|
|
|
@@ -67,27 +67,32 @@ module EasyAdminUi
|
|
|
67
67
|
[content, 'aright']
|
|
68
68
|
end
|
|
69
69
|
|
|
70
|
-
def admin_show_link(item, html_options = {})
|
|
71
|
-
link_to(show_icon_image_tag, {
|
|
70
|
+
def admin_show_link(item, url_options = {}, html_options = {})
|
|
71
|
+
link_to(show_icon_image_tag, eval("#{items_to_url(item)}(*item, url_options)"), html_options)
|
|
72
72
|
end
|
|
73
73
|
|
|
74
|
-
def admin_new_link(html_options = {})
|
|
75
|
-
content_tag(:span, raw(' - ') +
|
|
74
|
+
def admin_new_link(url_options = {}, html_options = {})
|
|
75
|
+
content_tag(:span, raw(' - ') +
|
|
76
|
+
link_to('New', {action: 'new'}.merge(url_options), html_options))
|
|
76
77
|
end
|
|
77
78
|
|
|
78
|
-
def admin_edit_link(item, html_options = {})
|
|
79
|
-
link_to(edit_icon_image_tag, {
|
|
79
|
+
def admin_edit_link(item, url_options = {}, html_options = {})
|
|
80
|
+
link_to(edit_icon_image_tag, eval("edit_#{items_to_url(item)}(*item, url_options)"), html_options)
|
|
80
81
|
end
|
|
81
82
|
|
|
82
83
|
# Use if below /admin/.
|
|
83
|
-
def admin_delete_link_with_confirmation(
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
84
|
+
def admin_delete_link_with_confirmation(item, url_options = {})
|
|
85
|
+
link_to(delete_icon_image_tag, eval("#{items_to_url(item)}(*item, url_options)"), class: "admin_delete", 'data-id' => item.to_param)
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
def items_to_url(item)
|
|
89
|
+
"admin_" +
|
|
90
|
+
if item.is_a?(Array)
|
|
91
|
+
item.map { |obj| obj.class.to_s.underscore }.join('_')
|
|
92
|
+
else
|
|
93
|
+
item.class.to_s.underscore.singularize.to_s
|
|
94
|
+
end +
|
|
95
|
+
"_path"
|
|
91
96
|
end
|
|
92
97
|
|
|
93
98
|
def partial_exists?(filename)
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<%= render_optional_either('modify_after_title', 'edit_after_title') %>
|
|
4
4
|
<%= render_optional('after_title') %>
|
|
5
5
|
|
|
6
|
-
<%= semantic_form_for(@item, :
|
|
6
|
+
<%= semantic_form_for(@item, url: eval("#{items_to_url([@parent_of_parent_item, @parent_item, @item].compact)}"), html: { multipart: true }) do |f| %>
|
|
7
7
|
<%= f.inputs do %>
|
|
8
8
|
<%= render :partial => 'form', :locals => {:f => f} %>
|
|
9
9
|
<% end -%>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<%= render_optional_either('modify_after_title', 'new_after_title') %>
|
|
4
4
|
<%= render_optional('after_title') %>
|
|
5
5
|
|
|
6
|
-
<%= semantic_form_for(@item, :
|
|
6
|
+
<%= semantic_form_for(@item, url: eval("#{items_to_url([@parent_of_parent_item, @parent_item, @item].compact)}"), html: { multipart: true }) do |f| %>
|
|
7
7
|
<%= f.inputs do %>
|
|
8
8
|
<%= render :partial => 'form', :locals => {:f => f} %>
|
|
9
9
|
<% end -%>
|
metadata
CHANGED
|
@@ -1,83 +1,83 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: easy_admin_ui
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.8.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Martin Moen Wulffeld
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2015-01-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- -
|
|
17
|
+
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
19
|
version: 1.3.2
|
|
20
20
|
type: :development
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
|
-
- -
|
|
24
|
+
- - ">="
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: 1.3.2
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: rake
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
|
-
- -
|
|
31
|
+
- - ">="
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
33
|
version: '0'
|
|
34
34
|
type: :development
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
|
-
- -
|
|
38
|
+
- - ">="
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
40
|
version: '0'
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: geminabox
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
|
-
- -
|
|
45
|
+
- - ">="
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
47
|
version: '0'
|
|
48
48
|
type: :development
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
|
-
- -
|
|
52
|
+
- - ">="
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
54
|
version: '0'
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
56
|
name: kaminari
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
58
58
|
requirements:
|
|
59
|
-
- -
|
|
59
|
+
- - ">="
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
61
|
version: 0.12.4
|
|
62
62
|
type: :runtime
|
|
63
63
|
prerelease: false
|
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
65
|
requirements:
|
|
66
|
-
- -
|
|
66
|
+
- - ">="
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
68
|
version: 0.12.4
|
|
69
69
|
- !ruby/object:Gem::Dependency
|
|
70
70
|
name: rails
|
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
|
72
72
|
requirements:
|
|
73
|
-
- -
|
|
73
|
+
- - ">="
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
75
|
version: 4.0.0
|
|
76
76
|
type: :runtime
|
|
77
77
|
prerelease: false
|
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
79
|
requirements:
|
|
80
|
-
- -
|
|
80
|
+
- - ">="
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
82
|
version: 4.0.0
|
|
83
83
|
description: Very simple DRY admin UI.
|
|
@@ -87,7 +87,7 @@ executables: []
|
|
|
87
87
|
extensions: []
|
|
88
88
|
extra_rdoc_files: []
|
|
89
89
|
files:
|
|
90
|
-
- .gitignore
|
|
90
|
+
- ".gitignore"
|
|
91
91
|
- Gemfile
|
|
92
92
|
- Gemfile.lock
|
|
93
93
|
- README.md
|
|
@@ -134,17 +134,17 @@ require_paths:
|
|
|
134
134
|
- lib
|
|
135
135
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
136
136
|
requirements:
|
|
137
|
-
- -
|
|
137
|
+
- - ">="
|
|
138
138
|
- !ruby/object:Gem::Version
|
|
139
139
|
version: '0'
|
|
140
140
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
141
141
|
requirements:
|
|
142
|
-
- -
|
|
142
|
+
- - ">="
|
|
143
143
|
- !ruby/object:Gem::Version
|
|
144
144
|
version: '0'
|
|
145
145
|
requirements: []
|
|
146
146
|
rubyforge_project:
|
|
147
|
-
rubygems_version: 2.
|
|
147
|
+
rubygems_version: 2.4.5
|
|
148
148
|
signing_key:
|
|
149
149
|
specification_version: 4
|
|
150
150
|
summary: Easy Admin UI.
|