adva 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/admin/users_controller.rb +1 -5
- data/app/helpers/admin/base_helper.rb +0 -44
- data/lib/adva/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee3ba355548f2d435cab4bed75a24bcd57ce604bccb9ce8040895c7cd7071cb1
|
4
|
+
data.tar.gz: c97a5d6de8e170695e217513ad3f915d6057c363ac909edd4d99af4d6b7e71a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d49f370f2085930f92abce6373b902416ababc8d903c1fa019151363d4575d2258bf98413c171e8f5c5b915f32974ae17c7a59683ebfde49c2a39d03ea2df792
|
7
|
+
data.tar.gz: ed9b3eba97128897b5ed432e727fca912a02fc2e0b2ac60ff45b4f327a1c41275a50dbeec73bd5f54fb602ef1a068446fc1b23cceec38f7f4029d07a7fb98430
|
@@ -1,9 +1,9 @@
|
|
1
1
|
class Admin::UsersController < Admin::BaseController
|
2
|
-
before_action :set_users, :only => [:index]
|
3
2
|
before_action :set_user, :only => [:show, :edit, :update, :destroy]
|
4
3
|
before_action :authorize_access
|
5
4
|
|
6
5
|
def index
|
6
|
+
@users = User.where(admin: true).to_a + @site.users.to_a
|
7
7
|
end
|
8
8
|
|
9
9
|
def show
|
@@ -59,10 +59,6 @@ class Admin::UsersController < Admin::BaseController
|
|
59
59
|
@menu = Menus::Admin::Users.new
|
60
60
|
end
|
61
61
|
|
62
|
-
def set_users
|
63
|
-
@users = @site.users
|
64
|
-
end
|
65
|
-
|
66
62
|
def set_user
|
67
63
|
@user = User.find(params[:id])
|
68
64
|
end
|
@@ -1,48 +1,4 @@
|
|
1
1
|
module Admin::BaseHelper
|
2
|
-
def self.define_shallow_resource_helpers options
|
3
|
-
from = options.delete(:from)
|
4
|
-
to = options.delete(:to)
|
5
|
-
|
6
|
-
from_namespace = from[0..-2].collect(&:to_s).join("_")
|
7
|
-
to_namespace = to[0..-2].collect(&:to_s).join("_")
|
8
|
-
resource = from[-1].to_s
|
9
|
-
|
10
|
-
def self.define_path_and_url_methods options
|
11
|
-
from = options.delete(:from)
|
12
|
-
to = options.delete(:to)
|
13
|
-
|
14
|
-
%w(path url).each do |suffix|
|
15
|
-
eval "def #{from}_#{suffix} *args; #{to}_#{suffix} *args; end"
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
# index
|
20
|
-
define_path_and_url_methods \
|
21
|
-
:from => [from_namespace, resource.pluralize].join("_"),
|
22
|
-
:to => [to_namespace, resource.pluralize].join("_")
|
23
|
-
|
24
|
-
# show
|
25
|
-
define_path_and_url_methods \
|
26
|
-
:from => [from_namespace, resource].join("_"),
|
27
|
-
:to => [to_namespace, resource].join("_")
|
28
|
-
|
29
|
-
# new
|
30
|
-
define_path_and_url_methods \
|
31
|
-
:from => [:new, from_namespace, resource].join("_"),
|
32
|
-
:to => [:new, to_namespace, resource].join("_")
|
33
|
-
|
34
|
-
# edit
|
35
|
-
define_path_and_url_methods \
|
36
|
-
:from => [:edit, from_namespace, resource].join("_"),
|
37
|
-
:to => [:edit, to_namespace, resource].join("_")
|
38
|
-
end
|
39
|
-
|
40
|
-
define_shallow_resource_helpers :from => [:admin, :category], :to => [:admin, :section, :category]
|
41
|
-
define_shallow_resource_helpers :from => [:admin, :content], :to => [:admin, :section, :content]
|
42
|
-
define_shallow_resource_helpers :from => [:admin, :article], :to => [:admin, :section, :article]
|
43
|
-
define_shallow_resource_helpers :from => [:admin, :link], :to => [:admin, :section, :link]
|
44
|
-
|
45
|
-
|
46
2
|
def save_or_cancel_links(builder, options = {})
|
47
3
|
save_text = options.delete(:save_text) || t(:'adva.common.save')
|
48
4
|
or_text = options.delete(:or_text) || t(:'adva.common.connector.or')
|
data/lib/adva/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adva
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Micah Geisel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-11-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: will_paginate
|
@@ -1170,7 +1170,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1170
1170
|
- !ruby/object:Gem::Version
|
1171
1171
|
version: '0'
|
1172
1172
|
requirements: []
|
1173
|
-
rubygems_version: 3.2.
|
1173
|
+
rubygems_version: 3.2.32
|
1174
1174
|
signing_key:
|
1175
1175
|
specification_version: 4
|
1176
1176
|
summary: cutting edge cms, blog, wiki, forum
|