admin_interface 2.1.12 → 2.1.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "admin_interface"
8
- s.version = "2.1.12"
8
+ s.version = "2.1.13"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Joost Hietbrink"]
12
- s.date = "2012-06-07"
12
+ s.date = "2012-06-14"
13
13
  s.description = "A Rails admin interface generator. Theme stolen from Redmine. Similar to web-app-theme but better ;)."
14
14
  s.extra_rdoc_files = [
15
15
  "README.rdoc"
@@ -124,6 +124,8 @@ Gem::Specification.new do |s|
124
124
  "vendor/assets/images/admin/files/text.png",
125
125
  "vendor/assets/images/admin/files/xml.png",
126
126
  "vendor/assets/images/admin/files/zip.png",
127
+ "vendor/assets/images/admin/flag_black.png",
128
+ "vendor/assets/images/admin/flag_red.png",
127
129
  "vendor/assets/images/admin/folder.png",
128
130
  "vendor/assets/images/admin/folder_open.png",
129
131
  "vendor/assets/images/admin/folder_open_add.png",
@@ -251,6 +253,8 @@ Gem::Specification.new do |s|
251
253
  s.add_development_dependency(%q<geminabox>, [">= 0"])
252
254
  s.add_development_dependency(%q<jeweler>, [">= 0"])
253
255
  s.add_development_dependency(%q<geminabox>, [">= 0"])
256
+ s.add_development_dependency(%q<jeweler>, [">= 0"])
257
+ s.add_development_dependency(%q<geminabox>, [">= 0"])
254
258
  s.add_runtime_dependency(%q<kaminari>, [">= 0.12.4"])
255
259
  s.add_runtime_dependency(%q<ransack>, [">= 0"])
256
260
  s.add_runtime_dependency(%q<inherited_resources>, [">= 1.2.2"])
@@ -297,6 +301,8 @@ Gem::Specification.new do |s|
297
301
  s.add_dependency(%q<geminabox>, [">= 0"])
298
302
  s.add_dependency(%q<jeweler>, [">= 0"])
299
303
  s.add_dependency(%q<geminabox>, [">= 0"])
304
+ s.add_dependency(%q<jeweler>, [">= 0"])
305
+ s.add_dependency(%q<geminabox>, [">= 0"])
300
306
  s.add_dependency(%q<kaminari>, [">= 0.12.4"])
301
307
  s.add_dependency(%q<ransack>, [">= 0"])
302
308
  s.add_dependency(%q<inherited_resources>, [">= 1.2.2"])
@@ -344,6 +350,8 @@ Gem::Specification.new do |s|
344
350
  s.add_dependency(%q<geminabox>, [">= 0"])
345
351
  s.add_dependency(%q<jeweler>, [">= 0"])
346
352
  s.add_dependency(%q<geminabox>, [">= 0"])
353
+ s.add_dependency(%q<jeweler>, [">= 0"])
354
+ s.add_dependency(%q<geminabox>, [">= 0"])
347
355
  s.add_dependency(%q<kaminari>, [">= 0.12.4"])
348
356
  s.add_dependency(%q<ransack>, [">= 0"])
349
357
  s.add_dependency(%q<inherited_resources>, [">= 1.2.2"])
@@ -31,6 +31,11 @@ module Admin::BaseHelper
31
31
  image_tag("admin/#{boolean}.png")
32
32
  end
33
33
 
34
+ def true_false_flag_class(boolean)
35
+ raise ArgumentError, "Expected a Boolean as argument!" unless boolean.is_a?(FalseClass) || boolean.is_a?(TrueClass)
36
+ boolean ? 'icon-flag_red' : 'icon-flag_black'
37
+ end
38
+
34
39
  # Overwrites l helper.
35
40
  # Make the I18n localize method work with nil dates!
36
41
  # Attribute must be Date, DateTime or Time object or nil :)
@@ -3,7 +3,7 @@ module AdminInterface
3
3
  module Version
4
4
  MAJOR = 2
5
5
  MINOR = 1
6
- PATCH = 12
6
+ PATCH = 13
7
7
  BUILD = nil
8
8
 
9
9
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
@@ -18,7 +18,7 @@ protected
18
18
  # Use meta_search and kaminari gem to load collection.
19
19
  # Saves the per parameter to the user's session[:admin_per].
20
20
  def collection
21
- @search ||= end_of_association_chain.search(params[:q])
21
+ @search ||= end_of_association_chain.ransack(params[:q])
22
22
  get_collection_ivar || begin
23
23
  session[:admin_per] = params[:per] || session[:admin_per] # Save the per_page to the user's session
24
24
  c = @search.result.page(params[:page]).per(session[:admin_per])
@@ -28,6 +28,8 @@ div.input {
28
28
  .icon-document { background-image: image-url('admin/document.png'); }
29
29
  .icon-crop { background-image: image-url('admin/crop.png'); }
30
30
  .icon-mail { background-image: image-url('admin/mail.png'); }
31
+ .icon-flag_red { background-image: image-url('admin/flag_red.png'); }
32
+ .icon-flag_black { background-image: image-url('admin/flag_black.png'); }
31
33
 
32
34
  tfoot th {
33
35
  text-align: left;
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: admin_interface
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.12
4
+ version: 2.1.13
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-06-07 00:00:00.000000000 Z
12
+ date: 2012-06-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: admin_interface
@@ -635,6 +635,38 @@ dependencies:
635
635
  - - ! '>='
636
636
  - !ruby/object:Gem::Version
637
637
  version: '0'
638
+ - !ruby/object:Gem::Dependency
639
+ name: jeweler
640
+ requirement: !ruby/object:Gem::Requirement
641
+ none: false
642
+ requirements:
643
+ - - ! '>='
644
+ - !ruby/object:Gem::Version
645
+ version: '0'
646
+ type: :development
647
+ prerelease: false
648
+ version_requirements: !ruby/object:Gem::Requirement
649
+ none: false
650
+ requirements:
651
+ - - ! '>='
652
+ - !ruby/object:Gem::Version
653
+ version: '0'
654
+ - !ruby/object:Gem::Dependency
655
+ name: geminabox
656
+ requirement: !ruby/object:Gem::Requirement
657
+ none: false
658
+ requirements:
659
+ - - ! '>='
660
+ - !ruby/object:Gem::Version
661
+ version: '0'
662
+ type: :development
663
+ prerelease: false
664
+ version_requirements: !ruby/object:Gem::Requirement
665
+ none: false
666
+ requirements:
667
+ - - ! '>='
668
+ - !ruby/object:Gem::Version
669
+ version: '0'
638
670
  - !ruby/object:Gem::Dependency
639
671
  name: kaminari
640
672
  requirement: !ruby/object:Gem::Requirement
@@ -848,6 +880,8 @@ files:
848
880
  - vendor/assets/images/admin/files/text.png
849
881
  - vendor/assets/images/admin/files/xml.png
850
882
  - vendor/assets/images/admin/files/zip.png
883
+ - vendor/assets/images/admin/flag_black.png
884
+ - vendor/assets/images/admin/flag_red.png
851
885
  - vendor/assets/images/admin/folder.png
852
886
  - vendor/assets/images/admin/folder_open.png
853
887
  - vendor/assets/images/admin/folder_open_add.png
@@ -952,3 +986,4 @@ signing_key:
952
986
  specification_version: 3
953
987
  summary: A Rails admin interface generator. Theme stolen from Redmine.
954
988
  test_files: []
989
+ has_rdoc: