phccodesnipperpro 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +0 -0
  4. data/Rakefile +22 -0
  5. data/app/assets/config/phccodesnipperpro_manifest.js +2 -0
  6. data/app/assets/javascripts/phccodesnipperpro/application.js +2 -0
  7. data/app/assets/stylesheets/phccodesnipperpro/application.scss +2 -0
  8. data/app/controllers/phccodesnipperpro/application_controller.rb +22 -0
  9. data/app/controllers/phccodesnipperpro/script/snippets_controller.rb +67 -0
  10. data/app/controllers/phccodesnipperpro/script/urls_controller.rb +76 -0
  11. data/app/helpers/phccodesnipperpro/application_helper.rb +4 -0
  12. data/app/helpers/phccodesnipperpro/script/snippets_helper.rb +4 -0
  13. data/app/helpers/phccodesnipperpro/script/urls_helper.rb +4 -0
  14. data/app/jobs/phccodesnipperpro/application_job.rb +4 -0
  15. data/app/mailers/phccodesnipperpro/application_mailer.rb +6 -0
  16. data/app/models/phccodesnipperpro/application_record.rb +5 -0
  17. data/app/models/phccodesnipperpro/script/snippet.rb +30 -0
  18. data/app/models/phccodesnipperpro/script/url.rb +16 -0
  19. data/app/models/phccodesnipperpro/script.rb +7 -0
  20. data/app/views/layouts/phccodesnipperpro/application.html.erb +79 -0
  21. data/app/views/layouts/phccodesnipperpro/components/backend/footer/_footer.html.erb +11 -0
  22. data/app/views/layouts/phccodesnipperpro/components/backend/navigation/_top_menu.html.erb +37 -0
  23. data/app/views/layouts/phccodesnipperpro/components/backend/sidebars/_side_menu.html.erb +189 -0
  24. data/app/views/phccodesnipperpro/script/snippets/_form.html.erb +26 -0
  25. data/app/views/phccodesnipperpro/script/snippets/edit.html.erb +39 -0
  26. data/app/views/phccodesnipperpro/script/snippets/index.html.erb +68 -0
  27. data/app/views/phccodesnipperpro/script/snippets/new.html.erb +39 -0
  28. data/app/views/phccodesnipperpro/script/snippets/show.html.erb +71 -0
  29. data/app/views/phccodesnipperpro/script/urls/_form.html.erb +22 -0
  30. data/app/views/phccodesnipperpro/script/urls/edit.html.erb +39 -0
  31. data/app/views/phccodesnipperpro/script/urls/index.html.erb +66 -0
  32. data/app/views/phccodesnipperpro/script/urls/new.html.erb +39 -0
  33. data/app/views/phccodesnipperpro/script/urls/show.html.erb +71 -0
  34. data/config/initializers/friendly_id.rb +107 -0
  35. data/config/routes.rb +13 -0
  36. data/db/migrate/20190504104048_create_phccodesnipperpro_script_urls.rb +19 -0
  37. data/db/migrate/20190504104101_create_phccodesnipperpro_script_snippets.rb +19 -0
  38. data/lib/phccodesnipperpro/engine.rb +70 -0
  39. data/lib/phccodesnipperpro/version.rb +3 -0
  40. data/lib/phccodesnipperpro.rb +4 -0
  41. data/lib/tasks/phccodesnipperpro_tasks.rake +4 -0
  42. metadata +697 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 4c3fd4994895d753c4fdab9e638b72c0a8141e078b8650be042468e06cfae99e
