administrate 0.11.0 → 0.16.0
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/administrate/components/associative.js +5 -0
- data/app/assets/javascripts/administrate/components/date_time_picker.js +6 -2
- data/app/assets/javascripts/administrate/components/table.js +1 -1
- data/app/assets/stylesheets/administrate/base/_tables.scss +3 -0
- data/app/assets/stylesheets/administrate/base/_typography.scss +1 -1
- data/app/assets/stylesheets/administrate/components/_attributes.scss +4 -3
- data/app/assets/stylesheets/administrate/components/_buttons.scss +11 -0
- data/app/assets/stylesheets/administrate/components/_cells.scss +2 -0
- data/app/assets/stylesheets/administrate/components/_field-unit.scss +17 -4
- data/app/assets/stylesheets/administrate/components/_flashes.scss +0 -8
- data/app/assets/stylesheets/administrate/components/_main-content.scss +1 -0
- data/app/assets/stylesheets/administrate/components/_navigation.scss +2 -3
- data/app/assets/stylesheets/administrate/library/_variables.scss +10 -8
- data/app/controllers/administrate/application_controller.rb +32 -11
- data/app/controllers/concerns/administrate/punditize.rb +3 -3
- data/app/helpers/administrate/application_helper.rb +41 -15
- data/app/views/administrate/application/_collection.html.erb +6 -4
- data/app/views/administrate/application/_form.html.erb +2 -2
- data/app/views/administrate/application/{_icons.erb → _icons.html.erb} +0 -0
- data/app/views/administrate/application/_navigation.html.erb +5 -3
- data/app/views/administrate/application/index.html.erb +3 -3
- data/app/views/administrate/application/show.html.erb +1 -1
- data/app/views/fields/belongs_to/_form.html.erb +3 -3
- data/app/views/fields/date/_form.html.erb +24 -0
- data/app/views/fields/date/_index.html.erb +21 -0
- data/app/views/fields/date/_show.html.erb +21 -0
- data/app/views/fields/has_one/_index.html.erb +1 -1
- data/app/views/fields/has_one/_show.html.erb +4 -4
- data/app/views/fields/number/_form.html.erb +1 -1
- data/app/views/fields/polymorphic/_show.html.erb +1 -1
- data/app/views/fields/select/_form.html.erb +22 -10
- data/app/views/fields/string/_show.html.erb +2 -2
- data/app/views/fields/text/_show.html.erb +2 -3
- data/app/views/fields/time/_form.html.erb +3 -2
- data/app/views/fields/time/_index.html.erb +3 -1
- data/app/views/fields/time/_show.html.erb +3 -1
- data/app/views/fields/url/_form.html.erb +23 -0
- data/app/views/fields/url/_index.html.erb +20 -0
- data/app/views/fields/url/_show.html.erb +20 -0
- data/app/views/layouts/administrate/application.html.erb +2 -1
- data/config/locales/administrate.ar.yml +2 -0
- data/config/locales/administrate.bs.yml +2 -0
- data/config/locales/administrate.ca.yml +2 -0
- data/config/locales/administrate.da.yml +2 -0
- data/config/locales/administrate.de.yml +2 -0
- data/config/locales/administrate.en.yml +2 -0
- data/config/locales/administrate.es.yml +3 -1
- data/config/locales/administrate.fi.yml +30 -0
- data/config/locales/administrate.fr.yml +4 -2
- data/config/locales/administrate.id.yml +2 -0
- data/config/locales/administrate.it.yml +2 -0
- data/config/locales/administrate.ja.yml +2 -0
- data/config/locales/administrate.ko.yml +12 -10
- data/config/locales/administrate.nl.yml +7 -5
- data/config/locales/administrate.pl.yml +2 -0
- data/config/locales/administrate.pt-BR.yml +4 -2
- data/config/locales/administrate.pt.yml +4 -2
- data/config/locales/administrate.ru.yml +2 -0
- data/config/locales/{administrate.al.yml → administrate.sq.yml} +3 -1
- data/config/locales/administrate.sv.yml +2 -0
- data/config/locales/administrate.tr.yml +30 -0
- data/config/locales/administrate.uk.yml +2 -0
- data/config/locales/administrate.vi.yml +2 -0
- data/config/locales/administrate.zh-CN.yml +4 -2
- data/config/locales/administrate.zh-TW.yml +2 -0
- data/config/unicorn.rb +8 -13
- data/docs/adding_controllers_without_related_model.md +52 -0
- data/docs/adding_custom_field_types.md +3 -1
- data/docs/authentication.md +3 -1
- data/docs/authorization.md +5 -3
- data/docs/customizing_attribute_partials.md +5 -2
- data/docs/customizing_controller_actions.md +32 -2
- data/docs/customizing_dashboards.md +78 -29
- data/docs/customizing_page_views.md +18 -4
- data/docs/extending_administrate.md +27 -0
- data/docs/getting_started.md +49 -56
- data/docs/guides.md +5 -0
- data/docs/guides/hiding_dashboards_from_sidebar.md +19 -0
- data/docs/rails_api.md +45 -0
- data/lib/administrate.rb +19 -0
- data/lib/administrate/base_dashboard.rb +31 -9
- data/lib/administrate/custom_dashboard.rb +15 -0
- data/lib/administrate/engine.rb +8 -1
- data/lib/administrate/field/associative.rb +49 -5
- data/lib/administrate/field/base.rb +35 -9
- data/lib/administrate/field/belongs_to.rb +13 -3
- data/lib/administrate/field/date.rb +20 -0
- data/lib/administrate/field/deferred.rb +22 -3
- data/lib/administrate/field/has_many.rb +16 -3
- data/lib/administrate/field/has_one.rb +32 -12
- data/lib/administrate/field/number.rb +19 -2
- data/lib/administrate/field/polymorphic.rb +5 -5
- data/lib/administrate/field/select.rb +6 -1
- data/lib/administrate/field/url.rb +21 -0
- data/lib/administrate/namespace.rb +5 -1
- data/lib/administrate/order.rb +17 -7
- data/lib/administrate/page/base.rb +7 -5
- data/lib/administrate/page/form.rb +1 -1
- data/lib/administrate/resource_resolver.rb +2 -2
- data/lib/administrate/search.rb +107 -23
- data/lib/administrate/version.rb +1 -1
- data/lib/administrate/view_generator.rb +9 -3
- data/lib/generators/administrate/dashboard/dashboard_generator.rb +22 -16
- data/lib/generators/administrate/dashboard/templates/controller.rb.erb +35 -10
- data/lib/generators/administrate/dashboard/templates/dashboard.rb.erb +18 -6
- data/lib/generators/administrate/install/install_generator.rb +37 -1
- data/lib/generators/administrate/install/templates/application_controller.rb.erb +3 -3
- data/lib/generators/administrate/routes/routes_generator.rb +21 -26
- data/lib/generators/administrate/views/layout_generator.rb +1 -0
- data/lib/generators/administrate/views/views_generator.rb +5 -4
- metadata +49 -53
- data/app/assets/javascripts/administrate/components/has_many_form.js +0 -3
- data/config/secrets.yml +0 -14
data/lib/administrate/version.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
require "rails/generators/base"
|
2
2
|
require "administrate/generator_helpers"
|
3
|
+
require "administrate/namespace"
|
3
4
|
|
4
5
|
module Administrate
|
5
6
|
class ViewGenerator < Rails::Generators::Base
|
6
7
|
include Administrate::GeneratorHelpers
|
7
|
-
|
8
|
-
private
|
8
|
+
class_option :namespace, type: :string, default: :admin
|
9
9
|
|
10
10
|
def self.template_source_path
|
11
11
|
File.expand_path(
|
@@ -14,12 +14,18 @@ module Administrate
|
|
14
14
|
)
|
15
15
|
end
|
16
16
|
|
17
|
+
private
|
18
|
+
|
19
|
+
def namespace
|
20
|
+
options[:namespace]
|
21
|
+
end
|
22
|
+
|
17
23
|
def copy_resource_template(template_name)
|
18
24
|
template_file = "#{template_name}.html.erb"
|
19
25
|
|
20
26
|
copy_file(
|
21
27
|
template_file,
|
22
|
-
"app/views
|
28
|
+
"app/views/#{namespace}/#{resource_path}/#{template_file}",
|
23
29
|
)
|
24
30
|
end
|
25
31
|
|
@@ -5,18 +5,21 @@ module Administrate
|
|
5
5
|
class DashboardGenerator < Rails::Generators::NamedBase
|
6
6
|
ATTRIBUTE_TYPE_MAPPING = {
|
7
7
|
boolean: "Field::Boolean",
|
8
|
-
date: "Field::
|
8
|
+
date: "Field::Date",
|
9
9
|
datetime: "Field::DateTime",
|
10
|
-
enum: "Field::
|
10
|
+
enum: "Field::Select",
|
11
11
|
float: "Field::Number",
|
12
12
|
integer: "Field::Number",
|
13
13
|
time: "Field::Time",
|
14
14
|
text: "Field::Text",
|
15
15
|
string: "Field::String",
|
16
|
+
uuid: "Field::String",
|
16
17
|
}
|
17
18
|
|
18
19
|
ATTRIBUTE_OPTIONS_MAPPING = {
|
19
|
-
|
20
|
+
# procs must be defined in one line!
|
21
|
+
enum: { searchable: false,
|
22
|
+
collection: ->(field) { field.resource.class.send(field.attribute.to_s.pluralize).keys } },
|
20
23
|
float: { decimals: 2 },
|
21
24
|
}
|
22
25
|
|
@@ -24,7 +27,7 @@ module Administrate
|
|
24
27
|
COLLECTION_ATTRIBUTE_LIMIT = 4
|
25
28
|
READ_ONLY_ATTRIBUTES = %w[id created_at updated_at]
|
26
29
|
|
27
|
-
class_option :namespace, type: :string, default:
|
30
|
+
class_option :namespace, type: :string, default: :admin
|
28
31
|
|
29
32
|
source_root File.expand_path("../templates", __FILE__)
|
30
33
|
|
@@ -50,7 +53,9 @@ module Administrate
|
|
50
53
|
end
|
51
54
|
|
52
55
|
def attributes
|
53
|
-
klass.reflections.keys +
|
56
|
+
klass.reflections.keys +
|
57
|
+
klass.columns.map(&:name) -
|
58
|
+
redundant_attributes
|
54
59
|
end
|
55
60
|
|
56
61
|
def form_attributes
|
@@ -105,11 +110,11 @@ module Administrate
|
|
105
110
|
if relationship.has_one?
|
106
111
|
"Field::HasOne"
|
107
112
|
elsif relationship.collection?
|
108
|
-
"Field::HasMany"
|
113
|
+
"Field::HasMany"
|
109
114
|
elsif relationship.polymorphic?
|
110
115
|
"Field::Polymorphic"
|
111
116
|
else
|
112
|
-
"Field::BelongsTo"
|
117
|
+
"Field::BelongsTo"
|
113
118
|
end
|
114
119
|
end
|
115
120
|
|
@@ -117,14 +122,6 @@ module Administrate
|
|
117
122
|
@klass ||= Object.const_get(class_name)
|
118
123
|
end
|
119
124
|
|
120
|
-
def relationship_options_string(relationship)
|
121
|
-
if relationship.class_name != relationship.name.to_s.classify
|
122
|
-
options_string(class_name: relationship.class_name)
|
123
|
-
else
|
124
|
-
""
|
125
|
-
end
|
126
|
-
end
|
127
|
-
|
128
125
|
def options_string(options)
|
129
126
|
if options.any?
|
130
127
|
".with_options(#{inspect_hash_as_ruby(options)})"
|
@@ -134,7 +131,16 @@ module Administrate
|
|
134
131
|
end
|
135
132
|
|
136
133
|
def inspect_hash_as_ruby(hash)
|
137
|
-
hash.map
|
134
|
+
hash.map do |key, value|
|
135
|
+
v_str = value.respond_to?(:call) ? proc_string(value) : value.inspect
|
136
|
+
"#{key}: #{v_str}"
|
137
|
+
end.join(", ")
|
138
|
+
end
|
139
|
+
|
140
|
+
def proc_string(value)
|
141
|
+
source = value.source_location
|
142
|
+
proc_string = IO.readlines(source.first)[source.second - 1]
|
143
|
+
proc_string[/->[^}]*} | (lambda|proc).*end/x]
|
138
144
|
end
|
139
145
|
end
|
140
146
|
end
|
@@ -1,18 +1,43 @@
|
|
1
|
-
module <%= namespace.classify %>
|
2
|
-
class <%= class_name.pluralize %>Controller < <%= namespace.classify %>::ApplicationController
|
3
|
-
#
|
4
|
-
# you
|
1
|
+
module <%= namespace.to_s.classify %>
|
2
|
+
class <%= class_name.pluralize %>Controller < <%= namespace.to_s.classify %>::ApplicationController
|
3
|
+
# Overwrite any of the RESTful controller actions to implement custom behavior
|
4
|
+
# For example, you may want to send an email after a foo is updated.
|
5
5
|
#
|
6
|
-
# def
|
6
|
+
# def update
|
7
7
|
# super
|
8
|
-
#
|
9
|
-
# page(params[:page]).
|
10
|
-
# per(10)
|
8
|
+
# send_foo_updated_email(requested_resource)
|
11
9
|
# end
|
12
10
|
|
13
|
-
#
|
11
|
+
# Override this method to specify custom lookup behavior.
|
12
|
+
# This will be used to set the resource for the `show`, `edit`, and `update`
|
13
|
+
# actions.
|
14
|
+
#
|
14
15
|
# def find_resource(param)
|
15
|
-
#
|
16
|
+
# Foo.find_by!(slug: param)
|
17
|
+
# end
|
18
|
+
|
19
|
+
# The result of this lookup will be available as `requested_resource`
|
20
|
+
|
21
|
+
# Override this if you have certain roles that require a subset
|
22
|
+
# this will be used to set the records shown on the `index` action.
|
23
|
+
#
|
24
|
+
# def scoped_resource
|
25
|
+
# if current_user.super_admin?
|
26
|
+
# resource_class
|
27
|
+
# else
|
28
|
+
# resource_class.with_less_stuff
|
29
|
+
# end
|
30
|
+
# end
|
31
|
+
|
32
|
+
# Override `resource_params` if you want to transform the submitted
|
33
|
+
# data before it's persisted. For example, the following would turn all
|
34
|
+
# empty values into nil values. It uses other APIs such as `resource_class`
|
35
|
+
# and `dashboard`:
|
36
|
+
#
|
37
|
+
# def resource_params
|
38
|
+
# params.require(resource_class.model_name.param_key).
|
39
|
+
# permit(dashboard.permitted_attributes).
|
40
|
+
# transform_values { |value| value == "" ? nil : value }
|
16
41
|
# end
|
17
42
|
|
18
43
|
# See https://administrate-prototype.herokuapp.com/customizing_controller_actions
|
@@ -18,20 +18,20 @@ class <%= class_name %>Dashboard < Administrate::BaseDashboard
|
|
18
18
|
#
|
19
19
|
# By default, it's limited to four items to reduce clutter on index pages.
|
20
20
|
# Feel free to add, remove, or rearrange items.
|
21
|
-
COLLECTION_ATTRIBUTES = [
|
21
|
+
COLLECTION_ATTRIBUTES = %i[
|
22
22
|
<%=
|
23
23
|
attributes.first(COLLECTION_ATTRIBUTE_LIMIT).map do |attr|
|
24
|
-
"
|
24
|
+
" #{attr}"
|
25
25
|
end.join("\n")
|
26
26
|
%>
|
27
27
|
].freeze
|
28
28
|
|
29
29
|
# SHOW_PAGE_ATTRIBUTES
|
30
30
|
# an array of attributes that will be displayed on the model's show page.
|
31
|
-
SHOW_PAGE_ATTRIBUTES = [
|
31
|
+
SHOW_PAGE_ATTRIBUTES = %i[
|
32
32
|
<%=
|
33
33
|
attributes.map do |attr|
|
34
|
-
"
|
34
|
+
" #{attr}"
|
35
35
|
end.join("\n")
|
36
36
|
%>
|
37
37
|
].freeze
|
@@ -39,14 +39,26 @@ class <%= class_name %>Dashboard < Administrate::BaseDashboard
|
|
39
39
|
# FORM_ATTRIBUTES
|
40
40
|
# an array of attributes that will be displayed
|
41
41
|
# on the model's form (`new` and `edit`) pages.
|
42
|
-
FORM_ATTRIBUTES = [
|
42
|
+
FORM_ATTRIBUTES = %i[
|
43
43
|
<%=
|
44
44
|
form_attributes.map do |attr|
|
45
|
-
"
|
45
|
+
" #{attr}"
|
46
46
|
end.join("\n")
|
47
47
|
%>
|
48
48
|
].freeze
|
49
49
|
|
50
|
+
# COLLECTION_FILTERS
|
51
|
+
# a hash that defines filters that can be used while searching via the search
|
52
|
+
# field of the dashboard.
|
53
|
+
#
|
54
|
+
# For example to add an option to search for open resources by typing "open:"
|
55
|
+
# in the search field:
|
56
|
+
#
|
57
|
+
# COLLECTION_FILTERS = {
|
58
|
+
# open: ->(resources) { resources.where(open: true) }
|
59
|
+
# }.freeze
|
60
|
+
COLLECTION_FILTERS = {}.freeze
|
61
|
+
|
50
62
|
# Overwrite this method to customize how <%= file_name.pluralize.humanize.downcase %> are displayed
|
51
63
|
# across all pages of the admin dashboard.
|
52
64
|
#
|
@@ -1,3 +1,9 @@
|
|
1
|
+
if defined?(Zeitwerk)
|
2
|
+
Zeitwerk::Loader.eager_load_all
|
3
|
+
else
|
4
|
+
Rails.application.eager_load!
|
5
|
+
end
|
6
|
+
|
1
7
|
require "rails/generators/base"
|
2
8
|
require "administrate/generator_helpers"
|
3
9
|
require "administrate/namespace"
|
@@ -13,7 +19,7 @@ module Administrate
|
|
13
19
|
def run_routes_generator
|
14
20
|
if dashboard_resources.none?
|
15
21
|
call_generator("administrate:routes", "--namespace", namespace)
|
16
|
-
|
22
|
+
Rails.application.reload_routes!
|
17
23
|
end
|
18
24
|
end
|
19
25
|
|
@@ -31,6 +37,12 @@ module Administrate
|
|
31
37
|
end
|
32
38
|
end
|
33
39
|
|
40
|
+
def model_check
|
41
|
+
if valid_dashboard_models.none?
|
42
|
+
puts "WARNING: Add models before installing Administrate."
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
34
46
|
private
|
35
47
|
|
36
48
|
def namespace
|
@@ -44,6 +56,30 @@ module Administrate
|
|
44
56
|
def dashboard_resources
|
45
57
|
Administrate::Namespace.new(namespace).resources
|
46
58
|
end
|
59
|
+
|
60
|
+
def valid_dashboard_models
|
61
|
+
database_models - invalid_dashboard_models
|
62
|
+
end
|
63
|
+
|
64
|
+
def database_models
|
65
|
+
ActiveRecord::Base.descendants.reject(&:abstract_class?)
|
66
|
+
end
|
67
|
+
|
68
|
+
def invalid_dashboard_models
|
69
|
+
(models_without_tables + namespaced_models + unnamed_constants).uniq
|
70
|
+
end
|
71
|
+
|
72
|
+
def models_without_tables
|
73
|
+
database_models.reject(&:table_exists?)
|
74
|
+
end
|
75
|
+
|
76
|
+
def namespaced_models
|
77
|
+
database_models.select { |model| model.to_s.include?("::") }
|
78
|
+
end
|
79
|
+
|
80
|
+
def unnamed_constants
|
81
|
+
ActiveRecord::Base.descendants.reject { |d| d.name == d.to_s }
|
82
|
+
end
|
47
83
|
end
|
48
84
|
end
|
49
85
|
end
|
@@ -1,6 +1,6 @@
|
|
1
|
-
# All Administrate controllers inherit from this
|
2
|
-
# making it the ideal place to put
|
3
|
-
# before_actions.
|
1
|
+
# All Administrate controllers inherit from this
|
2
|
+
# `Administrate::ApplicationController`, making it the ideal place to put
|
3
|
+
# authentication logic or other before_actions.
|
4
4
|
#
|
5
5
|
# If you want to add pagination or other controller-level concerns,
|
6
6
|
# you're free to overwrite the RESTful controller actions.
|
@@ -1,29 +1,36 @@
|
|
1
|
-
|
1
|
+
if defined?(Zeitwerk)
|
2
|
+
Zeitwerk::Loader.eager_load_all
|
3
|
+
else
|
4
|
+
Rails.application.eager_load!
|
5
|
+
end
|
6
|
+
|
2
7
|
require "rails/generators/base"
|
8
|
+
require "administrate/generator_helpers"
|
3
9
|
require "administrate/namespace"
|
4
10
|
|
5
11
|
module Administrate
|
6
12
|
module Generators
|
7
13
|
class RoutesGenerator < Rails::Generators::Base
|
14
|
+
include Administrate::GeneratorHelpers
|
8
15
|
source_root File.expand_path("../templates", __FILE__)
|
9
16
|
class_option :namespace, type: :string, default: "admin"
|
10
17
|
|
11
18
|
def insert_dashboard_routes
|
12
|
-
if
|
19
|
+
if valid_dashboard_models.any?
|
13
20
|
route(dashboard_routes)
|
14
21
|
end
|
15
22
|
end
|
16
23
|
|
17
24
|
def warn_about_invalid_models
|
18
|
-
|
19
|
-
puts "WARNING: Unable to generate a dashboard for #{
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
25
|
+
invalid_dashboard_models.each do |model|
|
26
|
+
puts "WARNING: Unable to generate a dashboard for #{model}."
|
27
|
+
if namespaced_models.include?(model)
|
28
|
+
puts " - Administrate does not yet support namespaced models."
|
29
|
+
end
|
30
|
+
if models_without_tables.include?(model)
|
31
|
+
puts " - It is not connected to a database table."
|
32
|
+
puts " Make sure your database migrations are up to date."
|
33
|
+
end
|
27
34
|
end
|
28
35
|
|
29
36
|
unnamed_constants.each do |invalid_model|
|
@@ -44,15 +51,15 @@ module Administrate
|
|
44
51
|
end
|
45
52
|
|
46
53
|
def valid_dashboard_models
|
47
|
-
database_models -
|
54
|
+
database_models - invalid_dashboard_models
|
48
55
|
end
|
49
56
|
|
50
57
|
def database_models
|
51
58
|
ActiveRecord::Base.descendants.reject(&:abstract_class?)
|
52
59
|
end
|
53
60
|
|
54
|
-
def
|
55
|
-
models_without_tables + namespaced_models + unnamed_constants
|
61
|
+
def invalid_dashboard_models
|
62
|
+
(models_without_tables + namespaced_models + unnamed_constants).uniq
|
56
63
|
end
|
57
64
|
|
58
65
|
def models_without_tables
|
@@ -71,21 +78,9 @@ module Administrate
|
|
71
78
|
ERB.new(File.read(routes_file_path)).result(binding)
|
72
79
|
end
|
73
80
|
|
74
|
-
def routes_includes_resources?
|
75
|
-
File.read(rails_routes_file_path).include?(dashboard_routes)
|
76
|
-
end
|
77
|
-
|
78
|
-
def rails_routes_file_path
|
79
|
-
Rails.root.join("config/routes.rb")
|
80
|
-
end
|
81
|
-
|
82
81
|
def routes_file_path
|
83
82
|
File.expand_path(find_in_source_paths("routes.rb.erb"))
|
84
83
|
end
|
85
|
-
|
86
|
-
def should_route_dashboard?
|
87
|
-
routes_includes_resources? || valid_dashboard_models.any?
|
88
|
-
end
|
89
84
|
end
|
90
85
|
end
|
91
86
|
end
|
@@ -4,10 +4,11 @@ module Administrate
|
|
4
4
|
module Generators
|
5
5
|
class ViewsGenerator < Administrate::ViewGenerator
|
6
6
|
def copy_templates
|
7
|
-
|
8
|
-
call_generator("
|
9
|
-
call_generator("
|
10
|
-
call_generator("
|
7
|
+
view = "administrate:views:"
|
8
|
+
call_generator("#{view}index", resource_path, "--namespace", namespace)
|
9
|
+
call_generator("#{view}show", resource_path, "--namespace", namespace)
|
10
|
+
call_generator("#{view}new", resource_path, "--namespace", namespace)
|
11
|
+
call_generator("#{view}edit", resource_path, "--namespace", namespace)
|
11
12
|
end
|
12
13
|
end
|
13
14
|
end
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: administrate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.16.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Charlton
|
8
8
|
- Grayson Wright
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2021-05-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -17,74 +17,42 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: '
|
21
|
-
- - "<"
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: '6.0'
|
20
|
+
version: '5.0'
|
24
21
|
type: :runtime
|
25
22
|
prerelease: false
|
26
23
|
version_requirements: !ruby/object:Gem::Requirement
|
27
24
|
requirements:
|
28
25
|
- - ">="
|
29
26
|
- !ruby/object:Gem::Version
|
30
|
-
version: '
|
31
|
-
- - "<"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '6.0'
|
27
|
+
version: '5.0'
|
34
28
|
- !ruby/object:Gem::Dependency
|
35
29
|
name: actionview
|
36
30
|
requirement: !ruby/object:Gem::Requirement
|
37
31
|
requirements:
|
38
32
|
- - ">="
|
39
33
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
41
|
-
- - "<"
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
version: '6.0'
|
34
|
+
version: '5.0'
|
44
35
|
type: :runtime
|
45
36
|
prerelease: false
|
46
37
|
version_requirements: !ruby/object:Gem::Requirement
|
47
38
|
requirements:
|
48
39
|
- - ">="
|
49
40
|
- !ruby/object:Gem::Version
|
50
|
-
version: '
|
51
|
-
- - "<"
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '6.0'
|
41
|
+
version: '5.0'
|
54
42
|
- !ruby/object:Gem::Dependency
|
55
43
|
name: activerecord
|
56
44
|
requirement: !ruby/object:Gem::Requirement
|
57
45
|
requirements:
|
58
46
|
- - ">="
|
59
47
|
- !ruby/object:Gem::Version
|
60
|
-
version: '
|
61
|
-
- - "<"
|
62
|
-
- !ruby/object:Gem::Version
|
63
|
-
version: '6.0'
|
64
|
-
type: :runtime
|
65
|
-
prerelease: false
|
66
|
-
version_requirements: !ruby/object:Gem::Requirement
|
67
|
-
requirements:
|
68
|
-
- - ">="
|
69
|
-
- !ruby/object:Gem::Version
|
70
|
-
version: '4.2'
|
71
|
-
- - "<"
|
72
|
-
- !ruby/object:Gem::Version
|
73
|
-
version: '6.0'
|
74
|
-
- !ruby/object:Gem::Dependency
|
75
|
-
name: autoprefixer-rails
|
76
|
-
requirement: !ruby/object:Gem::Requirement
|
77
|
-
requirements:
|
78
|
-
- - ">="
|
79
|
-
- !ruby/object:Gem::Version
|
80
|
-
version: '6.0'
|
48
|
+
version: '5.0'
|
81
49
|
type: :runtime
|
82
50
|
prerelease: false
|
83
51
|
version_requirements: !ruby/object:Gem::Requirement
|
84
52
|
requirements:
|
85
53
|
- - ">="
|
86
54
|
- !ruby/object:Gem::Version
|
87
|
-
version: '
|
55
|
+
version: '5.0'
|
88
56
|
- !ruby/object:Gem::Dependency
|
89
57
|
name: datetime_picker_rails
|
90
58
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,19 +110,19 @@ dependencies:
|
|
142
110
|
- !ruby/object:Gem::Version
|
143
111
|
version: '2.8'
|
144
112
|
- !ruby/object:Gem::Dependency
|
145
|
-
name:
|
113
|
+
name: sassc-rails
|
146
114
|
requirement: !ruby/object:Gem::Requirement
|
147
115
|
requirements:
|
148
116
|
- - "~>"
|
149
117
|
- !ruby/object:Gem::Version
|
150
|
-
version: '
|
118
|
+
version: '2.1'
|
151
119
|
type: :runtime
|
152
120
|
prerelease: false
|
153
121
|
version_requirements: !ruby/object:Gem::Requirement
|
154
122
|
requirements:
|
155
123
|
- - "~>"
|
156
124
|
- !ruby/object:Gem::Version
|
157
|
-
version: '
|
125
|
+
version: '2.1'
|
158
126
|
- !ruby/object:Gem::Dependency
|
159
127
|
name: selectize-rails
|
160
128
|
requirement: !ruby/object:Gem::Requirement
|
@@ -169,6 +137,20 @@ dependencies:
|
|
169
137
|
- - "~>"
|
170
138
|
- !ruby/object:Gem::Version
|
171
139
|
version: '0.6'
|
140
|
+
- !ruby/object:Gem::Dependency
|
141
|
+
name: rspec-rails
|
142
|
+
requirement: !ruby/object:Gem::Requirement
|
143
|
+
requirements:
|
144
|
+
- - ">="
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
version: '0'
|
147
|
+
type: :development
|
148
|
+
prerelease: false
|
149
|
+
version_requirements: !ruby/object:Gem::Requirement
|
150
|
+
requirements:
|
151
|
+
- - ">="
|
152
|
+
- !ruby/object:Gem::Version
|
153
|
+
version: '0'
|
172
154
|
description: |
|
173
155
|
Administrate is heavily inspired by projects like Rails Admin and ActiveAdmin,
|
174
156
|
but aims to provide a better user experience for site admins,
|
@@ -191,8 +173,8 @@ extra_rdoc_files: []
|
|
191
173
|
files:
|
192
174
|
- Rakefile
|
193
175
|
- app/assets/javascripts/administrate/application.js
|
176
|
+
- app/assets/javascripts/administrate/components/associative.js
|
194
177
|
- app/assets/javascripts/administrate/components/date_time_picker.js
|
195
|
-
- app/assets/javascripts/administrate/components/has_many_form.js
|
196
178
|
- app/assets/javascripts/administrate/components/table.js
|
197
179
|
- app/assets/stylesheets/administrate/application.scss
|
198
180
|
- app/assets/stylesheets/administrate/base/_forms.scss
|
@@ -223,7 +205,7 @@ files:
|
|
223
205
|
- app/views/administrate/application/_collection.html.erb
|
224
206
|
- app/views/administrate/application/_flashes.html.erb
|
225
207
|
- app/views/administrate/application/_form.html.erb
|
226
|
-
- app/views/administrate/application/_icons.erb
|
208
|
+
- app/views/administrate/application/_icons.html.erb
|
227
209
|
- app/views/administrate/application/_javascript.html.erb
|
228
210
|
- app/views/administrate/application/_navigation.html.erb
|
229
211
|
- app/views/administrate/application/_search.html.erb
|
@@ -238,6 +220,9 @@ files:
|
|
238
220
|
- app/views/fields/boolean/_form.html.erb
|
239
221
|
- app/views/fields/boolean/_index.html.erb
|
240
222
|
- app/views/fields/boolean/_show.html.erb
|
223
|
+
- app/views/fields/date/_form.html.erb
|
224
|
+
- app/views/fields/date/_index.html.erb
|
225
|
+
- app/views/fields/date/_show.html.erb
|
241
226
|
- app/views/fields/date_time/_form.html.erb
|
242
227
|
- app/views/fields/date_time/_index.html.erb
|
243
228
|
- app/views/fields/date_time/_show.html.erb
|
@@ -271,9 +256,11 @@ files:
|
|
271
256
|
- app/views/fields/time/_form.html.erb
|
272
257
|
- app/views/fields/time/_index.html.erb
|
273
258
|
- app/views/fields/time/_show.html.erb
|
259
|
+
- app/views/fields/url/_form.html.erb
|
260
|
+
- app/views/fields/url/_index.html.erb
|
261
|
+
- app/views/fields/url/_show.html.erb
|
274
262
|
- app/views/layouts/administrate/application.html.erb
|
275
263
|
- config/i18n-tasks.yml
|
276
|
-
- config/locales/administrate.al.yml
|
277
264
|
- config/locales/administrate.ar.yml
|
278
265
|
- config/locales/administrate.bs.yml
|
279
266
|
- config/locales/administrate.ca.yml
|
@@ -281,6 +268,7 @@ files:
|
|
281
268
|
- config/locales/administrate.de.yml
|
282
269
|
- config/locales/administrate.en.yml
|
283
270
|
- config/locales/administrate.es.yml
|
271
|
+
- config/locales/administrate.fi.yml
|
284
272
|
- config/locales/administrate.fr.yml
|
285
273
|
- config/locales/administrate.id.yml
|
286
274
|
- config/locales/administrate.it.yml
|
@@ -291,14 +279,16 @@ files:
|
|
291
279
|
- config/locales/administrate.pt-BR.yml
|
292
280
|
- config/locales/administrate.pt.yml
|
293
281
|
- config/locales/administrate.ru.yml
|
282
|
+
- config/locales/administrate.sq.yml
|
294
283
|
- config/locales/administrate.sv.yml
|
284
|
+
- config/locales/administrate.tr.yml
|
295
285
|
- config/locales/administrate.uk.yml
|
296
286
|
- config/locales/administrate.vi.yml
|
297
287
|
- config/locales/administrate.zh-CN.yml
|
298
288
|
- config/locales/administrate.zh-TW.yml
|
299
289
|
- config/routes.rb
|
300
|
-
- config/secrets.yml
|
301
290
|
- config/unicorn.rb
|
291
|
+
- docs/adding_controllers_without_related_model.md
|
302
292
|
- docs/adding_custom_field_types.md
|
303
293
|
- docs/authentication.md
|
304
294
|
- docs/authorization.md
|
@@ -306,14 +296,20 @@ files:
|
|
306
296
|
- docs/customizing_controller_actions.md
|
307
297
|
- docs/customizing_dashboards.md
|
308
298
|
- docs/customizing_page_views.md
|
299
|
+
- docs/extending_administrate.md
|
309
300
|
- docs/getting_started.md
|
301
|
+
- docs/guides.md
|
302
|
+
- docs/guides/hiding_dashboards_from_sidebar.md
|
303
|
+
- docs/rails_api.md
|
310
304
|
- lib/administrate.rb
|
311
305
|
- lib/administrate/base_dashboard.rb
|
306
|
+
- lib/administrate/custom_dashboard.rb
|
312
307
|
- lib/administrate/engine.rb
|
313
308
|
- lib/administrate/field/associative.rb
|
314
309
|
- lib/administrate/field/base.rb
|
315
310
|
- lib/administrate/field/belongs_to.rb
|
316
311
|
- lib/administrate/field/boolean.rb
|
312
|
+
- lib/administrate/field/date.rb
|
317
313
|
- lib/administrate/field/date_time.rb
|
318
314
|
- lib/administrate/field/deferred.rb
|
319
315
|
- lib/administrate/field/email.rb
|
@@ -326,6 +322,7 @@ files:
|
|
326
322
|
- lib/administrate/field/string.rb
|
327
323
|
- lib/administrate/field/text.rb
|
328
324
|
- lib/administrate/field/time.rb
|
325
|
+
- lib/administrate/field/url.rb
|
329
326
|
- lib/administrate/generator_helpers.rb
|
330
327
|
- lib/administrate/namespace.rb
|
331
328
|
- lib/administrate/namespace/resource.rb
|
@@ -365,11 +362,11 @@ files:
|
|
365
362
|
- lib/generators/administrate/views/show_generator.rb
|
366
363
|
- lib/generators/administrate/views/views_generator.rb
|
367
364
|
- lib/tasks/administrate_tasks.rake
|
368
|
-
homepage: https://administrate-
|
365
|
+
homepage: https://administrate-demo.herokuapp.com/
|
369
366
|
licenses:
|
370
367
|
- MIT
|
371
368
|
metadata: {}
|
372
|
-
post_install_message:
|
369
|
+
post_install_message:
|
373
370
|
rdoc_options: []
|
374
371
|
require_paths:
|
375
372
|
- lib
|
@@ -384,9 +381,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
384
381
|
- !ruby/object:Gem::Version
|
385
382
|
version: '0'
|
386
383
|
requirements: []
|
387
|
-
|
388
|
-
|
389
|
-
signing_key:
|
384
|
+
rubygems_version: 3.1.4
|
385
|
+
signing_key:
|
390
386
|
specification_version: 4
|
391
387
|
summary: A Rails engine for creating super-flexible admin dashboards
|
392
388
|
test_files: []
|