phcpresspro 82.0.0 → 83.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +1 -1
  3. data/app/assets/javascripts/phcpresspro/application.js +0 -3
  4. data/app/assets/stylesheets/phcpresspro/application.scss +0 -2
  5. data/app/controllers/phcpresspro/api/v1/post_index.json.rabl +2 -2
  6. data/app/controllers/phcpresspro/api/v1/post_single.json.rabl +2 -2
  7. data/app/controllers/phcpresspro/application_controller.rb +19 -19
  8. data/app/controllers/phcpresspro/article/categories_controller.rb +15 -16
  9. data/app/controllers/phcpresspro/article/posts_controller.rb +17 -18
  10. data/app/controllers/phcpresspro/blog/articles_controller.rb +5 -5
  11. data/app/models/phcpresspro/article/category.rb +7 -11
  12. data/app/models/phcpresspro/article/post.rb +8 -16
  13. data/app/views/layouts/phcpresspro/application.html.erb +8 -12
  14. data/app/views/layouts/phcpresspro/components/backend/footer/_footer.html.erb +5 -5
  15. data/app/views/layouts/phcpresspro/components/backend/navigation/_top_menu.html.erb +0 -41
  16. data/app/views/layouts/phcpresspro/components/backend/sidebars/_side_menu.html.erb +68 -61
  17. data/app/views/phcpresspro/article/categories/_form.html.erb +12 -3
  18. data/app/views/phcpresspro/article/categories/edit.html.erb +15 -3
  19. data/app/views/phcpresspro/article/categories/index.html.erb +23 -15
  20. data/app/views/phcpresspro/article/categories/new.html.erb +15 -3
  21. data/app/views/phcpresspro/article/posts/_form.html.erb +22 -14
  22. data/app/views/phcpresspro/article/posts/edit.html.erb +3 -3
  23. data/app/views/phcpresspro/article/posts/index.html.erb +25 -20
  24. data/app/views/phcpresspro/article/posts/new.html.erb +3 -3
  25. data/app/views/phcpresspro/blog/articles/index.html.erb +57 -57
  26. data/config/routes.rb +13 -13
  27. data/db/migrate/20190315010932_create_phcpresspro_article_posts.rb +1 -1
  28. data/lib/phcpresspro/engine.rb +67 -66
  29. data/lib/phcpresspro/version.rb +1 -1
  30. data/lib/phcpresspro.rb +0 -1
  31. metadata +62 -72
  32. data/app/assets/javascripts/phcpresspro/article/categories.js +0 -3
  33. data/app/assets/javascripts/phcpresspro/article/posts.js +0 -2
  34. data/app/assets/javascripts/phcpresspro/blog/articles.js +0 -0
  35. data/app/assets/javascripts/phcpresspro/custom/custom.js +0 -0
  36. data/app/assets/stylesheets/phcpresspro/article/categories.scss +0 -0
  37. data/app/assets/stylesheets/phcpresspro/article/posts.scss +0 -0
  38. data/app/assets/stylesheets/phcpresspro/blog/articles.scss +0 -3
  39. data/app/helpers/phcpresspro/blog/articles_helper.rb +0 -4
  40. data/app/views/phcpresspro/article/categories/show.html.erb +0 -9
  41. data/app/views/phcpresspro/article/posts/show.html.erb +0 -51
@@ -1,4 +1,4 @@
1
- <!-- Sidebar for Users and Admin -->
1
+ <!-- Sidebar for PHCDevworks Engines -->
2
2
  <div data-scrollbar="true" data-height="100%">
3
3
 
4
4
  <!-- Sidebar - User Profile Menu -->
@@ -34,11 +34,29 @@
34
34
  <% end %>
35
35
  </ul>
36
36
  <!-- Sidebar - User Profile Menu -->
37
+
37
38
  <!-- Sidebar - Sidebar Navigation -->
38
39
  <ul class="nav">
39
-
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
+
40
58
  <% if defined?phcpresspro %>
