phcdevworks_accounts 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +6 -0
  4. data/Rakefile +32 -0
  5. data/app/assets/config/phcdevworks_accounts_manifest.js +2 -0
  6. data/app/assets/javascripts/phcdevworks_accounts/application.js +2 -0
  7. data/app/assets/stylesheets/phcdevworks_accounts/application.scss +2 -0
  8. data/app/controllers/phcdevworks_accounts/account/dashboard_controller.rb +11 -0
  9. data/app/controllers/phcdevworks_accounts/admin/accounts_controller.rb +14 -0
  10. data/app/controllers/phcdevworks_accounts/application_controller.rb +30 -0
  11. data/app/helpers/phcdevworks_accounts/application_helper.rb +4 -0
  12. data/app/jobs/phcdevworks_accounts/application_job.rb +4 -0
  13. data/app/mailers/phcdevworks_accounts/application_mailer.rb +6 -0
  14. data/app/models/phcdevworks_accounts/application_record.rb +5 -0
  15. data/app/models/phcdevworks_accounts/user.rb +36 -0
  16. data/app/views/layouts/phcdevworks_accounts/application.html.erb +79 -0
  17. data/app/views/layouts/phcdevworks_accounts/application_full_width.html.erb +75 -0
  18. data/app/views/layouts/phcdevworks_accounts/application_no_sidebar.html.erb +68 -0
  19. data/app/views/layouts/phcdevworks_accounts/components/backend/footer/_footer.html.erb +16 -0
  20. data/app/views/layouts/phcdevworks_accounts/components/backend/navigation/_top_menu.html.erb +37 -0
  21. data/app/views/layouts/phcdevworks_accounts/components/backend/sidebars/_side_menu.html.erb +86 -0
  22. data/app/views/layouts/phcdevworks_accounts/devise.html.erb +48 -0
  23. data/app/views/phcdevworks_accounts/account/dashboard/index.html.erb +0 -0
  24. data/app/views/phcdevworks_accounts/admin/accounts/index.html.erb +0 -0
  25. data/app/views/phcdevworks_accounts/admin/accounts/users_index.html.erb +0 -0
  26. data/app/views/users/confirmations/new.html.erb +62 -0
  27. data/app/views/users/mailer/confirmation_instructions.html.erb +5 -0
  28. data/app/views/users/mailer/email_changed.html.erb +7 -0
  29. data/app/views/users/mailer/password_change.html.erb +3 -0
  30. data/app/views/users/mailer/reset_password_instructions.html.erb +8 -0
  31. data/app/views/users/mailer/unlock_instructions.html.erb +7 -0
  32. data/app/views/users/passwords/edit.html.erb +73 -0
  33. data/app/views/users/passwords/new.html.erb +65 -0
  34. data/app/views/users/registrations/edit.html.erb +101 -0
  35. data/app/views/users/registrations/new.html.erb +107 -0
  36. data/app/views/users/sessions/new.html.erb +81 -0
  37. data/app/views/users/shared/_links.html.erb +25 -0
  38. data/app/views/users/unlocks/new.html.erb +62 -0
  39. data/config/initializers/devise.rb +311 -0
  40. data/config/locales/devise.en.yml +65 -0
  41. data/config/routes.rb +13 -0
  42. data/db/migrate/20190701112047_devise_create_phcdevworks_accounts_users.rb +44 -0
  43. data/db/migrate/20190701120003_add_userinfo_to_users.rb +15 -0
  44. data/db/migrate/20190701120028_add_role_to_users.rb +7 -0
  45. data/db/migrate/20190701120045_add_terms_to_users.rb +7 -0
  46. data/lib/phcdevworks_accounts/engine.rb +35 -0
  47. data/lib/phcdevworks_accounts/version.rb +3 -0
  48. data/lib/phcdevworks_accounts.rb +5 -0
  49. data/lib/tasks/phcdevworks_accounts_tasks.rake +4 -0
  50. metadata +265 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 487247ab0a318fbe9979fb094f46072cb42eb8b720e87f7eb1280df815f8e337
