five-two-nw-olivander 0.1.2.24 → 0.1.2.26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/datatables/olivander/datatable.rb +12 -5
- data/app/helpers/olivander/application_helper.rb +32 -0
- data/app/views/devise/confirmations/new.html.erb +20 -0
- data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
- data/app/views/devise/mailer/email_changed.html.erb +7 -0
- data/app/views/devise/mailer/password_change.html.erb +3 -0
- data/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
- data/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
- data/app/views/devise/passwords/edit.html.erb +27 -0
- data/app/views/devise/passwords/new.html.erb +18 -0
- data/app/views/devise/registrations/edit.html.erb +35 -0
- data/app/views/devise/registrations/new.html.erb +25 -0
- data/app/views/devise/sessions/new.html.erb +20 -0
- data/app/views/devise/shared/_error_messages.html.erb +15 -0
- data/app/views/devise/shared/_links.html.haml +19 -0
- data/app/views/devise/unlocks/new.html.erb +19 -0
- data/app/views/layouts/olivander/adminlte/_head.html.haml +1 -1
- data/app/views/layouts/olivander/adminlte/_login_flashes.html.haml +4 -0
- data/app/views/layouts/olivander/adminlte/login.html.haml +7 -16
- data/lib/olivander/version.rb +1 -1
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d96cd91f2f4830a4cfe85a04cfac5bc30eb3460a0305bca7efb350f35c4e581
|
4
|
+
data.tar.gz: 23d8592c86e3ba64edc0a666b05bbcda1847365b1d4a23233cf0d7134995c225
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2806dca34a1cbccd23d2f9efbae8bf18365ab492fa714b9bb6b3f0451a5752a5e1a59be0f39e2b4cf3b1ad70bfafc9bf373c6a6cab2fef9cadb229b832f5e9e0
|
7
|
+
data.tar.gz: 69338f7e7fd4dcf122316bf5de2c3d7e7ced36b3a47d2797bbfa6f89a20130a886a3069a570129560559678f636a8af777a2298473b6b2f5ae7971e05cb7daa8
|
@@ -18,20 +18,27 @@ module Olivander
|
|
18
18
|
def self.auto_datatable(klazz, collection: nil, link_path: nil, only: [], except: [], hide: [], show: [], order_by: [])
|
19
19
|
Rails.logger.debug "initializing datatable for #{klazz}"
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
|
21
|
+
klazz_attributes = klazz.new.attributes.collect{ |x| x[0] }
|
22
|
+
column_attributes = klazz_attributes
|
23
|
+
column_attributes &&= only if only.size.positive?
|
24
|
+
column_attributes -= except if except.size.positive?
|
24
25
|
|
25
26
|
default_hidden = %w[id created updated created_at updated_at deleted_at current_user current_action]
|
26
27
|
|
27
28
|
collection do
|
28
|
-
collection.nil? ? klazz.all : collection
|
29
|
+
dc = collection.nil? ? klazz.all : collection
|
30
|
+
|
31
|
+
attributes.each do |att|
|
32
|
+
dc = dc.where("#{att[0]} = ?", att[1]) if klazz_attributes.include?(att[0].to_s)
|
33
|
+
end
|
34
|
+
|
35
|
+
dc
|
29
36
|
end
|
30
37
|
|
31
38
|
datatable do
|
32
39
|
order(order_by[0], order_by[1]) if order_by.size == 2
|
33
40
|
bulk_actions_col
|
34
|
-
|
41
|
+
column_attributes.each do |key|
|
35
42
|
label = field_label_for(klazz, key)
|
36
43
|
sym = key.gsub('_id', '').to_sym
|
37
44
|
visible = show.include?(key) || !(default_hidden.include?(key) || hide.include?(key))
|
@@ -109,9 +109,41 @@ module Olivander
|
|
109
109
|
(is_dev_environment? ? 'bg-danger' : 'bg-info')
|
110
110
|
end
|
111
111
|
|
112
|
+
def header_page_title
|
113
|
+
[is_dev_environment? ? sidebar_context_suffix.upcase : nil, page_title].reject(&:blank?).join(' ')
|
114
|
+
end
|
115
|
+
|
112
116
|
def favicon_link
|
113
117
|
favicon_path = is_dev_environment? ? '/images/favicon-dev.png' : '/images/favicon.ico'
|
114
118
|
favicon_link_tag(image_path(favicon_path))
|
115
119
|
end
|
120
|
+
|
121
|
+
def flash_class key
|
122
|
+
case key
|
123
|
+
when "error"
|
124
|
+
"danger"
|
125
|
+
when "notice"
|
126
|
+
"info"
|
127
|
+
when "alert"
|
128
|
+
"danger"
|
129
|
+
else
|
130
|
+
key
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
def flash_icon key
|
135
|
+
case key
|
136
|
+
when "error"
|
137
|
+
"fas fa-exclamation-circle"
|
138
|
+
when "notice"
|
139
|
+
"fas fa-info-circle"
|
140
|
+
when "alert"
|
141
|
+
"fas fa-info-circle"
|
142
|
+
when "success"
|
143
|
+
"fas fa-check-circle"
|
144
|
+
else
|
145
|
+
"fas fa-question-circle"
|
146
|
+
end
|
147
|
+
end
|
116
148
|
end
|
117
149
|
end
|
@@ -0,0 +1,20 @@
|
|
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" %>
|
@@ -0,0 +1,7 @@
|
|
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 %>
|
@@ -0,0 +1,8 @@
|
|
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>
|
@@ -0,0 +1,7 @@
|
|
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>
|
@@ -0,0 +1,27 @@
|
|
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" %>
|
@@ -0,0 +1,18 @@
|
|
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" %>
|
@@ -0,0 +1,35 @@
|
|
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 %>
|
@@ -0,0 +1,25 @@
|
|
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" %>
|
@@ -0,0 +1,20 @@
|
|
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" %>
|
@@ -0,0 +1,15 @@
|
|
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 %>
|
@@ -0,0 +1,19 @@
|
|
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/
|
@@ -0,0 +1,19 @@
|
|
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" %>
|
@@ -3,25 +3,16 @@
|
|
3
3
|
= render partial: 'layouts/olivander/adminlte/head'
|
4
4
|
%body.hold-transition.login-page
|
5
5
|
.login-box
|
6
|
-
|
7
|
-
.
|
8
|
-
|
9
|
-
|
10
|
-
|
6
|
+
-# .login-logo
|
7
|
+
-# %img.brand-image.img-circle.elevation-3{:alt => @context.logo.alt, :src => @context.logo.url, :style => "opacity: .8"}
|
8
|
+
.card
|
9
|
+
.card-header.text-center{ class: sidebar_background_class }
|
10
|
+
%a.h1{ href: '/' }
|
11
|
+
%b= sidebar_context_name
|
11
12
|
.card-body
|
12
13
|
%p.login-box-msg Sign in to start your session
|
13
14
|
= render partial: 'layouts/olivander/adminlte/login_flashes'
|
14
15
|
= yield
|
15
16
|
.card-footer
|
16
17
|
%p.small
|
17
|
-
|
18
|
-
some form of notice here
|
19
|
-
some form of notice here
|
20
|
-
some form of notice here
|
21
|
-
some form of notice here
|
22
|
-
some form of notice here
|
23
|
-
some form of notice here
|
24
|
-
some form of notice here
|
25
|
-
some form of notice here
|
26
|
-
some form of notice here
|
27
|
-
some form of notice here
|
18
|
+
|
data/lib/olivander/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.
|
4
|
+
version: 0.1.2.26
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Dennis
|
@@ -206,6 +206,20 @@ 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
|
209
223
|
- app/views/effective/resource/_actions_dropleft.html.haml
|
210
224
|
- app/views/layouts/olivander/adminlte/_content.html.haml
|
211
225
|
- app/views/layouts/olivander/adminlte/_content_kanban.html.haml
|