five-two-nw-olivander 0.1.2.27 → 0.1.2.28

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.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/config/olivander_manifest.js +0 -3
  3. data/app/assets/stylesheets/adminlte.css +1 -3
  4. data/app/components/olivander/components/small_box_component.html.haml +17 -0
  5. data/app/components/olivander/components/small_box_component.rb +34 -0
  6. data/app/controllers/concerns/olivander/resources/route_builder.rb +0 -4
  7. data/app/datatables/olivander/datatable.rb +3 -3
  8. data/app/views/application/_form.html.haml +1 -1
  9. data/app/views/layouts/olivander/adminlte/_login_flashes.html.haml +0 -4
  10. data/config/initializers/simple_form.rb +10 -57
  11. data/lib/olivander/version.rb +1 -1
  12. metadata +4 -19
  13. data/app/assets/config/manifest.js +0 -4
  14. data/app/inputs/custom_form_builder.rb +0 -43
  15. data/app/views/devise/confirmations/new.html.erb +0 -20
  16. data/app/views/devise/mailer/confirmation_instructions.html.erb +0 -5
  17. data/app/views/devise/mailer/email_changed.html.erb +0 -7
  18. data/app/views/devise/mailer/password_change.html.erb +0 -3
  19. data/app/views/devise/mailer/reset_password_instructions.html.erb +0 -8
  20. data/app/views/devise/mailer/unlock_instructions.html.erb +0 -7
  21. data/app/views/devise/passwords/edit.html.erb +0 -27
  22. data/app/views/devise/passwords/new.html.erb +0 -18
  23. data/app/views/devise/registrations/edit.html.erb +0 -35
  24. data/app/views/devise/registrations/new.html.erb +0 -25
  25. data/app/views/devise/sessions/new.html.erb +0 -20
  26. data/app/views/devise/shared/_error_messages.html.erb +0 -15
  27. data/app/views/devise/shared/_links.html.haml +0 -19
  28. data/app/views/devise/unlocks/new.html.erb +0 -19
  29. data/config/initializers/effective_datatables.rb.old +0 -49
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 575201e4ba97a06d33425fffb69b3550f2c3fddc58e1ccb030a827914cbd65f0
4
- data.tar.gz: e1570ff90c9a44764ea6c8e5d8b269d6482377c47010c36475eeabbbfcb5e1e1
3
+ metadata.gz: 80addbfd5fe9f9691a5b0b37db9456e0920abb8c31907d067c8dfe60683bd6fc
4
+ data.tar.gz: 1bd44fc8d34dd873c80ed5768da7d0b94d75aed63e6568370a64ba033dbb861c
5
5
  SHA512:
6
- metadata.gz: 97a5958aab8927d392183d9aea8b193491bf346af4a65fadc9faa96a4f57a54478e7a7247060ca0ec84a25fe7b09dd0c063001f5ae8dc50f59bdb03e86b1475a
7
- data.tar.gz: 3c237985f2aee2131498cbf501734aa9d517f7827eee5d23fb0549452c0d96aadd2913f66269e937a0ae9b5280654c39d3bd179f203b7f42ea7af49584481b7d
6
+ metadata.gz: 9a8bd33731c14f442c8857df913bb77c259c2edf64cec9a0d59a73cf22f7515f7c1a78ace886fbb46f710087d8b30ae470e26df1d176efe5b61c7fc3ba9c4e4e
7
+ data.tar.gz: 2a03cdfae9a10222167c04af1b8deb133a491b1057f6796965135e3201b6e3f1d606710bf0340f646cff56726282824550918dff39391d1775710486b7c5cda0
@@ -1,4 +1 @@
1
1
  //= link_directory ../stylesheets/olivander .css
2
- //= link ../images/avatar1.png
3
- //= link images/avatar1.png
4
- //= link avatar1.png
@@ -25,6 +25,4 @@
25
25
 
