slash_admin 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/slash_admin/models_controller.rb +1 -1
- data/app/views/slash_admin/base/_data_list.html.erb +1 -1
- data/app/views/slash_admin/base/_data_new.html.erb +0 -1
- data/app/views/slash_admin/custom_fields/_color.html.erb +1 -0
- data/app/views/slash_admin/custom_fields/_email.html.erb +1 -0
- data/app/views/slash_admin/custom_fields/_google_map.html.erb +2 -0
- data/app/views/slash_admin/custom_fields/_password.html.erb +1 -0
- data/app/views/slash_admin/custom_fields/_select.html.erb +1 -0
- data/app/views/slash_admin/custom_fields/_tags.html.erb +1 -0
- data/app/views/slash_admin/custom_fields/_timezone.html.erb +1 -0
- data/app/views/slash_admin/custom_fields/_wysiwyg.html.erb +1 -0
- data/app/views/slash_admin/fields/_belongs_to.html.erb +2 -1
- data/app/views/slash_admin/fields/_boolean.html.erb +1 -0
- data/app/views/slash_admin/fields/_carrierwave.html.erb +1 -0
- data/app/views/slash_admin/fields/_date.html.erb +1 -0
- data/app/views/slash_admin/fields/_decimal.html.erb +1 -0
- data/app/views/slash_admin/fields/_has_many.html.erb +1 -0
- data/app/views/slash_admin/fields/_has_one.html.erb +1 -0
- data/app/views/slash_admin/fields/_integer.html.erb +1 -0
- data/app/views/slash_admin/fields/_json.html.erb +2 -1
- data/app/views/slash_admin/fields/_jsonb.html.erb +3 -2
- data/app/views/slash_admin/fields/_nested_belongs_to.html.erb +1 -0
- data/app/views/slash_admin/fields/_nested_has_many.html.erb +1 -0
- data/app/views/slash_admin/fields/_nested_has_one.html.erb +1 -0
- data/app/views/slash_admin/fields/_number.html.erb +1 -0
- data/app/views/slash_admin/fields/_string.html.erb +1 -0
- data/app/views/slash_admin/fields/_text.html.erb +1 -0
- data/app/views/slash_admin/shared/_tooltip.html.erb +3 -0
- data/lib/slash_admin/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c5a4c285955a883a0704418cb27fa2837ef8a8fb58745413160846338142e621
|
4
|
+
data.tar.gz: 3ecc92ebafdf31d9fdea0c21f45c7d781e99a7f45cc31955a244870704300f5a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb4285ecb2759b358dfe285a67e3a58e9ff6558a32899a49975dfe6fb6083fc12105f59666a4c457dbcc9a1268eac6c79f7450ffa97e7ed93c211fc316ecffc9
|
7
|
+
data.tar.gz: d7ebaf4596b6d463e49c7c4abbad3c59ccb533f95d045b26a229f31424b2cc068ebaa87ec7ba1cfce7a541dc47263256ad11a962094137b0dabc7dac7b62ca05
|
@@ -48,7 +48,7 @@
|
|
48
48
|
<%= @model_class.human_attribute_name(attr) %>
|
49
49
|
<% if tooltips.key? attr %>
|
50
50
|
<a href="#" data-toggle="tooltip" data-placement="top" title="<%= tooltips[attr] %>"><i class="fas fa-question-circle"></i></a>
|
51
|
-
|
51
|
+
<% end %>
|
52
52
|
</th>
|
53
53
|
<% end %>
|
54
54
|
<% end %>
|
@@ -1,4 +1,6 @@
|
|
1
1
|
<%= f.label a.keys.first, class: "form-control-label #{required?(f.object, a).present? ? 'required' : ''}" %>
|
2
|
+
<%= render 'slash_admin/shared/tooltip', a: a %>
|
3
|
+
|
2
4
|
<input type="text" class="form-control" id="<%= f.options[:html][:id] %>_search" />
|
3
5
|
<script async defer
|
4
6
|
src="https://maps.googleapis.com/maps/api/js?key=<%= a[a.keys.first.to_sym][:google_api_key] %>&libraries=places&callback=initMap&language=<%= I18n.locale %>">
|
@@ -1,4 +1,5 @@
|
|
1
1
|
<%= f.label a.keys.first, class: "form-control-label #{required?(f.object, a) ? 'required' : ''}" %>
|
2
|
+
<%= render 'slash_admin/shared/tooltip', a: a %>
|
2
3
|
<% if a[a.keys.first][:multiple].present? && a[a.keys.first][:multiple] == true %>
|
3
4
|
<%= f.select(a.keys.first, a[a.keys.first][:choices], { include_blank: a[a.keys.first][:include_blank], required: required?(f.object, a) }, class: 'selectize-multiple', multiple: true) %>
|
4
5
|
<% else %>
|
@@ -1,2 +1,3 @@
|
|
1
1
|
<%= f.label a.keys.first, class: "form-control-label #{required?(f.object, a) ? 'required' : ''}" %>
|
2
|
+
<%= render 'slash_admin/shared/tooltip', a: a %>
|
2
3
|
<%= f.select(a.keys.first, ActiveSupport::TimeZone::MAPPING.values, { include_blank: true, required: required?(f.object, a) }, class: 'selectize-single') %>
|
@@ -1,7 +1,8 @@
|
|
1
1
|
<%= f.label a, class: "form-control-label #{required?(f.object, a).present? ? 'required' : ''}" %>
|
2
|
+
<%= render 'slash_admin/shared/tooltip', a: a %>
|
2
3
|
<%= f.collection_select a.to_s + '_id',
|
3
4
|
class_name_from_association(f.object, a).constantize.all.order(f.object.send(a).present? ? "CASE WHEN id = #{f.object.send(a).try(:id)} THEN 1 ELSE 0 END DESC" : "id DESC").limit(20), :id, object_label(class_name_from_association(f.object, a)),
|
4
|
-
{
|
5
|
+
{
|
5
6
|
prompt: t('slash_admin.view.select_model', model_name: class_name_from_association(f.object, a).constantize.model_name.human.downcase),
|
6
7
|
},
|
7
8
|
'data-model': class_name_from_association(f.object, a).constantize.model_name.to_s.underscore,
|
@@ -1,2 +1,3 @@
|
|
1
1
|
<%= f.label a, class: "form-control-label #{required?(f.object, a) ? 'required' : ''}" %>
|
2
|
+
<%= render 'slash_admin/shared/tooltip', a: a %>
|
2
3
|
<%= f.text_field a, class: "form-control bootstrap-material-#{@model_class.type_for_attribute(a.to_s).type.to_s}", required: required?(f.object, a) %>
|
@@ -1,4 +1,5 @@
|
|
1
1
|
<%= f.label a, class: "form-control-label #{required?(f.object, a) ? 'required' : ''}" %>
|
2
|
+
<%= render 'slash_admin/shared/tooltip', a: a %>
|
2
3
|
<%= f.collection_select "#{a.to_s.singularize}_ids",
|
3
4
|
class_name_from_association(f.object, a).constantize.all.order(f.object.send(a).present? ? "CASE WHEN id IN(#{f.object.send(a).pluck(:id).join(',')}) THEN 1 ELSE 0 END DESC" : "id DESC").limit(20), :id,
|
4
5
|
object_label(class_name_from_association(f.object, a)),
|
@@ -1,4 +1,5 @@
|
|
1
1
|
<%= f.label a, class: "form-control-label #{required?(f.object, a).present? ? 'required' : ''}" %>
|
2
|
+
<%= render 'slash_admin/shared/tooltip', a: a %>
|
2
3
|
<%= f.select a.to_s,
|
3
4
|
class_name_from_association(f.object, a).constantize.all.order(f.object.send(a).present? ? "CASE WHEN id = #{f.object.send(a).try(:id)} THEN 1 ELSE 0 END DESC" : "id DESC").limit(20).collect { |assoc| [assoc.send(object_label(class_name_from_association(f.object, a))), assoc.id] },
|
4
5
|
{
|
@@ -1,4 +1,5 @@
|
|
1
1
|
<%= f.label a, class: "form-control-label #{required?(f.object, a) ? 'required' : ''}"%>
|
2
|
+
<%= render 'slash_admin/shared/tooltip', a: a %>
|
2
3
|
<%= f.text_area a, class: "form-control #{'jsonarea_' + f.object.class.to_s + '_' + a.to_s}", required: required?(f.object, a), value: f.object.send(a).to_json %>
|
3
4
|
|
4
5
|
<script src="https://rawgithub.com/zaach/jsonlint/79b553fb65c192add9066da64043458981b3972b/lib/jsonlint.js"></script>
|
@@ -11,4 +12,4 @@
|
|
11
12
|
gutters: ["CodeMirror-lint-markers"],
|
12
13
|
lint: true
|
13
14
|
});
|
14
|
-
</script>
|
15
|
+
</script>
|
@@ -1,5 +1,6 @@
|
|
1
1
|
<%= f.label a, class: "form-control-label #{required?(f.object, a) ? 'required' : ''}"%>
|
2
|
-
<%=
|
2
|
+
<%= render 'slash_admin/shared/tooltip', a: a %>
|
3
|
+
<%= f.text_area a, class: "form-control #{'jsonarea_' + f.object.class.to_s + '_' + a.to_s}", required: required?(f.object, a), value: f.object.send(a).to_json %>
|
3
4
|
|
4
5
|
<script src="https://rawgithub.com/zaach/jsonlint/79b553fb65c192add9066da64043458981b3972b/lib/jsonlint.js"></script>
|
5
6
|
<script type="text/javascript">
|
@@ -11,4 +12,4 @@
|
|
11
12
|
gutters: ["CodeMirror-lint-markers"],
|
12
13
|
lint: true
|
13
14
|
});
|
14
|
-
</script>
|
15
|
+
</script>
|
@@ -1,4 +1,5 @@
|
|
1
1
|
<%= f.label a, class: "form-control-label #{required?(f.object, a).present? ? 'required' : ''}" %>
|
2
|
+
<%= render 'slash_admin/shared/tooltip', a: a %>
|
2
3
|
<%= f.collection_select a.to_s + '_id',
|
3
4
|
class_name_from_association(f.object, a).constantize.all.order(f.object.send(a).present? ? "CASE WHEN id = #{f.object.send(a).try(:id)} THEN 1 ELSE 0 END DESC" : "id DESC").limit(20), :id, object_label(a),
|
4
5
|
{
|
data/lib/slash_admin/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slash_admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- KOVACS Nicolas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -392,6 +392,7 @@ files:
|
|
392
392
|
- app/views/slash_admin/shared/_menu.html.erb
|
393
393
|
- app/views/slash_admin/shared/_new_form_buttons.html.erb
|
394
394
|
- app/views/slash_admin/shared/_sub_header.html.erb
|
395
|
+
- app/views/slash_admin/shared/_tooltip.html.erb
|
395
396
|
- config/initializers/validators.rb
|
396
397
|
- config/locales/en.yml
|
397
398
|
- config/locales/fr.yml
|