administrador 0.0.28.pre → 0.0.30.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/administrador/application/pagination_size.js.coffee +13 -0
- data/app/assets/javascripts/administrador.js +1 -1
- data/app/assets/stylesheets/administrador/application/breadcrumbs.css +1 -1
- data/app/assets/stylesheets/administrador/application/engines.css +36 -0
- data/app/assets/stylesheets/administrador/application/layout.css +23 -0
- data/app/assets/stylesheets/administrador/application/page-actions.css +13 -3
- data/app/assets/stylesheets/administrador/application/pagination.css +6 -0
- data/app/assets/stylesheets/administrador/application/sidebar-theme.css +2 -2
- data/app/assets/stylesheets/administrador.css +1 -0
- data/app/concerns/administrador/controller/engine_sidebar_concern.rb +17 -0
- data/app/concerns/administrador/controller/resources_concern.rb +4 -0
- data/app/controllers/administrador/home_controller/base.rb +1 -0
- data/app/controllers/administrador/home_controller.rb +2 -0
- data/app/controllers/administrador/resource_controller/base.rb +1 -0
- data/app/controllers/administrador/resources_controller/base.rb +1 -0
- data/app/controllers/administrador/service_controller/base.rb +1 -0
- data/app/view_helpers/administrador/application_view_helper.rb +9 -5
- data/app/view_helpers/administrador/breadcrumbs_view_helper.rb +5 -5
- data/app/views/administrador/application/_navbar.html.haml +4 -4
- data/app/views/administrador/application/sidebars/_engine.html.haml +32 -27
- data/app/views/administrador/application_view_helper/_render_engine_sidebars.html.haml +2 -1
- data/app/views/administrador/application_view_helper/_render_registered_engine_widget.html.haml +41 -0
- data/app/views/administrador/home/index.de.html.haml +4 -6
- data/app/views/administrador/home_controller/base/index.html.haml +2 -3
- data/app/views/administrador/resources_controller/base/_edit_actions.html.haml +1 -2
- data/app/views/administrador/resources_controller/base/_new_actions.html.haml +1 -2
- data/app/views/administrador/resources_controller/base/_pagination.html.haml +8 -1
- data/app/views/administrador/resources_controller/base/_show_actions.html.haml +1 -2
- data/app/views/administrador/resources_controller/base/edit.html.haml +1 -1
- data/app/views/administrador/resources_controller/base/index.html.haml +8 -4
- data/app/views/administrador/resources_controller/base/new.html.haml +1 -1
- data/app/views/administrador/service_controller/base/create.html.haml +1 -1
- data/app/views/administrador/service_controller/base/new.html.haml +1 -1
- data/app/views/layouts/administrador/application.html.haml +35 -22
- data/config/locales/de.yml +4 -1
- data/config/locales/en.yml +4 -1
- data/lib/administrador/configuration.rb +6 -2
- data/lib/administrador/feature.rb +2 -0
- data/lib/administrador/registered_engine.rb +41 -10
- data/lib/administrador/version.rb +1 -1
- data/lib/administrador.rb +1 -0
- data/lib/generators/administrador/install/templates/initializer.rb +10 -4
- metadata +46 -17
- data/app/assets/javascripts/administrador/application/sidebar.js.coffee~ +0 -104
- data/app/assets/stylesheets/administrador/application/engine-sidebar.css +0 -17
- data/app/assets/stylesheets/administrador/application/sidebar.css~ +0 -51
- data/app/views/administrador/resources_controller/base/_index_table_actions.html.haml~ +0 -16
@@ -1,5 +1,5 @@
|
|
1
1
|
!!!
|
2
|
-
%html{:
|
2
|
+
%html{ lang: I18n.locale, class: "h-100" }
|
3
3
|
%head
|
4
4
|
/ Required meta tags
|
5
5
|
%meta{:charset => "utf-8"}/
|
@@ -8,8 +8,9 @@
|
|
8
8
|
%link{:crossorigin => "anonymous", :href => "https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css", :integrity => "sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS", :rel => "stylesheet"}/
|
9
9
|
/ Font Awesome CSS
|
10
10
|
%link{:crossorigin => "anonymous", :href => "https://use.fontawesome.com/releases/v5.6.3/css/all.css", :integrity => "sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/", :rel => "stylesheet"}/
|
11
|
-
/ Fonts
|
11
|
+
/ Fonts CSS
|
12
12
|
%link{:href => "https://fonts.googleapis.com/css?family=Poppins", :rel => "stylesheet"}/
|
13
|
+
|
13
14
|
/ jQuery JS
|
14
15
|
%script{:crossorigin => "anonymous", :integrity => "sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=", :src => "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"}
|
15
16
|
/ jQuery UI JS
|
@@ -17,13 +18,13 @@
|
|
17
18
|
/ jQuery redirect JS
|
18
19
|
%script{:src => "https://cdn.jsdelivr.net/npm/jquery.redirect@1.1.4/jquery.redirect.min.js"}
|
19
20
|
|
20
|
-
- Administrador::
|
21
|
-
= "<!-- Javascript for #{
|
22
|
-
= javascript_include_tag
|
21
|
+
- Administrador::RegisteredEngine.all.each do |registered_engine|
|
22
|
+
= "<!-- Javascript for #{registered_engine} -->".html_safe
|
23
|
+
= javascript_include_tag registered_engine.engine_class.name.underscore.gsub('/', '_').gsub('_engine', '')
|
23
24
|
|
24
|
-
- Administrador::
|
25
|
-
= "<!-- CSS for #{
|
26
|
-
= stylesheet_link_tag
|
25
|
+
- Administrador::RegisteredEngine.all.each do |registered_engine|
|
26
|
+
= "<!-- CSS for #{registered_engine} -->".html_safe
|
27
|
+
= stylesheet_link_tag registered_engine.engine_class.name.underscore.gsub('/', '_').gsub('_engine', ''), media: "all"
|
27
28
|
|
28
29
|
%title Administrador
|
29
30
|
|
@@ -34,22 +35,34 @@
|
|
34
35
|
|
35
36
|
= render partial: 'html_head_extras'
|
36
37
|
%body{ administrador_helper(self).body_html }
|
37
|
-
|
38
|
+
%main
|
39
|
+
#main-navbar
|
40
|
+
= render '/administrador/application/navbar'
|
41
|
+
#main-content
|
42
|
+
.container-fluid
|
43
|
+
.row
|
44
|
+
.col-12.px-0
|
45
|
+
#main-breadcrumbs.container-fluid
|
46
|
+
.row
|
47
|
+
.col-12
|
48
|
+
= breadcrumbs(self).render
|
49
|
+
#main-container.container-fluid
|
50
|
+
.row
|
51
|
+
.col-12
|
52
|
+
#flash-messages
|
53
|
+
= administrador_helper(self).flash_messages
|
54
|
+
= yield
|
55
|
+
|
56
|
+
%footer#page-footer.mt-auto.bg-dark.text-white.py-3
|
38
57
|
.container-fluid
|
39
58
|
.row
|
40
|
-
.col-12.
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
#main-container.container-fluid
|
48
|
-
.row
|
49
|
-
.col-12
|
50
|
-
#flash-messages
|
51
|
-
= administrador_helper(self).flash_messages
|
52
|
-
= yield
|
59
|
+
.col-12.d-flex
|
60
|
+
.ml-auto
|
61
|
+
.small
|
62
|
+
Administrador
|
63
|
+
= Administrador::VERSION
|
64
|
+
by
|
65
|
+
= link_to("BeeGood IT", "https://www.beegoodit.de/", target: "_blank")
|
53
66
|
|
54
67
|
= render "/administrador/application/sidebars/engine"
|
55
68
|
|
data/config/locales/de.yml
CHANGED
data/config/locales/en.yml
CHANGED
@@ -4,13 +4,17 @@ module Administrador
|
|
4
4
|
yield self
|
5
5
|
end
|
6
6
|
|
7
|
-
mattr_accessor(:engines) { {} }
|
8
7
|
mattr_accessor(:features) { {} }
|
9
8
|
mattr_accessor(:resource_label_methods) { [:human, :name, :email, :to_s] }
|
10
9
|
mattr_accessor(:base_controller_class_name) { '::ApplicationController' }
|
10
|
+
mattr_accessor(:initial_engine_sidebar_state) { :closed }
|
11
|
+
|
12
|
+
def self.engines
|
13
|
+
Administrador::RegisteredEngine.all
|
14
|
+
end
|
11
15
|
|
12
16
|
def register_engine(name, options = {})
|
13
|
-
|
17
|
+
Administrador::RegisteredEngine.create(name: name, options: options)
|
14
18
|
end
|
15
19
|
|
16
20
|
def enable_feature(name, options = {})
|
@@ -20,7 +20,7 @@ module Administrador
|
|
20
20
|
# require 'example_app/configuration'
|
21
21
|
# Administrador.configure { |c| c.register_engine('ExampleApp::Application', {}) }
|
22
22
|
#
|
23
|
-
# You will need to add a
|
23
|
+
# You will need to add a configuration module:
|
24
24
|
#
|
25
25
|
# # lib/example_app/configuration.rb
|
26
26
|
# module ExampleApp
|
@@ -35,19 +35,50 @@ module Administrador
|
|
35
35
|
class RegisteredEngine
|
36
36
|
attr_accessor :options, :name
|
37
37
|
|
38
|
-
|
38
|
+
@store = []
|
39
|
+
|
40
|
+
def self.create(attributes = {})
|
41
|
+
@store << new(attributes)
|
42
|
+
end
|
43
|
+
|
44
|
+
def self.all
|
45
|
+
@store
|
46
|
+
end
|
47
|
+
|
48
|
+
def self.find_by_name(name)
|
49
|
+
@store.find { |re| re[:name] == name }
|
50
|
+
end
|
51
|
+
|
52
|
+
def self.find_by_class(klass)
|
53
|
+
@store.find { |re| re.engine_class == klass }
|
54
|
+
end
|
55
|
+
|
56
|
+
def self.find_by_class!(klass)
|
57
|
+
engine = @store.find { |re| re.engine_class == klass }
|
58
|
+
raise "Could not find engine #{klass}" if engine.nil?
|
59
|
+
engine
|
60
|
+
end
|
61
|
+
|
62
|
+
def self.find_by_class_name(class_name)
|
63
|
+
@store.find { |re| re.engine_class.name == class_name }
|
64
|
+
end
|
65
|
+
|
66
|
+
def initialize(attributes = {})
|
67
|
+
options = attributes.delete(:options)
|
39
68
|
options.reverse_merge!(
|
40
69
|
show_in_engine_sidebar: true
|
41
70
|
)
|
42
|
-
|
71
|
+
attributes.merge(options: options).each do |key, value|
|
72
|
+
send("#{key}=", value)
|
73
|
+
end
|
43
74
|
end
|
44
75
|
|
45
|
-
def
|
76
|
+
def engine_class
|
46
77
|
@name.constantize
|
47
78
|
end
|
48
79
|
|
49
80
|
def main_app?
|
50
|
-
|
81
|
+
engine_class.ancestors.include?(::Rails::Application)
|
51
82
|
end
|
52
83
|
|
53
84
|
def to_key
|
@@ -59,7 +90,7 @@ module Administrador
|
|
59
90
|
end
|
60
91
|
|
61
92
|
def translated_name
|
62
|
-
I18n.t("classes.#{
|
93
|
+
I18n.t("classes.#{engine_class.name.underscore}")
|
63
94
|
end
|
64
95
|
|
65
96
|
def router_name
|
@@ -80,7 +111,7 @@ module Administrador
|
|
80
111
|
elsif configuration.respond_to?(:resources_controllers)
|
81
112
|
configuration.resources_controllers.call
|
82
113
|
else
|
83
|
-
Rails.logger.warn("Administrador: The namespace #{
|
114
|
+
Rails.logger.warn("Administrador: The namespace #{engine_class.name.deconstantize} either does not define a Configuration class or the class #{engine_class.name.deconstantize}::Configuration does not respond_to :resources_controllers.")
|
84
115
|
[]
|
85
116
|
end
|
86
117
|
end
|
@@ -89,7 +120,7 @@ module Administrador
|
|
89
120
|
if configuration.respond_to?(:resource_controllers)
|
90
121
|
configuration.resource_controllers.call
|
91
122
|
else
|
92
|
-
Rails.logger.warn("Administrador: The namespace #{
|
123
|
+
Rails.logger.warn("Administrador: The namespace #{engine_class.name.deconstantize} either does not define a Configuration class or the class #{engine_class.name.deconstantize}::Configuration does not respond_to :resource_controllers.")
|
93
124
|
[]
|
94
125
|
end
|
95
126
|
end
|
@@ -100,7 +131,7 @@ module Administrador
|
|
100
131
|
elsif configuration.respond_to?(:service_controllers)
|
101
132
|
configuration.service_controllers.call
|
102
133
|
else
|
103
|
-
Rails.logger.warn("Administrador: The namespace #{
|
134
|
+
Rails.logger.warn("Administrador: The namespace #{engine_class.name.deconstantize} either does not define a Configuration class or the class #{engine_class.name.deconstantize}::Configuration does not respond_to :service_controllers.")
|
104
135
|
[]
|
105
136
|
end
|
106
137
|
end
|
@@ -109,7 +140,7 @@ module Administrador
|
|
109
140
|
if configuration.respond_to?(:sidebar_controllers)
|
110
141
|
configuration.sidebar_controllers.call
|
111
142
|
else
|
112
|
-
Rails.logger.warn("Administrador: The namespace #{
|
143
|
+
Rails.logger.warn("Administrador: The namespace #{engine_class.name.deconstantize} either does not define a Configuration class or the class #{engine_class.name.deconstantize}::Configuration does not respond_to :sidebar_controllers.")
|
113
144
|
[]
|
114
145
|
end
|
115
146
|
end
|
data/lib/administrador.rb
CHANGED
@@ -12,6 +12,7 @@ require "simple_form-datetimepicker"
|
|
12
12
|
require "simple_sidebar"
|
13
13
|
require "bootstrap4-kaminari-views"
|
14
14
|
require "rails-i18n"
|
15
|
+
require "administrador/version"
|
15
16
|
require "administrador/feature"
|
16
17
|
require "administrador/configuration"
|
17
18
|
require "administrador/engine"
|
@@ -1,9 +1,9 @@
|
|
1
1
|
Administrador.configure do |config|
|
2
2
|
# Methods, that will be tried on a resource to generate a nice title
|
3
3
|
#
|
4
|
-
# Default: config.resource_label_methods = [:administrador_title, :human, :name, :identifier, :to_s]
|
4
|
+
# Default: config.resource_label_methods = [:administrador_title, :human, :name, :identifier, :email, :to_s]
|
5
5
|
#
|
6
|
-
config.resource_label_methods = [:administrador_title, :human, :name, :identifier, :to_s]
|
6
|
+
config.resource_label_methods = [:administrador_title, :human, :name, :identifier, :email, :to_s]
|
7
7
|
|
8
8
|
# All controllers (for resources, services, sidebars, home, etc.) inherit
|
9
9
|
# from this controller.
|
@@ -12,13 +12,19 @@ Administrador.configure do |config|
|
|
12
12
|
#
|
13
13
|
config.base_controller_class_name = '::ApplicationController'
|
14
14
|
|
15
|
+
# Initial state of the engine sidebar. Can be :open or :closed.
|
16
|
+
#
|
17
|
+
# Default: config.initial_engine_sidebar_state = :closed
|
18
|
+
#
|
19
|
+
config.initial_engine_sidebar_state = :closed
|
20
|
+
|
15
21
|
# Enable additional features here.
|
16
22
|
#
|
17
|
-
# config.enable_feature(:kaminari, {})
|
23
|
+
# config.enable_feature(:kaminari, { per_page_default: 10 })
|
18
24
|
# config.enable_feature(:rao_query, {})
|
19
25
|
|
20
26
|
# Engines that are registered will be shown in the administrador main menu
|
21
27
|
# sidebar. Additionally they can register sidebars.
|
22
28
|
#
|
23
|
-
# config.register_engine '
|
29
|
+
# config.register_engine 'Cmor::Blog::Backend::Engine', {}
|
24
30
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: administrador
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.30.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roberto Vasquez Angel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: '6.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: '6.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: coffee-rails
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,14 +128,14 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - ">="
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 0.0.
|
131
|
+
version: 0.0.48.pre
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 0.0.
|
138
|
+
version: 0.0.48.pre
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: route_translator
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -184,14 +184,14 @@ dependencies:
|
|
184
184
|
requirements:
|
185
185
|
- - ">="
|
186
186
|
- !ruby/object:Gem::Version
|
187
|
-
version: 0.0.
|
187
|
+
version: 0.0.6.pre
|
188
188
|
type: :runtime
|
189
189
|
prerelease: false
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
192
|
- - ">="
|
193
193
|
- !ruby/object:Gem::Version
|
194
|
-
version: 0.0.
|
194
|
+
version: 0.0.6.pre
|
195
195
|
- !ruby/object:Gem::Dependency
|
196
196
|
name: bootstrap4-kaminari-views
|
197
197
|
requirement: !ruby/object:Gem::Requirement
|
@@ -226,14 +226,14 @@ dependencies:
|
|
226
226
|
requirements:
|
227
227
|
- - "~>"
|
228
228
|
- !ruby/object:Gem::Version
|
229
|
-
version: 1.
|
229
|
+
version: '1.4'
|
230
230
|
type: :development
|
231
231
|
prerelease: false
|
232
232
|
version_requirements: !ruby/object:Gem::Requirement
|
233
233
|
requirements:
|
234
234
|
- - "~>"
|
235
235
|
- !ruby/object:Gem::Version
|
236
|
-
version: 1.
|
236
|
+
version: '1.4'
|
237
237
|
- !ruby/object:Gem::Dependency
|
238
238
|
name: capybara-screenshot
|
239
239
|
requirement: !ruby/object:Gem::Requirement
|
@@ -332,6 +332,20 @@ dependencies:
|
|
332
332
|
- - ">="
|
333
333
|
- !ruby/object:Gem::Version
|
334
334
|
version: '0'
|
335
|
+
- !ruby/object:Gem::Dependency
|
336
|
+
name: matrix
|
337
|
+
requirement: !ruby/object:Gem::Requirement
|
338
|
+
requirements:
|
339
|
+
- - ">="
|
340
|
+
- !ruby/object:Gem::Version
|
341
|
+
version: '0'
|
342
|
+
type: :development
|
343
|
+
prerelease: false
|
344
|
+
version_requirements: !ruby/object:Gem::Requirement
|
345
|
+
requirements:
|
346
|
+
- - ">="
|
347
|
+
- !ruby/object:Gem::Version
|
348
|
+
version: '0'
|
335
349
|
- !ruby/object:Gem::Dependency
|
336
350
|
name: pry-rails
|
337
351
|
requirement: !ruby/object:Gem::Requirement
|
@@ -388,9 +402,23 @@ dependencies:
|
|
388
402
|
- - ">="
|
389
403
|
- !ruby/object:Gem::Version
|
390
404
|
version: '0'
|
405
|
+
- !ruby/object:Gem::Dependency
|
406
|
+
name: sprockets-rails
|
407
|
+
requirement: !ruby/object:Gem::Requirement
|
408
|
+
requirements:
|
409
|
+
- - ">="
|
410
|
+
- !ruby/object:Gem::Version
|
411
|
+
version: '0'
|
412
|
+
type: :development
|
413
|
+
prerelease: false
|
414
|
+
version_requirements: !ruby/object:Gem::Requirement
|
415
|
+
requirements:
|
416
|
+
- - ">="
|
417
|
+
- !ruby/object:Gem::Version
|
418
|
+
version: '0'
|
391
419
|
description:
|
392
420
|
email:
|
393
|
-
-
|
421
|
+
- info@beegoodit.de
|
394
422
|
executables: []
|
395
423
|
extensions: []
|
396
424
|
extra_rdoc_files: []
|
@@ -402,7 +430,7 @@ files:
|
|
402
430
|
- app/assets/javascripts/administrador.js
|
403
431
|
- app/assets/javascripts/administrador/application.js
|
404
432
|
- app/assets/javascripts/administrador/application/keep.js
|
405
|
-
- app/assets/javascripts/administrador/application/
|
433
|
+
- app/assets/javascripts/administrador/application/pagination_size.js.coffee
|
406
434
|
- app/assets/stylesheets/administrador.css
|
407
435
|
- app/assets/stylesheets/administrador/application.css
|
408
436
|
- app/assets/stylesheets/administrador/application/bootstrap-btn-responsive.css
|
@@ -411,15 +439,16 @@ files:
|
|
411
439
|
- app/assets/stylesheets/administrador/application/bootstrap-table-xs.css
|
412
440
|
- app/assets/stylesheets/administrador/application/breadcrumbs.css
|
413
441
|
- app/assets/stylesheets/administrador/application/colors.css
|
414
|
-
- app/assets/stylesheets/administrador/application/
|
442
|
+
- app/assets/stylesheets/administrador/application/engines.css
|
415
443
|
- app/assets/stylesheets/administrador/application/forms.css
|
416
444
|
- app/assets/stylesheets/administrador/application/layout.css
|
417
445
|
- app/assets/stylesheets/administrador/application/page-actions.css
|
446
|
+
- app/assets/stylesheets/administrador/application/pagination.css
|
418
447
|
- app/assets/stylesheets/administrador/application/query_form.css
|
419
448
|
- app/assets/stylesheets/administrador/application/sidebar-theme.css
|
420
|
-
- app/assets/stylesheets/administrador/application/sidebar.css~
|
421
449
|
- app/concerns/administrador/controller/application_concern.rb
|
422
450
|
- app/concerns/administrador/controller/engine_concern.rb
|
451
|
+
- app/concerns/administrador/controller/engine_sidebar_concern.rb
|
423
452
|
- app/concerns/administrador/controller/resource_concern.rb
|
424
453
|
- app/concerns/administrador/controller/resources_concern.rb
|
425
454
|
- app/concerns/administrador/controller/service_concern.rb
|
@@ -446,6 +475,7 @@ files:
|
|
446
475
|
- app/views/administrador/application/sidebars/_user.html.haml
|
447
476
|
- app/views/administrador/application_view_helper/_flash_messages.html.haml
|
448
477
|
- app/views/administrador/application_view_helper/_render_engine_sidebars.html.haml
|
478
|
+
- app/views/administrador/application_view_helper/_render_registered_engine_widget.html.haml
|
449
479
|
- app/views/administrador/home/_html_head_extras.html.haml
|
450
480
|
- app/views/administrador/home/index.de.html.haml
|
451
481
|
- app/views/administrador/home/index.en.html.haml
|
@@ -477,7 +507,6 @@ files:
|
|
477
507
|
- app/views/administrador/resources_controller/base/_index_actions.html.haml
|
478
508
|
- app/views/administrador/resources_controller/base/_index_table.html.haml
|
479
509
|
- app/views/administrador/resources_controller/base/_index_table_actions.html.haml
|
480
|
-
- app/views/administrador/resources_controller/base/_index_table_actions.html.haml~
|
481
510
|
- app/views/administrador/resources_controller/base/_new_actions.html.haml
|
482
511
|
- app/views/administrador/resources_controller/base/_pagination.html.haml
|
483
512
|
- app/views/administrador/resources_controller/base/_query_form.html.haml
|
@@ -527,14 +556,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
527
556
|
requirements:
|
528
557
|
- - ">="
|
529
558
|
- !ruby/object:Gem::Version
|
530
|
-
version:
|
559
|
+
version: 3.1.4
|
531
560
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
532
561
|
requirements:
|
533
562
|
- - ">"
|
534
563
|
- !ruby/object:Gem::Version
|
535
564
|
version: 1.3.1
|
536
565
|
requirements: []
|
537
|
-
rubygems_version: 3.
|
566
|
+
rubygems_version: 3.3.26
|
538
567
|
signing_key:
|
539
568
|
specification_version: 4
|
540
569
|
summary: Administrador - The rails administration interface.
|
@@ -1,104 +0,0 @@
|
|
1
|
-
# Usage:
|
2
|
-
#
|
3
|
-
# Put all the content that is not in the sidebar in a container with the id #main-content a trigger button and add a sidebar.
|
4
|
-
#
|
5
|
-
# <body>
|
6
|
-
# <div id="main-content">
|
7
|
-
# <button data-sidebar-trigger="#example-sidebar">
|
8
|
-
# Toggle the example sidebar!
|
9
|
-
# </button>
|
10
|
-
# </div>
|
11
|
-
# <aside
|
12
|
-
# id="example-sidebar">
|
13
|
-
# data-sidebar-load="/de/backend/authentifizierung/user_sidebar.html"
|
14
|
-
# data-sidebar-mode="overlay"
|
15
|
-
# data-sidebar-position="right"
|
16
|
-
# data-sidebar-size="20rem"
|
17
|
-
# data-sidebar-state="closed"
|
18
|
-
# <h3>Hello from the example sidebar!</h3>
|
19
|
-
# </aside>
|
20
|
-
# </body>
|
21
|
-
#
|
22
|
-
# Options:
|
23
|
-
#
|
24
|
-
# load: Passing an url to load will load the content of the url via ajax and display it in the sidebar.
|
25
|
-
# mode:
|
26
|
-
# push: This will decrease the size of the main content, making room for the sidebar.
|
27
|
-
# overlay: This will show the sidebar on top of the content, without moving it.
|
28
|
-
# modal: Like overlay, but with a modal background.
|
29
|
-
# position: left|right|top|bottom
|
30
|
-
# size: size that the sidebar will take up (width for left and right, height for top and bottom). Pass any css size in px, rem or whatever you like.
|
31
|
-
#
|
32
|
-
$ ->
|
33
|
-
$('body').on 'click', '#sidebar-modal-background', ->
|
34
|
-
target = $("##{$(@).data('sidebar-target')}")
|
35
|
-
closeModal(target)
|
36
|
-
|
37
|
-
$('[data-sidebar-position]').each (_, e) ->
|
38
|
-
position = $(@).data('sidebar-position')
|
39
|
-
$(e).addClass("sidebar sidebar-#{position}")
|
40
|
-
if $(@).data('sidebar-state') == 'opened'
|
41
|
-
openModal($(@))
|
42
|
-
|
43
|
-
$('[data-sidebar-trigger]').on 'click', ->
|
44
|
-
target = $($(@).data('sidebar-trigger'))
|
45
|
-
state = target.data('sidebar-state')
|
46
|
-
|
47
|
-
if state == 'closed'
|
48
|
-
openModal(target)
|
49
|
-
else
|
50
|
-
closeModal(target)
|
51
|
-
|
52
|
-
openModal = (target) ->
|
53
|
-
main_content = $('#main-content')
|
54
|
-
|
55
|
-
position = target.data('sidebar-position')
|
56
|
-
mode = target.data('sidebar-mode')
|
57
|
-
size_attribute = if position in ['top', 'bottom'] then 'height' else 'width'
|
58
|
-
size = target.data('sidebar-size')
|
59
|
-
|
60
|
-
target.css("display", "inherit")
|
61
|
-
target.css(size_attribute, size)
|
62
|
-
main_content.css("margin-#{position}", size) if mode == 'push'
|
63
|
-
|
64
|
-
|
65
|
-
# modal
|
66
|
-
if mode == 'modal'
|
67
|
-
$("body").append("<div id=\"sidebar-modal-background\" data-sidebar-target=\"#{target.attr('id')}\"></div>")
|
68
|
-
|
69
|
-
# load
|
70
|
-
if target.data('sidebar-load')
|
71
|
-
url = target.data('sidebar-load')
|
72
|
-
$.ajax
|
73
|
-
type: 'GET'
|
74
|
-
url: url
|
75
|
-
success: (response) ->
|
76
|
-
$(target).html(response)
|
77
|
-
return
|
78
|
-
|
79
|
-
# set state
|
80
|
-
target.data('sidebar-state', 'opened')
|
81
|
-
|
82
|
-
closeModal = (target) ->
|
83
|
-
main_content = $('#main-content')
|
84
|
-
|
85
|
-
position = target.data('sidebar-position')
|
86
|
-
mode = target.data('sidebar-mode')
|
87
|
-
size_attribute = if position in ['top', 'bottom'] then 'height' else 'width'
|
88
|
-
size = target.data('sidebar-size')
|
89
|
-
|
90
|
-
# push
|
91
|
-
if mode == 'push'
|
92
|
-
main_content.css("margin-#{position}", size)
|
93
|
-
|
94
|
-
# modal
|
95
|
-
if mode == 'modal'
|
96
|
-
$("#sidebar-modal-background").remove()
|
97
|
-
|
98
|
-
target.css(size_attribute, '0px')
|
99
|
-
|
100
|
-
if mode == 'push'
|
101
|
-
main_content.css("margin-#{position}", '0px')
|
102
|
-
|
103
|
-
# set state
|
104
|
-
target.data('sidebar-state', 'closed')
|
@@ -1,17 +0,0 @@
|
|
1
|
-
#sidebar-engines .administrador-engine-actions {
|
2
|
-
width: 1rem;
|
3
|
-
min-height: 1px;
|
4
|
-
margin-right: 1rem;
|
5
|
-
}
|
6
|
-
|
7
|
-
#sidebar-engines .administrador-engine-resources-count {
|
8
|
-
width: 1rem;
|
9
|
-
}
|
10
|
-
|
11
|
-
#sidebar-engines .administrador-engine a {
|
12
|
-
color: grey;
|
13
|
-
}
|
14
|
-
|
15
|
-
#sidebar-engines .administrador-engine .badge-pill {
|
16
|
-
min-width: 1.75rem;
|
17
|
-
}
|
@@ -1,51 +0,0 @@
|
|
1
|
-
.sidebar {
|
2
|
-
position: fixed;
|
3
|
-
z-index: 3000;
|
4
|
-
overflow-x: hidden;
|
5
|
-
transition: 0.5s;
|
6
|
-
}
|
7
|
-
|
8
|
-
.sidebar-left {
|
9
|
-
height: 100%;
|
10
|
-
width: 0;
|
11
|
-
top: 0;
|
12
|
-
left: 0;
|
13
|
-
}
|
14
|
-
.sidebar-right {
|
15
|
-
height: 100%;
|
16
|
-
width: 0;
|
17
|
-
top: 0;
|
18
|
-
right: 0;
|
19
|
-
}
|
20
|
-
.sidebar-top {
|
21
|
-
width: 100%;
|
22
|
-
height: 0;
|
23
|
-
left: 0;
|
24
|
-
top: 0;
|
25
|
-
}
|
26
|
-
.sidebar-bottom {
|
27
|
-
width: 100%;
|
28
|
-
height: 0;
|
29
|
-
left: 0;
|
30
|
-
bottom: 0;
|
31
|
-
}
|
32
|
-
|
33
|
-
#sidebar-modal-background {
|
34
|
-
position: fixed;
|
35
|
-
z-index: 2000;
|
36
|
-
left: 0;
|
37
|
-
top: 0;
|
38
|
-
width: 100%;
|
39
|
-
height: 100%;
|
40
|
-
background-color: rgb(0,0,0);
|
41
|
-
background-color: rgba(0,0,0,0.4);
|
42
|
-
}
|
43
|
-
|
44
|
-
#main-content {
|
45
|
-
transition: margin .5s;
|
46
|
-
}
|
47
|
-
|
48
|
-
/* @media screen and (max-height: 450px) {
|
49
|
-
.sidebar {padding-top: 15px;}
|
50
|
-
.sidebar a {font-size: 18px;}
|
51
|
-
} */
|
@@ -1,16 +0,0 @@
|
|
1
|
-
= table.column(:actions, title: false) do |resource|
|
2
|
-
- capture_haml do
|
3
|
-
.w-100.d-flex
|
4
|
-
.btn-group.ml-auto
|
5
|
-
- if available_rest_actions.include?(:show)
|
6
|
-
= link_to({ action: :show, id: resource.to_param }, class: 'show btn btn-xs btn-responsive btn-primary') do
|
7
|
-
%i.fas.fa-eye
|
8
|
-
%span.btn-text= t('.show')
|
9
|
-
- if available_rest_actions.include?(:edit)
|
10
|
-
= link_to({ action: :edit, id: resource.to_param }, class: 'edit btn btn-xs btn-responsive btn-secondary') do
|
11
|
-
%i.fas.fa-edit
|
12
|
-
%span.btn-text= t('.edit')
|
13
|
-
- if available_rest_actions.include?(:destroy)
|
14
|
-
= link_to({ action: :show, id: resource.to_param }, class: 'destroy btn btn-xs btn-responsive btn-danger', method: :delete, 'data-confirm': I18n.t('administrador.controller.confirmations.destroy')) do
|
15
|
-
%i.fas.fa-fire
|
16
|
-
%span.btn-text= t('.destroy')
|