administrate 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of administrate might be problematic. Click here for more details.

Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/administrate/application.js +2 -0
  3. data/app/assets/javascripts/administrate/components/date_time_picker.js +3 -0
  4. data/app/assets/stylesheets/administrate/application.scss +1 -1
  5. data/app/assets/stylesheets/administrate/base/_tables.scss +7 -15
  6. data/app/assets/stylesheets/administrate/components/_attributes.scss +3 -0
  7. data/app/assets/stylesheets/administrate/{_typography.scss → components/_cells.scss} +6 -0
  8. data/app/assets/stylesheets/administrate/components/_components.scss +3 -0
  9. data/app/assets/stylesheets/administrate/components/_date_time_picker.scss +3 -0
  10. data/app/controllers/administrate/application_controller.rb +20 -13
  11. data/app/views/administrate/application/_table.html.erb +5 -3
  12. data/app/views/administrate/application/show.html.erb +8 -2
  13. data/app/views/fields/date_time/_form.html.erb +2 -0
  14. data/app/views/fields/date_time/_index.html.erb +3 -0
  15. data/app/views/fields/date_time/_show.html.erb +3 -0
  16. data/app/views/fields/number/_form.html.erb +2 -0
  17. data/app/views/fields/number/_index.html.erb +1 -0
  18. data/app/views/fields/number/_show.html.erb +1 -0
  19. data/app/views/fields/polymorphic/_form.html.erb +3 -0
  20. data/app/views/fields/polymorphic/_index.html.erb +6 -0
  21. data/app/views/fields/polymorphic/_show.html.erb +6 -0
  22. data/app/views/fields/string/_index.html.erb +1 -1
  23. data/config/locales/administrate.en.yml +2 -0
  24. data/lib/administrate/base_dashboard.rb +3 -0
  25. data/lib/administrate/engine.rb +2 -0
  26. data/lib/administrate/fields/base.rb +10 -4
  27. data/lib/administrate/fields/date_time.rb +6 -0
  28. data/lib/administrate/fields/deferred.rb +9 -7
  29. data/lib/administrate/fields/has_many.rb +1 -1
  30. data/lib/administrate/fields/number.rb +29 -0
  31. data/lib/administrate/fields/polymorphic.rb +8 -0
  32. data/lib/administrate/fields/string.rb +9 -0
  33. data/lib/administrate/page/base.rb +6 -2
  34. data/lib/administrate/page/table.rb +4 -0
  35. data/lib/administrate/version.rb +1 -1
  36. data/lib/generators/administrate/dashboard/dashboard_generator.rb +48 -22
  37. data/lib/generators/administrate/install/templates/routes.rb +11 -3
  38. metadata +47 -6
  39. data/lib/generators/administrate/dashboard/templates/controller.rb.erb +0 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2bd49855b92730b3acde97d6015d92d54d0dd858
4
- data.tar.gz: 61010bf3e723a482ba3c1c3c5032c046c4a54592
3
+ metadata.gz: 4bf162085febeaff1ab69651259d6cff0c83ae85
4
+ data.tar.gz: 7ef68a804642c0c383097234e990b80727405862
5
5
  SHA512:
6
- metadata.gz: b55d4c98a0a5189a2b9fecd4a7b4fae8976b5664561826bf6a79b84ca1693234273d8948ecdf4e4502eb4770b514bb64eb629528e464e3585bf57c21752da4d1
7
- data.tar.gz: 5212a82a96c557a2096ea8c3581022d24dbee052150903b346279ed52191bb90e1cd462cda21dfe0165cef6b65c36eb37aad522100cc28b0ae9371e1d3b22319
6
+ metadata.gz: c75dc5a9894ef7d0165addcb2ea9e84a25c24991d7bd6b77e06dde1c51f858e14bf42123c4e82146d80e8d47bbfb85d325574952691ce2ca1c163149d716cbd4
7
+ data.tar.gz: 09aa24e5598534526286435935f0b362e383fc7954f81a98ece98c620075cf6074e9c2168be753f09e791a8909b6da04b386af4a77a1a711c6845cfeb4295915
@@ -1,4 +1,6 @@
1
1
  //= require jquery
2
2
  //= require jquery_ujs
3
3
  //= require selectize
4
+ //= require moment
5
+ //= require datetime_picker
4
6
  //= require_tree .
