madmin 0.1.0
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 +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +102 -0
- data/Rakefile +32 -0
- data/app/assets/config/madmin_manifest.js +2 -0
- data/app/assets/javascripts/madmin/application.js +15 -0
- data/app/assets/javascripts/madmin/dashboard.js +2 -0
- data/app/assets/javascripts/madmin/resources.js +36 -0
- data/app/assets/stylesheets/madmin/application.css +22 -0
- data/app/assets/stylesheets/madmin/dashboard.css +4 -0
- data/app/assets/stylesheets/madmin/resources.css +4 -0
- data/app/controllers/madmin/application_controller.rb +16 -0
- data/app/controllers/madmin/base_controller.rb +16 -0
- data/app/controllers/madmin/dashboard_controller.rb +8 -0
- data/app/controllers/madmin/resources_controller.rb +97 -0
- data/app/decorators/madmin/resource_decorator.rb +16 -0
- data/app/helpers/madmin/application_helper.rb +15 -0
- data/app/helpers/madmin/fields/polymorphic_helper.rb +25 -0
- data/app/jobs/madmin/application_job.rb +4 -0
- data/app/mailers/madmin/application_mailer.rb +6 -0
- data/app/models/madmin/application_record.rb +5 -0
- data/app/views/application/_navigation.html.erb +17 -0
- data/app/views/layouts/madmin/application.html.erb +30 -0
- data/app/views/madmin/dashboard/index.html.erb +6 -0
- data/app/views/madmin/fields/belongs_to/_form.html.erb +14 -0
- data/app/views/madmin/fields/belongs_to/_index.html.erb +7 -0
- data/app/views/madmin/fields/belongs_to/_show.html.erb +8 -0
- data/app/views/madmin/fields/check_box/_form.html.erb +4 -0
- data/app/views/madmin/fields/check_box/_index.html.erb +1 -0
- data/app/views/madmin/fields/check_box/_show.html.erb +8 -0
- data/app/views/madmin/fields/email/_form.html.erb +4 -0
- data/app/views/madmin/fields/email/_index.html.erb +1 -0
- data/app/views/madmin/fields/email/_show.html.erb +8 -0
- data/app/views/madmin/fields/has_many/_form.html.erb +0 -0
- data/app/views/madmin/fields/has_many/_show.html.erb +15 -0
- data/app/views/madmin/fields/has_one/_form.html.erb +0 -0
- data/app/views/madmin/fields/has_one/_show.html.erb +12 -0
- data/app/views/madmin/fields/number/_form.html.erb +4 -0
- data/app/views/madmin/fields/number/_index.html.erb +1 -0
- data/app/views/madmin/fields/number/_show.html.erb +8 -0
- data/app/views/madmin/fields/password/_form.html.erb +4 -0
- data/app/views/madmin/fields/password/_index.html.erb +1 -0
- data/app/views/madmin/fields/password/_show.html.erb +8 -0
- data/app/views/madmin/fields/polymorphic/_form.html.erb +32 -0
- data/app/views/madmin/fields/polymorphic/_index.html.erb +1 -0
- data/app/views/madmin/fields/polymorphic/_show.html.erb +14 -0
- data/app/views/madmin/fields/select/_form.html.erb +4 -0
- data/app/views/madmin/fields/select/_index.html.erb +1 -0
- data/app/views/madmin/fields/select/_show.html.erb +8 -0
- data/app/views/madmin/fields/text/_form.html.erb +4 -0
- data/app/views/madmin/fields/text/_index.html.erb +1 -0
- data/app/views/madmin/fields/text/_show.html.erb +8 -0
- data/app/views/madmin/fields/text_area/_form.html.erb +4 -0
- data/app/views/madmin/fields/text_area/_index.html.erb +1 -0
- data/app/views/madmin/fields/text_area/_show.html.erb +8 -0
- data/app/views/madmin/resources/_form.html.erb +15 -0
- data/app/views/madmin/resources/_scopes.html.erb +10 -0
- data/app/views/madmin/resources/edit.html.erb +2 -0
- data/app/views/madmin/resources/index.html.erb +13 -0
- data/app/views/madmin/resources/index/_content.html.erb +33 -0
- data/app/views/madmin/resources/new.html.erb +2 -0
- data/app/views/madmin/resources/show.html.erb +10 -0
- data/config/routes.rb +11 -0
- data/lib/generators/madmin/controller/USAGE +8 -0
- data/lib/generators/madmin/controller/controller_generator.rb +10 -0
- data/lib/generators/madmin/install/install_generator.rb +31 -0
- data/lib/generators/madmin/page/USAGE +8 -0
- data/lib/generators/madmin/page/page_generator.rb +20 -0
- data/lib/generators/madmin/page/templates/template.html.erb +2 -0
- data/lib/generators/madmin/page/templates/template.rb.erb +10 -0
- data/lib/generators/madmin/resource/resource_generator.rb +76 -0
- data/lib/generators/madmin/resource/templates/resource.rb.erb +11 -0
- data/lib/generators/madmin/views/views_generator.rb +15 -0
- data/lib/madmin.rb +30 -0
- data/lib/madmin/engine.rb +9 -0
- data/lib/madmin/field.rb +64 -0
- data/lib/madmin/field/associatable.rb +58 -0
- data/lib/madmin/field/belongs_to.rb +9 -0
- data/lib/madmin/field/check_box.rb +8 -0
- data/lib/madmin/field/date_time.rb +8 -0
- data/lib/madmin/field/email.rb +8 -0
- data/lib/madmin/field/has_many.rb +9 -0
- data/lib/madmin/field/has_one.rb +9 -0
- data/lib/madmin/field/number.rb +8 -0
- data/lib/madmin/field/password.rb +8 -0
- data/lib/madmin/field/polymorphic.rb +57 -0
- data/lib/madmin/field/select.rb +13 -0
- data/lib/madmin/field/text.rb +8 -0
- data/lib/madmin/field/text_area.rb +8 -0
- data/lib/madmin/generator_helpers.rb +13 -0
- data/lib/madmin/resourceable.rb +72 -0
- data/lib/madmin/resourceable/class_methods.rb +152 -0
- data/lib/madmin/resources.rb +13 -0
- data/lib/madmin/version.rb +3 -0
- data/lib/tasks/madmin_tasks.rake +4 -0
- metadata +197 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
module Madmin
|
|
2
|
+
class Field
|
|
3
|
+
##
|
|
4
|
+
# This field represents a polymorphic relationship.
|
|
5
|
+
class Polymorphic < Madmin::Field
|
|
6
|
+
attr_reader :polymorphic_display_value
|
|
7
|
+
attr_reader :polymorphic_scope
|
|
8
|
+
|
|
9
|
+
def initialize(args)
|
|
10
|
+
super(args)
|
|
11
|
+
@polymorphic_display_value = option_or_default(:display_value, :name)
|
|
12
|
+
@polymorphic_scope = :all
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
##
|
|
16
|
+
# Returns the id for the associated polymorphic record.
|
|
17
|
+
def polymorphic_id_for(resource)
|
|
18
|
+
value_for(resource).id
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
##
|
|
22
|
+
# Returns the polymorphic ID param.
|
|
23
|
+
def polymorphic_id_param
|
|
24
|
+
"#{key}_id".to_sym
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def polymorphic_relationship_exists?(resource)
|
|
28
|
+
resource.send(polymorphic_type_param) && resource.send(polymorphic_id_param)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
##
|
|
32
|
+
# Returns the slug for the polymorphic resource.
|
|
33
|
+
def polymorphic_slug_for(resource)
|
|
34
|
+
Object.const_get("::Madmin::Resources::#{resource.send("#{key}_type")}").new.slug
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
##
|
|
38
|
+
# Returns the polymorphic type param.
|
|
39
|
+
def polymorphic_type_param
|
|
40
|
+
"#{key}_type".to_sym
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
##
|
|
44
|
+
# Returns the value to show in the admin
|
|
45
|
+
# for the polymorphic relationship.
|
|
46
|
+
def polymorphic_value_for(resource)
|
|
47
|
+
value_for(resource).send(polymorphic_display_value)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
##
|
|
51
|
+
# Returns the polymorphic stront params keys.
|
|
52
|
+
def strong_params_keys
|
|
53
|
+
[polymorphic_id_param, polymorphic_type_param]
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
require "madmin/resourceable/class_methods"
|
|
2
|
+
|
|
3
|
+
##
|
|
4
|
+
# This module is the heart of a Madmin Resource.
|
|
5
|
+
# When included into a resource class, the
|
|
6
|
+
# resource is given a DSL for registering
|
|
7
|
+
# fields, scopes, and more.
|
|
8
|
+
module Madmin
|
|
9
|
+
module Resourceable
|
|
10
|
+
class << self
|
|
11
|
+
def included(base)
|
|
12
|
+
base.extend Madmin::Resourceable::ClassMethods
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
##
|
|
17
|
+
# This method returns a list of fields where
|
|
18
|
+
# the index option is truthy.
|
|
19
|
+
def form_fields
|
|
20
|
+
self.class.fields.values.select { |field| field.form }
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
##
|
|
24
|
+
# This methods exposes the underlying resource's name
|
|
25
|
+
# in a way humans can enjoy and understand.
|
|
26
|
+
def friendly_name
|
|
27
|
+
self.class.model_name.split("::").join(" ")
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
##
|
|
31
|
+
# This method returns a list of fields where
|
|
32
|
+
# the index option is truthy.
|
|
33
|
+
def index_fields
|
|
34
|
+
self.class.fields.values.select { |field| field.index }
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
##
|
|
38
|
+
# This method returns a list of labels for fields
|
|
39
|
+
# where the index option is truthy.
|
|
40
|
+
def index_headers
|
|
41
|
+
index_fields.map { |field| field.label }
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
##
|
|
45
|
+
# This method affords us the ability to retrieve
|
|
46
|
+
# a list of the scopes from the class variable.
|
|
47
|
+
def scopes
|
|
48
|
+
self.class.scopes
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
##
|
|
52
|
+
# This method exposes a way to control if the
|
|
53
|
+
# resource should visible in the menu.
|
|
54
|
+
def show_in_menu?
|
|
55
|
+
true
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
##
|
|
59
|
+
# This method, when used in the resource, sets all fields
|
|
60
|
+
# to be used when the show partial is rendered.
|
|
61
|
+
def show_fields
|
|
62
|
+
self.class.fields.values.select { |field| field.show }
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
##
|
|
66
|
+
# This method affords us the ability to have a
|
|
67
|
+
# consistently rendered slug for a resource.
|
|
68
|
+
def slug
|
|
69
|
+
ActiveModel::Naming.route_key(self.class.model)
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
module Madmin
|
|
2
|
+
module Resourceable
|
|
3
|
+
##
|
|
4
|
+
# This module extends methods into class methods on the resource.
|
|
5
|
+
module ClassMethods
|
|
6
|
+
##
|
|
7
|
+
# This method is a wrapper for the class variable fields.
|
|
8
|
+
# In the event there is no field defined yet, we rescue
|
|
9
|
+
# NameError and return an empty hash to begin the
|
|
10
|
+
# population of the fields class variable.
|
|
11
|
+
def fields
|
|
12
|
+
class_variable_get(:@@fields)
|
|
13
|
+
rescue NameError
|
|
14
|
+
{}
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
##
|
|
18
|
+
# This becomes a DSL for adding a field into the fields class variable.
|
|
19
|
+
# It is responsible for validating and parsing the arguments before
|
|
20
|
+
# placing them into the fields class variable.
|
|
21
|
+
def field(*args)
|
|
22
|
+
validate_arguments!(args)
|
|
23
|
+
|
|
24
|
+
key = args[0].to_sym
|
|
25
|
+
field_type = args[1]
|
|
26
|
+
|
|
27
|
+
# We reassign the entire list of fields to prevent
|
|
28
|
+
# duplication each time the class is evaluated.
|
|
29
|
+
fresh_fields = fields
|
|
30
|
+
fresh_fields[key] = field_type.new(args[2].merge(key: key, model: model, resource: self))
|
|
31
|
+
|
|
32
|
+
class_variable_set(:@@fields, fresh_fields)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
##
|
|
36
|
+
# This method is a wrapper for the class variable scopes.
|
|
37
|
+
# In the event there is no scope defined yet, we rescue
|
|
38
|
+
# NameError and return an empty array to begin the
|
|
39
|
+
# population of the scopes class variable.
|
|
40
|
+
def scopes
|
|
41
|
+
class_variable_get(:@@scopes)
|
|
42
|
+
rescue NameError
|
|
43
|
+
[]
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
##
|
|
47
|
+
# This becomes a DSL for adding a field into the scopes class variable.
|
|
48
|
+
# It is responsible for validating and parsing the arguments before
|
|
49
|
+
# placing them into the scopes class variable.
|
|
50
|
+
def scope(*args)
|
|
51
|
+
validate_scopes!(args)
|
|
52
|
+
|
|
53
|
+
# We reassign the entire list of scopes to prevent
|
|
54
|
+
# duplication each time the class is evaluated.
|
|
55
|
+
fresh_scopes = scopes << args
|
|
56
|
+
|
|
57
|
+
class_variable_set(:@@scopes, fresh_scopes.flatten.uniq)
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
##
|
|
61
|
+
# This method, when used in the resource, sets all fields
|
|
62
|
+
# to be used when the form partial is rendered.
|
|
63
|
+
def form_all_fields!
|
|
64
|
+
class_variable_set(:@@form_all_fields, true)
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
##
|
|
68
|
+
# This method exposes a convenient way to see if all fields
|
|
69
|
+
# for a resource should be available in a form partial.
|
|
70
|
+
def form_all_fields?
|
|
71
|
+
class_variable_get(:@@form_all_fields)
|
|
72
|
+
rescue NameError
|
|
73
|
+
false
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
##
|
|
77
|
+
# This method exposes the underlying model.
|
|
78
|
+
def model
|
|
79
|
+
model_name.constantize
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
##
|
|
83
|
+
# This method extracts the namespace to reveal
|
|
84
|
+
# the underlying models name as a string.
|
|
85
|
+
def model_name
|
|
86
|
+
to_s.split("Madmin::Resources::").last.to_s
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
##
|
|
90
|
+
# This method exposes a convenient way to see if all fields
|
|
91
|
+
# for a resource should be available in a show partial.
|
|
92
|
+
def show_all_fields!
|
|
93
|
+
class_variable_set(:@@show_all_fields, true)
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
##
|
|
97
|
+
# This method exposes a convenient way to see if all fields
|
|
98
|
+
# for a resource should be available in a show partial.
|
|
99
|
+
def show_all_fields?
|
|
100
|
+
class_variable_get(:@@show_all_fields)
|
|
101
|
+
rescue NameError
|
|
102
|
+
false
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
private
|
|
106
|
+
|
|
107
|
+
##
|
|
108
|
+
# This method validates that a given attribute for
|
|
109
|
+
# a field is provided in the correct format of
|
|
110
|
+
# either a symbol or a string.
|
|
111
|
+
def attribute?(attribute)
|
|
112
|
+
attribute.is_a?(Symbol) || attribute.is_a?(String)
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
##
|
|
116
|
+
# We want to make sure a provided type is
|
|
117
|
+
# registered within our system.
|
|
118
|
+
def valid_type?(type)
|
|
119
|
+
type.to_s.deconstantize == Madmin::Field.to_s
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
##
|
|
123
|
+
# This method looks at the first two arguments (attribute, type)
|
|
124
|
+
# and performs their prospective validations. If either
|
|
125
|
+
# validation fails, a WrongArgumentError is raised.
|
|
126
|
+
def validate_arguments!(args)
|
|
127
|
+
if !attribute?(args.first)
|
|
128
|
+
raise WrongArgumentError,
|
|
129
|
+
"#{model_name} expected the attribute name as a symbol or string as the first argument."
|
|
130
|
+
elsif !valid_type?(args.second)
|
|
131
|
+
raise WrongArgumentError,
|
|
132
|
+
"#{model_name} expected Madmin::Field type as the field type as the second argument."
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
##
|
|
137
|
+
# This method looks at a given scope(s) and validates
|
|
138
|
+
# the scope exists on the underlying model.
|
|
139
|
+
#
|
|
140
|
+
# Rails scopes are defined as class methods as the
|
|
141
|
+
# class is evaluated, requiring this method
|
|
142
|
+
# of performing the validation.
|
|
143
|
+
def validate_scopes!(args)
|
|
144
|
+
args.each do |arg|
|
|
145
|
+
unless model.respond_to?(arg)
|
|
146
|
+
raise UndefinedScopeError, ".#{arg} is not a valid scope on #{name}"
|
|
147
|
+
end
|
|
148
|
+
end
|
|
149
|
+
end
|
|
150
|
+
end
|
|
151
|
+
end
|
|
152
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module Madmin
|
|
2
|
+
module Resources
|
|
3
|
+
# TODO: link to documentation in error message.
|
|
4
|
+
def self.gather
|
|
5
|
+
all
|
|
6
|
+
rescue NoMethodError
|
|
7
|
+
raise NoResourcesError,
|
|
8
|
+
"You must define an array of resources as `self.all` in lib/madmin/resources.rb"
|
|
9
|
+
rescue NameError => e
|
|
10
|
+
raise ResourceNotFoundError, "Madmin cannot locate the resource #{e.name}."
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: madmin
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Jason Charnes
|
|
8
|
+
- Chris Oliver
|
|
9
|
+
- Andrew Fomera
|
|
10
|
+
autorequire:
|
|
11
|
+
bindir: bin
|
|
12
|
+
cert_chain: []
|
|
13
|
+
date: 2019-10-18 00:00:00.000000000 Z
|
|
14
|
+
dependencies:
|
|
15
|
+
- !ruby/object:Gem::Dependency
|
|
16
|
+
name: rails
|
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
|
18
|
+
requirements:
|
|
19
|
+
- - ">="
|
|
20
|
+
- !ruby/object:Gem::Version
|
|
21
|
+
version: '5.2'
|
|
22
|
+
type: :runtime
|
|
23
|
+
prerelease: false
|
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
25
|
+
requirements:
|
|
26
|
+
- - ">="
|
|
27
|
+
- !ruby/object:Gem::Version
|
|
28
|
+
version: '5.2'
|
|
29
|
+
- !ruby/object:Gem::Dependency
|
|
30
|
+
name: pry-rails
|
|
31
|
+
requirement: !ruby/object:Gem::Requirement
|
|
32
|
+
requirements:
|
|
33
|
+
- - ">="
|
|
34
|
+
- !ruby/object:Gem::Version
|
|
35
|
+
version: '0'
|
|
36
|
+
type: :development
|
|
37
|
+
prerelease: false
|
|
38
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
39
|
+
requirements:
|
|
40
|
+
- - ">="
|
|
41
|
+
- !ruby/object:Gem::Version
|
|
42
|
+
version: '0'
|
|
43
|
+
- !ruby/object:Gem::Dependency
|
|
44
|
+
name: sqlite3
|
|
45
|
+
requirement: !ruby/object:Gem::Requirement
|
|
46
|
+
requirements:
|
|
47
|
+
- - "~>"
|
|
48
|
+
- !ruby/object:Gem::Version
|
|
49
|
+
version: 1.3.6
|
|
50
|
+
type: :development
|
|
51
|
+
prerelease: false
|
|
52
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
53
|
+
requirements:
|
|
54
|
+
- - "~>"
|
|
55
|
+
- !ruby/object:Gem::Version
|
|
56
|
+
version: 1.3.6
|
|
57
|
+
- !ruby/object:Gem::Dependency
|
|
58
|
+
name: standardrb
|
|
59
|
+
requirement: !ruby/object:Gem::Requirement
|
|
60
|
+
requirements:
|
|
61
|
+
- - ">="
|
|
62
|
+
- !ruby/object:Gem::Version
|
|
63
|
+
version: '0'
|
|
64
|
+
type: :development
|
|
65
|
+
prerelease: false
|
|
66
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
67
|
+
requirements:
|
|
68
|
+
- - ">="
|
|
69
|
+
- !ruby/object:Gem::Version
|
|
70
|
+
version: '0'
|
|
71
|
+
description: Administration for Rails
|
|
72
|
+
email:
|
|
73
|
+
- jason@thecharnes.com
|
|
74
|
+
- excid3@gmail.com
|
|
75
|
+
- andrew@zerlex.net
|
|
76
|
+
executables: []
|
|
77
|
+
extensions: []
|
|
78
|
+
extra_rdoc_files: []
|
|
79
|
+
files:
|
|
80
|
+
- MIT-LICENSE
|
|
81
|
+
- README.md
|
|
82
|
+
- Rakefile
|
|
83
|
+
- app/assets/config/madmin_manifest.js
|
|
84
|
+
- app/assets/javascripts/madmin/application.js
|
|
85
|
+
- app/assets/javascripts/madmin/dashboard.js
|
|
86
|
+
- app/assets/javascripts/madmin/resources.js
|
|
87
|
+
- app/assets/stylesheets/madmin/application.css
|
|
88
|
+
- app/assets/stylesheets/madmin/dashboard.css
|
|
89
|
+
- app/assets/stylesheets/madmin/resources.css
|
|
90
|
+
- app/controllers/madmin/application_controller.rb
|
|
91
|
+
- app/controllers/madmin/base_controller.rb
|
|
92
|
+
- app/controllers/madmin/dashboard_controller.rb
|
|
93
|
+
- app/controllers/madmin/resources_controller.rb
|
|
94
|
+
- app/decorators/madmin/resource_decorator.rb
|
|
95
|
+
- app/helpers/madmin/application_helper.rb
|
|
96
|
+
- app/helpers/madmin/fields/polymorphic_helper.rb
|
|
97
|
+
- app/jobs/madmin/application_job.rb
|
|
98
|
+
- app/mailers/madmin/application_mailer.rb
|
|
99
|
+
- app/models/madmin/application_record.rb
|
|
100
|
+
- app/views/application/_navigation.html.erb
|
|
101
|
+
- app/views/layouts/madmin/application.html.erb
|
|
102
|
+
- app/views/madmin/dashboard/index.html.erb
|
|
103
|
+
- app/views/madmin/fields/belongs_to/_form.html.erb
|
|
104
|
+
- app/views/madmin/fields/belongs_to/_index.html.erb
|
|
105
|
+
- app/views/madmin/fields/belongs_to/_show.html.erb
|
|
106
|
+
- app/views/madmin/fields/check_box/_form.html.erb
|
|
107
|
+
- app/views/madmin/fields/check_box/_index.html.erb
|
|
108
|
+
- app/views/madmin/fields/check_box/_show.html.erb
|
|
109
|
+
- app/views/madmin/fields/email/_form.html.erb
|
|
110
|
+
- app/views/madmin/fields/email/_index.html.erb
|
|
111
|
+
- app/views/madmin/fields/email/_show.html.erb
|
|
112
|
+
- app/views/madmin/fields/has_many/_form.html.erb
|
|
113
|
+
- app/views/madmin/fields/has_many/_show.html.erb
|
|
114
|
+
- app/views/madmin/fields/has_one/_form.html.erb
|
|
115
|
+
- app/views/madmin/fields/has_one/_show.html.erb
|
|
116
|
+
- app/views/madmin/fields/number/_form.html.erb
|
|
117
|
+
- app/views/madmin/fields/number/_index.html.erb
|
|
118
|
+
- app/views/madmin/fields/number/_show.html.erb
|
|
119
|
+
- app/views/madmin/fields/password/_form.html.erb
|
|
120
|
+
- app/views/madmin/fields/password/_index.html.erb
|
|
121
|
+
- app/views/madmin/fields/password/_show.html.erb
|
|
122
|
+
- app/views/madmin/fields/polymorphic/_form.html.erb
|
|
123
|
+
- app/views/madmin/fields/polymorphic/_index.html.erb
|
|
124
|
+
- app/views/madmin/fields/polymorphic/_show.html.erb
|
|
125
|
+
- app/views/madmin/fields/select/_form.html.erb
|
|
126
|
+
- app/views/madmin/fields/select/_index.html.erb
|
|
127
|
+
- app/views/madmin/fields/select/_show.html.erb
|
|
128
|
+
- app/views/madmin/fields/text/_form.html.erb
|
|
129
|
+
- app/views/madmin/fields/text/_index.html.erb
|
|
130
|
+
- app/views/madmin/fields/text/_show.html.erb
|
|
131
|
+
- app/views/madmin/fields/text_area/_form.html.erb
|
|
132
|
+
- app/views/madmin/fields/text_area/_index.html.erb
|
|
133
|
+
- app/views/madmin/fields/text_area/_show.html.erb
|
|
134
|
+
- app/views/madmin/resources/_form.html.erb
|
|
135
|
+
- app/views/madmin/resources/_scopes.html.erb
|
|
136
|
+
- app/views/madmin/resources/edit.html.erb
|
|
137
|
+
- app/views/madmin/resources/index.html.erb
|
|
138
|
+
- app/views/madmin/resources/index/_content.html.erb
|
|
139
|
+
- app/views/madmin/resources/new.html.erb
|
|
140
|
+
- app/views/madmin/resources/show.html.erb
|
|
141
|
+
- config/routes.rb
|
|
142
|
+
- lib/generators/madmin/controller/USAGE
|
|
143
|
+
- lib/generators/madmin/controller/controller_generator.rb
|
|
144
|
+
- lib/generators/madmin/install/install_generator.rb
|
|
145
|
+
- lib/generators/madmin/page/USAGE
|
|
146
|
+
- lib/generators/madmin/page/page_generator.rb
|
|
147
|
+
- lib/generators/madmin/page/templates/template.html.erb
|
|
148
|
+
- lib/generators/madmin/page/templates/template.rb.erb
|
|
149
|
+
- lib/generators/madmin/resource/resource_generator.rb
|
|
150
|
+
- lib/generators/madmin/resource/templates/resource.rb.erb
|
|
151
|
+
- lib/generators/madmin/views/views_generator.rb
|
|
152
|
+
- lib/madmin.rb
|
|
153
|
+
- lib/madmin/engine.rb
|
|
154
|
+
- lib/madmin/field.rb
|
|
155
|
+
- lib/madmin/field/associatable.rb
|
|
156
|
+
- lib/madmin/field/belongs_to.rb
|
|
157
|
+
- lib/madmin/field/check_box.rb
|
|
158
|
+
- lib/madmin/field/date_time.rb
|
|
159
|
+
- lib/madmin/field/email.rb
|
|
160
|
+
- lib/madmin/field/has_many.rb
|
|
161
|
+
- lib/madmin/field/has_one.rb
|
|
162
|
+
- lib/madmin/field/number.rb
|
|
163
|
+
- lib/madmin/field/password.rb
|
|
164
|
+
- lib/madmin/field/polymorphic.rb
|
|
165
|
+
- lib/madmin/field/select.rb
|
|
166
|
+
- lib/madmin/field/text.rb
|
|
167
|
+
- lib/madmin/field/text_area.rb
|
|
168
|
+
- lib/madmin/generator_helpers.rb
|
|
169
|
+
- lib/madmin/resourceable.rb
|
|
170
|
+
- lib/madmin/resourceable/class_methods.rb
|
|
171
|
+
- lib/madmin/resources.rb
|
|
172
|
+
- lib/madmin/version.rb
|
|
173
|
+
- lib/tasks/madmin_tasks.rake
|
|
174
|
+
homepage: https://madmin.jasoncharnes.com
|
|
175
|
+
licenses:
|
|
176
|
+
- MIT
|
|
177
|
+
metadata: {}
|
|
178
|
+
post_install_message:
|
|
179
|
+
rdoc_options: []
|
|
180
|
+
require_paths:
|
|
181
|
+
- lib
|
|
182
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
183
|
+
requirements:
|
|
184
|
+
- - ">="
|
|
185
|
+
- !ruby/object:Gem::Version
|
|
186
|
+
version: '0'
|
|
187
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
188
|
+
requirements:
|
|
189
|
+
- - ">="
|
|
190
|
+
- !ruby/object:Gem::Version
|
|
191
|
+
version: '0'
|
|
192
|
+
requirements: []
|
|
193
|
+
rubygems_version: 3.0.6
|
|
194
|
+
signing_key:
|
|
195
|
+
specification_version: 4
|
|
196
|
+
summary: Administration for Rails
|
|
197
|
+
test_files: []
|