phcdevworks_tutorials 1.2.5 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -27
- data/app/assets/config/phcdevworks_tutorials_manifest.js +1 -1
- data/app/assets/stylesheets/phcdevworks_tutorials/category/posts.css +4 -0
- data/app/assets/stylesheets/phcdevworks_tutorials/tutorial/posts.css +4 -0
- data/app/assets/stylesheets/phcdevworks_tutorials/tutorial/steps.css +4 -0
- data/app/controllers/phcdevworks_tutorials/tutorial/categories_controller.rb +1 -2
- data/app/controllers/phcdevworks_tutorials/tutorial/posts_controller.rb +5 -6
- data/app/controllers/phcdevworks_tutorials/tutorial/steps_controller.rb +6 -12
- data/app/models/phcdevworks_tutorials/category.rb +7 -0
- data/app/models/phcdevworks_tutorials/tutorial/category.rb +1 -1
- data/app/models/phcdevworks_tutorials/tutorial/post.rb +2 -2
- data/app/models/phcdevworks_tutorials/tutorial/step.rb +1 -1
- data/app/views/layouts/phcdevworks_tutorials/application.html.erb +62 -77
- data/app/views/layouts/phcdevworks_tutorials/components/backend/footer/_footer.html.erb +7 -7
- data/app/views/layouts/phcdevworks_tutorials/components/backend/navigation/_top_menu.html.erb +37 -37
- data/app/views/layouts/phcdevworks_tutorials/components/backend/sidebars/_side_menu.html.erb +257 -239
- data/app/views/layouts/phcdevworks_tutorials/frontend.html.erb +0 -5
- data/app/views/phcdevworks_tutorials/tutorial/categories/_form.html.erb +16 -14
- data/app/views/phcdevworks_tutorials/tutorial/categories/edit.html.erb +31 -23
- data/app/views/phcdevworks_tutorials/tutorial/categories/index.html.erb +63 -52
- data/app/views/phcdevworks_tutorials/tutorial/categories/new.html.erb +31 -23
- data/app/views/phcdevworks_tutorials/tutorial/posts/_form.html.erb +46 -46
- data/app/views/phcdevworks_tutorials/tutorial/posts/edit.html.erb +31 -23
- data/app/views/phcdevworks_tutorials/tutorial/posts/index.html.erb +68 -56
- data/app/views/phcdevworks_tutorials/tutorial/posts/new.html.erb +31 -23
- data/app/views/phcdevworks_tutorials/tutorial/steps/_form.html.erb +36 -48
- data/app/views/phcdevworks_tutorials/tutorial/steps/edit.html.erb +31 -23
- data/app/views/phcdevworks_tutorials/tutorial/steps/index.html.erb +57 -52
- data/app/views/phcdevworks_tutorials/tutorial/steps/new.html.erb +31 -23
- data/config/routes.rb +3 -3
- data/db/migrate/{20190911225813_create_phcdevworks_tutorials_tutorial_posts.rb → 20191017235259_create_phcdevworks_tutorials_tutorial_posts.rb} +3 -0
- data/db/migrate/{20190923113101_create_phcdevworks_tutorials_tutorial_steps.rb → 20191017235421_create_phcdevworks_tutorials_tutorial_steps.rb} +4 -2
- data/db/migrate/{20190911225925_create_phcdevworks_tutorials_tutorial_categories.rb → 20191018124910_create_phcdevworks_tutorials_tutorial_categories.rb} +0 -0
- data/db/migrate/20191024232406_create_phcdevworks_tutorials_categories_posts.rb +8 -0
- data/lib/phcdevworks_tutorials/engine.rb +6 -8
- data/lib/phcdevworks_tutorials/version.rb +1 -1
- metadata +36 -22
- data/app/assets/javascripts/phcdevworks_tutorials/tutorial/posts.coffee +0 -3
- data/app/assets/javascripts/phcdevworks_tutorials/tutorial/steps.coffee +0 -3
- data/app/assets/stylesheets/phcdevworks_tutorials/tutorial/posts.scss +0 -3
- data/app/assets/stylesheets/phcdevworks_tutorials/tutorial/steps.scss +0 -3
- data/app/assets/stylesheets/scaffolds.scss +0 -65
- data/config/initializers/friendly_id.rb +0 -107
- data/db/migrate/20190929044403_add_info_to_phcdevworks_tutorials_tutorial_posts.rb +0 -9
- data/db/migrate/20190929044505_add_info_to_phcdevworks_tutorials_tutorial_steps.rb +0 -7
- data/db/migrate/20191002093451_add_image_to_phcdevworks_tutorials_tutorial_posts.rb +0 -8
- data/db/migrate/20191003235303_create_join_table_categories_posts.rb +0 -10
- data/db/migrate/20191006054657_add_tittle_to_phcdevworks_tutorials_tutorial_steps.rb +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d73bfa6d1cf3e314aa938a5a67ce544c7899b2d56b19afcb0a147354216eb704
|
4
|
+
data.tar.gz: c8fa6aafa79e2504e5709718a727c44214ad5dba8acab50cf745eb7d7855c66e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 201a7c24fe3acd7d3f83648ce8e46da7c09ac03e90d700df9d34c50ca8178120b55a3892959c6dc529fb423bf493dc9ad58459f2cb021e2f2cabbec15460a610
|
7
|
+
data.tar.gz: 5b28edd1312dd7a228514e983968730ad52b79daa7bb0b4a35ecf159d1ee654ca97f8fec2ae7dc168f6ca961a55bfd1a6b4e26a90d1425e98a35b35b4f52f5ff
|
data/README.md
CHANGED
@@ -1,28 +1 @@
|
|
1
1
|
# PhcdevworksTutorials
|
2
|
-
Short description and motivation.
|
3
|
-
|
4
|
-
## Usage
|
5
|
-
How to use my plugin.
|
6
|
-
|
7
|
-
## Installation
|
8
|
-
Add this line to your application's Gemfile:
|
9
|
-
|
10
|
-
```ruby
|
11
|
-
gem 'phcdevworks_tutorials'
|
12
|
-
```
|
13
|
-
|
14
|
-
And then execute:
|
15
|
-
```bash
|
16
|
-
$ bundle
|
17
|
-
```
|
18
|
-
|
19
|
-
Or install it yourself as:
|
20
|
-
```bash
|
21
|
-
$ gem install phcdevworks_tutorials
|
22
|
-
```
|
23
|
-
|
24
|
-
## Contributing
|
25
|
-
Contribution directions go here.
|
26
|
-
|
27
|
-
## License
|
28
|
-
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
@@ -16,7 +16,6 @@ module PhcdevworksTutorials
|
|
16
16
|
|
17
17
|
# GET /tutorial/categories/1
|
18
18
|
def show
|
19
|
-
@tutorial_category = Tutorial::Category.friendly.find(params[:id])
|
20
19
|
end
|
21
20
|
|
22
21
|
# GET /tutorial/categories/new
|
@@ -70,7 +69,7 @@ module PhcdevworksTutorials
|
|
70
69
|
|
71
70
|
# Common Callbacks
|
72
71
|
def set_tutorial_category
|
73
|
-
@tutorial_category = Tutorial::Category.
|
72
|
+
@tutorial_category = Tutorial::Category.find(params[:id])
|
74
73
|
end
|
75
74
|
|
76
75
|
# Whitelist
|
@@ -16,7 +16,6 @@ module PhcdevworksTutorials
|
|
16
16
|
|
17
17
|
# GET /tutorial/posts/1
|
18
18
|
def show
|
19
|
-
@tutorial_post = Tutorial::Post.friendly.find(params[:id])
|
20
19
|
end
|
21
20
|
|
22
21
|
# GET /tutorial/posts/new
|
@@ -60,9 +59,9 @@ module PhcdevworksTutorials
|
|
60
59
|
# DELETE /tutorial/posts/1
|
61
60
|
def destroy
|
62
61
|
@tutorial_post.destroy
|
63
|
-
|
64
|
-
|
65
|
-
|
62
|
+
respond_to do |format|
|
63
|
+
format.html { redirect_to tutorial_posts_path, :flash => { :error => 'Tutorial has been Removed.' }}
|
64
|
+
format.json { head :no_content }
|
66
65
|
end
|
67
66
|
end
|
68
67
|
|
@@ -70,12 +69,12 @@ module PhcdevworksTutorials
|
|
70
69
|
|
71
70
|
# Common Callbacks
|
72
71
|
def set_tutorial_post
|
73
|
-
@tutorial_post = Tutorial::Post.
|
72
|
+
@tutorial_post = Tutorial::Post.find(params[:id])
|
74
73
|
end
|
75
74
|
|
76
75
|
# Whitelist
|
77
76
|
def tutorial_post_params
|
78
|
-
params.require(:tutorial_post).permit(:
|
77
|
+
params.require(:tutorial_post).permit(:tutorial_post_title, :tutorial_post_description, :tutorial_post_status, :tutorial_post_image, :slug, :user_id, :org_id, category_ids: [])
|
79
78
|
end
|
80
79
|
|
81
80
|
end
|
@@ -10,13 +10,11 @@ module PhcdevworksTutorials
|
|
10
10
|
before_action :set_tutorial_step, only: [:show, :edit, :update, :destroy]
|
11
11
|
|
12
12
|
# GET /tutorial/steps
|
13
|
-
# GET /tutorial/steps.json
|
14
13
|
def index
|
15
|
-
@tutorial_steps = tutorial_post.steps.
|
14
|
+
@tutorial_steps = tutorial_post.steps.order("tutorial_step_number")
|
16
15
|
end
|
17
16
|
|
18
17
|
# GET /tutorial/steps/1
|
19
|
-
# GET /tutorial/steps/1.json
|
20
18
|
def show
|
21
19
|
@tutorial_step = tutorial_post.steps.find(params[:id])
|
22
20
|
end
|
@@ -28,18 +26,17 @@ module PhcdevworksTutorials
|
|
28
26
|
|
29
27
|
# GET /tutorial/steps/1/edit
|
30
28
|
def edit
|
31
|
-
@
|
29
|
+
@tutorial_post = Tutorial::Post.friendly.find(params[:post_id])
|
32
30
|
end
|
33
31
|
|
34
32
|
# POST /tutorial/steps
|
35
|
-
# POST /tutorial/steps.json
|
36
33
|
def create
|
37
34
|
@tutorial_step = tutorial_post.steps.create(tutorial_step_params)
|
38
35
|
@tutorial_step.user_id = current_user.id
|
39
36
|
@tutorial_step.org_id = current_user.org_id
|
40
37
|
respond_to do |format|
|
41
38
|
if @tutorial_step.save
|
42
|
-
format.html { redirect_to
|
39
|
+
format.html { redirect_to tutorial_post_steps_url, :flash => { :success => 'Member Listing has been Added' }}
|
43
40
|
format.json { render :show, status: :created, location: @tutorial_step }
|
44
41
|
else
|
45
42
|
format.html { render :new }
|
@@ -49,12 +46,11 @@ module PhcdevworksTutorials
|
|
49
46
|
end
|
50
47
|
|
51
48
|
# PATCH/PUT /tutorial/steps/1
|
52
|
-
# PATCH/PUT /tutorial/steps/1.json
|
53
49
|
def update
|
54
50
|
@tutorial_post = Tutorial::Post.friendly.find(params[:post_id])
|
55
51
|
respond_to do |format|
|
56
52
|
if @tutorial_step.update(tutorial_step_params)
|
57
|
-
format.html { redirect_to
|
53
|
+
format.html { redirect_to tutorial_post_steps_url, :flash => { :notice => 'Member Listing has been Updated.' }}
|
58
54
|
format.json { render :show, status: :ok, location: @tutorial_step }
|
59
55
|
else
|
60
56
|
format.html { render :edit }
|
@@ -64,12 +60,11 @@ module PhcdevworksTutorials
|
|
64
60
|
end
|
65
61
|
|
66
62
|
# DELETE /tutorial/steps/1
|
67
|
-
# DELETE /tutorial/steps/1.json
|
68
63
|
def destroy
|
69
64
|
@tutorial_step = tutorial_post.steps.find(params[:id])
|
70
65
|
@tutorial_step.destroy
|
71
66
|
respond_to do |format|
|
72
|
-
format.html { redirect_to
|
67
|
+
format.html { redirect_to tutorial_post_steps_url, :flash => { :error => 'Member Listing has been Removed' }}
|
73
68
|
format.json { head :no_content }
|
74
69
|
end
|
75
70
|
end
|
@@ -77,7 +72,6 @@ module PhcdevworksTutorials
|
|
77
72
|
private
|
78
73
|
|
79
74
|
# Common Callbacks
|
80
|
-
|
81
75
|
def set_tutorial_step
|
82
76
|
@tutorial_step = Tutorial::Step.find(params[:id])
|
83
77
|
end
|
@@ -88,7 +82,7 @@ module PhcdevworksTutorials
|
|
88
82
|
|
89
83
|
# Whitelist
|
90
84
|
def tutorial_step_params
|
91
|
-
params.require(:tutorial_step).permit(:tutorial_step_number, :
|
85
|
+
params.require(:tutorial_step).permit(:tutorial_step_number, :tutorial_step_title, :tutorial_step_description, :tutorial_step_image, :post_id, :slug, :user_id, :org_id)
|
92
86
|
end
|
93
87
|
|
94
88
|
end
|
@@ -5,7 +5,7 @@ module PhcdevworksTutorials
|
|
5
5
|
extend FriendlyId
|
6
6
|
|
7
7
|
#Relationships
|
8
|
-
has_and_belongs_to_many :posts, class_name:
|
8
|
+
has_and_belongs_to_many :posts, class_name: "Tutorial::Post", :join_table => "phcdevworks_tutorials_categories_posts", :dependent => :destroy
|
9
9
|
|
10
10
|
# Form Fields Validation
|
11
11
|
validates :tutorial_category_name,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module PhcdevworksTutorials
|
2
2
|
class Tutorial::Post < ApplicationRecord
|
3
|
-
|
3
|
+
|
4
4
|
# Clean URL Initialize
|
5
5
|
extend FriendlyId
|
6
6
|
|
@@ -8,7 +8,7 @@ module PhcdevworksTutorials
|
|
8
8
|
has_one_attached :tutorial_post_image
|
9
9
|
|
10
10
|
# Relationships
|
11
|
-
has_and_belongs_to_many :categories, class_name: "Tutorial::Category", :join_table => "
|
11
|
+
has_and_belongs_to_many :categories, class_name: "Tutorial::Category", :join_table => "phcdevworks_tutorials_categories_posts", :dependent => :destroy
|
12
12
|
has_many :steps, class_name: "Tutorial::Step"
|
13
13
|
belongs_to :user, class_name: "PhcdevworksAccounts::User"
|
14
14
|
|
@@ -5,7 +5,7 @@ module PhcdevworksTutorials
|
|
5
5
|
has_one_attached :tutorial_step_image
|
6
6
|
|
7
7
|
# Relationships
|
8
|
-
belongs_to :post, class_name: "
|
8
|
+
belongs_to :post, class_name: "Tutorial::Post"
|
9
9
|
has_many :categories, class_name: "Tutorial::Category", :through => :post
|
10
10
|
belongs_to :user, class_name: "PhcdevworksAccounts::User"
|
11
11
|
|
@@ -2,93 +2,78 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
5
|
+
<!-- SEO System -->
|
6
|
+
<% phc_seo_title "PHCDevworks Tutorials" %>
|
7
|
+
<% phc_seo_description "Ruby on Rails 6 Engine to Manage Online Tutorials." %>
|
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_tutorials/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
30
|
|
31
31
|
</head>
|
32
32
|
<body>
|
33
33
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
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_tutorials/components/backend/navigation/top_menu" %>
|
40
|
+
</div>
|
41
|
+
<!-- Page Header -->
|
42
|
+
|
43
|
+
<!-- Page Sidebar -->
|
44
|
+
<div id="sidebar" class="sidebar">
|
45
|
+
<%= render "layouts/phcdevworks_tutorials/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="footer mb-4">
|
59
|
+
<%= render "layouts/phcdevworks_tutorials/components/backend/footer/footer" %>
|
60
|
+
</div>
|
61
|
+
<!-- Footer Content -->
|
56
62
|
|
57
|
-
<!-- Footer Content -->
|
58
|
-
<div id="footer" class="footer mb-4">
|
59
|
-
<%= render 'layouts/phcdevworks_tutorials/components/backend/footer/footer' %>
|
60
63
|
</div>
|
61
|
-
<!--
|
62
|
-
|
63
|
-
</div>
|
64
|
-
<!-- Page Container -->
|
65
|
-
|
66
|
-
<!-- JavaScript -->
|
67
|
-
<%= javascript_include_tag "phcdevworks_tutorials/application", 'data-turbolinks-track': 'reload' %>
|
68
|
-
<!-- JavaScript -->
|
64
|
+
<!-- Page Container -->
|
69
65
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
.then( editor => {
|
74
|
-
window.editor = editor;
|
75
|
-
const wordCountPlugin = editor.plugins.get( 'WordCount' );
|
76
|
-
const wordCountWrapper = document.getElementById( 'word-count' );
|
77
|
-
wordCountWrapper.appendChild( wordCountPlugin.wordCountContainer );
|
78
|
-
} )
|
79
|
-
.catch( err => {
|
80
|
-
console.error( err.stack );
|
81
|
-
} );
|
82
|
-
</script>
|
83
|
-
<!-- JavaScript CKEditor -->
|
66
|
+
<!-- JavaScript -->
|
67
|
+
<%= javascript_include_tag "phcdevworks_tutorials/application", "data-turbolinks-track": "reload" %>
|
68
|
+
<!-- JavaScript -->
|
84
69
|
|
85
|
-
|
86
|
-
|
70
|
+
<!-- JavaScript Loader -->
|
71
|
+
<script>
|
87
72
|
$(document).ready(function() {
|
88
|
-
|
73
|
+
App.init();
|
89
74
|
});
|
90
|
-
|
91
|
-
|
75
|
+
</script>
|
76
|
+
<!-- JavaScript Loader -->
|
92
77
|
|
93
78
|
</body>
|
94
79
|
</html>
|
@@ -1,16 +1,16 @@
|
|
1
1
|
<!-- Footer Content - Left -->
|
2
2
|
<span>
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
3
|
+
<!-- Footer Content - Left - Time in Production -->
|
4
|
+
<i class="fab fa-osi font-weight-bolder"></i> 2012-<%= Time.now.year %> -
|
5
|
+
<span class="font-weight-bold">PHC</span>Devworks Scripts & Snippets -
|
6
|
+
Engine v<%= Gem.loaded_specs["phcdevworks_tutorials"].version.to_s %>
|
7
|
+
<!-- Footer Content - Left - Time in Production -->
|
8
8
|
</span>
|
9
9
|
<!-- Footer Content - Left -->
|
10
10
|
|
11
11
|
<!-- Footer Content - Right -->
|
12
12
|
<span class="float-right">
|
13
|
-
|
14
|
-
|
13
|
+
Developed with <i class="fas fa-heart hanna_hearts"></i> by
|
14
|
+
<a class="phcnet_copyright text-dark" href="https://phcdevworks.com/"><u><span class="font-weight-bold">PHC</span>Devworks</u></a>
|
15
15
|
</span>
|
16
16
|
<!-- Footer Content - Right -->
|
data/app/views/layouts/phcdevworks_tutorials/components/backend/navigation/_top_menu.html.erb
CHANGED
@@ -1,37 +1,37 @@
|
|
1
|
-
<!-- Topbar - Navigation Header -->
|
2
|
-
<div class="navbar-header">
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
</div>
|
12
|
-
<!-- Topbar - Navigation Header -->
|
13
|
-
|
14
|
-
<!-- Topbar - Navigation Main -->
|
15
|
-
<% if current_user %>
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
<% end %>
|
37
|
-
<!-- Topbar - Navigation Main -->
|
1
|
+
<!-- Topbar - Navigation Header -->
|
2
|
+
<div class="navbar-header">
|
3
|
+
<%= link_to phcdevworks_tutorials.tutorial_posts_path, class: "navbar-brand" do %>
|
4
|
+
<strong>PHCDevworks</strong>Tutorial
|
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="fad 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="fad 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 -->
|