@@ -0,0 +1,3 @@
1
+ $(function () {
2
+ $(".datetimepicker").datetimepicker({ format: "DD/MM/YYYY hh:mm:ss A" });
3
+ });
@@ -6,6 +6,7 @@
6
6
  @import "neat";
7
7
 
8
8
  @import "selectize";
9
+ @import "datetime_picker";
9
10
 
10
11
  @import "mixins/mixins";
11
12
  @import "base/base";
@@ -13,6 +14,5 @@
13
14
  @import "layout";
14
15
  @import "sidebar";
15
16
  @import "show";
16
- @import "typography";
17
17
 
18
18
  @import "components/components";
@@ -3,30 +3,22 @@ table {
3
3
  width: 100%;
4
4
  }
5
5
 
6
+ th,
7
+ td {
8
+ padding: $small-spacing;
9
+ vertical-align: middle;
10
+ }
11
+
6
12
  th {
7
13
  border-bottom: $dark-border;
8
- padding-bottom: $small-spacing;
14
+ padding-top: 0;
9
15
  text-align: left;
10
16
  }
11
17
 
12
18
  td {
13
19
  border-bottom: $base-border;
14
20
  overflow: hidden;
15
- padding: $small-spacing 0;
16
21
  text-overflow: ellipsis;
17
22
  white-space: nowrap;
18
23
  word-wrap: normal;
19
24
  }
20
-
21
- td,
22
- th {
23
- &:first-child {
24
- padding-left: 1em;
25
- }
26
- }
27
-
28
- tr,
29
- td,
30
- th {
31
- vertical-align: middle;
32
- }
@@ -0,0 +1,3 @@
1
+ .attribute-data--string {
2
+ white-space: pre;
3
+ }
@@ -1,3 +1,4 @@
1
+ .cell-label,
1
2
  .attribute-label {
2
3
  color: $grey-4;
3
4
  font-size: $small-font-size;
@@ -5,3 +6,8 @@
5
6
  letter-spacing: 0.0357em;
6
7
  text-transform: uppercase;
7
8
  }
9
+
10
+ .cell-data--number,
11
+ .cell-label--number {
12
+ text-align: right;
13
+ }
@@ -1,3 +1,6 @@
1
+ @import "attributes";
2
+ @import "cells";
1
3
  @import "form";
4
+ @import "date_time_picker";
2
5
  @import "header";
3
6
  @import "table";
@@ -0,0 +1,3 @@
1
+ .form-field {
2
+ position: relative;
3
+ }
@@ -1,7 +1,7 @@
1
1
  module Administrate
2
2
  class ApplicationController < ActionController::Base
3
3
  def index
4
- @resources = resource_class.all
4
+ @resources = resolver.resource_class.all
5
5
  @page = Administrate::Page::Table.new(dashboard)
6
6
  end
7
7
 
@@ -12,7 +12,9 @@ module Administrate
12
12
  end
13
13
 
14
14
  def new
15
- @page = Administrate::Page::Form.new(dashboard, resource_class.new)
15
+ @page = Administrate::Page::Form.new(
16
+ dashboard, resolver.resource_class.new
17
+ )
16
18
  end
17
19
 
18
20
  def edit
@@ -22,7 +24,7 @@ module Administrate
22
24
  end
23
25
 
24
26
  def create
25
- set_resource(resource_class.new(resource_params))
27
+ set_resource(resolver.resource_class.new(resource_params))
26
28
 
27
29
  if resource.save
