phcdevworks_press 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +34 -0
- data/Rakefile +32 -0
- data/app/assets/config/phcdevworks_press_manifest.js +2 -0
- data/app/assets/javascripts/phcdevworks_press/application.js +2 -0
- data/app/assets/stylesheets/phcdevworks_press/application.scss +2 -0
- data/app/assets/stylesheets/phcdevworks_press/article/categories.css +4 -0
- data/app/assets/stylesheets/phcdevworks_press/article/posts.css +4 -0
- data/app/assets/stylesheets/phcdevworks_press/blog/articles.css +4 -0
- data/app/controllers/phcdevworks_press/application_controller.rb +13 -0
- data/app/controllers/phcdevworks_press/article/categories_controller.rb +82 -0
- data/app/controllers/phcdevworks_press/article/posts_controller.rb +82 -0
- data/app/controllers/phcdevworks_press/blog/articles_controller.rb +20 -0
- data/app/helpers/phcdevworks_press/application_helper.rb +4 -0
- data/app/helpers/phcdevworks_press/article/categories_helper.rb +4 -0
- data/app/helpers/phcdevworks_press/article/posts_helper.rb +4 -0
- data/app/helpers/phcdevworks_press/blog/articles_helper.rb +4 -0
- data/app/jobs/phcdevworks_press/application_job.rb +4 -0
- data/app/mailers/phcdevworks_press/application_mailer.rb +6 -0
- data/app/models/phcdevworks_press/application_record.rb +5 -0
- data/app/models/phcdevworks_press/article/category.rb +27 -0
- data/app/models/phcdevworks_press/article/post.rb +32 -0
- data/app/models/phcdevworks_press/article.rb +7 -0
- data/app/models/phcdevworks_press/category_versions.rb +5 -0
- data/app/models/phcdevworks_press/post_versions.rb +5 -0
- data/app/views/layouts/phcdevworks_press/application.html.erb +94 -0
- data/app/views/layouts/phcdevworks_press/components/backend/footer/_footer.html.erb +16 -0
- data/app/views/layouts/phcdevworks_press/components/backend/navigation/_top_menu.html.erb +37 -0
- data/app/views/layouts/phcdevworks_press/components/backend/sidebars/_side_menu.html.erb +142 -0
- data/app/views/layouts/phcdevworks_press/frontend.html.erb +5 -0
- data/app/views/phcdevworks_press/article/categories/_form.html.erb +22 -0
- data/app/views/phcdevworks_press/article/categories/edit.html.erb +37 -0
- data/app/views/phcdevworks_press/article/categories/index.html.erb +65 -0
- data/app/views/phcdevworks_press/article/categories/new.html.erb +37 -0
- data/app/views/phcdevworks_press/article/posts/_form.html.erb +87 -0
- data/app/views/phcdevworks_press/article/posts/edit.html.erb +23 -0
- data/app/views/phcdevworks_press/article/posts/index.html.erb +68 -0
- data/app/views/phcdevworks_press/article/posts/new.html.erb +23 -0
- data/app/views/phcdevworks_press/blog/articles/index.html.erb +69 -0
- data/app/views/phcdevworks_press/blog/articles/show.html.erb +1 -0
- data/config/routes.rb +25 -0
- data/db/migrate/20170517064030_create_phcdevworks_press_post_versions.rb +17 -0
- data/db/migrate/20170517064427_create_phcdevworks_press_category_versions.rb +17 -0
- data/db/migrate/20190315173237_create_join_table_categories_posts.rb +8 -0
- data/db/migrate/20190805232522_create_phcdevworks_press_article_posts.rb +18 -0
- data/db/migrate/20190805232733_create_phcdevworks_press_article_categories.rb +15 -0
- data/lib/phcdevworks_press/engine.rb +38 -0
- data/lib/phcdevworks_press/version.rb +3 -0
- data/lib/phcdevworks_press.rb +5 -0
- data/lib/tasks/phcdevworks_press_tasks.rake +4 -0
- metadata +296 -0
@@ -0,0 +1,94 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
|
5
|
+
<!-- SEO System -->
|
6
|
+
<% phc_seo_title "PHCPress by PHCDevworks" %>
|
7
|
+
<% phc_seo_description "PHCPress rails CMS application to manage your website's articles, categories and media." %>
|
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_press/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/phcdevworks_press/components/backend/navigation/top_menu' %>
|
40
|
+
</div>
|
41
|
+
<!-- Page Header -->
|
42
|
+
|
43
|
+
<!-- Page Sidebar -->
|
44
|
+
<div id="sidebar" class="sidebar">
|
45
|
+
<%= render 'layouts/phcdevworks_press/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_press/components/backend/footer/footer' %>
|
60
|
+
</div>
|
61
|
+
<!-- Footer Content -->
|
62
|
+
|
63
|
+
</div>
|
64
|
+
<!-- Page Container -->
|
65
|
+
|
66
|
+
<!-- JavaScript -->
|
67
|
+
<%= javascript_include_tag "phcdevworks_press/application", 'data-turbolinks-track': 'reload' %>
|
68
|
+
<!-- JavaScript -->
|
69
|
+
|
70
|
+
<!-- JavaScript CKEditor -->
|
71
|
+
<script>
|
72
|
+
ClassicEditor.create( document.querySelector( '#editor' ) )
|
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 -->
|
84
|
+
|
85
|
+
<!-- JavaScript Loader -->
|
86
|
+
<script>
|
87
|
+
$(document).ready(function() {
|
88
|
+
App.init();
|
89
|
+
});
|
90
|
+
</script>
|
91
|
+
<!-- JavaScript Loader -->
|
92
|
+
|
93
|
+
</body>
|
94
|
+
</html>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<!-- Footer Content - Left -->
|
2
|
+
<span>
|
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 CMS Press -
|
6
|
+
Engine v<%= Gem.loaded_specs["phcdevworks_press"].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 text-dark" href="https://phcdevworks.com/"><u><span class="font-weight-bold">PHC</span>Devworks</u></a>
|
15
|
+
</span>
|
16
|
+
<!-- Footer Content - Right -->
|
@@ -0,0 +1,37 @@
|
|
1
|
+
<!-- Topbar - Navigation Header -->
|
2
|
+
<div class="navbar-header">
|
3
|
+
<%= link_to phcdevworks_press.article_posts_path, class: "navbar-brand" do %>
|
4
|
+
<b>PHCDevworks</b> CMS Press
|
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,142 @@
|
|
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="fad 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 defined?phcdevworks_members %>
|
42
|
+
<!-- Sidebar - Sidebar Navigation - PHCDevworks Members -->
|
43
|
+
<li class="nav-header">Membership Manager</li>
|
44
|
+
<li class="has-sub">
|
45
|
+
<a href="javascript:;">
|
46
|
+
<b class="caret"></b>
|
47
|
+
<i class="fad fa-users"></i>
|
48
|
+
<span>Member's Data</span>
|
49
|
+
</a>
|
50
|
+
<ul class="sub-menu">
|
51
|
+
<li class="<%= phc_menu_active_controller('phcdevworks_members/member/profiles') %>"><%= link_to('Profile Index', phcdevworks_members.member_profiles_path) %></li>
|
52
|
+
<li class="<%= phc_menu_active_controller('phcdevworks_members/member/profiles#new') %>"><%= link_to('New Member Profile', phcdevworks_members.new_member_profile_path) %></li>
|
53
|
+
</ul>
|
54
|
+
</li>
|
55
|
+
<li class="has-sub">
|
56
|
+
<a href="javascript:;">
|
57
|
+
<b class="caret"></b>
|
58
|
+
<i class="fad fa-list-alt"></i>
|
59
|
+
<span>Member's Directory</span>
|
60
|
+
</a>
|
61
|
+
<ul class="sub-menu">
|
62
|
+
<li class="<%= phc_menu_active_controller('phcdevworks_members/directory/categories') %>"><%= link_to('Directory Index', phcdevworks_members.directory_categories_path) %></li>
|
63
|
+
<li class="<%= phc_menu_active_controller('phcdevworks_members/directory/categories#new') %>"><%= link_to('New Directory Listing', phcdevworks_members.new_directory_category_path) %></li>
|
64
|
+
</ul>
|
65
|
+
</li>
|
66
|
+
<!-- Sidebar - Sidebar Navigation - PHCDevworks Members -->
|
67
|
+
<% end %>
|
68
|
+
|
69
|
+
<% if defined?phcdevworks_press %>
|
70
|
+
<!-- Sidebar - Sidebar Navigation - phcdevworks_press -->
|
71
|
+
<li class="nav-header">Article Management</li>
|
72
|
+
<li class="has-sub">
|
73
|
+
<a href="javascript:;">
|
74
|
+
<b class="caret"></b>
|
75
|
+
<i class="fad fa-newspaper"></i>
|
76
|
+
<span>Article Posts</span>
|
77
|
+
</a>
|
78
|
+
<ul class="sub-menu">
|
79
|
+
<li class="<%= phc_menu_active_controller('phcdevworks_press/article/posts') %>"><%= link_to('Article Index', phcdevworks_press.article_posts_path) %></li>
|
80
|
+
<li class="<%= phc_menu_active_controller('phcdevworks_press/article/posts#new') %>"><%= link_to('New Aritcle', phcdevworks_press.new_article_post_path) %></li>
|
81
|
+
</ul>
|
82
|
+
</li>
|
83
|
+
<li class="has-sub">
|
84
|
+
<a href="javascript:;">
|
85
|
+
<b class="caret"></b>
|
86
|
+
<i class="fad fa-sitemap"></i>
|
87
|
+
<span>Article Categories</span>
|
88
|
+
</a>
|
89
|
+
<ul class="sub-menu">
|
90
|
+
<li class="<%= phc_menu_active_controller('phcdevworks_press/article/categories') %>"><%= link_to('Category Index', phcdevworks_press.article_categories_path) %></li>
|
91
|
+
<li class="<%= phc_menu_active_controller('phcdevworks_press/article/categories#new') %>"><%= link_to('New Category', phcdevworks_press.new_article_category_path) %></li>
|
92
|
+
</ul>
|
93
|
+
</li>
|
94
|
+
<!-- Sidebar - Sidebar Navigation - phcdevworks_press -->
|
95
|
+
<% end %>
|
96
|
+
|
97
|
+
<% if current_user && current_user.admin? %>
|
98
|
+
<!-- Sidebar - Sidebar Navigation - PHCAccounts Admin Options -->
|
99
|
+
<li class="nav-header">User Administration</li>
|
100
|
+
<li class="has-sub">
|
101
|
+
<a href="javascript:;">
|
102
|
+
<b class="caret"></b>
|
103
|
+
<i class="fad fa-user"></i>
|
104
|
+
<span>Admin</span>
|
105
|
+
</a>
|
106
|
+
<ul class="sub-menu">
|
107
|
+
<li class="<%= phc_menu_active_controller('phcdevworks_accounts/admin/users') %>"><%= link_to 'User List', phcdevworks_accounts.admin_users_index_path %></li>
|
108
|
+
</ul>
|
109
|
+
</li>
|
110
|
+
<!-- Sidebar - Sidebar Navigation - PHCAccounts Admin Options -->
|
111
|
+
<% end %>
|
112
|
+
|
113
|
+
<% if current_user %>
|
114
|
+
<!-- Sidebar - Sidebar Navigation - PHCAccounts User Options -->
|
115
|
+
<li class="nav-header">Your Account</li>
|
116
|
+
<li class="has-sub">
|
117
|
+
<a href="javascript:;">
|
118
|
+
<b class="caret"></b>
|
119
|
+
<i class="fad fa-user"></i>
|
120
|
+
<span>Accounts Settings</span>
|
121
|
+
</a>
|
122
|
+
<ul class="sub-menu">
|
123
|
+
<li class="<%= phc_menu_active_controller('phcdevworks_accounts/user/edit') %>"><%= link_to 'Settings', phcdevworks_accounts.edit_user_registration_path %></li>
|
124
|
+
<li class="<%= phc_menu_active_controller('phcdevworks_accounts/user/new') %>"><%= link_to 'Logout', phcdevworks_accounts.destroy_user_session_path, method: :delete %></li>
|
125
|
+
</ul>
|
126
|
+
</li>
|
127
|
+
<!-- Sidebar - Sidebar Navigation - PHCAccounts User Options -->
|
128
|
+
<% end %>
|
129
|
+
|
130
|
+
<!-- Sidebar - Sidebar Minifier -->
|
131
|
+
<li>
|
132
|
+
<a href="javascript:;" class="sidebar-minify-btn" data-click="sidebar-minify">
|
133
|
+
<i class="fa fa-angle-double-left"></i>
|
134
|
+
</a>
|
135
|
+
</li>
|
136
|
+
<!-- Sidebar - Sidebar Minifier -->
|
137
|
+
|
138
|
+
</ul>
|
139
|
+
<!-- Sidebar - Sidebar Navigation -->
|
140
|
+
|
141
|
+
</div>
|
142
|
+
<!-- Sidebar for PHCDevworks Engines -->
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<!-- Form - Article - Category -->
|
2
|
+
<%= form_with(model: article_category, local: true) do |form| %>
|
3
|
+
|
4
|
+
<!-- PHCNotifi Render Validation -->
|
5
|
+
<%= render 'phcdevworks_notifications/bootstrap/validations', :object => @article_category %>
|
6
|
+
<!-- PHCNotifi Render Validation -->
|
7
|
+
|
8
|
+
<!-- Form Input Fields -->
|
9
|
+
<div class="form-group field_with_errors">
|
10
|
+
<%= form.label :category_name, "Category Name" %>
|
11
|
+
<%= form.text_field :category_name, class: "form-control" %>
|
12
|
+
</div>
|
13
|
+
<!-- Form Input Fields -->
|
14
|
+
|
15
|
+
<!-- Form Submition Button -->
|
16
|
+
<div class="actions">
|
17
|
+
<%= form.submit class: "btn btn-primary" %>
|
18
|
+
</div>
|
19
|
+
<!-- For Submition Button -->
|
20
|
+
|
21
|
+
<% end %>
|
22
|
+
<!-- Form - Article - Category -->
|
@@ -0,0 +1,37 @@
|
|
1
|
+
<!-- Title System -->
|
2
|
+
<% phc_title "Article Category Manager" %>
|
3
|
+
<% phc_title_tagline "Update Category Data" %>
|
4
|
+
<% phc_breadcrumb_one yield(:phc_title) %>
|
5
|
+
<% phc_breadcrumb_two link_to "Category Index", phcdevworks_press.article_categories_path %>
|
6
|
+
<% phc_breadcrumb_three yield(:phc_title_tagline) %>
|
7
|
+
<!-- Title System -->
|
8
|
+
|
9
|
+
<!-- Page Bradcrumbs -->
|
10
|
+
<ol class="breadcrumb pull-right">
|
11
|
+
<li class="breadcrumb-item"><%= yield(:phc_breadcrumb_one) %></li>
|
12
|
+
<li class="breadcrumb-item"><%= yield(:phc_breadcrumb_two) %></li>
|
13
|
+
<li class="breadcrumb-item active"><%= yield(:phc_breadcrumb_three) %></li>
|
14
|
+
</ol>
|
15
|
+
<!-- Page Bradcrumbs -->
|
16
|
+
|
17
|
+
<!-- Page Header -->
|
18
|
+
<h1 class="page-header"><%= yield(:phc_title) %></h1>
|
19
|
+
<!-- Page Header -->
|
20
|
+
|
21
|
+
<!-- Page Content -->
|
22
|
+
<div class="panel panel-inverse">
|
23
|
+
<div class="panel-heading">
|
24
|
+
<div class="panel-heading-btn">
|
25
|
+
<a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default" data-click="panel-expand"><i class="fa fa-expand"></i></a>
|
26
|
+
<a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-success" data-click="panel-reload"><i class="fa fa-redo"></i></a>
|
27
|
+
<a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-warning" data-click="panel-collapse"><i class="fa fa-minus"></i></a>
|
28
|
+
</div>
|
29
|
+
<h4 class="panel-title"><%= yield(:phc_title) %></h4>
|
30
|
+
</div>
|
31
|
+
<div class="panel-body">
|
32
|
+
<!-- Form to Edit Article Category -->
|
33
|
+
<%= render 'form', article_category: @article_category %>
|
34
|
+
<!-- Form to Edit Article Category -->
|
35
|
+
</div>
|
36
|
+
</div>
|
37
|
+
<!-- Page Content -->
|
@@ -0,0 +1,65 @@
|
|
1
|
+
<!-- Title System -->
|
2
|
+
<% phc_title "Article Category Manager" %>
|
3
|
+
<% phc_title_tagline "Category Index" %>
|
4
|
+
<% phc_breadcrumb_one yield(:phc_title) %>
|
5
|
+
<% phc_breadcrumb_two link_to "Category Index", phcdevworks_press.article_categories_path %>
|
6
|
+
<% phc_breadcrumb_three yield(:phc_title_tagline) %>
|
7
|
+
<!-- Title System -->
|
8
|
+
|
9
|
+
<!-- Page Bradcrumbs -->
|
10
|
+
<ol class="breadcrumb pull-right">
|
11
|
+
<li class="breadcrumb-item"><%= yield(:phc_breadcrumb_one) %></li>
|
12
|
+
<li class="breadcrumb-item active"><%= yield(:phc_breadcrumb_two) %></li>
|
13
|
+
</ol>
|
14
|
+
<!-- Page Bradcrumbs -->
|
15
|
+
|
16
|
+
<!-- Page Header -->
|
17
|
+
<h1 class="page-header"><%= yield(:phc_title) %></h1>
|
18
|
+
<!-- Page Header -->
|
19
|
+
|
20
|
+
<!-- Page & Panel Content -->
|
21
|
+
<div class="panel panel-inverse">
|
22
|
+
<!-- Panel Heading -->
|
23
|
+
<div class="panel-heading">
|
24
|
+
<div class="panel-heading-btn">
|
25
|
+
<a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default" data-click="panel-expand"><i class="fa fa-expand"></i></a>
|
26
|
+
<a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-success" data-click="panel-reload"><i class="fa fa-redo"></i></a>
|
27
|
+
<a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-warning" data-click="panel-collapse"><i class="fa fa-minus"></i></a>
|
28
|
+
</div>
|
29
|
+
<h4 class="panel-title"><%= yield(:phc_title_tagline) %></h4>
|
30
|
+
</div>
|
31
|
+
<!-- Panel Heading -->
|
32
|
+
<!-- Panel Body -->
|
33
|
+
<div class="panel-body">
|
34
|
+
<!-- Table - Category Index -->
|
35
|
+
<div class="table-responsive">
|
36
|
+
<table class="table table-striped table-bordered">
|
37
|
+
<thead>
|
38
|
+
<tr>
|
39
|
+
<th>Category Name</th>
|
40
|
+
<th></th>
|
41
|
+
</tr>
|
42
|
+
</thead>
|
43
|
+
<tbody>
|
44
|
+
<% @article_categories.each do |article_category| %>
|
45
|
+
<tr>
|
46
|
+
<td><%= link_to article_category.category_name, phcdevworks_press.edit_article_category_path(article_category) %></td>
|
47
|
+
<td>
|
48
|
+
<div class="btn-group d-flex" role="group">
|
49
|
+
<%= link_to 'Edit Category', edit_article_category_path(article_category), class: "btn btn-primary btn-xs" %>
|
50
|
+
<%= link_to 'Remove Category', article_category, class: "btn btn-danger btn-xs", method: :delete, data: { confirm: 'Are you sure?' } %>
|
51
|
+
</div>
|
52
|
+
</td>
|
53
|
+
</tr>
|
54
|
+
<% end %>
|
55
|
+
</tbody>
|
56
|
+
</table>
|
57
|
+
<%= link_to phcdevworks_press.new_article_category_path, class: "btn btn-primary btn-sm" do %>
|
58
|
+
<i class="fas fa-plus-circle"></i>
|
59
|
+
<%= "Add a New Article Category" %>
|
60
|
+
<% end %>
|
61
|
+
</div>
|
62
|
+
<!-- Table - Category Index -->
|
63
|
+
</div>
|
64
|
+
</div>
|
65
|
+
<!-- Page Content -->
|
@@ -0,0 +1,37 @@
|
|
1
|
+
<!-- Title System -->
|
2
|
+
<% phc_title "Article Category Manager" %>
|
3
|
+
<% phc_title_tagline "Create a New Category" %>
|
4
|
+
<% phc_breadcrumb_one yield(:phc_title) %>
|
5
|
+
<% phc_breadcrumb_two link_to "Category Index", phcdevworks_press.article_categories_path %>
|
6
|
+
<% phc_breadcrumb_three yield(:phc_title_tagline) %>
|
7
|
+
<!-- Title System -->
|
8
|
+
|
9
|
+
<!-- Page Bradcrumbs -->
|
10
|
+
<ol class="breadcrumb pull-right">
|
11
|
+
<li class="breadcrumb-item"><%= yield(:phc_breadcrumb_one) %></li>
|
12
|
+
<li class="breadcrumb-item"><%= yield(:phc_breadcrumb_two) %></li>
|
13
|
+
<li class="breadcrumb-item active"><%= yield(:phc_breadcrumb_three) %></li>
|
14
|
+
</ol>
|
15
|
+
<!-- Page Bradcrumbs -->
|
16
|
+
|
17
|
+
<!-- Page Header -->
|
18
|
+
<h1 class="page-header"><%= yield(:phc_title) %></h1>
|
19
|
+
<!-- Page Header -->
|
20
|
+
|
21
|
+
<!-- Page Content -->
|
22
|
+
<div class="panel panel-inverse">
|
23
|
+
<div class="panel-heading">
|
24
|
+
<div class="panel-heading-btn">
|
25
|
+
<a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default" data-click="panel-expand"><i class="fa fa-expand"></i></a>
|
26
|
+
<a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-success" data-click="panel-reload"><i class="fa fa-redo"></i></a>
|
27
|
+
<a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-warning" data-click="panel-collapse"><i class="fa fa-minus"></i></a>
|
28
|
+
</div>
|
29
|
+
<h4 class="panel-title"><%= yield(:phc_title) %></h4>
|
30
|
+
</div>
|
31
|
+
<div class="panel-body">
|
32
|
+
<!-- Form for New Article Category -->
|
33
|
+
<%= render 'form', article_category: @article_category %>
|
34
|
+
<!-- Form for New Article Category -->
|
35
|
+
</div>
|
36
|
+
</div>
|
37
|
+
<!-- Page Content -->
|