slash_admin 1.3.0 → 1.3.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b630d2ae3de110061ec7538dc87dad3adbcc395f1bf1e166d3e3d351e583abe1
4
- data.tar.gz: 2b3745532e3152208abd1a454b6b5ad34d429a9527d1ee6f3be84b66ddb82636
3
+ metadata.gz: ccb3baa1e350b7dd50df3668174273bc00d7e1aa343181b1f79f8212281488cb
4
+ data.tar.gz: 2157f07a84cd25f6fa9bd3420d4ac6b0b540082afc07ea69d706517f6740672c
5
5
  SHA512:
6
- metadata.gz: 53e00bfbf7c89933d68b9c3a9bd0d08ab4279b30d577ba20f9c36a3f579af0945021b0aa4b79a078834a7ec6ee4c5a78eb9c4257eaedd3281d8390f1045ae61d
7
- data.tar.gz: 7367cda7b8e2fc74cd52944c39e83574562a6f70aa26d2beac0f8caf5b0f03d6eeaf1da1b33d53b6fa26608abf9b596342f4c1db01b3101700e27256ce116b9d
6
+ metadata.gz: 9af1af8597797ddb789f091c9d722c1edb6f3d9ebcdb28ec50b7e3051c170095bda6964f2970c080930a39c13f454642f2cf4ae79848c4f6d0decd7da9a6e0fb
7
+ data.tar.gz: 6ca2267f25300ba5d2a5323c160d23e17d184adbfabc0819264dfd44a4a9c3a08df051f22993b59bb78215a24a75fec02d2fcaeb42a4a8e644dd89d6e0a17595
data/README.md CHANGED
@@ -1,15 +1,14 @@
1
1
  <p align="center">
2
- <img width="250" src="https://i.imgur.com/Rok5Ocf.png" />
2
+ <img width="250" src="https://i.imgur.com/mm9gXtL.png" />
3
3
  </p>
4
4
 
5
5
  # SlashAdmin
6
6
 