26
26
  .table td, .table th {
27
27
  padding: 0.25rem !important;
28
- }
29
-
30
- .card-secondary:not(.card-outline) > .card-header a.page-link { color: blue }
28
+ }
@@ -0,0 +1,17 @@
1
+ - if @turbo_frame.present?
2
+ <turbo-frame id="#{@turbo_frame}" src="#{@src}" loading="#{@loading}">
3
+ .small-box{ class: @background }
4
+ .inner
5
+ %h3= @primary_text
6
+ %p= @secondary_text
7
+ - if @icon.present?
8
+ .icon
9
+ %i{ class: @icon }
10
+ - if @more_link.present?
11
+ %a.small-box-footer{ href: @more_link }
12
+ = @more_text
13
+ %i{ class: @more_icon }
14
+ - if @turbo_frame.present?
15
+ .overlay.dark
16
+ - if @turbo_frame.present?
17
+ </turbo-frame>
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Olivander
4
+ module Components
5
+ class SmallBoxComponent < ViewComponent::Base
6
+ def initialize(
7
+ background: 'bg-danger',
8
+ primary_text: 'Loading...',
9
+ secondary_text: "&nbsp;".html_safe,
10
+ icon: 'fas fa-sync-alt fa-spin',
11
+ more_link: nil,
12
+ more_text: '',
13
+ more_icon: 'fas fa-arrow-circle-right',
14
+ turbo_frame: nil,
15
+ loading: true,
16
+ src: nil,
17
+ overlay: 'dark'
18
+ )
19
+ super
20
+ @background = background
21
+ @primary_text = primary_text
22
+ @secondary_text = secondary_text
23
+ @icon = icon
24
+ @more_link = more_link
25
+ @more_text = more_text
26
+ @more_icon = more_icon
27
+ @turbo_frame = turbo_frame
28
+ @loading = loading
29
+ @src = src
30
+ @overlay = overlay
31
+ end
32
+ end
33
+ end
34
+ end
@@ -90,10 +90,6 @@ module Olivander
90
90
  end
91
91
 
92
92
  class_methods do
93
- def resource_action(model, action)
94
- resources[model].actions.select{ |x| x.sym == action }.first
95
- end
96
-
97
93
  def resource(model, only: DEFAULT_CRUD_ACTIONS, except: [], &block)
98
94
  self.current_resource = RoutedResource.new(model, DEFAULT_CRUD_ACTIONS & (only - except))
99
95
  yield if block_given?
@@ -40,11 +40,11 @@ module Olivander
40
40
  bulk_actions_col
41
41
  column_attributes.each do |key|
42
42
  label = field_label_for(klazz, key)
43
- sym = key.gsub('_id', '') #.to_sym
43
+ sym = key.gsub('_id', '')
44
44
  visible = show.include?(key) || !(default_hidden.include?(key) || hide.include?(key))
45
45
  if link_path.present? && sym == :id
46
- link_col sym, link_path, :id, visible: visible
47
- elsif link_path.present? && sym == :name
46
+ link_col sym, link_path, 'id', visible: visible
47
+ elsif link_path.present? && sym == 'name'
48
48
  link_col sym, link_path, :id, visible: visible
49
49
  elsif sym.include?('.')
50
50
  col sym, visible: visible, label: label
@@ -1,5 +1,5 @@
1
1
  - read_only = action_name != 'edit'
2
- = simple_form_for(@resource, builder: CustomFormBuilder) do |f|
2
+ = simple_form_for(@resource) do |f|
3
3
  .card.card-primary
4
4
  .card-header
5
5
  %h3.card-title= @resource
@@ -1,4 +0,0 @@
1
- - flash.to_hash.slice("alert", "error", "notice", "success").each do |key, value|
2
- .span.alert{ class: "alert-#{flash_class(key)}" }
3
- %i.icon{ class: flash_icon(key) }
4
- = value
@@ -70,49 +70,16 @@ SimpleForm.setup do |config|
70
70
  config.wrappers :checkbox, class: "form-check",
71
71
  hint_class: :field_with_hint, error_class: :field_with_errors, valid_class: :field_without_errors do |b|
72
72
  b.use :html5
