adminsite 3.2.3 → 3.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/app/assets/stylesheets/adminsite/admin/base.scss +3 -0
- data/app/controllers/adminsite/admin/resources_controller.rb +4 -3
- data/app/views/adminsite/admin/resources/_filters.html.haml +6 -1
- data/app/views/layouts/adminsite/admin.html.haml +1 -1
- data/lib/adminsite/configuration.rb +3 -0
- data/lib/adminsite/version.rb +1 -1
- data/lib/generators/adminsite/add_dashboard/add_dashboard_generator.rb +2 -0
- data/lib/generators/adminsite/install/install_generator.rb +3 -0
- data/lib/generators/adminsite/install/templates/config/initializers/adminsite.rb +3 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec1dc6526cbc7a4b7a922dc006ef7734a5c4a70c
|
4
|
+
data.tar.gz: 5c2a69196c00a6671a393a933a67cfefc5c3b9e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24c934899bfe48ca079c7959256f4d3168bcca77bbca7a0dfb0b302259c5fa9b1a3c0f192df62a957f85f4793348194c1ae9b99b1a86bd0f83aa4ae0a5e0d11d
|
7
|
+
data.tar.gz: 1ba60ed0f8ea560901cc4695303b51d588694ccf95a7d63c3d9fcb564bf1cc967dec647d102aa6c0485a431d334dc4b61192337b1ff4d9c3f52a1b0a10797f9a
|
data/Gemfile.lock
CHANGED
@@ -119,8 +119,10 @@ class Adminsite::Admin::ResourcesController < Adminsite::Admin::CrudController
|
|
119
119
|
end
|
120
120
|
|
121
121
|
def filter_scopes
|
122
|
-
|
123
|
-
|
122
|
+
@scopes ||= []
|
123
|
+
return @scopes if params[:scope].blank?
|
124
|
+
scopes = params[:scope].split(',').collect(&:to_sym)
|
125
|
+
@scopes = resource_admin_config.scopes.collect(&:to_sym) & scopes
|
124
126
|
end
|
125
127
|
|
126
128
|
def order_params
|
@@ -133,7 +135,6 @@ class Adminsite::Admin::ResourcesController < Adminsite::Admin::CrudController
|
|
133
135
|
@resource_admin_config
|
134
136
|
end
|
135
137
|
|
136
|
-
|
137
138
|
class << self
|
138
139
|
|
139
140
|
def content_menu_label
|
@@ -7,7 +7,12 @@
|
|
7
7
|
- resource_admin_config.scopes.each do |scope|
|
8
8
|
- scope_label = "#{scope.to_s.titlecase} <span class=\"count\">(#{resource_class.send(scope).ransack(params[:q]).result.count})</span>".html_safe
|
9
9
|
- scope_path = "#{admin_resource_path(nil,nil,@ransack_params )}&scope=#{scope}"
|
10
|
-
|
10
|
+
- if @scopes.try(:include?, scope.to_sym) || scope.to_sym == (params[:scope].try(:to_sym) || :all)
|
11
|
+
- li_class = 'active'
|
12
|
+
- else
|
13
|
+
- li_class = nil
|
14
|
+
- @scopes
|
15
|
+
%li{class: li_class} #{link_to scope_label, scope_path}
|
11
16
|
- if resource_admin_config.attributes_search.any?
|
12
17
|
#search_filters
|
13
18
|
%label |
|
@@ -6,7 +6,7 @@
|
|
6
6
|
= stylesheet_link_tag 'adminsite'
|
7
7
|
= javascript_include_tag 'adminsite'
|
8
8
|
%body.adminsite
|
9
|
-
%h1
|
9
|
+
%h1= Adminsite.config.title
|
10
10
|
= render :partial => 'adminsite/admin/shared/admin_menu' if current_adminsite_admin_user.present?
|
11
11
|
= render :partial => 'adminsite/admin/shared/content_menu' if current_adminsite_admin_user.present?
|
12
12
|
|
data/lib/adminsite/version.rb
CHANGED
@@ -15,6 +15,8 @@ module Adminsite
|
|
15
15
|
|
16
16
|
template "views/index.html.haml", "app/views/adminsite/admin/dashboard/index.html.haml"
|
17
17
|
|
18
|
+
template "views/index.html.haml", "app/views/adminsite/admin/dashboard/index.html.haml"
|
19
|
+
|
18
20
|
# Content-Menu
|
19
21
|
inject_into_file "app/views/adminsite/admin/shared/_admin_menu.html.haml", :after => /\= yield :admin_menu\n/ do\
|
20
22
|
# "\n = menu_item 'IFrameMgt', admin_#Dashboard_index_path, ['#{@file_name}']\n"
|
@@ -35,6 +35,9 @@ module Adminsite
|
|
35
35
|
puts "Setting up CanCan"
|
36
36
|
copy_file "#{Adminsite::Engine.root}/app/models/adminsite/ability.rb", 'app/models/adminsite/ability.rb'
|
37
37
|
|
38
|
+
# initializers
|
39
|
+
template 'config/initializers/adminsite.rb', 'config/initializers/adminsite.rb'
|
40
|
+
|
38
41
|
# Locales
|
39
42
|
copy_file "config/locales/adminsite.da.yml", 'config/locales/adminsite.da.yml'
|
40
43
|
copy_file "config/locales/adminsite.en.yml", 'config/locales/adminsite.en.yml'
|
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: 3.2.
|
4
|
+
version: 3.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robin Wunderlin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -362,6 +362,7 @@ files:
|
|
362
362
|
- lib/generators/adminsite/install/install_generator.rb
|
363
363
|
- lib/generators/adminsite/install/templates/assets/adminsite.js
|
364
364
|
- lib/generators/adminsite/install/templates/assets/adminsite.scss
|
365
|
+
- lib/generators/adminsite/install/templates/config/initializers/adminsite.rb
|
365
366
|
- lib/generators/adminsite/install/templates/config/locales/adminsite.da.yml
|
366
367
|
- lib/generators/adminsite/install/templates/config/locales/adminsite.en.yml
|
367
368
|
- lib/generators/adminsite/install/templates/recipes/application.rb
|