easy_admin_ui 0.5.2 → 0.5.3
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.
- data/VERSION +1 -1
- data/app/assets/stylesheets/easy_admin_ui/easy_admin_ui.sass +2 -0
- data/easy_admin_ui.gemspec +2 -2
- data/lib/easy_admin_ui/core_ext.rb +12 -4
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.3
|
@@ -5,10 +5,12 @@ table.easy
|
|
5
5
|
font-family: "Helvetica Neue", Arial, sans-serif
|
6
6
|
font-size: 12px
|
7
7
|
line-height: 14px
|
8
|
+
vertical-align: top
|
8
9
|
td
|
9
10
|
font-family: "Helvetica Neue", Arial, sans-serif
|
10
11
|
font-size: 12px
|
11
12
|
line-height: 14px
|
13
|
+
vertical-align: top
|
12
14
|
p
|
13
15
|
margin: 0 0 10px 0
|
14
16
|
th.wrap,
|
data/easy_admin_ui.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "easy_admin_ui"
|
8
|
-
s.version = "0.5.
|
8
|
+
s.version = "0.5.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Martin Moen Wulffeld"]
|
12
|
-
s.date = "2011-
|
12
|
+
s.date = "2011-10-08"
|
13
13
|
s.description = "Very simple DRY admin UI."
|
14
14
|
s.email = "martin@wulffeld.org"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -18,10 +18,14 @@ module EasyAdminUi
|
|
18
18
|
format.html do
|
19
19
|
@options = options
|
20
20
|
override = File.join('app/views', self.controller_path, 'index.html.erb')
|
21
|
-
if
|
22
|
-
|
21
|
+
if @items.blank? && params[:page] && params[:page].to_i > 1
|
22
|
+
redirect_to :action => :index
|
23
23
|
else
|
24
|
-
|
24
|
+
if File.exists?(override)
|
25
|
+
render :template => override.gsub('app/views', '')
|
26
|
+
else
|
27
|
+
render :template => 'easy_admin_ui/index'
|
28
|
+
end
|
25
29
|
end
|
26
30
|
end
|
27
31
|
end
|
@@ -78,7 +82,11 @@ module EasyAdminUi
|
|
78
82
|
end
|
79
83
|
|
80
84
|
def current_objects
|
81
|
-
|
85
|
+
if current_model.included_modules.include?(Mongoid::Document)
|
86
|
+
@items = current_model.send(options[:order_method] ? options[:order_method] : :asc, options[:order]).page(params[:page]).per(options[:per_page])
|
87
|
+
else
|
88
|
+
@items = current_model.order(options[:order]).page(params[:page]).per(options[:per_page])
|
89
|
+
end
|
82
90
|
end
|
83
91
|
|
84
92
|
def current_object
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easy_admin_ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 13
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 0.5.
|
9
|
+
- 3
|
10
|
+
version: 0.5.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Martin Moen Wulffeld
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-10-08 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: kaminari
|