41
- <!-- Sidebar - Sidebar Navigation - PHCPress(Pro) -->
59
+ <!-- Sidebar - Sidebar Navigation - PHCPress -->
42
60
  <li class="nav-header">Article Management</li>
43
61
  <li class="has-sub">
44
62
  <a href="javascript:;">
@@ -47,8 +65,8 @@
47
65
  <span>Article Posts</span>
48
66
  </a>
49
67
  <ul class="sub-menu">
50
- <li class="<%= phc_menus_active_controller('phcpresspro/article/posts') %>"><%= link_to 'Article Index', phcpresspro.article_posts_path %></li>
51
- <li class="<%= phc_menus_active_controller('phcpresspro/article/posts#new') %>"><%= link_to 'New Aritcle', phcpresspro.new_article_post_path %></li>
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>
52
70
  </ul>
53
71
  </li>
54
72
  <li class="has-sub">
@@ -58,15 +76,15 @@
58
76
  <span>Article Categories</span>
59
77
  </a>
60
78
  <ul class="sub-menu">
61
- <li class="<%= phc_menus_active_controller('phcpresspro/article/categories') %>"><%= link_to 'Category Index', phcpresspro.article_categories_path %></li>
62
- <li class="<%= phc_menus_active_controller('phcpresspro/article/categories#new') %>"><%= link_to 'New Category', phcpresspro.new_article_category_path %></li>
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>
63
81
  </ul>
64
82
  </li>
65
- <!-- Sidebar - Sidebar Navigation - PHCPress(Pro) -->
83
+ <!-- Sidebar - Sidebar Navigation - PHCPress -->
66
84
  <% end %>
67
85
 
68
86
  <% if defined?phcmemberspro %>
69
- <!-- Sidebar - Sidebar Navigation - PHCPress(Pro) -->
87
+ <!-- Sidebar - Sidebar Navigation - PHCMembers -->
70
88
  <li class="nav-header">Membership Manager</li>
71
89
  <li class="has-sub">
72
90
  <a href="javascript:;">
@@ -75,8 +93,8 @@
75
93
  <span>Member's Data</span>
76
94
  </a>
77
95
  <ul class="sub-menu">
78
- <li class="<%= phc_menus_active_controller('phcmemberspro/member/profiles') %>"><%= link_to 'Profile Index', phcmemberspro.member_profiles_path %></li>
79
- <li class="<%= phc_menus_active_controller('phcmemberspro/member/profiles#new') %>"><%= link_to 'New Member Profile', phcmemberspro.new_member_profile_path %></li>
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>
80
98
  </ul>
81
99
  </li>
82
100
  <li class="has-sub">
@@ -86,43 +104,15 @@
86
104
  <span>Member's Directory</span>
87
105
  </a>
88
106
  <ul class="sub-menu">
89
- <li class="<%= phc_menus_active_controller('phcmemberspro/directory/categories') %>"><%= link_to 'Directory Index', phcmemberspro.directory_categories_path %></li>
90
- <li class="<%= phc_menus_active_controller('phcmemberspro/directory/categories#new') %>"><%= link_to 'New Directory Listing', phcmemberspro.new_directory_category_path %></li>
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>
91
109
  </ul>
92
110
  </li>