4
+ data.tar.gz: 02bc81e8f8871c2c748ed25f22b93e47dc6fa43b9653a9c0a3c16300ef405a35
5
+ SHA512:
6
+ metadata.gz: 97abc474d7bea9c0d94f476dc6db2307c0f36f7b3f7ee13c38efe04109c0b8178234bcc26b647f194223b3e39fd60243f92fe7ce0b86045b2dbd89dc58cbef46
7
+ data.tar.gz: 92463c76a8abc93496797bce7d6d7a6e7715e97ce2f42c27bd8635e90a00794b8f5a586aa583f935b9410a097d5a9aadcf4713eb2a82c51ea47483bbd0124ee4
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2012-2019 BradPotts - PHCNetCo/PHCDevworks/PHCNetworks
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
File without changes
data/Rakefile ADDED
@@ -0,0 +1,22 @@
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 = 'Phccodesnipperpro'
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("spec/test_app/Rakefile", __dir__)
18
+ load 'rails/tasks/engine.rake'
19
+
20
+ load 'rails/tasks/statistics.rake'
21
+
22
+ require 'bundler/gem_tasks'
@@ -0,0 +1,2 @@
1
+ //= link_directory ../javascripts/phccodesnipperpro .js
2
+ //= link_directory ../stylesheets/phccodesnipperpro .scss
@@ -0,0 +1,2 @@
1
+ // Load Admin Theme
2
+ //= require phc_admin_theme_scripts_four
@@ -0,0 +1,2 @@
1
+ // Load Admin Theme
2
+ @import "phc_admin_theme_styles_four";
@@ -0,0 +1,22 @@
1
+ module Phccodesnipperpro
2
+ class ApplicationController < ActionController::Base
3
+
4
+ # Security Filters
5
+ protect_from_forgery with: :exception
6
+
7
+ # Load Requried Helper Files
8
+ helper Phcaccountspro::Engine.helpers
9
+ helper Phccorehelpers::Engine.helpers
10
+ helper Phcmenus::Engine.helpers
11
+ helper Phctitleseo::Engine.helpers
12
+ helper Phcnotifi::Engine.helpers
13
+
14
+ # Papertrail Whodunnit Username
15
+ def user_for_paper_trail
16
+ current_user ? current_user.username : 'Public user'
17
+ end
18
+
19
+ private
20
+
21
+ end
22
+ end
@@ -0,0 +1,67 @@
1
+ require_dependency "phccodesnipperpro/application_controller"
2
+
3
+ module Phccodesnipperpro
4
+ class Script::SnippetsController < ApplicationController
5
+
6
+ # Include Core Helpers, Security & Action Filters
7
+ include Phccorehelpers::PhcpluginsproHelper
8
+ before_action :authenticate_user!
9
+ before_action :set_script_snippet, only: [:show, :edit, :update, :destroy]
10
+
11
+ # INDEX
12
+ def index
13
+ @script_snippets = Script::Snippet.all
14
+ end
15
+
16
+ # SHOW
17
+ def show
18
+ end
19
+
20
+ # NEW
21
+ def new
22
+ @script_snippet = Script::Snippet.new
23
+ end
24
+
25
+ # EDIT
26
+ def edit
27
+ end
28
+
29
+ # CREATE
30
+ def create
31
+ @script_snippet = Script::Snippet.new(script_snippet_params)
32
+ if @script_snippet.save
33
+ redirect_to @script_snippet, :flash => { :success => 'Snippet was successfully created.' }
34
+ else
35
+ render :new
36
+ end
37
+ end
38
+
39
+ # UPDATE
40
+ def update
41
+ if @script_snippet.update(script_snippet_params)
42
+ redirect_to @script_snippet, :flash => { :success => 'Snippet was successfully updated.' }
43
+ else
44
+ render :edit
45
+ end
46
+ end
47
+
48
+ # DELETE
49
+ def destroy
50
+ @script_snippet.destroy
51
+ redirect_to script_snippets_url, :flash => { :error => 'Snippet was successfully destroyed.' }
52
+ end
53
+
54
+ private
55
+
56
+ # Common Callbacks
57
+ def set_script_snippet
58
+ @script_snippet = Script::Snippet.find(params[:id])
59
+ end
60
+
61
+ # Whitelist
62
+ def script_snippet_params
63
+ params.require(:script_snippet).permit(:snippet_title, :snippet_code)
64
+ end
65
+
66
+ end
67
+ end
@@ -0,0 +1,76 @@
1
+ require_dependency "phccodesnipperpro/application_controller"
2
+
3
+ module Phccodesnipperpro
4
+ class Script::UrlsController < ApplicationController
5
+
6
+ # Include Core Helpers, Security & Action Filters
7
+ include Phccorehelpers::PhcpluginsproHelper
8
+ before_action :authenticate_user!
9
+ before_action :set_script_url, only: [:show, :edit, :update, :destroy]
10
+
11
+ # INDEX
12
+ def index
13
+ snippet = Script::Snippet.find(params[:snippet_id])
14
+ @script_urls = snippet.urls.all
15
+ end
16
+
17
+ # SHOW
18
+ def show
19
+ script_snippet = Script::Snippet.find(params[:snippet_id])
20
+ @script_url = script_snippet.urls.find(params[:id])
21
+ end
22
+
23
+ # NEW
24
+ def new
25
+ script_snippet = Script::Snippet.find(params[:snippet_id])
26
+ @script_url = script_snippet.urls.build
27
+ end
28
+
29
+ # EDIT
30
+ def edit
31
+ end
32
+
33
+ # CREATE
34
+ def create
35
+ @script_snippet = Script::Snippet.find(params[:snippet_id])
36
+ @script_url = @script_snippet.urls.create(script_url_params)
37
+ @script_url.user_id = current_user.id
38
+ if @script_url.save
39
+ redirect_to script_snippet_urls_path, :flash => { :success => 'Script url was successfully created.' }
40
+ else
41
+ render :new
42
+ end
43
+ end
44
+
45
+ # UPDATE
46
+ def update
47
+ @script_snippet = Script::Snippet.find(params[:snippet_id])
48
+ if @script_url.update(script_url_params)
49
+ redirect_to script_snippet_urls_path, :flash => { :success => 'Script url was successfully updated.' }
50
+ else
51
+ render :edit
52
+ end
53
+ end
54
+
55
+ # DELETE
56
+ def destroy
57
+ @script_snippet = Script::Snippet.find(params[:snippet_id])
58
+ @script_url = @script_snippet.urls.find(params[:id])
59
+ @script_url.destroy
60
+ redirect_to script_snippet_urls_path, :flash => { :error => 'Script url was successfully destroyed.' }
61
+ end
62
+
63
+ private
64
+
65
+ # Common Callbacks
66
+ def set_script_url
67
+ @script_url = Script::Url.find(params[:id])
68
+ end
69
+
70
+ # Whitelist
71
+ def script_url_params
72
+ params.require(:script_url).permit(:script_url, :snippet_id)
73
+ end
74
+
75
+ end
76
+ end
@@ -0,0 +1,4 @@
1
+ module Phccodesnipperpro
2
+ module ApplicationHelper
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module Phccodesnipperpro
2
+ module Script::SnippetsHelper
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module Phccodesnipperpro
2
+ module Script::UrlsHelper
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module Phccodesnipperpro
2
+ class ApplicationJob < ActiveJob::Base
3
+ end
4
+ end
@@ -0,0 +1,6 @@
1
+ module Phccodesnipperpro
2
+ class ApplicationMailer < ActionMailer::Base
3
+ default from: 'from@example.com'
4
+ layout 'mailer'
5
+ end
6
+ end
@@ -0,0 +1,5 @@
1
+ module Phccodesnipperpro
2
+ class ApplicationRecord < ActiveRecord::Base
3
+ self.abstract_class = true
4
+ end
5
+ end
@@ -0,0 +1,30 @@
1
+ module Phccodesnipperpro
2
+ class Script::Snippet < ApplicationRecord
3
+
4
+ # Include Core Validations
5
+ include Phccorehelpers::Validations
6
+
7
+ # Clean URL Initialize
8
+ extend FriendlyId
9
+
10
+ # Relationships
11
+ has_many :urls, class_name: 'Phccodesnipperpro::Script::Url'
12
+
13
+ # Form Fields Validation
14
+ validates :snippet_title,
15
+ presence: true
16
+
17
+ validates :snippet_code,
18
+ presence: true
19
+
20
+ # Clean URL Define
21
+ friendly_id :phc_nice_url_slug, use: [:slugged, :finders]
22
+
23
+ def phc_nice_url_slug
24
+ [
25
+ [:snippet_title]
26
+ ]
27
+ end
28
+
29
+ end
30
+ end
@@ -0,0 +1,16 @@
1
+ module Phccodesnipperpro
2
+ class Script::Url < ApplicationRecord
3
+
4
+ # Include Core Validations
5
+ phc_domain_regx = URI::regexp(%w(http https))
6
+
7
+ # Relationships
8
+ belongs_to :snippet, class_name: 'Phccodesnipperpro::Script::Snippet'
9
+
10
+ # Form Fields Validation
11
+ validates :script_url,
12
+ presence: true,
13
+ format: { :with => phc_domain_regx, message: "Please follow this URL format http or https://www.**********.com" }
14
+
15
+ end
16
+ end
@@ -0,0 +1,7 @@
1
+ module Phccodesnipperpro
2
+ module Script
3
+ def self.table_name_prefix
4
+ 'phccodesnipperpro_script_'
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,79 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+
5
+ <!-- SEO System -->
6
+ <% phc_seo_title "PHCCodeSnipper by PHCDevworks" %>
7
+ <% phc_seo_description "Application to manage and post code snippets." %>
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 'phccodesnipperpro/application', media: 'all', 'data-turbolinks-track': 'reload' %>
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/phccodesnipperpro/components/backend/navigation/top_menu' %>
40
+ </div>
41
+ <!-- Page Header -->
42
+
43
+ <!-- Page Sidebar -->
44
+ <div id="sidebar" class="sidebar">
45
+ <%= render 'layouts/phccodesnipperpro/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 'phcnotifi/default/notifications' %>
53
+ <%= yield %>
54
+ </div>
55
+ <!-- Page Content -->
56
+
57
+ <!-- Footer Content -->
58
+ <div id="footer" class="footer mb-4">
59
+ <%= render 'layouts/phccodesnipperpro/components/backend/footer/footer' %>
60
+ </div>
61
+ <!-- Footer Content -->
62
+
63
+ </div>
64
+ <!-- Page Container -->
65
+
66
+ <!-- JavaScript -->
67
+ <%= javascript_include_tag "phccodesnipperpro/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,11 @@
1
+ <!-- Footer -->
2
+ <span class="float-left">
3
+ 2012-<%= Time.now.year %> -
4
+ <strong>PHC</strong>CodeSnipper -
5
+ Engine v<%= Gem.loaded_specs["phccodesnipperpro"].version.to_s %>
6
+ </span>
7
+ <span class="float-right">
8
+ Developed with <i class="fas fa-heart hanna_hearts"></i> by
9
+ <a class="phcnet_copyright" href="https://phcdevworks.com/"><strong>PHC</strong>Devworks</a>
10
+ </span>
11
+ <!-- Footer -->
@@ -0,0 +1,37 @@
1
+ <!-- Topbar - Navigation Header -->
2
+ <div class="navbar-header">
3
+ <%= link_to phccodesnipperpro.script_snippets_path, class: "navbar-brand" do %>
4
+ <strong>PHC</strong>CodeSnipper
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 phcaccountspro.edit_user_registration_path, class: "dropdown-item" do %>
26
+ <i class="fas fa-cogs"></i> Account Settings
27
+ <% end %>
28
+ <%= link_to phcaccountspro.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,189 @@
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 phcaccountspro.edit_user_registration_path do %>
24
+ <i class="fas fa-cogs"></i> Account Settings
25
+ <% end %>
26
+ </li>
27
+ <li>
28
+ <%= link_to phcaccountspro.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 defined?phccodesnipperpro %>
42
+ <!-- Sidebar - Sidebar Navigation - PHCCodeSnipper -->
43
+ <li class="nav-header">Code Snippets</li>
44
+ <li class="has-sub">
45
+ <a href="javascript:;">
46
+ <b class="caret"></b>
47
+ <i class="fas fa-newspaper"></i>
48
+ <span>Code Snippets</span>
49
+ </a>
50
+ <ul class="sub-menu">
51
+ <li class="<%= phc_menus_active_controller('phccodesnipperpro/script/posts') %>"><%= link_to 'Snippet Index', phccodesnipperpro.script_snippets_path %></li>
52
+ <li class="<%= phc_menus_active_controller('phccodesnipperpro/script/posts#new') %>"><%= link_to 'New Snippet', phccodesnipperpro.new_script_snippet_path %></li>
53
+ </ul>
54
+ </li>
55
+ <!-- Sidebar - Sidebar Navigation - PHCCodeSnipper -->
56
+ <% end %>
57
+
58
+ <% if defined?phcpresspro %>
59
+ <!-- Sidebar - Sidebar Navigation - PHCPress -->
60
+ <li class="nav-header">Article Management</li>
61
+ <li class="has-sub">
62
+ <a href="javascript:;">
63
+ <b class="caret"></b>
64
+ <i class="fas fa-newspaper"></i>
65
+ <span>Article Posts</span>
66
+ </a>
67
+ <ul class="sub-menu">
68
+ <li class="<%= phc_menus_active_controller('phcpresspro/article/posts') %>"><%= link_to('Article Index', phcpresspro.article_posts_path) %></li>
69
+ <li class="<%= phc_menus_active_controller('phcpresspro/article/posts#new') %>"><%= link_to('New Aritcle', phcpresspro.new_article_post_path) %></li>
70
+ </ul>
71
+ </li>
72
+ <li class="has-sub">
73
+ <a href="javascript:;">
74
+ <b class="caret"></b>
75
+ <i class="fas fa-sitemap"></i>
76
+ <span>Article Categories</span>
77
+ </a>
78
+ <ul class="sub-menu">
79
+ <li class="<%= phc_menus_active_controller('phcpresspro/article/categories') %>"><%= link_to('Category Index', phcpresspro.article_categories_path) %></li>
80
+ <li class="<%= phc_menus_active_controller('phcpresspro/article/categories#new') %>"><%= link_to('New Category', phcpresspro.new_article_category_path) %></li>
81
+ </ul>
82
+ </li>
83
+ <!-- Sidebar - Sidebar Navigation - PHCPress -->
84
+ <% end %>
85
+
86
+ <% if defined?phcmemberspro %>
87
+ <!-- Sidebar - Sidebar Navigation - PHCMembers -->
88
+ <li class="nav-header">Membership Manager</li>
89
+ <li class="has-sub">
90
+ <a href="javascript:;">
91
+ <b class="caret"></b>
92
+ <i class="fas fa-users"></i>
93
+ <span>Member's Data</span>
94
+ </a>
95
+ <ul class="sub-menu">
96
+ <li class="<%= phc_menus_active_controller('phcmemberspro/member/profiles') %>"><%= link_to('Profile Index', phcmemberspro.member_profiles_path) %></li>
97
+ <li class="<%= phc_menus_active_controller('phcmemberspro/member/profiles#new') %>"><%= link_to('New Member Profile', phcmemberspro.new_member_profile_path) %></li>
98
+ </ul>
99
+ </li>
100
+ <li class="has-sub">
101
+ <a href="javascript:;">
102
+ <b class="caret"></b>
103
+ <i class="fas fa-list-alt"></i>
104
+ <span>Member's Directory</span>
105
+ </a>
106
+ <ul class="sub-menu">
107
+ <li class="<%= phc_menus_active_controller('phcmemberspro/directory/categories') %>"><%= link_to('Directory Index', phcmemberspro.directory_categories_path) %></li>
108
+ <li class="<%= phc_menus_active_controller('phcmemberspro/directory/categories#new') %>"><%= link_to('New Directory Listing', phcmemberspro.new_directory_category_path) %></li>
109
+ </ul>
110
+ </li>
111
+ <!-- Sidebar - Sidebar Navigation - PHCMembers -->
112
+ <% end %>
113
+
114
+ <% if defined?phcscriptcdnpro %>
115
+ <!-- Sidebar - Sidebar Navigation - PHCScriptCDN -->
116
+ <li class="nav-header">Script Management</li>
117
+ <li class="has-sub">
118
+ <a href="javascript:;">
119
+ <b class="caret"></b>
120
+ <i class="fas fa-newspaper"></i>
121
+ <span>Script Posts</span>
122
+ </a>
123
+ <ul class="sub-menu">
124
+ <li class="<%= phc_menus_active_controller('phcscriptcdnpro/script/listings') %>"><%= link_to "All Script Listings", phcscriptcdnpro.script_listings_path %></li>
125
+ <li class="<%= phc_menus_active_controller('phcscriptcdnpro/script/listings#new') %>"><%= link_to "Add a New Listing", phcscriptcdnpro.new_script_listing_path %></li>
126
+ </ul>
127
+ </li>
128
+ <li class="has-sub">
129
+ <a href="javascript:;">
130
+ <b class="caret"></b>
131
+ <i class="fas fa-sitemap"></i>
132
+ <span>Script Extras</span>
133
+ </a>
134
+ <ul class="sub-menu">
135
+ <li class="<%= phc_menus_active_controller('phcscriptcdnpro/script/authors') %>"><%= link_to "Script Authors", phcscriptcdnpro.script_authors_path %></li>
136
+ <li class="<%= phc_menus_active_controller('phcscriptcdnpro/script/licences') %>"><%= link_to "Script Licences", phcscriptcdnpro.script_licences_path %></li>
137
+ <li class="<%= phc_menus_active_controller('phcscriptcdnpro/script/extensions') %>"><%= link_to "Script Extensions", phcscriptcdnpro.script_extensions_path %></li>
138
+ <li class="<%= phc_menus_active_controller('phcscriptcdnpro/script/versions') %>"><%= link_to "Script Versions", phcscriptcdnpro.script_versions_path %></li>
139
+ </ul>
140
+ </li>
141
+ <!-- Sidebar - Sidebar Navigation - PHCScriptCDN -->
142
+ <% end %>
143
+
144
+ <% if current_user && current_user.admin? %>
145
+ <!-- Sidebar - Sidebar Navigation - PHCAccounts Admin Options -->
146
+ <li class="nav-header">User Administration</li>
147
+ <li class="has-sub">
148
+ <a href="javascript:;">
149
+ <b class="caret"></b>
150
+ <i class="fas fa-user"></i>
151
+ <span>Admin</span>
152
+ </a>
153
+ <ul class="sub-menu">
154
+ <li class="<%= phc_menus_active_controller('phcaccountspro/admin/users') %>"><%= link_to 'User List', phcaccountspro.admin_users_path %></li>
155
+ </ul>
156
+ </li>
157
+ <!-- Sidebar - Sidebar Navigation - PHCAccounts Admin Options -->
158
+ <% end %>
159
+
160
+ <% if current_user %>
161
+ <!-- Sidebar - Sidebar Navigation - PHCAccounts User Options -->
162
+ <li class="nav-header">Your Account</li>
163
+ <li class="has-sub">
164
+ <a href="javascript:;">
165
+ <b class="caret"></b>
166
+ <i class="fas fa-user"></i>
167
+ <span>Accounts Settings</span>
168
+ </a>
169
+ <ul class="sub-menu">
170
+ <li class="<%= phc_menus_active_controller('phcaccountspro/user/edit') %>"><%= link_to 'Settings', phcaccountspro.edit_user_registration_path %></li>
171
+ <li class="<%= phc_menus_active_controller('phcaccountspro/user/new') %>"><%= link_to 'Logout', phcaccountspro.destroy_user_session_path, method: :delete %></li>
172
+ </ul>
173
+ </li>
174
+ <!-- Sidebar - Sidebar Navigation - PHCAccounts User Options -->
175
+ <% end %>
176
+
177
+ <!-- Sidebar - Sidebar Minifier -->
178
+ <li>
179
+ <a href="javascript:;" class="sidebar-minify-btn" data-click="sidebar-minify">
180
+ <i class="fa fa-angle-double-left"></i>
181
+ </a>
182
+ </li>
183
+ <!-- Sidebar - Sidebar Minifier -->
184
+
185
+ </ul>
186
+ <!-- Sidebar - Sidebar Navigation -->
187
+
188
+ </div>
189
+ <!-- Sidebar for PHCDevworks Engines -->