73
+ b.use :placeholder
74
+ b.optional :maxlength
75
+ b.optional :minlength
76
+ b.optional :pattern
77
+ b.optional :min_max
73
78
  b.optional :readonly
74
- b.wrapper :legend_tag, tag: 'legend', class: 'col-form-label pt-0' do |ba|
75
- ba.use :label_text
76
- end
77
- b.use :input, class: 'form-check-input', error_class: 'is-invalid', valid_class: 'is-valid'
78
- b.use :full_error, wrap_with: { tag: 'div', class: 'invalid-feedback d-block' }
79
- b.use :hint, wrap_with: { tag: 'small', class: 'form-text text-muted' }
80
- end
81
-
82
- # vertical input for boolean
83
- config.wrappers :vertical_boolean, tag: 'fieldset', class: 'form-group', error_class: 'form-group-invalid', valid_class: 'form-group-valid' do |b|
84
- b.use :html5
85
- b.optional :readonly
86
- b.wrapper :form_check_wrapper, tag: 'div', class: 'form-check' do |bb|
87
- bb.use :input, class: 'form-check-input' #, error_class: 'is-invalid', valid_class: 'is-valid'
88
- bb.use :label, class: 'form-check-label'
89
- bb.use :full_error, wrap_with: { tag: 'div', class: 'invalid-feedback' }
90
- bb.use :hint, wrap_with: { tag: 'small', class: 'form-text text-muted' }
91
- end
92
- end
93
-
94
- # vertical input for radio buttons and check boxes
95
- config.wrappers :vertical_collection, item_wrapper_class: 'form-check', item_label_class: 'form-check-label', tag: 'fieldset', class: 'form-group', error_class: 'form-group-invalid', valid_class: 'form-group-valid' do |b|
96
- b.use :html5
97
- b.optional :readonly
98
- b.wrapper :legend_tag, tag: 'legend', class: 'col-form-label pt-0' do |ba|
99
- ba.use :label_text
100
- end
101
- b.use :input, class: 'form-check-input', error_class: 'is-invalid', valid_class: 'is-valid'
102
- b.use :full_error, wrap_with: { tag: 'div', class: 'invalid-feedback d-block' }
103
- b.use :hint, wrap_with: { tag: 'small', class: 'form-text text-muted' }
104
- end
105
-
106
- # vertical input for inline radio buttons and check boxes
107
- config.wrappers :vertical_collection_inline, item_wrapper_class: 'form-check form-check-inline', item_label_class: 'form-check-label', tag: 'fieldset', class: 'form-group', error_class: 'form-group-invalid', valid_class: 'form-group-valid' do |b|
108
- b.use :html5
109
- b.optional :readonly
110
- b.wrapper :legend_tag, tag: 'legend', class: 'col-form-label pt-0' do |ba|
111
- ba.use :label_text
112
- end
113
- b.use :input, class: 'form-check-input', error_class: 'is-invalid', valid_class: 'is-valid'
114
- b.use :full_error, wrap_with: { tag: 'div', class: 'invalid-feedback d-block' }
115
- b.use :hint, wrap_with: { tag: 'small', class: 'form-text text-muted' }
79
+ b.use :input, class: 'form-check-input'
80
+ b.use :label #, class: 'form-control'
81
+ b.use :hint, wrap_with: { tag: :span, class: :hint }
82
+ b.use :error, wrap_with: { tag: :span, class: "text-danger" }
116
83
  end
117
84
 
118
85
  config.wrappers :switch, class: "custom-control custom-switch",
@@ -203,24 +170,10 @@ SimpleForm.setup do |config|
203
170
  # Custom wrappers for input types. This should be a hash containing an input
204
171
  # type as key and the wrapper that will be used for all inputs with specified type.
205
172
  # config.wrapper_mappings = { string: :prepend }
206
- config.wrapper_mappings = {
207
- boolean: :vertical_boolean,
208
- check_boxes: :check_box,
209
- # date: :horizontal_multi_select,
210
- # datetime: :horizontal_multi_select,
211
- # file: :horizontal_file,
212
- # radio_buttons: :horizontal_collection,
213
- # range: :horizontal_range,
214
- # time: :horizontal_multi_select
215
- }
216
173
 
