adminsite 2.1.1 → 2.1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7b3d294a019111f15b80a047d93e7150220447b1
4
- data.tar.gz: 95b04287bc58eb4fad54eb2f4089da3c64faed6f
3
+ metadata.gz: 19d396b76029c39ad67a1f2d2ef6257eaad32cf6
4
+ data.tar.gz: f3fb9c4f7ef39c13d17caf8550c8d98890da3d69
5
5
  SHA512:
6
- metadata.gz: 1756e777130a3f963ebf05ee01a24e4d5d269ba01560584ffd1d97573185471d94e3600718936b00013bb3e8ccb91c9fc2a9d9102b60ba30e48126bc1ce7a78f
7
- data.tar.gz: f3a2157f68c0be9af4d100d5fa83a6a2f047aa552d6bda05e6528a2324f55a54d663263c98d5e89809c36e2a7d99c76d972fd7ff1b88ef4891287757ba4dbeb9
6
+ metadata.gz: c9918c79e62f8c32bbaf4a7d8ae51049180ac3812e04a3adc7e0d13c315d540e0d1b934f7343dc226402b6b06baf04a943fdd3a6cde5103ee3a760082df4b421
7
+ data.tar.gz: 3027a002d44c0e842ba0c1792046054078925536316564a1539a82eacc02aa38282759a4878dee8e55675f9405c8763c0ca09648f088d59fc521cf4d82cdc901
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- adminsite (2.1.1)
4
+ adminsite (2.1.2)
5
5
  actionpack-page_caching
6
6
  codemirror-rails (>= 4.8)
7
7
  devise (~> 3.4)
@@ -50,6 +50,7 @@ class Adminsite::Admin::ResourcesController < Adminsite::Admin::CrudController
50
50
  @q = resources.order(order_params).ransack(params[:q])
51
51
  @resources = @q.result.page(params[:page])
52
52
  @ransack_params = ransack_params
53
+ @show_search_form = @ransack_params[:q].try(:except, :s).present?
53
54
  render :json => @resources if api_call?
54
55
  end
55
56
 
@@ -1,9 +1,8 @@
1
1
  - if resource_admin_config.attributes_search.any?
2
2
  .search_form
3
- - show_search_form = @ransack_params[:q].present?
4
- %a#show{onClick: 'Adminsite.showSearchForm();', style: "#{'display:none' if show_search_form}" } Show Filters
5
- %a#hide{onClick: 'Adminsite.hideSearchForm();', style: "#{'display:none' unless show_search_form}" } Hide Filters
6
- = search_form_for(@q, :url => admin_resource_path(nil), method: :get, html: { style: "#{'display:none' unless show_search_form}"} ) do |f|
3
+ %a#show{onClick: 'Adminsite.showSearchForm();', style: "#{'display:none' if @show_search_form}" } Show Filters
4
+ %a#hide{onClick: 'Adminsite.hideSearchForm();', style: "#{'display:none' unless @show_search_form}" } Hide Filters
5
+ = search_form_for(@q, :url => admin_resource_path(nil), method: :get, html: { style: "#{'display:none' unless @show_search_form}"} ) do |f|
7
6
  = hidden_field_tag :admin_menu, params[:admin_menu]
8
7
  %div{id: "#{controller_name}-search"}
9
8
  %ul
@@ -1,6 +1,7 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
3
  # Rails.application.config.assets.paths << Emoji.images_path
4
+ Rails.application.config.assets.paths += %w( adminsite/admin )
4
5
 
5
6
  # Precompile additional assets.
6
7
  # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
@@ -1,3 +1,3 @@
1
1
  module Adminsite
2
- VERSION = "2.1.1" unless defined?(Adminsite::VERSION)
2
+ VERSION = "2.1.2" unless defined?(Adminsite::VERSION)
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adminsite
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robin Wunderlin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-27 00:00:00.000000000 Z
11
+ date: 2016-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails