phcdevworks_accounts 2.2.0 → 2.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/phcdevworks_accounts/{account/dashboard.coffee → admin/pages.coffee} +0 -0
  3. data/app/assets/javascripts/phcdevworks_accounts/{admin/accounts.coffee → user/pages.coffee} +0 -0
  4. data/app/assets/stylesheets/phcdevworks_accounts/admin/{accounts.scss → pages.scss} +1 -1
  5. data/app/assets/stylesheets/phcdevworks_accounts/{account/dashboard.scss → user/pages.scss} +1 -1
  6. data/app/controllers/phcdevworks_accounts/admin/pages_controller.rb +25 -0
  7. data/app/controllers/phcdevworks_accounts/user/pages_controller.rb +15 -0
  8. data/app/helpers/phcdevworks_accounts/admin/{accounts_helper.rb → pages_helper.rb} +1 -1
  9. data/app/helpers/phcdevworks_accounts/{account/dashboard_helper.rb → user/pages_helper.rb} +1 -1
  10. data/app/views/phcdevworks_accounts/{account/dashboard/index.html.erb → admin/pages/dashboard.html.erb} +0 -0
  11. data/app/views/phcdevworks_accounts/admin/pages/user_id.html.erb +2 -0
  12. data/app/views/phcdevworks_accounts/admin/pages/users_list.html.erb +4 -0
  13. data/app/views/phcdevworks_accounts/{admin/accounts/index.html.erb → user/pages/profile.html.erb} +0 -0
  14. data/app/views/users/confirmations/new.html.erb +1 -1
  15. data/app/views/users/passwords/edit.html.erb +1 -1
  16. data/app/views/users/passwords/new.html.erb +1 -1
  17. data/app/views/users/registrations/edit.html.erb +1 -1
  18. data/app/views/users/registrations/new.html.erb +1 -1
  19. data/app/views/users/sessions/new.html.erb +1 -1
  20. data/app/views/users/unlocks/new.html.erb +1 -1
  21. data/config/routes.rb +9 -5
  22. data/lib/phcdevworks_accounts/version.rb +1 -1
  23. metadata +17 -14
  24. data/app/controllers/phcdevworks_accounts/account/dashboard_controller.rb +0 -11
  25. data/app/controllers/phcdevworks_accounts/admin/accounts_controller.rb +0 -15
  26. data/app/views/phcdevworks_accounts/admin/accounts/users_index.html.erb +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e82bb61ee080fe523381201e30431473d97d4fc51ff5befc6fd1a0cc8f81ac5e
4
- data.tar.gz: 4d6d773cf1e3101da970ec3b63650d0585913e09ad9c7dd488c7f3e1107d107a
3
+ metadata.gz: d92e06856f84fc051f6130132aba04d57e44b2bcfe2bf46f7f749c2fb7e98ba8
4
+ data.tar.gz: dcbfbf053d98940f04a8f98176983fff658707f501afd537b8a9652b6f26b140
5
5
  SHA512:
6
- metadata.gz: b9e576364928c0e8713635f2d986cde3ca780aa6b925dfec8bdf1ff8411864d6ddfd3b70967f354b425c8d87d49e7912df2583d8f9195e23ebacb63d0d0f8c65
7
- data.tar.gz: a60295a687133dbc3a9af33da3f8c59687b77130b5c0532158e4e205a1fccecae23bd726bbf24c74aafbf305e74e1eebc96e58e72505df5ec069e76398f34488
6
+ metadata.gz: 56e13396a39a216ca777a816ac7d2eb1ebcf592d22f01e43ef534ed7d9342d75783db07384c9dbaadd6e5027eb8792f9a928bb04ca520afe30b9bf0e127ad255
7
+ data.tar.gz: 5f609afd6f4d1f10a37a80544e198e81e09879e9b6ac09cc0cb27aab5aff23c75df58f26c2db0175341346925c115942f07339ce80583065f725b827f835b51b
@@ -1,3 +1,3 @@
1
- // Place all the styles related to the admin/accounts controller here.
1
+ // Place all the styles related to the admin/pages controller here.
2
2
  // They will automatically be included in application.css.
3
3
  // You can use Sass (SCSS) here: https://sass-lang.com/
@@ -1,3 +1,3 @@
1
- // Place all the styles related to the account/dashboard controller here.
1
+ // Place all the styles related to the user/pages controller here.
2
2
  // They will automatically be included in application.css.
3
3
  // You can use Sass (SCSS) here: https://sass-lang.com/
@@ -0,0 +1,25 @@
1
+ require_dependency "phcdevworks_accounts/application_controller"
2
+
3
+ module PhcdevworksAccounts
4
+ class Admin::PagesController < ApplicationController
5
+
6
+ # Filters
7
+ include PhcdevworksCore::PhcdevworksPluginsHelper
8
+ before_action :phcdevworks_accounts_admin_only
9
+
10
+
11
+ # Account Admin
12
+ def dashboard
13
+ end
14
+
15
+ # User Admin
16
+ def users_list
17
+ @admin_users = User.all
18
+ end
19
+
20
+ def user_id
21
+ @admin_user = User.find_by_id(params[:id])
22
+ end
23
+
24
+ end
25
+ end
@@ -0,0 +1,15 @@
1
+ require_dependency "phcdevworks_accounts/application_controller"
2
+
3
+ module PhcdevworksAccounts
4
+ class User::PagesController < ApplicationController
5
+
6
+ # Security Filters
7
+ before_action :authenticate_user!
8
+
9
+ # Pages - User
10
+ def profile
11
+ @user_profile = User.find_by_id(params[:id])
12
+ end
13
+
14
+ end
15
+ end
@@ -1,4 +1,4 @@
1
1
  module PhcdevworksAccounts
2
- module Admin::AccountsHelper
2
+ module Admin::PagesHelper
3
3
  end
4
4
  end
@@ -1,4 +1,4 @@
1
1
  module PhcdevworksAccounts
2
- module Account::DashboardHelper
2
+ module User::PagesHelper
3
3
  end
4
4
  end
@@ -0,0 +1,2 @@
1
+ <h1><%= @admin_user.username %></h1>
2
+ <h5><%= @admin_user.email%></h5>
@@ -0,0 +1,4 @@
1
+ <% @admin_users.each do |user| %>
2
+ <%= user.username %><br/>
3
+ <%= user.email %><br/>
4
+ <% end %>
@@ -36,7 +36,7 @@
36
36
  <%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |form| %>
37
37
 
38
38
  <!-- Devise Error Message -->
39
- <%= devise_error_messages! %>
39
+ <%= render "devise/shared/error_messages", resource: resource %>
40
40
  <!-- Devise Error Message -->
41
41
 
42
42
  <div class="form-group">
@@ -36,7 +36,7 @@
36
36
  <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |form| %>
37
37
 
38
38
  <!-- Devise Error Message -->
39
- <%= devise_error_messages! %>
39
+ <%= render "devise/shared/error_messages", resource: resource %>
40
40
  <!-- Devise Error Message -->
41
41
 
42
42
  <!-- Reset Password Token -->
@@ -36,7 +36,7 @@
36
36
  <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |form| %>
37
37
 
38
38
  <!-- Devise Error Message -->
39
- <%= devise_error_messages! %>
39
+ <%= render "devise/shared/error_messages", resource: resource %>
40
40
  <!-- Devise Error Message -->
41
41
 
42
42
  <div class="form-group">
@@ -38,7 +38,7 @@
38
38
  <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |form| %>
39
39
 
40
40
  <!-- Devise Error Message -->
41
- <%= devise_error_messages! %>
41
+ <%= render "devise/shared/error_messages", resource: resource %>
42
42
  <!-- Devise Error Message -->
43
43
 
44
44
  <div class="form-group">
@@ -34,7 +34,7 @@
34
34
  <%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |form| %>
35
35
 
36
36
  <!-- Devise Error Message -->
37
- <%= devise_error_messages! %>
37
+ <%= render "devise/shared/error_messages", resource: resource %>
38
38
  <!-- Devise Error Message -->
39
39
 
40
40
  <label class="control-label">Name <span class="text-danger">*</span></label>
@@ -35,7 +35,7 @@
35
35
 
36
36
  <%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |form| %>
37
37
 
38
- <%= devise_error_messages! %>
38
+ <%= render "devise/shared/error_messages", resource: resource %>
39
39
 
40
40
  <div class="form-group m-b-15">
41
41
  <%= form.email_field :email, autofocus: true, autocomplete: "email", placeholder: "Email", class: "form-control form-control-lg" %>
@@ -38,7 +38,7 @@
38
38
 
39
39
  <%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |form| %>
40
40
 
41
- <%= devise_error_messages! %>
41
+ <%= render "devise/shared/error_messages", resource: resource %>
42
42
 
43
43
  <div class="form-group">
44
44
  <%= form.label :email %>
@@ -3,15 +3,19 @@ PhcdevworksAccounts::Engine.routes.draw do
3
3
  # User Routes
4
4
  devise_for :users, {
5
5
  class_name: "PhcdevworksAccounts::User",
6
- module: :devise,
7
- controllers: { registrations: "users/registrations"}
6
+ module: :devise
8
7
  }
9
8
 
10
9
  # User Dashboard
11
- get 'dashboard', to: 'account/dashboard#index'
10
+ match "user/profile", to: "user/pages#profile", via: "get"
12
11
 
13
12
  # Admin Routes
14
- get "admin_dashboard", to: "admin/accounts#index"
15
- get "admin_users_index", to: "admin/accounts#users_index"
13
+ match "/admin", to: "admin/pages#dashboard", via: "get"
14
+ match "/admin/users/all", to: "admin/pages#users_list", via: "get"
15
+ match "/admin/user/:id", to: "admin/pages#user_id", via: "get"
16
+
17
+ # Old Path Support (Will be Depricated)
18
+ get "dashboard", to: "user/pages#profile"
19
+ get "admin_users_index", to: "admin/pages#dashboard"
16
20
 
17
21
  end
@@ -1,3 +1,3 @@
1
1
  module PhcdevworksAccounts