217
174
  # Namespaces where SimpleForm should look for custom input classes that
218
175
  # override default inputs.
219
- Dir.glob('app/inputs/**/')
220
- .map{ |x| x.gsub('app/inputs/', '').split('/').reject(&:blank?).join('/').camelize }
221
- .reject(&:blank?).each do |d|
222
- config.custom_inputs_namespaces << d
223
- end
176
+ # config.custom_inputs_namespaces << "CustomInputs"
224
177
 
225
178
  # Default priority for time_zone inputs.
226
179
  # config.time_zone_priority = nil
@@ -1,3 +1,3 @@
1
1
  module Olivander
2
- VERSION = '0.1.2.27'.freeze
2
+ VERSION = '0.1.2.28'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: five-two-nw-olivander
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2.27
4
+ version: 0.1.2.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Dennis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-31 00:00:00.000000000 Z
11
+ date: 2023-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chartkick
@@ -133,7 +133,6 @@ files:
133
133
  - MIT-LICENSE
134
134
  - README.md
135
135
  - Rakefile
136
- - app/assets/config/manifest.js
137
136
  - app/assets/config/olivander_manifest.js
138
137
  - app/assets/fonts/fa-brands-400.eot
139
138
  - app/assets/fonts/fa-brands-400.svg
@@ -189,12 +188,13 @@ files:
189
188
  - app/components/olivander/components/resource_form_component.rb
190
189
  - app/components/olivander/components/resource_show_component.html.haml
191
190
  - app/components/olivander/components/resource_show_component.rb
191
+ - app/components/olivander/components/small_box_component.html.haml
192
+ - app/components/olivander/components/small_box_component.rb
192
193
  - app/controllers/concerns/olivander/resources/auto_form_attributes.rb
193
194
  - app/controllers/concerns/olivander/resources/route_builder.rb
194
195
  - app/controllers/olivander/application_controller.rb
195
196
  - app/datatables/olivander/datatable.rb
196
197
  - app/helpers/olivander/application_helper.rb
197
- - app/inputs/custom_form_builder.rb
198
198
  - app/inputs/date_time_input.rb
199
199
  - app/jobs/olivander/application_job.rb
200
200
  - app/mailers/olivander/application_mailer.rb
@@ -206,20 +206,6 @@ files:
206
206
  - app/views/application/index.json.jbuilder
207
207
  - app/views/application/new.html.haml
208
208
  - app/views/application/show.html.haml
209
- - app/views/devise/confirmations/new.html.erb
210
- - app/views/devise/mailer/confirmation_instructions.html.erb
211
- - app/views/devise/mailer/email_changed.html.erb
212
- - app/views/devise/mailer/password_change.html.erb
213
- - app/views/devise/mailer/reset_password_instructions.html.erb
214
- - app/views/devise/mailer/unlock_instructions.html.erb
215
- - app/views/devise/passwords/edit.html.erb
216
- - app/views/devise/passwords/new.html.erb
217
- - app/views/devise/registrations/edit.html.erb
218
- - app/views/devise/registrations/new.html.erb
219
- - app/views/devise/sessions/new.html.erb
220
- - app/views/devise/shared/_error_messages.html.erb
221
- - app/views/devise/shared/_links.html.haml
222
- - app/views/devise/unlocks/new.html.erb
223
209
  - app/views/effective/resource/_actions_dropleft.html.haml
224
210
  - app/views/layouts/olivander/adminlte/_content.html.haml
225
211
  - app/views/layouts/olivander/adminlte/_content_kanban.html.haml
@@ -233,7 +219,6 @@ files:
233
219
  - app/views/layouts/olivander/adminlte/login.html.haml
234
220
  - app/views/layouts/olivander/adminlte/main.html.haml
235
221
  - app/views/layouts/olivander/application.html.haml
236
- - config/initializers/effective_datatables.rb.old
237
222
  - config/initializers/simple_form.rb
238
223
  - config/locales/simple_form.en.yml
239
224
  - config/routes.rb