93
- <!-- Sidebar - Sidebar Navigation - PHCPress(Pro) -->
94
- <% end %>
95
-
96
- <% if defined?phcreallistingspro %>
97
- <!-- Sidebar - Sidebar Navigation - PHCPress(Pro) -->
98
- <li class="nav-header">Listing Management</li>
99
- <li class="has-sub">
100
- <a href="javascript:;">
101
- <b class="caret"></b>
102
- <i class="fas fa-store-alt"></i>
103
- <span>Property Listings</span>
104
- </a>
105
- <ul class="sub-menu">
106
- <li class="<%= phc_menus_active_controller('phcreallistingspro/property/listings') %>"><%= link_to 'Listing Index', phcreallistingspro.property_listings_path %></li>
107
- <li class="<%= phc_menus_active_controller('phcreallistingspro/property/listings#new') %>"><%= link_to 'New Listing', phcreallistingspro.new_property_listing_path %></li>
108
- </ul>
109
- </li>
110
- <li class="has-sub">
111
- <a href="javascript:;">
112
- <b class="caret"></b>
113
- <i class="fas fa-list-alt"></i>
114
- <span>Listing Features</span>
115
- </a>
116
- <ul class="sub-menu">
117
- <li class="<%= phc_menus_active_controller('phcreallistingspro/property/listings') %>"><%= link_to 'Features Index', phcreallistingspro.property_features_path %></li>
118
- <li class="<%= phc_menus_active_controller('phcreallistingspro/property/listings#new') %>"><%= link_to 'New Features', phcreallistingspro.new_property_feature_path %></li>
119
- </ul>
120
- </li>
121
- <!-- Sidebar - Sidebar Navigation - PHCPress(Pro) -->
111
+ <!-- Sidebar - Sidebar Navigation - PHCMembers -->
122
112
  <% end %>
123
113
 
124
114
  <% if defined?phcscriptcdnpro %>
125
- <!-- Sidebar - Sidebar Navigation - PHCScriptCDN(Pro) -->
115
+ <!-- Sidebar - Sidebar Navigation - PHCScriptCDN -->
126
116
  <li class="nav-header">Script Management</li>
127
117
  <li class="has-sub">
128
118
  <a href="javascript:;">
@@ -132,7 +122,7 @@
132
122
  </a>
133
123
  <ul class="sub-menu">
134
124
  <li class="<%= phc_menus_active_controller('phcscriptcdnpro/script/listings') %>"><%= link_to "All Script Listings", phcscriptcdnpro.script_listings_path %></li>
135
- <li class="<%= phc_menus_active_controller('phcscriptcdnpro/script/listings#new') %>"><%= link_to "Add a New Listing", phcscriptcdnpro.new_script_listing_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>
136
126
  </ul>
137
127
  </li>
138
128
  <li class="has-sub">
@@ -142,41 +132,58 @@
142
132
  <span>Script Extras</span>
143
133
  </a>
144
134
  <ul class="sub-menu">
145
- <li class="<%= phc_menus_active_controller('phcscriptcdnpro/script/authors') %>"><%= link_to "Script Authors", phcscriptcdnpro.script_authors_path %></li>
146
- <li class="<%= phc_menus_active_controller('phcscriptcdnpro/script/licences') %>"><%= link_to "Script Licences", phcscriptcdnpro.script_licences_path %></li>
147
- <li class="<%= phc_menus_active_controller('phcscriptcdnpro/script/extensions') %>"><%= link_to "Script Extensions", phcscriptcdnpro.script_extensions_path %></li>
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>
148
138
  <li class="<%= phc_menus_active_controller('phcscriptcdnpro/script/versions') %>"><%= link_to "Script Versions", phcscriptcdnpro.script_versions_path %></li>
149
139
  </ul>
150
140
  </li>
151
- <!-- Sidebar - Sidebar Navigation - PHCScriptCDN(Pro) -->
141
+ <!-- Sidebar - Sidebar Navigation - PHCScriptCDN -->
152
142
  <% end %>
153
143
 
154
- <% if current_user %>
155
- <!-- Sidebar - Sidebar Navigation - PHCAccountsPro -->
156
- <li class="nav-header">Account Settings</li>
144
+ <% if current_user && current_user.admin? %>
145
+ <!-- Sidebar - Sidebar Navigation - PHCAccounts Admin Options -->
146
+ <li class="nav-header">User Administration</li>
157
147
  <li class="has-sub">
158
148
  <a href="javascript:;">
159
149
  <b class="caret"></b>
160
150
  <i class="fas fa-user"></i>
161
- <span>Accounts Dashboard</span>
151
+ <span>Admin</span>
162
152
  </a>
163
153
  <ul class="sub-menu">
