administrate 0.15.0 → 0.16.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 +4 -4
- data/app/assets/stylesheets/administrate/components/_buttons.scss +3 -0
- data/app/views/administrate/application/_navigation.html.erb +1 -1
- data/app/views/administrate/application/index.html.erb +1 -1
- data/app/views/fields/url/_index.html.erb +1 -1
- data/app/views/fields/url/_show.html.erb +1 -1
- data/docs/adding_controllers_without_related_model.md +0 -2
- data/docs/customizing_dashboards.md +9 -0
- data/lib/administrate/namespace.rb +1 -1
- data/lib/administrate/resource_resolver.rb +1 -1
- data/lib/administrate/version.rb +1 -1
- data/lib/administrate/view_generator.rb +1 -1
- data/lib/generators/administrate/dashboard/dashboard_generator.rb +1 -1
- data/lib/generators/administrate/dashboard/templates/controller.rb.erb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4919291c5352f8cfb68e629292b4cd85f89d1e8912bf75e6702ecee682383f7
|
4
|
+
data.tar.gz: 48212e43cd940b32a40f1d86c93f181cb808fbcfaa839459292ec258460c8b97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 839bab4d2832921f6a6f7fcc06cbc8f8a5e18017e9de81d7d0c5d22360567ba9b9a427a68223c5b6fe600cb07dbb176404476a51fecb56f07f559a1461da0c4c
|
7
|
+
data.tar.gz: 7b356066b5c0dbe9d82bdc65eefe6563111e30592b827b94fdd03196f01a29e167fb5d22cee9ec907c7e57c29913f12ba75a922aef7f8172a0130b964527c2d8
|
@@ -8,7 +8,7 @@ as defined by the routes in the `admin/` namespace
|
|
8
8
|
%>
|
9
9
|
|
10
10
|
<nav class="navigation" role="navigation">
|
11
|
-
<%= link_to(t("administrate.navigation.back_to_app"), root_url, class: "button button--alt") if defined?(root_url) %>
|
11
|
+
<%= link_to(t("administrate.navigation.back_to_app"), root_url, class: "button button--alt button--nav") if defined?(root_url) %>
|
12
12
|
|
13
13
|
<% Administrate::Namespace.new(namespace).resources_with_index_route.each do |resource| %>
|
14
14
|
<%= link_to(
|
@@ -46,7 +46,7 @@ It renders the `_table` partial to display details about the resources.
|
|
46
46
|
"administrate.actions.new_resource",
|
47
47
|
name: display_resource_name(page.resource_name, singular: true).downcase
|
48
48
|
),
|
49
|
-
[:new, namespace, page.resource_path],
|
49
|
+
[:new, namespace, page.resource_path.to_sym],
|
50
50
|
class: "button",
|
51
51
|
) if valid_action?(:new) && show_action?(:new, new_resource) %>
|
52
52
|
</div>
|
@@ -65,6 +65,7 @@ specify, including:
|
|
65
65
|
- `Field::Select`
|
66
66
|
- `Field::String`
|
67
67
|
- `Field::Text`
|
68
|
+
- `Field::Url`
|
68
69
|
- `Field::Password`
|
69
70
|
|
70
71
|
## Customizing Fields
|
@@ -238,6 +239,14 @@ Default is `false`.
|
|
238
239
|
`:truncate` - Set the number of characters to display in the index view.
|
239
240
|
Defaults to `50`.
|
240
241
|
|
242
|
+
**Field::Url**
|
243
|
+
|
244
|
+
`:searchable` - Specify if the attribute should be considered when searching.
|
245
|
+
Default is `true`.
|
246
|
+
|
247
|
+
`:truncate` - Set the number of characters to display in the index view.
|
248
|
+
Defaults to `50`.
|
249
|
+
|
241
250
|
**Field::Password**
|
242
251
|
|
243
252
|
`:searchable` - Specify if the attribute should be considered when searching.
|
data/lib/administrate/version.rb
CHANGED
@@ -5,7 +5,7 @@ require "administrate/namespace"
|
|
5
5
|
module Administrate
|
6
6
|
class ViewGenerator < Rails::Generators::Base
|
7
7
|
include Administrate::GeneratorHelpers
|
8
|
-
class_option :namespace, type: :string, default:
|
8
|
+
class_option :namespace, type: :string, default: :admin
|
9
9
|
|
10
10
|
def self.template_source_path
|
11
11
|
File.expand_path(
|
@@ -27,7 +27,7 @@ module Administrate
|
|
27
27
|
COLLECTION_ATTRIBUTE_LIMIT = 4
|
28
28
|
READ_ONLY_ATTRIBUTES = %w[id created_at updated_at]
|
29
29
|
|
30
|
-
class_option :namespace, type: :string, default:
|
30
|
+
class_option :namespace, type: :string, default: :admin
|
31
31
|
|
32
32
|
source_root File.expand_path("../templates", __FILE__)
|
33
33
|
|
@@ -1,5 +1,5 @@
|
|
1
|
-
module <%= namespace.classify %>
|
2
|
-
class <%= class_name.pluralize %>Controller < <%= namespace.classify %>::ApplicationController
|
1
|
+
module <%= namespace.to_s.classify %>
|
2
|
+
class <%= class_name.pluralize %>Controller < <%= namespace.to_s.classify %>::ApplicationController
|
3
3
|
# Overwrite any of the RESTful controller actions to implement custom behavior
|
4
4
|
# For example, you may want to send an email after a foo is updated.
|
5
5
|
#
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-
|
12
|
+
date: 2021-05-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|