7
7
  [![Gem Version](https://badge.fury.io/rb/slash_admin.svg)](https://badge.fury.io/rb/slash_admin)
8
- [![Code Climate](https://codeclimate.com/github/nicovak/slash_admin/badges/gpa.svg)](https://codeclimate.com/github/nicovak/slash_admin)
9
8
  [![CircleCI](https://circleci.com/gh/nicovak/slash_admin/tree/master.svg?style=svg&circle-token=6e9ebd7fef3ebc881c75a769b0970808024a2ae9)](https://circleci.com/gh/nicovak/slash_admin/tree/master)
10
9
 
11
- A modern and fully overridable admin, just the rails way.
12
- Embeded admin user and authentication system, devise is not needed.
10
+ A modern and fully customizable admin, just the rails way.
11
+ Embedded admin user and authentication system, devise is not needded.
13
12
 
14
13
  ❤️ [Demo repository](https://github.com/nicovak/slash_admin_demo)
15
14
  🚀 [Live running](https://slashadmin.herokuapp.com/admin)
@@ -21,7 +20,7 @@ Password
21
20
  `admin@admin`
22
21
 
23
22
  #### Motivation:
24
- - Provide to rails the admin it deserves without DSL or obscure logic.
23
+ - Provide to Ruby On Rails the admin it deserves without DSL or obscure logic.
25
24
  - Provide an easy to use and modern experience to final users.
26
25
 
27
26
  I tried to take the best from two greats existing gem:
@@ -34,37 +33,42 @@ Design inspired from the awesome metronic admin theme:
34
33
  #### Screenshots
35
34
 
36
35
  ##### Login
37
- ![Image of Login screen](https://i.imgur.com/MJerQSR.jpg)
36
+ ![Image of Login screen](https://i.imgur.com/ftwC0rF.png)
38
37
  ##### Dashboard
39
- ![Image of Dashboard](https://i.imgur.com/0g3wSjw.png)
38
+ ![Image of Dashboard](https://i.imgur.com/3JzkvoT.png)
40
39
  ##### List
41
- ![Image of List](https://i.imgur.com/s1egSS3.png)
40
+ ![Image of List](https://i.imgur.com/y6Vz6S1.png)
42
41
  ##### Edit / Create
43
- ![Image of Create / Edit](https://i.imgur.com/wf72pZz.png)
42
+ ![Image of Create / Edit](https://i.imgur.com/S2QqHWF.png)
44
43
 
45
44
  ### Installation
46
45
 
47
46
  Add this line to your application's Gemfile:
47
+
48
48
  ```ruby
49
49
  gem 'slash_admin'
50
50
  ```
51
51
 
52
- And then execute:
52
+ Then execute:
53
+
53
54
  ```bash
54
55
  $ bundle install
55
56
  ```
56
57
 
57
58
  Or install it yourself as:
59
+
58
60
  ```bash
59
61
  $ gem install slash_admin
60
62
  ```
61
63
 
62
64
  Gemfile
65
+
63
66
  ```
64
67
  gem 'carrierwave'
65
68
  ```
66
69
 
67
70
  Then:
71
+
68
72
  ```bash
69
73
  $ rails g slash_admin:install
70
74
  $ rails slash_admin:install:migrations
@@ -77,13 +81,36 @@ $ rails db:migrate
77
81
  Mime::Type.register "application/xls", :xls
78
82
  ```
79
83
 
84
+ If your apps uses Sprockets 4+, you'll need to add SlashAdmin assets to your `manifest.js` file. To do this, add these two lines to the file:
85
+
86
+ `app/assets/config/manifest.js`
87
+
88
+ ```
89
+ //= link administrate/application.css
90
+ //= link administrate/application.js
91
+ ```
92
+
93
+ `config/routes.rb`
94
+
80
95
  ```ruby
81
96
  Rails.application.routes.draw do
82
97
  mount SlashAdmin::Engine => "/"
83
98
  end
84
99
  ```
85
100
 
86
- Mounted as '/' but prefixed in the gem and in routes definition of models admin. See above.
101
+ Mounted as '/' but prefixed in the gem and in routes definition of models admin. See the full example above.
102
+
103
+ ```ruby
104
+ Rails.application.routes.draw do
105
+ mount SlashAdmin::Engine => "/"
106
+
107
+ namespace :slash_admin, path: "/admin" do
108
+ scope module: 'models' do
109
+ resources :pages # assume Page model
110
+ end
111
+ end
112
+ end
113
+ ```
87
114
 
88
115
  ### Important
89
116
 
@@ -1,3 +1,3 @@
1
1
  //= link_tree ../images
2
- //= link_directory ../javascripts/slash_admin .js
3
- //= link_directory ../stylesheets/slash_admin scss
2
+ //= link_tree ../javascripts
3
+ //= link_tree ../stylesheets
@@ -5,7 +5,9 @@
5
5
  //= require jquery_ujs
6
6
  //= require popper
7
7
  //= require bootstrap
8
- //= require select2.min
8
+ //= require select2/select2.min
9
+ //= require select2/i18n/fr
10
+ //= require select2/i18n/en
9
11
  //= require moment
10
12
  //= require moment/fr
11
13
  //= require bootstrap-material-datetimepicker
@@ -205,12 +207,12 @@ function init() {
205
207
 
206
208
 
207
209
  $(".select2-single, .select2-multiple").each (function() {
208
- let initialPlaceholder = $(this).attr('placeholder');
210
+ var initialPlaceholder = $(this).attr('data-placeholder') || I18n.t('slash_admin.view.select');
211
+
209
212
  $(this).select2({
210
213
  placeholder: initialPlaceholder,
211
214
  allowClear: true,
212
215
  theme: 'bootstrap4',
213
- debug: true,
214
216
  }).on("select2:unselecting", function (e) {
215
217
  $(this).data('state', 'unselected');
216
218
  }).on("select2:open", function (e) {
@@ -226,13 +228,12 @@ function init() {
226
228
  });
227
229
 
228
230
  $(".select2-model-multiple, .select2-model-single").each(function() {
229
- let initialPlaceholder = $(this).attr('data-placeholder') || I18n.t('slash_admin.view.select');
231
+ var initialPlaceholder = $(this).attr('data-placeholder') || I18n.t('slash_admin.view.select');
230
232
 
231
233
  $(this).select2({
232
234
  placeholder: initialPlaceholder,
233
235
  allowClear: true,
234
236
  theme: 'bootstrap4',
235
- debug: true,
236
237
  ajax: {
237
238
  url: Routes.slash_admin_remote_select_path({
238
239
  format: "json"
@@ -1,37 +1,21 @@
1
- /*
2
- * This is a manifest file that'll be compiled into application.css, which will include all the files
3
- * listed below.
4
- *
5
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
- * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
- *
8
- * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
- * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
10
- * files in this directory. Styles in this file should be added after the last require_* statement.
11
- * It is generally better to create a new file per style scope.
12
- *
13
- *= require animate
14
- *= require toastr
15
- *= require jquery.nestable
16
- *= require sweetalert
17
- *= require select2.min
18
- *= require select2-bootstrap4
19
- *= require bootstrap-datepicker.min
20
- *= require bootstrap-material-datetimepicker
21
- *= require jquery.tagsinput-revisited.min
22
- *= require jquery.minicolors
23
- *= require slash_admin/colors
24
- *= require slash_admin/alert
25
- *= require codemirror/codemirror
26
- *= require codemirror/theme/relax-seti
27
- *= require codemirror/lint/lint
28
- *= require_self
29
- *= require slash_admin/custom
30
- *= require_tree .
31
- */
32
-
33
- @import "./colors";
34
- @import "./alert";
1
+ @import "animate";
2
+ @import "toastr";
3
+ @import "jquery.nestable";
4
+ @import "sweetalert";
5
+ @import "select2/select2.min";
6
+ @import "select2/select2-bootstrap4";
7
+ @import "bootstrap-datepicker.min";
8
+ @import "bootstrap-material-datetimepicker";
9
+ @import "jquery.tagsinput-revisited.min";
10
+ @import "jquery.minicolors";
11
+ @import "slash_admin/colors";
12
+ @import "slash_admin/alert";
13
+ @import "slash_admin/custom";
14
+ @import "codemirror/codemirror";
15
+ @import "codemirror/theme/relax-seti";
16
+ @import "codemirror/lint/lint";
17
+ @import "colors";
18
+ @import "alert";
35
19
 
36
20
  $pagination-padding-y: 0.4rem !default;
37
21
  $pagination-border-width: 0 !default;
@@ -155,7 +139,8 @@ p[data-f-id="pbf"] {
155
139
  }
156
140
 
157
141
  .select2-container--bootstrap4 .select2-results__option--highlighted,
158
- .select2-container--bootstrap4 .select2-results__option--highlighted.select2-results__option[aria-selected=true] {
142
+ .select2-container--bootstrap4
143
+ .select2-results__option--highlighted.select2-results__option[aria-selected="true"] {
159
144
  background-color: $primary;
160
145
  color: white;
161
146
  }
@@ -178,20 +163,27 @@ p[data-f-id="pbf"] {
178
163
  background: $input;
179
164
  }
180
165
 
181
- .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice {
166
+ .select2-container--bootstrap4
167
+ .select2-selection--multiple
168
+ .select2-selection__choice {
182
169
  word-break: break-all;
183
170
  background: white;
184
171
  }
185
172
 
186
173
  .select2-container .select2-results__option--highlighted,
187
- .select2-container .select2-results__option--highlighted.select2-results__option[aria-selected=true],
188
- .select2-container--bootstrap4 .select2-dropdown .select2-results__option[aria-selected=true] {
174
+ .select2-container
175
+ .select2-results__option--highlighted.select2-results__option[aria-selected="true"],
176
+ .select2-container--bootstrap4
177
+ .select2-dropdown
178
+ .select2-results__option[aria-selected="true"] {
189
179
  background-color: $primary;
190
180
  color: white;
191
181
  }
192
182
 
193
- .select2-container--bootstrap4.select2-container--focus .select2-selection--multiple,
194
- .select2-container--bootstrap4.select2-container--focus .select2-selection--single {
183
+ .select2-container--bootstrap4.select2-container--focus
184
+ .select2-selection--multiple,
185
+ .select2-container--bootstrap4.select2-container--focus
186
+ .select2-selection--single {
195
187
  border: 1px solid $border;
196
188
  background: $input;
197
189
  }
@@ -211,7 +203,9 @@ p[data-f-id="pbf"] {
211
203
  background: none;
212
204
  }
213
205
 
214
- .select2-container--bootstrap4 .select2-search--dropdown .select2-search__field {
206
+ .select2-container--bootstrap4
207
+ .select2-search--dropdown
208
+ .select2-search__field {
215
209
  border-color: $border;
216
210
  }
217
211
 
@@ -397,18 +391,18 @@ p[data-f-id="pbf"] {
397
391
  position: relative;
398
392
  height: 80px;
399
393
  width: 100%;
400
- transition: all ease .6s;
394
+ transition: all ease 0.6s;
401
395
  }
402
396
 
403
397
  .image-overlay {
404
- transition: all ease .6s;
398
+ transition: all ease 0.6s;
405
399
  position: absolute;
406
400
  width: 100%;
407
401
  height: 100%;
408
- background: rgba($primary, .0);
402
+ background: rgba($primary, 0);
409
403
 
410
404
  .icon-zoom-image {
411
- transition: all ease .6s;
405
+ transition: all ease 0.6s;
412
406
  position: absolute;
413
407
  top: 50%;
414
408
  left: 50%;
@@ -418,7 +412,7 @@ p[data-f-id="pbf"] {
418
412
  }
419
413
 
420
414
  &:hover {
421
- background: rgba($primary, .4);
415
+ background: rgba($primary, 0.4);
422
416
 
423
417
  .icon-zoom-image {
424
418
  opacity: 1;
@@ -589,10 +583,6 @@ p[data-f-id="pbf"] {
589
583
  display: flex;
590
584
  align-items: center;
591
585
 
592
- &:hover {
593
- background: #f9fafc;
594
- }
595
-
596
586
  &.active {
597
587
  color: $textColorHover;
598
588
  }
@@ -869,9 +859,10 @@ p[data-f-id="pbf"] {
869
859
  display: none;
870
860
  padding: 9px 15px;
871
861
 
872
- tr, a {
862
+ tr,
863
+ a {
873
864
  color: $textColor;
874
- transition: all .6s ease;
865
+ transition: all 0.6s ease;
875
866
  cursor: pointer;
876
867
 
877
868
  &.active {
@@ -1051,7 +1042,7 @@ p[data-f-id="pbf"] {
1051
1042
  border-color: rgba(121, 133, 166, 0.1) !important;
1052
1043
  margin-top: 1rem;
1053
1044
  background: #fff;
1054
- font-size: .9em;
1045
+ font-size: 0.9em;
1055
1046
 
1056
1047
  .fit {
1057
1048
  white-space: nowrap;
@@ -1085,8 +1076,12 @@ p[data-f-id="pbf"] {
1085
1076
  margin-top: 0.5rem;
1086
1077
  }
1087
1078
 
1088
- .select2-container--bootstrap4 .select2-selection--single .select2-selection__choice,
1089
- .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice {
1079
+ .select2-container--bootstrap4
1080
+ .select2-selection--single
1081
+ .select2-selection__choice,
1082
+ .select2-container--bootstrap4
1083
+ .select2-selection--multiple
1084
+ .select2-selection__choice {
1090
1085
  display: flex;
1091
1086
  clear: both;
1092
1087
  }
@@ -1350,7 +1345,9 @@ p[data-f-id="pbf"] {
1350
1345
  height: 45px;
1351
1346
  }
1352
1347
 
1353
- .cookies-eu, .cookies-eu-button-holder, .cookies-eu-content-holder {
1348
+ .cookies-eu,
1349
+ .cookies-eu-button-holder,
1350
+ .cookies-eu-content-holder {
1354
1351
  display: flex;
1355
1352
  line-height: normal;
1356
1353
  }
@@ -1397,7 +1394,7 @@ p[data-f-id="pbf"] {
1397
1394
  }
1398
1395
 
1399
1396
  label {
1400
- font-size: .85em;
1397
+ font-size: 0.85em;
1401
1398
  color: $textColor;
1402
1399
  text-transform: uppercase;
1403
1400
  margin-bottom: 0.25rem;
@@ -1411,7 +1408,9 @@ p[data-f-id="pbf"] {
1411
1408
  a {
1412
1409
  color: $textColor;
1413
1410
 
1414
- &:hover, &:focus, &:active {
1411
+ &:hover,
1412
+ &:focus,
1413
+ &:active {
1415
1414
  color: $primary;
1416
1415
  }
1417
1416
  }
@@ -1439,7 +1438,7 @@ p[data-f-id="pbf"] {
1439
1438
  }
1440
1439
 
1441
1440
  .sub-title {
1442
- font-size: .9em;
1441
+ font-size: 0.9em;
1443
1442
  color: $textColor;
1444
1443
  }
1445
1444
 
@@ -2,6 +2,8 @@
2
2
 
3
3
  module SlashAdmin
4
4
  module ApplicationHelper
5
+ include Pagy::Frontend
6
+
5
7
  def page_title(content)
6
8
  content_for :page_title, content
7
9
  end
@@ -1,7 +1,13 @@
1
1
  <%= f.label a.keys.first, class: "form-control-label #{required?(f.object, a) ? 'required' : ''}" %>
2
2
  <%= render 'slash_admin/shared/tooltip', a: a %>
3
- <% if a[a.keys.first][:multiple].present? && a[a.keys.first][:multiple] == true %>
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: 'form-control select2-multiple', multiple: true) %>
3
+ <% if a[a.keys.first][:multiple].present? %>
4
+ <%= f.select(a.keys.first, a[a.keys.first][:choices],
5
+ { include_blank: a[a.keys.first][:include_blank], required: required?(f.object, a) },
6
+ 'data-placeholder': t('slash_admin.view.select_model', model_name: @model_class.human_attribute_name(a.keys.first).singularize.downcase),
7
+ class: 'form-control select2-multiple', multiple: true) %>
5
8
  <% else %>
6
- <%= f.select(a.keys.first, a[a.keys.first][:choices], { include_blank: a[a.keys.first][:include_blank], required: required?(f.object, a) }, class: 'form-control select2-single') %>
9
+ <%= f.select(a.keys.first, a[a.keys.first][:choices],
10
+ { include_blank: a[a.keys.first][:include_blank], required: required?(f.object, a) },
11
+ 'data-placeholder': t('slash_admin.view.select_model', model_name: @model_class.human_attribute_name(a.keys.first).singularize.downcase),
12
+ class: 'form-control select2-single') %>
7
13
  <% end %>
@@ -1,3 +1,6 @@
1
1
  <%= f.label a.keys.first, class: "form-control-label #{required?(f.object, a) ? 'required' : ''}" %>
2
2
  <%= render 'slash_admin/shared/tooltip', a: a %>
3
- <%= f.select(a.keys.first, ActiveSupport::TimeZone::MAPPING.values, { include_blank: true, required: required?(f.object, a) }, class: 'form-control select2-single') %>
3
+ <%= f.select(a.keys.first, ActiveSupport::TimeZone::MAPPING.values,
4
+ { include_blank: true, required: required?(f.object, a) },
5
+ 'data-placeholder': t('slash_admin.view.select_model', model_name: @model_class.human_attribute_name(a.keys.first).singularize.downcase),
6
+ class: 'form-control select2-single') %>
@@ -2,7 +2,9 @@
2
2
  <%= render 'slash_admin/shared/tooltip', a: a %>
3
3
  <%= f.collection_select a.to_s + '_id',
4
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)),
5
- {},
5
+ {
6
+ include_blank: true,
7
+ },
6
8
  'data-placeholder': t('slash_admin.view.select_model', model_name: class_name_from_association(f.object, a).constantize.model_name.human.downcase),
7
9
  'data-model': class_name_from_association(f.object, a).constantize.model_name.to_s.underscore,
8
10
  'data-fields': "SlashAdmin::Models::#{class_name_from_association(f.object, a).classify.pluralize}Controller".constantize.new.autocomplete_params.join(' '),
@@ -2,7 +2,9 @@
2
2
  <%= render 'slash_admin/shared/tooltip', a: a %>
3
3
  <%= f.select a.to_s,
4
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] },
5
- {},
5
+ {
6
+ include_blank: true,
7
+ },
6
8
  'data-placeholder': t('slash_admin.view.select_model', model_name: class_name_from_association(f.object, a).constantize.model_name.human.downcase),
7
9
  'data-model': class_name_from_association(f.object, a).constantize.model_name.to_s.underscore,
8
10
  'data-fields': "SlashAdmin::Models::#{class_name_from_association(f.object, a).classify.pluralize}Controller".constantize.new.autocomplete_params.join(' '),
@@ -3,7 +3,9 @@
3
3
  <% class_name_from_association = class_name_from_association(f.object, a) %>
4
4
  <%= f.collection_select a.to_s + '_id',
5
5
  class_name_from_association.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),
6
- {},
6
+ {
7
+ include_blank: true,
8
+ },
7
9
  'data-placeholder': t('slash_admin.view.select_model', model_name: class_name_from_association.constantize.model_name.human.downcase),
8
10
  'data-model': class_name_from_association.constantize.model_name.to_s.underscore,
9
11
  'data-fields': "SlashAdmin::Models::#{a.to_s.classify.pluralize}Controller".constantize.new.autocomplete_params.join(' '),
@@ -27,7 +27,7 @@
27
27
  </div>
28
28
  </div>
29
29
  <div class="col-lg-6 col-md-4 d-none d-sm-none d-md-flex ">
30
- <div class="container-fluid container-fluid-devise bckg-login" align="center" style="background: url(https://source.unsplash.com/1920x1080/?nature) no-repeat; background-size: cover;">
30
+ <div class="container-fluid container-fluid-devise bckg-login" align="center" style="background: url(https://source.unsplash.com/collection/827743/960x1080) no-repeat; background-size: cover;">
31
31
  </div>
32
32
  </div>
33
33
  </div>
@@ -10,8 +10,8 @@
10
10
  <div class="navbar-nav mr-auto mt-2 mt-lg-0">
11
11
  </div>
12
12
  <ul class="nav right-nav-fix">
13
- <li class="nav-item dropdown">
14
- <a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
13
+ <li class="nav-item">
14
+ <a class="nav-link">
15
15
  <% if current_admin.avatar.present? %>
16
16
  <img src="<%= current_admin.avatar.url %>" class="rounded-circle"/>
17
17
  <% else %>
@@ -74,8 +74,8 @@
74
74
  <script type="text/javascript">
75
75
  $(function() {
76
76
  $(".clickable-row").click(function() {
77
- let href = $(this).data("href");
78
- let blank = $(this).data("blank");
77
+ var href = $(this).data("href");
78
+ var blank = $(this).data("blank");
79
79
 
80
80
  if (blank === true) {
81
81
  window.open = href;
@@ -1,9 +1,15 @@
1
+ require "pagy"
2
+ require "pagy/extras/bootstrap"
3
+ require "pagy/extras/i18n"
4
+ require "pagy/extras/array"
5
+
1
6
  module SlashAdmin
2
7
  class Engine < ::Rails::Engine
3
8
  isolate_namespace SlashAdmin
4
9
 
5
10
  initializer "slash_admin.assets.precompile" do |app|
6
- app.config.assets.precompile += %w[slash_admin/*]
11
+ app.config.assets.precompile += %w(slash_admin slash_admin_manifest.js)
12
+ app.config.assets.paths << Pagy.root.join("javascripts")
7
13
  end
8
14
  end
9
15
  end
@@ -1,3 +1,3 @@
1
1
  module SlashAdmin
2
- VERSION = "1.3.0"
2
+ VERSION = "1.3.5"
3
3
  end
@@ -0,0 +1,3 @@
1
+ /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Please delete "+n+" character";return 1!=n&&(r+="s"),r},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var n="You can only select "+e.maximum+" item";return 1!=e.maximum&&(n+="s"),n},noResults:function(){return"No results found"},searching:function(){return"Searching…"},removeAllItems:function(){return"Remove all items"}}}),e.define,e.require}();
@@ -0,0 +1,3 @@
1
+ /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/fr",[],function(){return{errorLoading:function(){return"Les résultats ne peuvent pas être chargés."},inputTooLong:function(e){var n=e.input.length-e.maximum;return"Supprimez "+n+" caractère"+(n>1?"s":"")},inputTooShort:function(e){var n=e.minimum-e.input.length;return"Saisissez au moins "+n+" caractère"+(n>1?"s":"")},loadingMore:function(){return"Chargement de résultats supplémentaires…"},maximumSelected:function(e){return"Vous pouvez seulement sélectionner "+e.maximum+" élément"+(e.maximum>1?"s":"")},noResults:function(){return"Aucun résultat trouvé"},searching:function(){return"Recherche en cours…"},removeAllItems:function(){return"Supprimer tous les éléments"}}}),e.define,e.require}();
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.3.0
4
+ version: 1.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - KOVACS Nicolas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-06 00:00:00.000000000 Z
11
+ date: 2020-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -389,7 +389,6 @@ files:
389
389
  - app/views/slash_admin/shared/_new_form_buttons.html.erb
390
390
  - app/views/slash_admin/shared/_sub_header.html.erb
391
391
  - app/views/slash_admin/shared/_tooltip.html.erb
392
- - config/initializers/pagy.rb
393
392
  - config/initializers/validators.rb
394
393
  - config/locales/en.yml
395
394
  - config/locales/fr.yml
@@ -420,7 +419,9 @@ files:
420
419
  - vendor/assets/javascripts/codemirror/mode/javascript.js
421
420
  - vendor/assets/javascripts/jquery.nestable.js
422
421
  - vendor/assets/javascripts/jquery.tagsinput-revisited.min.js
423
- - vendor/assets/javascripts/select2.min.js
422
+ - vendor/assets/javascripts/select2/i18n/en.js
423
+ - vendor/assets/javascripts/select2/i18n/fr.js
424
+ - vendor/assets/javascripts/select2/select2.min.js
424
425
  - vendor/assets/javascripts/toastr.js
425
426
  - vendor/assets/stylesheets/animate.css
426
427
  - vendor/assets/stylesheets/bootstrap-datepicker.min.css
@@ -430,8 +431,8 @@ files:
430
431
  - vendor/assets/stylesheets/codemirror/theme/relax-seti.css
431
432
  - vendor/assets/stylesheets/jquery.nestable.css
432
433
  - vendor/assets/stylesheets/jquery.tagsinput-revisited.min.css
433
- - vendor/assets/stylesheets/select2-bootstrap4.css
434
- - vendor/assets/stylesheets/select2.min.css
434
+ - vendor/assets/stylesheets/select2/select2-bootstrap4.css
435
+ - vendor/assets/stylesheets/select2/select2.min.css
435
436
  - vendor/assets/stylesheets/sweetalert.css
436
437
  - vendor/assets/stylesheets/toastr.css
437
438
  homepage: https://github.com/nicovak/slash_admin
@@ -1,8 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "pagy/extras/bootstrap"
4
- require "pagy/extras/i18n"
5
- require "pagy/extras/array"
6
- require "pagy/extras/searchkick"
7
-
8
- Rails.application.config.assets.paths << Pagy.root.join("javascripts")