4
+ data.tar.gz: a4ecfd2aa4fbda210a192e85dd2704fe0e4044dbd4b7209c0e358c931f97dd38
5
+ SHA512:
6
+ metadata.gz: 48cadc06e47ae300d85ee10f5ab9bf00be45ad59cfd70a73d4809080ed169c46b232084b9f5b1731581f5008f13e35e1a663fa2177e82d143c5c23f8715c8311
7
+ data.tar.gz: 521bbe7578dad2e46a7ca94661e363493e413c45fcdf06c9640d2b7b8d78d1949fbde2ecf384118300852c6a6c14904b9cd9acae6a41e3a080c87d023fb2a86b
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2019 - PHCDEVWORKS
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,6 @@
1
+ #### PHCDevworks Accounts
2
+ Rails devise based user accounts and administration engine.
3
+
4
+ Using Devise for Authentication
5
+ Extra user information built in
6
+ Custom login views included
data/Rakefile ADDED
@@ -0,0 +1,32 @@
1
+ begin
2
+ require 'bundler/setup'
3
+ rescue LoadError
4
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
+ end
6
+
7
+ require 'rdoc/task'
8
+
9
+ RDoc::Task.new(:rdoc) do |rdoc|
10
+ rdoc.rdoc_dir = 'rdoc'
11
+ rdoc.title = 'PhcdevworksAccounts'
12
+ rdoc.options << '--line-numbers'
13
+ rdoc.rdoc_files.include('README.md')
14
+ rdoc.rdoc_files.include('lib/**/*.rb')
15
+ end
16
+
17
+ APP_RAKEFILE = File.expand_path("test/test_app/Rakefile", __dir__)
18
+ load 'rails/tasks/engine.rake'
19
+
20
+ load 'rails/tasks/statistics.rake'
21
+
22
+ require 'bundler/gem_tasks'
23
+
24
+ require 'rake/testtask'
25
+
26
+ Rake::TestTask.new(:test) do |t|
27
+ t.libs << 'test'
28
+ t.pattern = 'test/**/*_test.rb'
29
+ t.verbose = false
30
+ end
31
+
32
+ task default: :test
@@ -0,0 +1,2 @@
1
+ //= link_directory ../javascripts/phcdevworks_accounts .js
2
+ //= link_directory ../stylesheets/phcdevworks_accounts .scss
@@ -0,0 +1,2 @@
1
+ // Load Admin Theme
2
+ //= require phcthemes_admin_panel_pack_coloradmin
@@ -0,0 +1,2 @@
1
+ // Load Admin Theme
2
+ @import "phcthemes_admin_panel_pack_coloradmin";
@@ -0,0 +1,11 @@
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
@@ -0,0 +1,14 @@
1
+ require_dependency "phcdevworks_accounts/application_controller"
2
+
3
+ module PhcdevworksAccounts
4
+ class Admin::AccountsController < ApplicationController
5
+
6
+ # Admin Dashboard
7
+ def index
8
+ end
9
+
10
+ def users_index
11
+ end
12
+
13
+ end
14
+ end
@@ -0,0 +1,30 @@
1
+ module PhcdevworksAccounts
2
+ class ApplicationController < ActionController::Base
3
+
4
+ # Devise Filter
5
+ before_action :phcdevworks_accounts_permitted_parameters, if: :devise_controller?
6
+
7
+ # Security Filters
8
+ protect_from_forgery with: :exception
9
+
10
+ # Load Requried Helper Files
11
+ helper PhcdevworksActiveMenus::Engine.helpers
12
+ helper PhcdevworksNotifications::Engine.helpers
13
+ helper PhcdevworksTitleseo::Engine.helpers
14
+
15
+ private
16
+
17
+ # Whitelist Additional Fields
18
+ def phcdevworks_accounts_permitted_parameters
19
+ added_attrs = [:username, :firstname, :lastname, :email, :terms_of_service, :password, :password_confirmation, :remember_me]
20
+ devise_parameter_sanitizer.permit :sign_up, keys: added_attrs
21
+ devise_parameter_sanitizer.permit :account_update, keys: added_attrs
22
+ end
23
+
24
+ # Redirect User to Root After Login
25
+ def after_sign_in_path_for(resource)
26
+ main_app.root_path
27
+ end
28
+
29
+ end
30
+ end
@@ -0,0 +1,4 @@
1
+ module PhcdevworksAccounts
2
+ module ApplicationHelper
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module PhcdevworksAccounts
2
+ class ApplicationJob < ActiveJob::Base
3
+ end
4
+ end
@@ -0,0 +1,6 @@
1
+ module PhcdevworksAccounts
2
+ class ApplicationMailer < ActionMailer::Base
3
+ default from: 'from@example.com'
4
+ layout 'mailer'
5
+ end
6
+ end
@@ -0,0 +1,5 @@
1
+ module PhcdevworksAccounts
2
+ class ApplicationRecord < ActiveRecord::Base
3
+ self.abstract_class = true
4
+ end
5
+ end
@@ -0,0 +1,36 @@
1
+ module PhcdevworksAccounts
2
+ class User < ApplicationRecord
3
+
4
+ # Autogenerate Organization ID
5
+ before_create :phcdevworks_generate_org_id
6
+
7
+ # User Gravatar Support
8
+ include Gravtastic
9
+ gravtastic
10
+
11
+ # Add Users Roles
12
+ enum role: [:user, :editor, :admin]
13
+ after_initialize :phcdevworks_set_default_role
14
+
15
+ # Include default devise modules. Others available are:
16
+ # :trackable, :confirmable, :lockable and :omniauthable
17
+ devise :database_authenticatable, :registerable, :recoverable, :rememberable, :validatable, :timeoutable
18
+
19
+ private
20
+
21
+ # Autogenerate User Organization ID
22
+ def phcdevworks_generate_org_id
23
+ self.org_id = SecureRandom.hex(5)
24
+ end
25
+
26
+ # First Signup Admin and Rest Default to User
27
+ def phcdevworks_set_default_role
28
+ if User.all.count < 1
29
+ self.role ||= :admin
30
+ elsif
31
+ self.role ||= :user
32
+ end
33
+ end
34
+
35
+ end
36
+ end
@@ -0,0 +1,79 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+
5
+ <!-- SEO System -->
6
+ <% phc_seo_title "PHCDevworks Accounts" %>
7
+ <% phc_seo_description "Rails Authentication and User Management Engine." %>
8
+ <!-- SEO System -->
9
+
10
+ <!-- SEO and Site Description -->
11
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
12
+ <title><%= yield(:phc_seo_title) %></title>
13
+ <meta name="description" content="<%= yield(:phc_seo_description) %>">
14
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
15
+ <link rel="canonical" href="http://phcdevworks.com">
16
+ <!-- SEO and Site Description -->
17
+
18
+ <!-- Rails Security Tags -->
19
+ <%= csrf_meta_tags %>
20
+ <%= csp_meta_tag %>
21
+ <!-- Rails Security Tags -->
22
+
23
+ <!-- CSS Styles -->
24
+ <%= stylesheet_link_tag 'phcdevworks_accounts/application', media: 'all' %>
25
+ <!-- CSS Styles -->
26
+
27
+ <!-- Font -->
28
+ <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Open+Sans:300,400%7CRaleway:300,400,500,600,700%7CLato:300,400,400italic,600,700"/>
29
+ <!-- Font -->
30
+
31
+ </head>
32
+ <body>
33
+
34
+ <!-- Page Container -->
35
+ <div id="page-container" class="fade page-sidebar-fixed page-header-fixed">
36
+
37
+ <!-- Page Header -->
38
+ <div id="header" class="header navbar-default">
39
+ <%= render 'layouts/phcdevworks_accounts/components/backend/navigation/top_menu' %>
40
+ </div>
41
+ <!-- Page Header -->
42
+
43
+ <!-- Page Sidebar -->
44
+ <div id="sidebar" class="sidebar">
45
+ <%= render 'layouts/phcdevworks_accounts/components/backend/sidebars/side_menu' %>
46
+ </div>
47
+ <div class="sidebar-bg"></div>
48
+ <!-- Page Sidebar -->
49
+
50
+ <!-- Page Content -->
51
+ <div id="content" class="content">
52
+ <%= render 'phcdevworks_notifications/bootstrap/notifications' %>
53
+ <%= yield %>
54
+ </div>
55
+ <!-- Page Content -->
56
+
57
+ <!-- Footer Content -->
58
+ <div id="footer" class="row footer mb-4">
59
+ <%= render 'layouts/phcdevworks_accounts/components/backend/footer/footer' %>
60
+ </div>
61
+ <!-- Footer Content -->
62
+
63
+ </div>
64
+ <!-- Page Container -->
65
+
66
+ <!-- JavaScript -->
67
+ <%= javascript_include_tag "phcdevworks_accounts/application", "data-turbolinks-track": "reload" %>
68
+ <!-- JavaScript -->
69
+
70
+ <!-- JavaScript Loader -->
71
+ <script>
72
+ $(document).ready(function() {
73
+ App.init();
74
+ });
75
+ </script>
76
+ <!-- JavaScript Loader -->
77
+
78
+ </body>
79
+ </html>
@@ -0,0 +1,75 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+
5
+ <!-- SEO System -->
6
+ <% phc_seo_title "PHCDevworks Accounts" %>
7
+ <% phc_seo_description "Rails Authentication and User Management Engine." %>
8
+ <!-- SEO System -->
9
+
10
+ <!-- SEO and Site Description -->
11
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
12
+ <title><%= yield(:phc_seo_title) %></title>
13
+ <meta name="description" content="<%= yield(:phc_seo_description) %>">
14
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
15
+ <link rel="canonical" href="http://phcdevworks.com">
16
+ <!-- SEO and Site Description -->
17
+
18
+ <!-- Rails Security Tags -->
19
+ <%= csrf_meta_tags %>
20
+ <%= csp_meta_tag %>
21
+ <!-- Rails Security Tags -->
22
+
23
+ <!-- CSS Styles -->
24
+ <%= stylesheet_link_tag "phcdevworks_accounts/application", media: "all", "data-turbolinks-track": "reload" %>
25
+ <!-- CSS Styles -->
26
+
27
+ </head>
28
+ <body>
29
+
30
+ <!-- Page Container -->
31
+ <div id="page-container" class="page-container fade page-sidebar-fixed page-header-fixed">
32
+
33
+ <!-- Page Header -->
34
+ <div id="header" class="header navbar-default">
35
+ <%= render 'layouts/phcdevworks_accounts/components/backend/navigation/top_menu' %>
36
+ </div>
37
+ <!-- Page Header -->
38
+
39
+ <!-- Page Sidebar -->
40
+ <div id="sidebar" class="sidebar">
41
+ <%= render 'layouts/phcdevworks_accounts/components/backend/sidebars/side_menu' %>
42
+ </div>
43
+ <div class="sidebar-bg"></div>
44
+ <!-- Page Sidebar -->
45
+
46
+ <!-- Page Content -->
47
+ <div id="content" class="content content-full-width">
48
+ <%= render 'phcdevworks_notifications/bootstrap/notifications' %>
49
+ <%= yield %>
50
+ </div>
51
+ <!-- Page Content -->
52
+
53
+ <!-- Footer Content -->
54
+ <div id="footer" class="footer mb-4 d-flex">
55
+ <%= render 'layouts/phcdevworks_accounts/components/backend/footer/footer' %>
56
+ </div>
57
+ <!-- Footer Content -->
58
+
59
+ </div>
60
+ <!-- Page Container -->
61
+
62
+ <!-- JavaScript -->
63
+ <%= javascript_include_tag "phcdevworks_accounts/application", "data-turbolinks-track": "reload" %>
64
+ <!-- JavaScript -->
65
+
66
+ <!-- JavaScript Loader -->
67
+ <script>
68
+ $(document).ready(function() {
69
+ App.init();
70
+ });
71
+ </script>
72
+ <!-- JavaScript Loader -->
73
+
74
+ </body>
75
+ </html>
@@ -0,0 +1,68 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+
5
+ <!-- SEO System -->
6
+ <% phc_seo_title "PHCDevworks Accounts" %>
7
+ <% phc_seo_description "Rails Authentication and User Management Engine." %>
8
+ <!-- SEO System -->
9
+
10
+ <!-- SEO and Site Description -->
11
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
12
+ <title><%= yield(:phc_seo_title) %></title>
13
+ <meta name="description" content="<%= yield(:phc_seo_description) %>">
14
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
15
+ <link rel="canonical" href="http://phcdevworks.com">
16
+ <!-- SEO and Site Description -->
17
+
18
+ <!-- Rails Security Tags -->
19
+ <%= csrf_meta_tags %>
20
+ <%= csp_meta_tag %>
21
+ <!-- Rails Security Tags -->
22
+
23
+ <!-- CSS Styles -->
24
+ <%= stylesheet_link_tag "phcdevworks_accounts/application", media: "all", "data-turbolinks-track": "reload" %>
25
+ <!-- CSS Styles -->
26
+
27
+ </head>
28
+ <body>
29
+
30
+ <!-- Page Container -->
31
+ <div id="page-container" class="fade page-without-sidebar page-header-fixed">
32
+
33
+ <!-- Page Header -->
34
+ <div id="header" class="header navbar-default">
35
+ <%= render 'layouts/phcdevworks_accounts/components/backend/navigation/top_menu' %>
36
+ </div>
37
+ <!-- Page Header -->
38
+
39
+ <!-- Page Content -->
40
+ <div id="content" class="content">
41
+ <%= render 'phcdevworks_notifications/bootstrap/notifications' %>
42
+ <%= yield %>
43
+ </div>
44
+ <!-- Page Content -->
45
+
46
+ <!-- Footer Content -->
47
+ <div id="footer" class="footer mb-4 d-flex">
48
+ <%= render 'layouts/phcdevworks_accounts/components/backend/footer/footer' %>
49
+ </div>
50
+ <!-- Footer Content -->
51
+
52
+ </div>
53
+ <!-- Page Container -->
54
+
55
+ <!-- JavaScript -->
56
+ <%= javascript_include_tag "phcdevworks_accounts/application", "data-turbolinks-track": "reload" %>
57
+ <!-- JavaScript -->
58
+
59
+ <!-- JavaScript Loader -->
60
+ <script>
61
+ $(document).ready(function() {
62
+ App.init();
63
+ });
64
+ </script>
65
+ <!-- JavaScript Loader -->
66
+
67
+ </body>
68
+ </html>
@@ -0,0 +1,16 @@
1
+ <!-- Footer Content - Left -->
2
+ <span>
3
+ <!-- Footer Content - Left - Time in Production -->
4
+ <i class="fab fa-osi"></i> 2012-<%= Time.now.year %> -
5
+ <strong>PHC</strong>Accounts(Pro) -
6
+ Engine v<%= Gem.loaded_specs["phcdevworks_accounts"].version.to_s %>
7
+ <!-- Footer Content - Left - Time in Production -->
8
+ </span>
9
+ <!-- Footer Content - Left -->
10
+
11
+ <!-- Footer Content - Right -->
12
+ <span class="float-right">
13
+ Developed with <i class="fas fa-heart hanna_hearts"></i> by
14
+ <a class="phcnet_copyright" href="https://phcdevworks.com/"><strong>PHC</strong>Devworks</a>
15
+ </span>
16
+ <!-- Footer Content - Right -->
@@ -0,0 +1,37 @@
1
+ <!-- Topbar - Navigation Header -->
2
+ <div class="navbar-header">
3
+ <%= link_to main_app.root_path, class: "navbar-brand" do %>
4
+ <strong>PHCDevworks</strong>Accounts
5
+ <% end %>
6
+ <button type="button" class="navbar-toggle" data-click="sidebar-toggled">
7
+ <span class="icon-bar"></span>
8
+ <span class="icon-bar"></span>
9
+ <span class="icon-bar"></span>
10
+ </button>
11
+ </div>
12
+ <!-- Topbar - Navigation Header -->
13
+
14
+ <!-- Topbar - Navigation Main -->
15
+ <% if current_user %>
16
+ <ul class="navbar-nav navbar-right">
17
+
18
+ <!-- Topbar - Navigation Main - User Menu -->
19
+ <li class="dropdown navbar-user">
20
+ <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">
21
+ <%= image_tag current_user.gravatar_url %>
22
+ <span class="d-none d-md-inline"><%= current_user.firstname + ' ' + current_user.lastname %></span> <b class="caret"></b>
23
+ </a>
24
+ <div class="dropdown-menu dropdown-menu-right">
25
+ <%= link_to phcdevworks_accounts.edit_user_registration_path, class: "dropdown-item" do %>
26
+ <i class="fas fa-cogs"></i> Account Settings
27
+ <% end %>
28
+ <%= link_to phcdevworks_accounts.destroy_user_session_path, method: :delete, class: "dropdown-item" do %>
29
+ <i class="fas fa-sign-out-alt"></i> Logout
30
+ <% end %>
31
+ </div>
32
+ </li>
33
+ <!-- Topbar - Navigation Main - User Menu -->
34
+
35
+ </ul>
36
+ <% end %>
37
+ <!-- Topbar - Navigation Main -->
@@ -0,0 +1,86 @@
1
+ <!-- Sidebar for PHCDevworks Engines -->
2
+ <div data-scrollbar="true" data-height="100%">
3
+
4
+ <!-- Sidebar - User Profile Menu -->
5
+ <ul class="nav">
6
+ <% if current_user %>
7
+ <li class="nav-profile">
8
+ <a href="javascript:;" data-toggle="nav-profile">
9
+ <div class="cover with-shadow"></div>
10
+ <div class="image">
11
+ <%= image_tag current_user.gravatar_url %>
12
+ </div>
13
+ <div class="info">
14
+ <b class="caret pull-right"></b>
15
+ <%= current_user.firstname + ' ' + current_user.lastname %>
16
+ <small><%= current_user.username %></small>
17
+ </div>
18
+ </a>
19
+ </li>
20
+ <li>
21
+ <ul class="nav nav-profile">
22
+ <li>
23
+ <%= link_to phcdevworks_accounts.edit_user_registration_path do %>
24
+ <i class="fas fa-cogs"></i> Account Settings
25
+ <% end %>
26
+ </li>
27
+ <li>
28
+ <%= link_to phcdevworks_accounts.destroy_user_session_path do %>
29
+ <i class="fas fa-sign-out-alt"></i> Logout
30
+ <% end %>
31
+ </li>
32
+ </ul>
33
+ </li>
34
+ <% end %>
35
+ </ul>
36
+ <!-- Sidebar - User Profile Menu -->
37
+
38
+ <!-- Sidebar - Sidebar Navigation -->
39
+ <ul class="nav">
40
+
41
+ <% if current_user && current_user.admin? %>
42
+ <!-- Sidebar - Sidebar Navigation - PHCAccounts Admin Options -->
43
+ <li class="nav-header">User Administration</li>
44
+ <li class="has-sub">
45
+ <a href="javascript:;">
46
+ <b class="caret"></b>
47
+ <i class="fas fa-user"></i>
48
+ <span>Admin</span>
49
+ </a>
50
+ <ul class="sub-menu">
51
+ <li class="<%= phc_menu_active_controller('phcdevworks_accounts/admin/users') %>"><%= link_to 'User List', phcdevworks_accounts.admin_users_index_path %></li>
52
+ </ul>
53
+ </li>
54
+ <!-- Sidebar - Sidebar Navigation - PHCAccounts Admin Options -->
55
+ <% end %>
56
+
57
+ <% if current_user %>
58
+ <!-- Sidebar - Sidebar Navigation - PHCAccounts User Options -->
59
+ <li class="nav-header">Your Account</li>
60
+ <li class="has-sub">
61
+ <a href="javascript:;">
62
+ <b class="caret"></b>
63
+ <i class="fas fa-user"></i>
64
+ <span>Accounts Settings</span>
65
+ </a>
66
+ <ul class="sub-menu">
67
+ <li class="<%= phc_menu_active_controller('phcdevworks_accounts/user/edit') %>"><%= link_to 'Settings', phcdevworks_accounts.edit_user_registration_path %></li>
68
+ <li class="<%= phc_menu_active_controller('phcdevworks_accounts/user/new') %>"><%= link_to 'Logout', phcdevworks_accounts.destroy_user_session_path, method: :delete %></li>
69
+ </ul>
70
+ </li>
71
+ <!-- Sidebar - Sidebar Navigation - PHCAccounts User Options -->
72
+ <% end %>
73
+
74
+ <!-- Sidebar - Sidebar Minifier -->
75
+ <li>
76
+ <a href="javascript:;" class="sidebar-minify-btn" data-click="sidebar-minify">
77
+ <i class="fa fa-angle-double-left"></i>
78
+ </a>
79
+ </li>
80
+ <!-- Sidebar - Sidebar Minifier -->
81
+
82
+ </ul>
83
+ <!-- Sidebar - Sidebar Navigation -->
84
+
85
+ </div>
86
+ <!-- Sidebar for PHCDevworks Engines -->
@@ -0,0 +1,48 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+
5
+ <!-- SEO System -->
6
+ <% phc_seo_title "PHCDevworks Accounts" %>
7
+ <% phc_seo_description "Rails Authentication and User Management Engine." %>
8
+ <!-- SEO System -->
9
+
10
+ <!-- SEO and Site Description -->
11
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
12
+ <title><%= yield(:phc_seo_title) %></title>
13
+ <meta name="description" content="<%= yield(:phc_seo_description) %>">
14
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
15
+ <link rel="canonical" href="http://phcdevworks.com">
16
+ <!-- SEO and Site Description -->
17
+
18
+ <!-- Rails Security Tags -->
19
+ <%= csrf_meta_tags %>
20
+ <%= csp_meta_tag %>
21
+ <!-- Rails Security Tags -->
22
+
23
+ <!-- CSS Styles -->
24
+ <%= stylesheet_link_tag "phcdevworks_accounts/application", media: "all", "data-turbolinks-track": "reload" %>
25
+ <!-- CSS Styles -->
26
+
27
+ </head>
28
+ <body class="pace-top bg-white">
29
+
30
+ <!-- Page Content -->
31
+ <%= render 'phcdevworks_notifications/bootstrap/notifications' %>
32
+ <%= yield %>
33
+ <!-- Page Content -->
34
+
35
+ <!-- JavaScript -->
36
+ <%= javascript_include_tag "phcdevworks_accounts/application", "data-turbolinks-track": "reload" %>
37
+ <!-- JavaScript -->
38
+
39
+ <!-- JavaScript Loader -->
40
+ <script>
41
+ $(document).ready(function() {
42
+ App.init();
43
+ });
44
+ </script>
45
+ <!-- JavaScript Loader -->
46
+
47
+ </body>
48
+ </html>