28
30
  redirect_to(
@@ -61,7 +63,7 @@ module Administrate
61
63
 
62
64
  helper_method :nav_link_state
63
65
  def nav_link_state(resource)
64
- if resource_name.to_s.pluralize == resource.to_s
66
+ if resolver.resource_name.to_s.pluralize == resource.to_s
65
67
  :active
66
68
  else
67
69
  :inactive
@@ -69,20 +71,24 @@ module Administrate
69
71
  end
70
72
 
71
73
  def dashboard
72
- @dashboard ||= resource_resolver.dashboard_class.new
74
+ @dashboard ||= resolver.dashboard_class.new
73
75
  end
74
76
 
75
77
  def set_resource(resource = nil)
76
- resource ||= resource_class.find(params[:id])
78
+ resource ||= find_resource(params[:id])
77
79
  instance_variable_set(instance_variable, resource)
78
80
  end
79
81
 
82
+ def find_resource(param)
83
+ resolver.resource_class.find(param)
84
+ end
85
+
80
86
  def resource
81
87
  instance_variable_get(instance_variable)
82
88
  end
83
89
 
84
90
  def resource_params
85
- params.require(resource_name).permit(*permitted_attributes)
91
+ params.require(resolver.resource_name).permit(*permitted_attributes)
86
92
  end
87
93
 
88
94
  def permitted_attributes
@@ -90,20 +96,21 @@ module Administrate
90
96
  end
91
97
 
92
98
  def instance_variable
93
- "@#{resource_name}"
99
+ "@#{resolver.resource_name}"
94
100
  end
95
101
 
96
- delegate :resource_class, :resource_name, to: :resource_resolver
102
+ def resolver
103
+ @resolver ||= Administrate::ResourceResolver.new(resource_class)
104
+ end
97
105
 
98
- def resource_resolver
99
- @resource_resolver ||=
100
- Administrate::ResourceResolver.new(controller_path)
106
+ def resource_class
107
+ params.fetch(:resource_class, controller_path).to_s
101
108
  end
102
109
 
103
110
  def translate(key)
104
111
  t(
105
112
  "administrate.controller.#{key}",
106
- resource: resource_resolver.resource_title,
113
+ resource: resolver.resource_title,
107
114
  )
108
115
  end
109
116
  end
@@ -1,8 +1,10 @@
1
1
  <table>
2
2
  <thead>
3
3
  <tr>
4
- <% table_presenter.attribute_names.each do |attr_name| %>
5
- <th class="attribute-label"><%= attr_name.to_s.titleize %></th>
4
+ <% table_presenter.attribute_types.each do |attr_name, attr_type| %>
5
+ <th class="cell-label cell-label--<%= attr_type.html_class %>">
6
+ <%= attr_name.to_s.titleize %>
7
+ </th>
6
8
  <% end %>
7
9
  <th colspan="2"></th>
8
10
  </tr>
@@ -16,7 +18,7 @@
16
18
  data-url="<%= polymorphic_path([Administrate::NAMESPACE, resource]) -%>"
17
19
  >
18
20
  <% table_presenter.attributes_for(resource).each do |attribute| %>
19
- <td class="field-<%= attribute.html_class %>">
21
+ <td class="cell-data cell-data--<%= attribute.html_class %>">
20
22
  <%= render_field attribute %>
21
23
  </td>
22
24
  <% end %>
@@ -1,11 +1,17 @@
1
1
  <header class="header">
2
2
  <h1 class="header-heading"><%= @page.page_title %></h1>
3
- <%= link_to 'Edit', [:edit, Administrate::NAMESPACE, @page.resource], class: "button" %>
3
+ <%= link_to(
4
+ "Edit",
5
+ [:edit, Administrate::NAMESPACE, @page.resource],
6
+ class: "button",
7
+ ) %>
4
8
  </header>
5
9
 
6
10
  <dl>
7
11
  <% @page.attributes.each do |attribute| %>
8
12
  <dt class="attribute-label"><%= attribute.name.titleize %></dt>
9
- <dd><%= render_field attribute %></dd>
13
+ <dd class="attribute-data--<%=attribute.html_class%>">
14
+ <%= render_field attribute %>
15
+ </dd>
10
16
  <% end %>
11
17
  </dl>
@@ -0,0 +1,2 @@
1
+ <%= f.label field.attribute %>
2
+ <%= f.text_field field.attribute, class: "datetimepicker" %>
@@ -0,0 +1,3 @@
1
+ <% if field.data %>
2
+ <%= l field.data.to_date %>
3
+ <% end %>
@@ -0,0 +1,3 @@
1
+ <% if field.data %>
2
+ <%= l field.data %>
3
+ <% end %>
@@ -0,0 +1,2 @@
1
+ <%= f.label field.attribute %>
2
+ <%= f.text_field field.attribute %>
@@ -0,0 +1 @@
1
+ <%= field %>
@@ -0,0 +1 @@
1
+ <%= field %>
@@ -0,0 +1,3 @@
1
+ <%= f.label field.name %>
2
+
3
+ <%= t("administrate.fields.polymorphic.not_supported") %>
@@ -0,0 +1,6 @@
1
+ <% if field.data %>
2
+ <%= link_to(
3
+ field.data.to_s,
4
+ polymorphic_path([:admin, field.data])
5
+ ) %>
6
+ <% end %>
@@ -0,0 +1,6 @@
1
+ <% if field.data %>
2
+ <%= link_to(
3
+ field.data.to_s,
4
+ polymorphic_path([:admin, field.data])
5
+ ) %>
6
+ <% end %>
@@ -1 +1 @@
1
- <%= field.data %>
1
+ <%= field.truncate %>
@@ -8,6 +8,8 @@ en:
8
8
  fields:
9
9
  has_many:
10
10
  none: None
11
+ polymorphic:
12
+ not_supported: "Polymorphic relationship forms are not supported yet. Sorry!"
11
13
  controller:
12
14
  create:
13
15
  success: "%{resource} was successfully created."
@@ -1,8 +1,11 @@
1
1
  require "administrate/fields/belongs_to"
2
+ require "administrate/fields/date_time"
2
3
  require "administrate/fields/email"
3
4
  require "administrate/fields/has_many"
4
5
  require "administrate/fields/has_one"
5
6
  require "administrate/fields/image"
7
+ require "administrate/fields/number"
8
+ require "administrate/fields/polymorphic"
6
9
  require "administrate/fields/string"
7
10
 
8
11
  module Administrate
@@ -1,6 +1,8 @@
1
1
  require "neat"
2
2
  require "normalize-rails"
3
3
  require "selectize-rails"
4
+ require "momentjs-rails"
5
+ require "datetime_picker_rails"
4
6
 
5
7
  require "administrate/namespace"
6
8
  require "administrate/page/form"
@@ -7,6 +7,10 @@ module Administrate
7
7
  Deferred.new(self, options)
8
8
  end
9
9
 
10
+ def self.html_class
11
+ field_type.dasherize
12
+ end
13
+
10
14
  def initialize(attribute, data, page, options = {})
11
15
  @attribute = attribute
12
16
  @data = data
@@ -19,7 +23,7 @@ module Administrate
19
23
  end
20
24
 
21
25
  def html_class
22
- field_name.dasherize
26
+ self.class.html_class
23
27
  end
24
28
 
25
29
  def name
@@ -27,15 +31,17 @@ module Administrate
27
31
  end
28
32
 
29
33
  def to_partial_path
30
- "/fields/#{field_name}/#{page}"
34
+ "/fields/#{self.class.field_type}/#{page}"
31
35
  end
32
36
 
33
37
  attr_reader :attribute, :data, :page
34
38
 
35
39
  protected
36
40
 
37
- def field_name
38
- self.class.to_s.split("::").last.underscore
41
+ attr_reader :options
42
+
43
+ def self.field_type
44
+ to_s.split("::").last.underscore
39
45
  end
40
46
  end
41
47
  end
@@ -0,0 +1,6 @@
1
+ module Administrate
2
+ module Field
3
+ class DateTime < Base
4
+ end
5
+ end
6
+ end
@@ -1,20 +1,22 @@
1
1
  module Administrate
2
2
  module Field
3
3
  class Deferred
4
- def initialize(klass, options = {})
5
- @klass = klass
4
+ def initialize(deferred_class, options = {})
5
+ @deferred_class = deferred_class
6
6
  @options = options
7
7
  end
8
8
 
9
+ attr_reader :deferred_class, :options
10
+
9
11
  def new(*args)
10
- klass.new(*args, options)
12
+ deferred_class.new(*args, options)
11
13
  end
12
14
 
13
- delegate :permitted_attribute, to: :klass
14
-
15
- private
15
+ def ==(other)
16
+ deferred_class == other.deferred_class && options == other.options
17
+ end
16
18
 
17
- attr_reader :klass, :options
19
+ delegate :html_class, :permitted_attribute, to: :deferred_class
18
20
  end
19
21
  end
20
22
  end
@@ -31,7 +31,7 @@ module Administrate
31
31
  end
32
32
 
33
33
  def resource_class_name
34
- @options[:class_name] || attribute.to_s.singularize.camelcase
34
+ options[:class_name] || attribute.to_s.singularize.camelcase
35
35
  end
36
36
  end
37
37
  end
@@ -0,0 +1,29 @@
1
+ require_relative "base"
2
+
3
+ module Administrate
4
+ module Field
5
+ class Number < Field::Base
6
+ def to_s
7
+ if data.nil?
8
+ "-"
9
+ else
10
+ format_string % data
11
+ end
12
+ end
13
+
14
+ private
15
+
16
+ def format_string
17
+ prefix + "%.#{decimals}f"
18
+ end
19
+
20
+ def prefix
21
+ options[:prefix].to_s
22
+ end
23
+
24
+ def decimals
25
+ options.fetch(:decimals, 0)
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,8 @@
1
+ require_relative "base"
2
+
3
+ module Administrate
4
+ module Field
5
+ class Polymorphic < Base
6
+ end
7
+ end
8
+ end
@@ -3,6 +3,15 @@ require_relative "base"
3
3
  module Administrate
4
4
  module Field
5
5
  class String < Field::Base
6
+ def truncate
7
+ data[0...truncation_length]
8
+ end
9
+
10
+ private
11
+
12
+ def truncation_length
13
+ options.fetch(:truncate, 50)
14
+ end
6
15
  end
7
16
  end
8
17
  end
@@ -13,14 +13,18 @@ module Administrate
13
13
  protected
14
14
 
15
15
  def attribute_field(dashboard, resource, attribute_name, page)
16
- value = resource.public_send(attribute_name)
16
+ value = get_attribute_value(resource, attribute_name)
17
17
 
18
18
  dashboard.
19
19
  attribute_types[attribute_name].
20
20
  new(attribute_name, value, page)
21
21
  end
22
22
 
23
- protected
23
+ def get_attribute_value(resource, attribute_name)
24
+ resource.public_send(attribute_name)
25
+ rescue NameError
26
+ nil
27
+ end
24
28
 
25
29
  attr_reader :dashboard
26
30
  end
@@ -13,6 +13,10 @@ module Administrate
13
13
  end
14
14
  end
15
15
 
16
+ def attribute_types
17
+ dashboard.attribute_types.slice(*attribute_names)
18
+ end
19
+
16
20
  def to_partial_path
17
21
  "/dashboard/table"
18
22
  end
@@ -1,3 +1,3 @@
1
1
  module Administrate
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
3
3
  end
@@ -3,6 +3,19 @@ require "rails/generators/named_base"
3
3
  module Administrate
4
4
  module Generators
5
5
  class DashboardGenerator < Rails::Generators::NamedBase
6
+ ATTRIBUTE_TYPE_MAPPING = {
7
+ date: "Field::DateTime",
8
+ datetime: "Field::DateTime",
9
+ float: "Field::Number",
10
+ integer: "Field::Number",
11
+ time: "Field::DateTime",
12
+ }
13
+
14
+ ATTRIBUTE_OPTIONS_MAPPING = {
15
+ float: { decimals: 2 },
16
+ }
17
+
18
+ DEFAULT_FIELD_TYPE = "Field::String"
6
19
  TABLE_ATTRIBUTE_LIMIT = 4
7
20
 
8
21
  source_root File.expand_path("../templates", __FILE__)
@@ -11,37 +24,46 @@ module Administrate
11
24
  template "dashboard.rb.erb", "app/dashboards/#{file_name}_dashboard.rb"
12
25
  end
13
26
 
14
- def create_resource_controller
15
- template(
16
- "controller.rb.erb",
17
- "app/controllers/admin/#{file_name.pluralize}_controller.rb"
18
- )
19
- end
20
-
21
27
  private
22
28
 
23
29
  def attributes
24
- klass.attribute_names + klass.reflections.keys
30
+ klass.reflections.keys + klass.attribute_names - redundant_attributes
31
+ end
32
+
33
+ def redundant_attributes
34
+ klass.reflections.keys.flat_map do |relationship|
35
+ redundant_attributes_for(relationship)
36
+ end.compact
37
+ end
38
+
39
+ def redundant_attributes_for(relationship)
40
+ case association_type(relationship)
41
+ when "Field::Polymorphic"
42
+ [relationship + "_id", relationship + "_type"]
43
+ when "Field::BelongsTo"
44
+ relationship + "_id"
45
+ end
25
46
  end
26
47
 
27
48
  def field_type(attribute)
28
- if klass.type_for_attribute(attribute).type
29
- default_field_type
49
+ type = klass.column_types[attribute.to_s].type
50
+
51
+ if type
52
+ ATTRIBUTE_TYPE_MAPPING.fetch(type, DEFAULT_FIELD_TYPE) +
53
+ options_string(ATTRIBUTE_OPTIONS_MAPPING.fetch(type, {}))
30
54
  else
31
55
  association_type(attribute)
32
56
  end
33
57
  end
34
58
 
35
- def default_field_type
36
- "Field::String"
37
- end
38
-
39
59
  def association_type(attribute)
40
- reflection = klass.reflections[attribute.to_s]
41
- if reflection.has_one?
60
+ relationship = klass.reflections[attribute.to_s]
61
+ if relationship.has_one?
42
62
  "Field::HasOne"
43
- elsif reflection.collection?
44
- "Field::HasMany" + has_many_options_string(reflection)
63
+ elsif relationship.collection?
64
+ "Field::HasMany" + has_many_options_string(relationship)
65
+ elsif relationship.polymorphic?
66
+ "Field::Polymorphic"
45
67
  else
46
68
  "Field::BelongsTo"
47
69
  end
@@ -51,16 +73,20 @@ module Administrate
51
73
  @klass ||= Object.const_get(class_name)
52
74
  end
53
75
 
54
- def has_many_options_string(reflection)
55
- if reflection.class_name != reflection.name.to_s.classify
56
- options_string(class_name: reflection.class_name)
76
+ def has_many_options_string(relationship)
77
+ if relationship.class_name != relationship.name.to_s.classify
78
+ options_string(class_name: relationship.class_name)
57
79
  else
58
80
  ""
59
81
  end
60
82
  end
61
83
 
62
84
  def options_string(options)
63
- ".with_options(#{inspect_hash_as_ruby(options)})"
85
+ if options.any?
86
+ ".with_options(#{inspect_hash_as_ruby(options)})"
87
+ else
88
+ ""
89
+ end
64
90
  end
65
91
 
66
92
  def inspect_hash_as_ruby(hash)
@@ -1,7 +1,15 @@
1
1
  namespace :admin do
2
- DashboardManifest::DASHBOARDS.each do |dashboard_resource|
3
- resources dashboard_resource
2
+ DashboardManifest::DASHBOARDS.each do |resource_class|
3
+ resources(
4
+ resource_class,
5
+ controller: :application,
6
+ resource_class: resource_class,
7
+ )
4
8
  end
5
9
 
6
- root controller: DashboardManifest::ROOT_DASHBOARD, action: :index
10
+ root(
11
+ action: :index,
12
+ controller: :application,
13
+ resource_class: DashboardManifest::ROOT_DASHBOARD,
14
+ )
7
15
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: administrate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Grayson Wright
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-03 00:00:00.000000000 Z
11
+ date: 2015-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: neat
@@ -80,6 +80,34 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0.6'
83
+ - !ruby/object:Gem::Dependency
84
+ name: momentjs-rails
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: 2.9.0
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: 2.9.0
97
+ - !ruby/object:Gem::Dependency
98
+ name: datetime_picker_rails
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: 0.0.4
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: 0.0.4
83
111
  - !ruby/object:Gem::Dependency
84
112
  name: autoprefixer-rails
85
113
  requirement: !ruby/object:Gem::Requirement
@@ -116,11 +144,11 @@ files:
116
144
  - LICENSE
117
145
  - Rakefile
118
146
  - app/assets/javascripts/administrate/application.js
147
+ - app/assets/javascripts/administrate/components/date_time_picker.js
119
148
  - app/assets/javascripts/administrate/components/has_many_form.js
120
149
  - app/assets/javascripts/administrate/components/table.js
121
150
  - app/assets/stylesheets/administrate/_show.sass
122
151
  - app/assets/stylesheets/administrate/_sidebar.scss
123
- - app/assets/stylesheets/administrate/_typography.scss
124
152
  - app/assets/stylesheets/administrate/application.scss
125
153
  - app/assets/stylesheets/administrate/base/_base.scss
126
154
  - app/assets/stylesheets/administrate/base/_buttons.scss
@@ -135,7 +163,10 @@ files:
135
163
  - app/assets/stylesheets/administrate/base/extends/_errors.scss
136
164
  - app/assets/stylesheets/administrate/base/extends/_flashes.scss
137
165
  - app/assets/stylesheets/administrate/base/extends/_hide-text.scss
166
+ - app/assets/stylesheets/administrate/components/_attributes.scss
167
+ - app/assets/stylesheets/administrate/components/_cells.scss
138
168
  - app/assets/stylesheets/administrate/components/_components.scss
169
+ - app/assets/stylesheets/administrate/components/_date_time_picker.scss
139
170
  - app/assets/stylesheets/administrate/components/_form.scss
140
171
  - app/assets/stylesheets/administrate/components/_header.scss
141
172
  - app/assets/stylesheets/administrate/components/_table.scss
@@ -156,6 +187,9 @@ files:
156
187
  - app/views/fields/belongs_to/_form.html.erb
157
188
  - app/views/fields/belongs_to/_index.html.erb
158
189
  - app/views/fields/belongs_to/_show.html.erb
190
+ - app/views/fields/date_time/_form.html.erb
191
+ - app/views/fields/date_time/_index.html.erb
192
+ - app/views/fields/date_time/_show.html.erb
159
193
  - app/views/fields/email/_form.html.erb
160
194
  - app/views/fields/email/_index.html.erb
161
195
  - app/views/fields/email/_show.html.erb
@@ -168,6 +202,12 @@ files:
168
202
  - app/views/fields/image/_form.html.erb
169
203
  - app/views/fields/image/_index.html.erb
170
204
  - app/views/fields/image/_show.html.erb
205
+ - app/views/fields/number/_form.html.erb
206
+ - app/views/fields/number/_index.html.erb
207
+ - app/views/fields/number/_show.html.erb
208
+ - app/views/fields/polymorphic/_form.html.erb
209
+ - app/views/fields/polymorphic/_index.html.erb
210
+ - app/views/fields/polymorphic/_show.html.erb
171
211
  - app/views/fields/string/_form.html.erb
172
212
  - app/views/fields/string/_index.html.erb
173
213
  - app/views/fields/string/_show.html.erb
@@ -179,11 +219,14 @@ files:
179
219
  - lib/administrate/engine.rb
180
220
  - lib/administrate/fields/base.rb
181
221
  - lib/administrate/fields/belongs_to.rb
222
+ - lib/administrate/fields/date_time.rb
182
223
  - lib/administrate/fields/deferred.rb
183
224
  - lib/administrate/fields/email.rb
184
225
  - lib/administrate/fields/has_many.rb
185
226
  - lib/administrate/fields/has_one.rb
186
227
  - lib/administrate/fields/image.rb
228
+ - lib/administrate/fields/number.rb
229
+ - lib/administrate/fields/polymorphic.rb
187
230
  - lib/administrate/fields/string.rb
188
231
  - lib/administrate/namespace.rb
189
232
  - lib/administrate/page.rb
@@ -195,7 +238,6 @@ files:
195
238
  - lib/administrate/version.rb
196
239
  - lib/generators/administrate/dashboard/USAGE
197
240
  - lib/generators/administrate/dashboard/dashboard_generator.rb
198
- - lib/generators/administrate/dashboard/templates/controller.rb.erb
199
241
  - lib/generators/administrate/dashboard/templates/dashboard.rb.erb
200
242
  - lib/generators/administrate/install/install_generator.rb
201
243
  - lib/generators/administrate/install/templates/application_controller.rb
@@ -222,9 +264,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
222
264
  version: '0'
223
265
  requirements: []
224
266
  rubyforge_project:
225
- rubygems_version: 2.4.8
267
+ rubygems_version: 2.4.5
226
268
  signing_key:
227
269
  specification_version: 4
228
270
  summary: A Rails engine for creating super-flexible admin dashboards
229
271
  test_files: []
230
- has_rdoc:
@@ -1,12 +0,0 @@
1
- class Admin::<%= class_name.pluralize %>Controller < Admin::ApplicationController
2
- # To customize the behavior of this controller,
3
- # simply overwrite any of the RESTful actions. For example:
4
- #
5
- # def index
6
- # super
7
- # @resources = <%= class_name %>.all.paginate(10, params[:page])
8
- # end
9
-
10
- # See https://administrate-docs.herokuapp.com/customizing_controller_actions
11
- # for more information
12
- end