164
- <li class="<%= phc_menus_active_controller('phcaccountspro/admin/edit') %>"><%= link_to 'Settings', phcaccountspro.edit_user_registration_path %></li>
165
- <li class="<%= phc_menus_active_controller('phcaccountspro/admin/new') %>"><%= link_to 'Logout', phcaccountspro.destroy_user_session_path, method: :delete %></li>
154
+ <li class="<%= phc_menus_active_controller('phcaccountspro/admin/users') %>"><%= link_to 'User List', phcaccountspro.admin_users_path %></li>
166
155
  </ul>
167
156
  </li>
168
- <!-- Sidebar - Sidebar Navigation - PHCAccountsPro -->
169
- <!-- Sidebar - Sidebar Minifier -->
170
- <li>
171
- <a href="javascript:;" class="sidebar-minify-btn" data-click="sidebar-minify">
172
- <i class="fa fa-angle-double-left"></i>
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>
173
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>
174
173
  </li>
175
- <!-- Sidebar - Sidebar Minifier -->
174
+ <!-- Sidebar - Sidebar Navigation - PHCAccounts User Options -->
176
175
  <% end %>
177
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
+
178
185
  </ul>
179
186
  <!-- Sidebar - Sidebar Navigation -->
180
187
 
181
188
  </div>
182
- <!-- Sidebar for Users and Admin -->
189
+ <!-- Sidebar for PHCDevworks Engines -->
@@ -1,13 +1,22 @@
1
+ <!-- Form - Article - Category -->
1
2
  <%= form_with(model: article_category, local: true) do |form| %>
2
3
 
3
- <!-- PHCPressPro - Category Form -->
4
- <div class="form-group">
4
+ <!-- PHCNotifi Render Validation -->
5
+ <%= render 'phcnotifi/default/validations', :object => @article_category %>
6
+ <!-- PHCNotifi Render Validation -->
7
+
8
+ <!-- Form Input Fields -->
9
+ <div class="form-group field_with_errors">
5
10
  <%= form.label :category_name, "Category Name" %>
6
11
  <%= form.text_field :category_name, class: "form-control" %>
7
12
  </div>
13
+ <!-- Form Input Fields -->
14
+
15
+ <!-- Form Submition Button -->
8
16
  <div class="actions">
9
17
  <%= form.submit class: "btn btn-primary" %>
10
18
  </div>
11
- <!-- PHCPressPro - Category Form -->
19
+ <!-- For Submition Button -->
12
20
 
13
21
  <% end %>
22
+ <!-- Form - Article - Category -->
@@ -6,6 +6,18 @@
6
6
  <% phc_breadcrumb_three yield(:phc_title_tagline) %>
7
7
  <!-- Title System -->
8
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
+
9
21
  <!-- Page Content -->
10
22
  <div class="panel panel-inverse">
11
23
  <div class="panel-heading">
@@ -14,12 +26,12 @@
14
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>
15
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>
16
28
  </div>
17
- <h4 class="panel-title"><%= yield(:phc_title_tagline) %></h4>
29
+ <h4 class="panel-title"><%= yield(:phc_title) %></h4>
18
30
  </div>
19
31
  <div class="panel-body">
20
- <!-- Table - Category Edit Form -->
32
+ <!-- Form to Edit Article Category -->
21
33
  <%= render 'form', article_category: @article_category %>
22
- <!-- Table - Category Edit Form -->
34
+ <!-- Form to Edit Article Category -->
23
35
  </div>
24
36
  </div>
25
37
  <!-- Page Content -->
@@ -8,29 +8,32 @@
8
8
 
9
9
  <!-- Page Bradcrumbs -->
10
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>
11
+ <li class="breadcrumb-item"><%= yield(:phc_breadcrumb_one) %></li>
12
+ <li class="breadcrumb-item active"><%= yield(:phc_breadcrumb_two) %></li>
13
13
  </ol>
14
14
  <!-- Page Bradcrumbs -->
15
15
 
16
16
  <!-- Page Header -->
17
17
  <h1 class="page-header"><%= yield(:phc_title) %></h1>
18
18
  <!-- Page Header -->
19
-
20
- <!-- Page Content -->
19
+
20
+ <!-- Page & Panel Content -->
21
21
  <div class="panel panel-inverse">
22
- <div class="panel-heading">
23
- <div class="panel-heading-btn">
24
- <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default" data-click="panel-expand"><i class="fa fa-expand"></i></a>
25
- <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-success" data-click="panel-reload"><i class="fa fa-redo"></i></a>
26
- <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-warning" data-click="panel-collapse"><i class="fa fa-minus"></i></a>
27
- </div>
28
- <h4 class="panel-title"><%= yield(:phc_title_tagline) %></h4>
29
- </div>
30
- <div class="panel-body">
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">
31
34
  <!-- Table - Category Index -->
32
35
  <div class="table-responsive">
33
- <table class="table table-striped table-bordered table-hover dataTables-example">
36
+ <table class="table table-striped table-bordered">
34
37
  <thead>
35
38
  <tr>
36
39
  <th>Category Name</th>
@@ -41,7 +44,12 @@
41
44
  <% @article_categories.each do |article_category| %>
42
45
  <tr>
43
46
  <td><%= link_to article_category.category_name, phcpresspro.edit_article_category_path(article_category) %></td>
44
- <td><%= link_to 'Trash', article_category, class: "btn btn-danger btn-xs", method: :delete, data: { confirm: 'Are you sure?' } %></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>
45
53
  </tr>
46
54
  <% end %>
47
55
  </tbody>
@@ -6,6 +6,18 @@
6
6
  <% phc_breadcrumb_three yield(:phc_title_tagline) %>
7
7
  <!-- Title System -->
8
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
+
9
21
  <!-- Page Content -->
10
22
  <div class="panel panel-inverse">
11
23
  <div class="panel-heading">
@@ -14,12 +26,12 @@
14
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>
15
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>
16
28
  </div>
17
- <h4 class="panel-title"><%= yield(:phc_title_tagline) %></h4>
29
+ <h4 class="panel-title"><%= yield(:phc_title) %></h4>
18
30
  </div>
19
31
  <div class="panel-body">
20
- <!-- Table - Category New Form -->
32
+ <!-- Form for New Article Category -->
21
33
  <%= render 'form', article_category: @article_category %>
22
- <!-- Table - Category New Form -->
34
+ <!-- Form for New Article Category -->
23
35
  </div>
24
36
  </div>
25
37
  <!-- Page Content -->
@@ -1,28 +1,32 @@
1
1
  <%= form_with(model: article_post, local: true) do |form| %>
2
2
  <div class="row">
3
+
3
4
  <div class="col-md-3">
4
5
 
6
+ <!-- Panel - Publishing -->
5
7
  <div class="panel panel-inverse">
6
8
  <div class="panel-heading">
7
9
  <h4 class="panel-title">Publish Panel</h4>
8
10
  </div>
9
11
  <div class="panel-body">
10
- <div class="form-group">
12
+ <div class="form-group field_with_errors">
11
13
  <%= form.label :post_status, "Post Status" %>
12
14
  <%= form.select( :post_status, [['Draft','draft'],['Published','published'],['Review','review']], {}, {class: "form-control form-control-sm"}) %>
13
15
  </div>
14
16
  <div class="actions">
15
- <%= form.submit class: "btn btn-primary waves-effect" %>
17
+ <%= form.submit class: "btn btn-primary" %>
16
18
  </div>
17
19
  </div>
18
20
  </div>
21
+ <!-- Panel - Publishing -->
19
22
 
23
+ <!-- Panel - Image Uploading -->
20
24
  <div class="panel panel-inverse">
21
25
  <div class="panel-heading">
22
- <h4 class="panel-title">Post Images</h4>
26
+ <h4 class="panel-title">Post Images</h4>
23
27
  </div>
24
28
  <div class="panel-body">
25
- <div class="form-group">
29
+ <div class="form-group field_with_errors">
26
30
  <%= form.label :post_image, "Featured Image" %>
27
31
  <%= form.file_field :post_image, class: "form-control" %>
28
32
  </div>
@@ -33,41 +37,45 @@
33
37
  <% end %>
34
38
  </div>
35
39
  </div>
40
+ <!-- Panel - Image Uploading -->
36
41
 
42
+ <!-- Panel - Article - Categories -->
37
43
  <div class="panel panel-inverse">
38
44
  <div class="panel-heading">
39
45
  <h4 class="panel-title">Post Categories</h4>
40
46
  </div>
41
47
  <div class="panel-body">
42
- <%= form.collection_check_boxes :category_ids, Phcpresspro::Article::Category.where(org_id: current_user.org_id), :id, :category_name do |post_category| %>
48
+ <%= form.collection_check_boxes :category_ids, Phcpresspro::Article::Category.all, :id, :category_name do |post_category| %>
43
49
  <%= post_category.check_box %>
44
- <%= post_category.label %></br>
50
+ <%= post_category.label %><br>
45
51
  <% end %>
46
52
  </div>
47
53
  </div>
54
+ <!-- Panel - Article - Categories -->
48
55
 
49
56
  </div>
57
+
50
58
  <div class="col-md-9 ">
51
59
 
52
60
  <!-- PHCNotifi Render Validation -->
53
- <%= render 'phcnotifi/validations', :object => @article_post %>
61
+ <%= render 'phcnotifi/default/validations', :object => @article_post %>
54
62
  <!-- PHCNotifi Render Validation -->
55
63
 
56
64
  <div class="panel panel-inverse">
57
65
  <div class="panel-heading">
58
66
  <div class="panel-heading-btn">
59
- <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default" data-click="panel-expand"><i class="fa fa-expand"></i></a>
60
- <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-success" data-click="panel-reload"><i class="fa fa-redo"></i></a>
61
- <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-warning" data-click="panel-collapse"><i class="fa fa-minus"></i></a>
67
+ <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default" data-click="panel-expand"><i class="fa fa-expand"></i></a>
68
+ <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-success" data-click="panel-reload"><i class="fa fa-redo"></i></a>
69
+ <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-warning" data-click="panel-collapse"><i class="fa fa-minus"></i></a>
62
70
  </div>
63
71
  <h4 class="panel-title"><%= yield(:phc_title_tagline) %></h4>
64
72
  </div>
65
73
  <div class="panel-body ">
66
- <div class="form-group">
67
- <%= form.label :post_tittle, "Article Title" %>
68
- <%= form.text_field :post_tittle, class: "form-control" %>
74
+ <div class="form-group field_with_errors">
75
+ <%= form.label :post_title, "Article Title" %>
76
+ <%= form.text_field :post_title, class: "form-control" %>
69
77
  </div>
70
- <div class="form-group">
78
+ <div class="form-group field_with_errors">
71
79
  <%= form.text_area :post_text, :class => "ckeditor form-control", :id => "editor1", :rows => 20, :cols => 60 %>
72
80
  </div>
73
81
  </div>
@@ -17,7 +17,7 @@
17
17
  <!-- Page Header -->
18
18
  <h1 class="page-header"><%= yield(:phc_title) %></h1>
19
19
  <!-- Page Header -->
20
-
21
- <!-- Page Content -->
20
+
21
+ <!-- Form to Edit Article Post -->
22
22
  <%= render 'form', article_post: @article_post %>
23
- <!-- Page Content -->
23
+ <!-- Form to Edit Article Post -->
@@ -7,29 +7,32 @@
7
7
 
8
8
  <!-- Page Bradcrumbs -->
9
9
  <ol class="breadcrumb pull-right">
10
- <li class="breadcrumb-item"><%= yield(:phc_breadcrumb_one) %></li>
11
- <li class="breadcrumb-item active"><%= yield(:phc_breadcrumb_two) %></li>
10
+ <li class="breadcrumb-item"><%= yield(:phc_breadcrumb_one) %></li>
11
+ <li class="breadcrumb-item active"><%= yield(:phc_breadcrumb_two) %></li>
12
12
  </ol>