@@ -1,4 +0,0 @@
1
- //= link_directory ../stylesheets/olivander .css
2
- //= link ../images/avatar1.png
3
- //= link images/avatar1.png
4
- //= link avatar1.png
@@ -1,43 +0,0 @@
1
- class CustomFormBuilder < SimpleForm::FormBuilder
2
- def initialize(*)
3
- Rails.logger.warn "instantiating this class"
4
- super
5
- end
6
-
7
- def association(association, options = {}, &block)
8
- Rails.logger.warn "making an association"
9
- resolve_custom_input_association(association, options)
10
- super(association, options, &block)
11
- end
12
-
13
- def resolve_custom_input_association(association, options)
14
- return if options[:as].present?
15
-
16
- [
17
- "#{object.class.name.demodulize}#{association.to_s.titleize}", "#{association.to_s.titleize}"
18
- ].each do |key|
19
- Rails.logger.debug "trying for #{key}"
20
- next unless attempt_mapping_with_custom_namespace("#{key}Input").present?
21
-
22
- options[:as] = key.to_sym
23
- break
24
- end
25
- end
26
-
27
- private
28
-
29
- def fetch_association_collection(reflection, options)
30
- Rails.logger.warn "we got into here"
31
-
32
- options_method = "options_for_#{reflection.name}".to_sym
33
- if object.respond_to?(options_method) then
34
- Rails.logger.info "using specific method"
35
- options.fetch(:collection) do
36
- object.send(options_method)
37
- end
38
- else
39
- Rails.logger.info "doing it old school"
40
- super(reflection, options)
41
- end
42
- end
43
- end
@@ -1,20 +0,0 @@
1
- <h2>Resend confirmation instructions</h2>
2
-
3
- <%= simple_form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
4
- <%= f.error_notification %>
5
- <%= f.full_error :confirmation_token %>
6
-
7
- <div class="form-inputs">
8
- <%= f.input :email,
9
- required: true,
10
- autofocus: true,
11
- value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email),
12
- input_html: { autocomplete: "email" } %>
13
- </div>
14
-
15
- <div class="form-actions">
16
- <%= f.button :submit, "Resend confirmation instructions" %>
17
- </div>
18
- <% end %>
19
-
20
- <%= render "devise/shared/links" %>
@@ -1,5 +0,0 @@
1
- <p>Welcome <%= @email %>!</p>
2
-
3
- <p>You can confirm your account email through the link below:</p>
4
-
5
- <p><%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %></p>
@@ -1,7 +0,0 @@
1
- <p>Hello <%= @email %>!</p>
2
-
3
- <% if @resource.try(:unconfirmed_email?) %>
4
- <p>We're contacting you to notify you that your email is being changed to <%= @resource.unconfirmed_email %>.</p>
5
- <% else %>
6
- <p>We're contacting you to notify you that your email has been changed to <%= @resource.email %>.</p>
7
- <% end %>
@@ -1,3 +0,0 @@
1
- <p>Hello <%= @resource.email %>!</p>
2
-
3
- <p>We're contacting you to notify you that your password has been changed.</p>
@@ -1,8 +0,0 @@
1
- <p>Hello <%= @resource.email %>!</p>
2
-
3
- <p>Someone has requested a link to change your password. You can do this through the link below.</p>
4
-
5
- <p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %></p>
6
-
7
- <p>If you didn't request this, please ignore this email.</p>
8
- <p>Your password won't change until you access the link above and create a new one.</p>
@@ -1,7 +0,0 @@
1
- <p>Hello <%= @resource.email %>!</p>
2
-
3
- <p>Your account has been locked due to an excessive number of unsuccessful sign in attempts.</p>
4
-
5
- <p>Click the link below to unlock your account:</p>
6
-
7
- <p><%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %></p>
@@ -1,27 +0,0 @@
1
- <h2>Change your password</h2>
2
-
3
- <%= simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
4
- <%= f.error_notification %>
5
-
6
- <%= f.input :reset_password_token, as: :hidden %>
7
- <%= f.full_error :reset_password_token %>
8
-
9
- <div class="form-inputs">
10
- <%= f.input :password,
11
- label: "New password",
12
- required: true,
13
- autofocus: true,
14
- hint: ("#{@minimum_password_length} characters minimum" if @minimum_password_length),
15
- input_html: { autocomplete: "new-password" } %>
16
- <%= f.input :password_confirmation,
17
- label: "Confirm your new password",
18
- required: true,
19
- input_html: { autocomplete: "new-password" } %>
20
- </div>
21
-
22
- <div class="form-actions">
23
- <%= f.button :submit, "Change my password" %>
24
- </div>
25
- <% end %>
26
-
27
- <%= render "devise/shared/links" %>
@@ -1,18 +0,0 @@
1
- <h2>Forgot your password?</h2>
2
-
3
- <%= simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
4
- <%= f.error_notification %>
5
-
6
- <div class="form-inputs">
7
- <%= f.input :email,
8
- required: true,
9
- autofocus: true,
10
- input_html: { autocomplete: "email" } %>
11
- </div>
12
-
13
- <div class="form-actions">
14
- <%= f.button :submit, "Send me reset password instructions" %>
15
- </div>
16
- <% end %>
17
-
18
- <%= render "devise/shared/links" %>
@@ -1,35 +0,0 @@
1
- <h2>Edit <%= resource_name.to_s.humanize %></h2>
2
-
3
- <%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
4
- <%= f.error_notification %>
5
-
6
- <div class="form-inputs">
7
- <%= f.input :email, required: true, autofocus: true %>
8
-
9
- <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
10
- <p>Currently waiting confirmation for: <%= resource.unconfirmed_email %></p>
11
- <% end %>
12
-
13
- <%= f.input :password,
14
- hint: "leave it blank if you don't want to change it",
15
- required: false,
16
- input_html: { autocomplete: "new-password" } %>
17
- <%= f.input :password_confirmation,
18
- required: false,
19
- input_html: { autocomplete: "new-password" } %>
20
- <%= f.input :current_password,
21
- hint: "we need your current password to confirm your changes",
22
- required: true,
23
- input_html: { autocomplete: "current-password" } %>
24
- </div>
25
-
26
- <div class="form-actions">
27
- <%= f.button :submit, "Update" %>
28
- </div>
29
- <% end %>
30
-
31
- <h3>Cancel my account</h3>
32
-
33
- <p>Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete %></p>
34
-
35
- <%= link_to "Back", :back %>
@@ -1,25 +0,0 @@
1
- <h2>Sign up</h2>
2
-
3
- <%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
4
- <%= f.error_notification %>
5
-
6
- <div class="form-inputs">
7
- <%= f.input :email,
8
- required: true,
9
- autofocus: true,
10
- input_html: { autocomplete: "email" }%>
11
- <%= f.input :password,
12
- required: true,
13
- hint: ("#{@minimum_password_length} characters minimum" if @minimum_password_length),
14
- input_html: { autocomplete: "new-password" } %>
15
- <%= f.input :password_confirmation,
16
- required: true,
17
- input_html: { autocomplete: "new-password" } %>
18
- </div>
19
-
20
- <div class="form-actions">
21
- <%= f.button :submit, "Sign up" %>
22
- </div>
23
- <% end %>
24
-
25
- <%= render "devise/shared/links" %>
@@ -1,20 +0,0 @@
1
- <h2>Log in</h2>
2
-
3
- <%= simple_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
4
- <div class="form-inputs">
5
- <%= f.input :email,
6
- required: false,
7
- autofocus: true,
8
- input_html: { autocomplete: "email" } %>
9
- <%= f.input :password,
10
- required: false,
11
- input_html: { autocomplete: "current-password" } %>
12
- <%= f.input :remember_me, as: :boolean if devise_mapping.rememberable? %>
13
- </div>
14
-
15
- <div class="form-actions">
16
- <%= f.button :submit, "Log in" %>
17
- </div>
18
- <% end %>
19
-
20
- <%= render "devise/shared/links" %>
@@ -1,15 +0,0 @@
1
- <% if resource.errors.any? %>
2
- <div id="error_explanation">
3
- <h2>
4
- <%= I18n.t("errors.messages.not_saved",
5
- count: resource.errors.count,
6
- resource: resource.class.model_name.human.downcase)
7
- %>
8
- </h2>
9
- <ul>
10
- <% resource.errors.full_messages.each do |message| %>
11
- <li><%= message %></li>
12
- <% end %>
13
- </ul>
14
- </div>
15
- <% end %>
@@ -1,19 +0,0 @@
1
- - if controller_name != 'sessions'
2
- = link_to "Log in", new_session_path(resource_name)
3
- %br/
4
- - if devise_mapping.registerable? && controller_name != 'registrations'
5
- %p.mb-0
6
- = link_to "Sign up", new_registration_path(resource_name)
7
- - if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations'
8
- %p.mb-1
9
- = link_to "I forgot my password", new_password_path(resource_name)
10
- - if devise_mapping.confirmable? && controller_name != 'confirmations'
11
- = link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name)
12
- %br/
13
- - if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks'
14
- = link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name)
15
- %br/
16
- - if devise_mapping.omniauthable?
17
- - resource_class.omniauth_providers.each do |provider|
18
- = link_to "Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider), method: :post
19
- %br/
@@ -1,19 +0,0 @@
1
- <h2>Resend unlock instructions</h2>
2
-
3
- <%= simple_form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %>
4
- <%= f.error_notification %>
5
- <%= f.full_error :unlock_token %>
6
-
7
- <div class="form-inputs">
8
- <%= f.input :email,
9
- required: true,
10
- autofocus: true,
11
- input_html: { autocomplete: "email" } %>
12
- </div>
13
-
14
- <div class="form-actions">
15
- <%= f.button :submit, "Resend unlock instructions" %>
16
- </div>
17
- <% end %>
18
-
19
- <%= render "devise/shared/links" %>
@@ -1,49 +0,0 @@
1
- EffectiveDatatables.setup do |config|
2
- # Authorization Method
3
- #
4
- # This method is called by all controller actions with the appropriate action and resource
5
- # If it raises an exception or returns false, an Effective::AccessDenied Error will be raised
6
- #
7
- # Use via Proc:
8
- # Proc.new { |controller, action, resource| authorize!(action, resource) } # CanCan
9
- # Proc.new { |controller, action, resource| can?(action, resource) } # CanCan with skip_authorization_check
10
- # Proc.new { |controller, action, resource| authorize "#{action}?", resource } # Pundit
11
- # Proc.new { |controller, action, resource| current_user.is?(:admin) } # Custom logic
12
- #
13
- # Use via Boolean:
14
- # config.authorization_method = true # Always authorized
15
- # config.authorization_method = false # Always unauthorized
16
- #
17
- # Use via Method (probably in your application_controller.rb):
18
- # config.authorization_method = :my_authorization_method
19
- # def my_authorization_method(resource, action)
20
- # true
21
- # end
22
- config.authorization_method = Proc.new { |controller, action, resource| true }
23
-
24
- # Default number of entries shown per page
25
- # Valid options are: 5, 10, 25, 50, 100, 250, 500, :all
26
- config.default_length = 25
27
-
28
- # Default class used on the <table> tag
29
- config.html_class = 'table table-hover'
30
-
31
- # Log search/sort information to the console
32
- config.debug = true
33
-
34
- # Use a cookie to save and restore state from previous page visits.
35
- config.save_state = true
36
-
37
- # Configure the _effective_dt cookie.
38
- config.cookie_max_size = 1500 # String size. Final byte size is about 1.5 times bigger, after rails signs it
39
- config.cookie_domain = :all # Should usually be :all
40
- config.cookie_tld_length = nil # Leave nil to autodetect, or set to probably 2
41
-
42
- # Date formatting
43
- config.format_datetime = '%F %H:%M'
44
- config.format_date = '%F'
45
- config.format_time = '%H:%M'
46
-
47
- # Enable the Download button which serves a CSV of your collection
48
- config.download = false
49
- end