2
- VERSION = "2.2.0"
2
+ VERSION = "2.2.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phcdevworks_accounts
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - PHCDevworks
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-02 00:00:00.000000000 Z
11
+ date: 2020-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -282,7 +282,9 @@ dependencies:
282
282
  - - "~>"
283
283
  - !ruby/object:Gem::Version
284
284
  version: '1.4'
285
- description: Ruby on Rails 6 Authentication and User Management Engine.
285
+ description: Ruby on Rails 6 Authentication and User Management Engine using Devise
286
+ with a nice-looking dashboard, admin panel and login views to get you going fast
287
+ on your next project.
286
288
  email:
287
289
  - imfo@phcdevworks.com
288
290
  executables: []
@@ -293,24 +295,24 @@ files:
293
295
  - README.md
294
296
  - Rakefile
295
297
  - app/assets/config/phcdevworks_accounts_manifest.js
296
- - app/assets/javascripts/phcdevworks_accounts/account/dashboard.coffee
297
- - app/assets/javascripts/phcdevworks_accounts/admin/accounts.coffee
298
+ - app/assets/javascripts/phcdevworks_accounts/admin/pages.coffee
298
299
  - app/assets/javascripts/phcdevworks_accounts/application.js
299
- - app/assets/stylesheets/phcdevworks_accounts/account/dashboard.scss
300
- - app/assets/stylesheets/phcdevworks_accounts/admin/accounts.scss
300
+ - app/assets/javascripts/phcdevworks_accounts/user/pages.coffee
301
+ - app/assets/stylesheets/phcdevworks_accounts/admin/pages.scss
301
302
  - app/assets/stylesheets/phcdevworks_accounts/application.scss
302
- - app/controllers/phcdevworks_accounts/account/dashboard_controller.rb
303
- - app/controllers/phcdevworks_accounts/admin/accounts_controller.rb
303
+ - app/assets/stylesheets/phcdevworks_accounts/user/pages.scss
304
+ - app/controllers/phcdevworks_accounts/admin/pages_controller.rb
304
305
  - app/controllers/phcdevworks_accounts/application_controller.rb
306
+ - app/controllers/phcdevworks_accounts/user/pages_controller.rb
305
307
  - app/controllers/users/confirmations_controller.rb
306
308
  - app/controllers/users/omniauth_callbacks_controller.rb
307
309
  - app/controllers/users/passwords_controller.rb
308
310
  - app/controllers/users/registrations_controller.rb
309
311
  - app/controllers/users/sessions_controller.rb
310
312
  - app/controllers/users/unlocks_controller.rb
311
- - app/helpers/phcdevworks_accounts/account/dashboard_helper.rb
312
- - app/helpers/phcdevworks_accounts/admin/accounts_helper.rb
313
+ - app/helpers/phcdevworks_accounts/admin/pages_helper.rb
313
314
  - app/helpers/phcdevworks_accounts/application_helper.rb
315
+ - app/helpers/phcdevworks_accounts/user/pages_helper.rb
314
316
  - app/jobs/phcdevworks_accounts/application_job.rb
315
317
  - app/mailers/phcdevworks_accounts/application_mailer.rb
316
318
  - app/models/phcdevworks_accounts/application_record.rb
@@ -322,9 +324,10 @@ files:
322
324
  - app/views/layouts/phcdevworks_accounts/components/backend/navigation/_top_menu.html.erb
323
325
  - app/views/layouts/phcdevworks_accounts/components/backend/sidebars/_side_menu.html.erb
324
326
  - app/views/layouts/phcdevworks_accounts/devise.html.erb
325
- - app/views/phcdevworks_accounts/account/dashboard/index.html.erb
326
- - app/views/phcdevworks_accounts/admin/accounts/index.html.erb
327
- - app/views/phcdevworks_accounts/admin/accounts/users_index.html.erb
327
+ - app/views/phcdevworks_accounts/admin/pages/dashboard.html.erb
328
+ - app/views/phcdevworks_accounts/admin/pages/user_id.html.erb
329
+ - app/views/phcdevworks_accounts/admin/pages/users_list.html.erb
330
+ - app/views/phcdevworks_accounts/user/pages/profile.html.erb
328
331
  - app/views/users/confirmations/new.html.erb
329
332
  - app/views/users/mailer/confirmation_instructions.html.erb
330
333
  - app/views/users/mailer/email_changed.html.erb
@@ -1,11 +0,0 @@
1
- require_dependency "phcdevworks_accounts/application_controller"
2
-
3
- module PhcdevworksAccounts
4
- class Account::DashboardController < ApplicationController
5
-
6
- # Dashboard
7
- def index
8
- end
9
-
10
- end
11
- end
@@ -1,15 +0,0 @@
1
- require_dependency "phcdevworks_accounts/application_controller"
2
-
3
- module PhcdevworksAccounts
4
- class Admin::AccountsController < ApplicationController
5
-
6
- # Admin Main Dashboard
7
- def index
8
- end
9
-
10
- # Admin User List
11
- def users_index
12
- end
13
-
14
- end
15
- end