13
13
  <!-- Page Bradcrumbs -->
14
14
 
15
15
  <!-- Page Header -->
16
16
  <h1 class="page-header"><%= yield(:phc_title) %></h1>
17
17
  <!-- Page Header -->
18
-
19
- <!-- Page Content -->
18
+
19
+ <!-- Page & Panel Content -->
20
20
  <div class="panel panel-inverse">
21
- <div class="panel-heading">
22
- <div class="panel-heading-btn">
23
- <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default" data-click="panel-expand"><i class="fa fa-expand"></i></a>
24
- <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-success" data-click="panel-reload"><i class="fa fa-redo"></i></a>
25
- <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-warning" data-click="panel-collapse"><i class="fa fa-minus"></i></a>
26
- </div>
27
- <h4 class="panel-title"><%= yield(:phc_title_tagline) %></h4>
28
- </div>
29
- <div class="panel-body">
21
+ <!-- Panel Heading -->
22
+ <div class="panel-heading">
23
+ <div class="panel-heading-btn">
24
+ <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default" data-click="panel-expand"><i class="fa fa-expand"></i></a>
25
+ <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-success" data-click="panel-reload"><i class="fa fa-redo"></i></a>
26
+ <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-warning" data-click="panel-collapse"><i class="fa fa-minus"></i></a>
27
+ </div>
28
+ <h4 class="panel-title"><%= yield(:phc_title_tagline) %></h4>
29
+ </div>
30
+ <!-- Panel Heading -->
31
+ <!-- Panel Body -->
32
+ <div class="panel-body">
30
33
  <!-- Table - Article Index -->
31
34
  <div class="table-responsive">
32
- <table class="table table-striped table-bordered table-hover dataTables-example">
35
+ <table class="table table-striped table-bordered">
33
36
  <thead>
34
37
  <tr>
35
38
  <th>Post Headline</th>
@@ -41,18 +44,20 @@
41
44
  <tbody>
42
45
  <% @article_posts.each do |article_post| %>
43
46
  <tr>
44
- <td><%= article_post.post_tittle %></td>
47
+ <td><%= article_post.post_title %></td>
45
48
  <td><%= truncate(article_post.post_text, :length => 80, :escape => false) %></td>
46
49
  <td><%= article_post.post_status.capitalize %></td>
47
- <td><div class="btn-group" role="group" aria-label="Blog Articles">
48
- <%= link_to 'Edit Post', edit_article_post_path(article_post), class: "btn btn-primary btn-xs" %>
49
- <%= link_to 'Trash Post', article_post, class: "btn btn-danger btn-xs", method: :delete, data: { confirm: 'Are you sure?' } %>
50
- </div></td>
50
+ <td>
51
+ <div class="btn-group d-flex" role="group">
52
+ <%= link_to 'Update Post', edit_article_post_path(article_post), class: "btn btn-primary btn-xs" %>
53
+ <%= link_to 'Remove Post', article_post, class: "btn btn-danger btn-xs", method: :delete, data: { confirm: 'Are you sure?' } %>
54
+ </div>
55
+ </td>
51
56
  </tr>
52
57
  <% end %>
53
58
  </tbody>
54
59
  </table>
55
- <%= link_to phcpresspro.new_article_post_path, class: "btn btn-primary btn-sm" do %>
60
+ <%= link_to phcpresspro.new_article_post_path, class: "btn btn-primary" do %>
56
61
  <i class="fas fa-plus-circle"></i>
57
62
  <%= "Add a New Article Post" %>
58
63
  <% end %>
@@ -17,7 +17,7 @@
17
17
  <!-- Page Header -->
18
18
  <h1 class="page-header"><%= yield(:phc_title) %></h1>
19
19
  <!-- Page Header -->
20
-
21
- <!-- Page Content -->
20
+
21
+ <!-- Form for New Article Post -->
22
22
  <%= render 'form', article_post: @article_post %>
23
- <!-- Page Content -->
23
+ <!-- Form for New Article Post -->