phcdevworks_press 5.0.0 → 7.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/phcdevworks_press/list/items.coffee +3 -0
  3. data/app/assets/javascripts/phcdevworks_press/list/posts.coffee +3 -0
  4. data/app/assets/javascripts/phcdevworks_press/review/posts.coffee +3 -0
  5. data/app/assets/stylesheets/phcdevworks_press/list/items.scss +3 -0
  6. data/app/assets/stylesheets/phcdevworks_press/list/posts.scss +3 -0
  7. data/app/assets/stylesheets/phcdevworks_press/review/posts.scss +3 -0
  8. data/app/assets/stylesheets/scaffolds.scss +65 -0
  9. data/app/controllers/phcdevworks_press/article/posts_controller.rb +1 -1
  10. data/app/controllers/phcdevworks_press/blog/articles_controller.rb +1 -1
  11. data/app/controllers/phcdevworks_press/list/items_controller.rb +89 -0
  12. data/app/controllers/phcdevworks_press/list/posts_controller.rb +82 -0
  13. data/app/controllers/phcdevworks_press/review/posts_controller.rb +82 -0
  14. data/app/helpers/phcdevworks_press/list/items_helper.rb +4 -0
  15. data/app/helpers/phcdevworks_press/list/posts_helper.rb +4 -0
  16. data/app/helpers/phcdevworks_press/review/posts_helper.rb +4 -0
  17. data/app/models/phcdevworks_press/article/post.rb +8 -8
  18. data/app/models/phcdevworks_press/article_post_versions.rb +1 -1
  19. data/app/models/phcdevworks_press/list.rb +7 -0
  20. data/app/models/phcdevworks_press/list/item.rb +33 -0
  21. data/app/models/phcdevworks_press/list/post.rb +34 -0
  22. data/app/models/phcdevworks_press/list_item_versions.rb +5 -0
  23. data/app/models/phcdevworks_press/list_post_versions.rb +5 -0
  24. data/app/models/phcdevworks_press/review.rb +7 -0
  25. data/app/models/phcdevworks_press/review/post.rb +33 -0
  26. data/app/models/phcdevworks_press/review_post_versions.rb +5 -0
  27. data/app/views/layouts/phcdevworks_press/components/backend/sidebars/_side_menu.html.erb +54 -21
  28. data/app/views/phcdevworks_press/article/posts/_form.html.erb +17 -13
  29. data/app/views/phcdevworks_press/article/posts/index.html.erb +3 -3
  30. data/app/views/phcdevworks_press/list/items/_form.html.erb +37 -0
  31. data/app/views/phcdevworks_press/list/items/edit.html.erb +47 -0
  32. data/app/views/phcdevworks_press/list/items/index.html.erb +81 -0
  33. data/app/views/phcdevworks_press/list/items/new.html.erb +48 -0
  34. data/app/views/phcdevworks_press/list/items/show.html.erb +0 -0
  35. data/app/views/phcdevworks_press/list/posts/_form.html.erb +88 -0
  36. data/app/views/phcdevworks_press/list/posts/edit.html.erb +23 -0
  37. data/app/views/phcdevworks_press/list/posts/index.html.erb +84 -0
  38. data/app/views/phcdevworks_press/list/posts/new.html.erb +23 -0
  39. data/app/views/phcdevworks_press/list/posts/show.html.erb +76 -0
  40. data/app/views/phcdevworks_press/review/posts/_form.html.erb +92 -0
  41. data/app/views/phcdevworks_press/review/posts/edit.html.erb +23 -0
  42. data/app/views/phcdevworks_press/review/posts/index.html.erb +83 -0
  43. data/app/views/phcdevworks_press/review/posts/new.html.erb +23 -0
  44. data/app/views/phcdevworks_press/review/posts/show.html.erb +9 -0
  45. data/config/routes.rb +28 -16
  46. data/db/migrate/20170517064030_create_phcdevworks_press_article_post_versions.rb +18 -0
  47. data/db/migrate/20190805232522_create_phcdevworks_press_article_posts.rb +5 -4
  48. data/db/migrate/20191024232406_create_phcdevworks_press_article_categories_posts.rb +10 -0
  49. data/db/migrate/{20170517064030_create_phcdevworks_press_post_versions.rb → 20200708231335_create_phcdevworks_press_list_post_versions.rb} +18 -17
  50. data/db/migrate/20200708231351_create_phcdevworks_press_review_post_versions.rb +18 -0
  51. data/db/migrate/20200712064624_create_phcdevworks_press_list_posts.rb +19 -0
  52. data/db/migrate/20200712064740_create_phcdevworks_press_review_posts.rb +21 -0
  53. data/db/migrate/20200712064920_create_phcdevworks_press_list_items.rb +22 -0
  54. data/db/migrate/20200712065808_create_phcdevworks_press_list_item_versions.rb +18 -0
  55. data/db/migrate/20200716224648_create_phcdevworks_press_review_categories_posts.rb +10 -0
  56. data/db/migrate/20200716224738_create_phcdevworks_press_list_categories_posts.rb +10 -0
  57. data/lib/phcdevworks_press/version.rb +1 -1
  58. metadata +70 -26
  59. data/db/migrate/20191024232406_create_phcdevworks_press_categories_posts.rb +0 -10
@@ -0,0 +1,33 @@
1
+ module PhcdevworksPress
2
+ class List::Item < ApplicationRecord
3
+
4
+ # Clean URL Initialize
5
+ extend FriendlyId
6
+
7
+ # Paper Trail Initialize
8
+ has_paper_trail :class_name => "PhcdevworksPress::ListItemVersions"
9
+
10
+ # Image Upload
11
+ has_one_attached :list_item_image
12
+
13
+ # Relationships
14
+ belongs_to :user, class_name: "PhcdevworksAccounts::User"
15
+ belongs_to :post, class_name: "PhcdevworksPress::List::Post"
16
+ belongs_to :optimization, class_name: "PhcdevworksCoreModules::Marketing::Optimization", optional: true
17
+
18
+ # Form Fields Validation
19
+ validates :list_item_title,
20
+ presence: true
21
+
22
+ validates :list_item_text,
23
+ presence: true
24
+
25
+ # Clean URL Define
26
+ friendly_id :list_item_nice_urls, use: [:slugged, :finders]
27
+
28
+ def list_item_nice_urls
29
+ [:list_item_title]
30
+ end
31
+
32
+ end
33
+ end
@@ -0,0 +1,34 @@
1
+ module PhcdevworksPress
2
+ class List::Post < ApplicationRecord
3
+
4
+ # Clean URL Initialize
5
+ extend FriendlyId
6
+
7
+ # Paper Trail Initialize
8
+ has_paper_trail :class_name => "PhcdevworksPress::ListPostVersions"
9
+
10
+ # Image Upload
11
+ has_one_attached :list_post_image
12
+
13
+ # Relationships
14
+ belongs_to :user, class_name: "PhcdevworksAccounts::User"
15
+ has_many :items, class_name: "PhcdevworksPress::List::Item", :dependent => :destroy
16
+ has_and_belongs_to_many :categories, class_name: "PhcdevworksCoreModules::Post::Category", :join_table => "phcdevworks_press_list_categories_posts", :dependent => :destroy
17
+ belongs_to :optimization, class_name: "PhcdevworksCoreModules::Marketing::Optimization", optional: true
18
+
19
+ # Form Fields Validation
20
+ validates :list_post_title,
21
+ presence: true
22
+
23
+ validates :list_post_text,
24
+ presence: true
25
+
26
+ # Clean URL Define
27
+ friendly_id :list_post_nice_urls, use: [:slugged, :finders]
28
+
29
+ def list_post_nice_urls
30
+ [:list_post_title]
31
+ end
32
+
33
+ end
34
+ end
@@ -0,0 +1,5 @@
1
+ module PhcdevworksPress
2
+ class ListItemVersions < PaperTrail::Version
3
+ self.table_name = :phcdevworks_press_list_item_versions
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ module PhcdevworksPress
2
+ class ListPostVersions < PaperTrail::Version
3
+ self.table_name = :phcdevworks_press_list_post_versions
4
+ end
5
+ end
@@ -0,0 +1,7 @@
1
+ module PhcdevworksPress
2
+ module Review
3
+ def self.table_name_prefix
4
+ 'phcdevworks_press_review_'
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,33 @@
1
+ module PhcdevworksPress
2
+ class Review::Post < ApplicationRecord
3
+
4
+ # Clean URL Initialize
5
+ extend FriendlyId
6
+
7
+ # Paper Trail Initialize
8
+ has_paper_trail :class_name => "PhcdevworksPress::ReviewPostVersions"
9
+
10
+ # Image Upload
11
+ has_one_attached :review_post_image
12
+
13
+ # Relationships
14
+ belongs_to :user, class_name: "PhcdevworksAccounts::User"
15
+ has_and_belongs_to_many :categories, class_name: "PhcdevworksCoreModules::Post::Category", :join_table => "phcdevworks_press_review_categories_posts", :dependent => :destroy
16
+ belongs_to :optimization, class_name: "PhcdevworksCoreModules::Marketing::Optimization", optional: true
17
+
18
+ # Form Fields Validation
19
+ validates :review_post_title,
20
+ presence: true
21
+
22
+ validates :review_post_text,
23
+ presence: true
24
+
25
+ # Clean URL Define
26
+ friendly_id :article_review_nice_urls, use: [:slugged, :finders]
27
+
28
+ def article_review_nice_urls
29
+ [:review_post_text]
30
+ end
31
+
32
+ end
33
+ end
@@ -0,0 +1,5 @@
1
+ module PhcdevworksPress
2
+ class ReviewPostVersions < PaperTrail::Version
3
+ self.table_name = :phcdevworks_press_review_post_versions
4
+ end
5
+ end
@@ -45,18 +45,40 @@
45
45
  <a href="javascript:;">
46
46
  <b class="caret"></b>
47
47
  <i class="fad fa-newspaper"></i>
48
- <span>Article Posts</span>
48
+ <span>Blog Articles</span>
49
49
  </a>
50
50
  <ul class="sub-menu">
51
51
  <li class="<%= phc_menu_active_controller("phcdevworks_press/article/posts") %>"><%= link_to("Article Index", phcdevworks_press.article_posts_path) %></li>
52
- <li class="<%= phc_menu_active_controller("phcdevworks_press/article/posts#new") %>"><%= link_to("New Aritcle", phcdevworks_press.new_article_post_path) %></li>
52
+ <li class="<%= phc_menu_active_controller("phcdevworks_press/article/posts#new") %>"><%= link_to("Add a New Aritcle", phcdevworks_press.new_article_post_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-star-half"></i>
59
+ <span>Review Articles</span>
60
+ </a>
61
+ <ul class="sub-menu">
62
+ <li class="<%= phc_menu_active_controller("phcdevworks_press/review/posts") %>"><%= link_to("Reviews Index", phcdevworks_press.review_posts_path) %></li>
63
+ <li class="<%= phc_menu_active_controller("phcdevworks_press/review/posts#new") %>"><%= link_to("Add a New Review", phcdevworks_press.new_review_post_path) %></li>
64
+ </ul>
65
+ </li>
66
+ <li class="has-sub">
67
+ <a href="javascript:;">
68
+ <b class="caret"></b>
69
+ <i class="fad fa-th-list"></i>
70
+ <span>List Articles</span>
71
+ </a>
72
+ <ul class="sub-menu">
73
+ <li class="<%= phc_menu_active_controller("phcdevworks_press/list/posts") %>"><%= link_to("Lists Index", phcdevworks_press.list_posts_path) %></li>
74
+ <li class="<%= phc_menu_active_controller("phcdevworks_press/list/posts#new") %>"><%= link_to("Add a New List", phcdevworks_press.new_list_post_path) %></li>
53
75
  </ul>
54
76
  </li>
55
77
  <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Press -->
56
78
  <% end %>
57
79
 
58
80
  <% if defined?phcdevworks_portfolio %>
59
- <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Press -->
81
+ <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Portfolio -->
60
82
  <li class="nav-header">Portfolio</li>
61
83
  <li class="has-sub">
62
84
  <a href="javascript:;">
@@ -80,7 +102,7 @@
80
102
  <li class="<%= phc_menu_active_controller("phcdevworks_portfolio/project/posts#new") %>"><%= link_to("New Types", phcdevworks_portfolio.new_project_type_path) %></li>
81
103
  </ul>
82
104
  </li>
83
- <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Press -->
105
+ <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Portfolio -->
84
106
  <% end %>
85
107
 
86
108
  <% if defined?phcdevworks_tutorials %>
@@ -112,23 +134,6 @@
112
134
  <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Tutorials -->
113
135
  <% end %>
114
136
 
115
- <% if defined?phcdevworks_core_modules %>
116
- <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Press -->
117
- <li class="nav-header">Core Modules</li>
118
- <li class="has-sub">
119
- <a href="javascript:;">
120
- <b class="caret"></b>
121
- <i class="fad fa-sitemap"></i>
122
- <span>Categories</span>
123
- </a>
124
- <ul class="sub-menu">
125
- <li class="<%= phc_menu_active_controller("phcdevworks_core_modules/modules/categories") %>"><%= link_to("Category Index", phcdevworks_core_modules.modules_categories_path) %></li>
126
- <li class="<%= phc_menu_active_controller("phcdevworks_core_modules/modules/categories#new") %>"><%= link_to("New Category", phcdevworks_core_modules.new_modules_category_path) %></li>
127
- </ul>
128
- </li>
129
- <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Press -->
130
- <% end %>
131
-
132
137
  <% if defined?phcdevworks_members %>
133
138
  <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Members -->
134
139
  <li class="nav-header">Membership Manager</li>
@@ -227,6 +232,34 @@
227
232
  <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks RealEstate -->
228
233
  <% end %>
229
234
 
235
+ <% if defined?phcdevworks_core_modules %>
236
+ <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Core Modules -->
237
+ <li class="nav-header">Core Modules</li>
238
+ <li class="has-sub">
239
+ <a href="javascript:;">
240
+ <b class="caret"></b>
241
+ <i class="fad fa-sitemap"></i>
242
+ <span>Categories</span>
243
+ </a>
244
+ <ul class="sub-menu">
245
+ <li class="<%= phc_menu_active_controller("phcdevworks_core_modules/post/categories") %>"><%= link_to("Category Index", phcdevworks_core_modules.post_categories_path) %></li>
246
+ <li class="<%= phc_menu_active_controller("phcdevworks_core_modules/post/categories#new") %>"><%= link_to("New Category", phcdevworks_core_modules.new_post_category_path) %></li>
247
+ </ul>
248
+ </li>
249
+ <li class="has-sub">
250
+ <a href="javascript:;">
251
+ <b class="caret"></b>
252
+ <i class="fad fa-analytics"></i>
253
+ <span>Marketing</span>
254
+ </a>
255
+ <ul class="sub-menu">
256
+ <li class="<%= phc_menu_active_controller("phcdevworks_core_modules/marketing/optimizations") %>"><%= link_to("SEO Data Index", phcdevworks_core_modules.marketing_optimizations_path) %></li>
257
+ <li class="<%= phc_menu_active_controller("phcdevworks_core_modules/marketing/optimizations#new") %>"><%= link_to("Add SEO Data", phcdevworks_core_modules.new_marketing_optimization_path) %></li>
258
+ </ul>
259
+ </li>
260
+ <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Core Modules -->
261
+ <% end %>
262
+
230
263
  <% if current_user && current_user.admin? %>
231
264
  <!-- -PHC- Sidebar - Sidebar Navigation - PHCAccounts Admin Options -->
232
265
  <li class="nav-header">User Administration</li>
@@ -10,8 +10,8 @@
10
10
  </div>
11
11
  <div class="panel-body">
12
12
  <div class="form-group field_with_errors">
13
- <%= form.label :post_status, "Post Status" %>
14
- <%= form.select( :post_status, [["Draft","draft"],["Published","published"],["Review","review"]], {}, {class: "form-control"}) %>
13
+ <%= form.label :article_post_status, "Post Status" %>
14
+ <%= form.select( :article_post_status, [["Draft","draft"],["Published","published"],["Review","review"]], {}, {class: "form-control"}) %>
15
15
  </div>
16
16
  <div class="actions">
17
17
  <%= form.submit class: "btn btn-primary" %>
@@ -27,13 +27,13 @@
27
27
  </div>
28
28
  <div class="panel-body">
29
29
  <div class="form-group field_with_errors">
30
- <%= form.label :post_image, "Featured Image" %>
31
- <%= form.file_field :post_image, class: "form-control" %>
30
+ <%= form.label :article_post_image, "Featured Image" %>
31
+ <%= form.file_field :article_post_image, class: "form-control" %>
32
32
  </div>
33
- <% if form.object.post_image.attached? %>
34
- <%= image_tag main_app.url_for(form.object.post_image), class: "img-responsive img-thumbnail" %>
35
- <%= form.label :remove_post_image %>
36
- <%= form.check_box :remove_post_image %>
33
+ <% if form.object.article_post_image.attached? %>
34
+ <%= image_tag main_app.url_for(form.object.article_post_image), class: "img-responsive img-thumbnail" %>
35
+ <%= form.label :remove_article_post_image %>
36
+ <%= form.check_box :remove_article_post_image %>
37
37
  <% end %>
38
38
  </div>
39
39
  </div>
@@ -42,13 +42,17 @@
42
42
  <!-- Panel - Article - Categories -->
43
43
  <div class="panel panel-inverse">
44
44
  <div class="panel-heading">
45
- <h4 class="panel-title">Post Categories</h4>
45
+ <h4 class="panel-title">Post Categories & SEO</h4>
46
46
  </div>
47
47
  <div class="panel-body">
48
- <%= form.collection_check_boxes :category_ids, PhcdevworksCoreModules::Modules::Category.all, :id, :category_name do |post_category| %>
48
+ <%= form.collection_check_boxes :category_ids, PhcdevworksCoreModules::Post::Category.all, :id, :post_category_name do |post_category| %>
49
49
  <%= post_category.check_box %>
50
50
  <%= post_category.label %><br>
51
51
  <% end %>
52
+ <div class="form-group">
53
+ <label>Attach SEO Data</label>
54
+ <%= collection_select(:article_post, :optimization_id, PhcdevworksCoreModules::Marketing::Optimization.order("marketing_optimization_page_title"), :id, :marketing_optimization_page_title, {include_blank: true}, {class: "form-control"}) %>
55
+ </div>
52
56
  </div>
53
57
  </div>
54
58
  <!-- Panel - Article - Categories -->
@@ -71,11 +75,11 @@
71
75
  </div>
72
76
  <div class="panel-body">
73
77
  <div class="form-group field_with_errors">
74
- <%= form.label :post_title, "Article Title" %>
75
- <%= form.text_field :post_title, class: "form-control" %>
78
+ <%= form.label :article_post_title, "Article Title" %>
79
+ <%= form.text_field :article_post_title, class: "form-control" %>
76
80
  </div>
77
81
  <div class="form-group ">
78
- <%= form.text_area :post_text, class: "form-control editor" %>
82
+ <%= form.text_area :article_post_text, class: "form-control editor" %>
79
83
  <div id="word-count" class="mt-3"></div>
80
84
  </div>
81
85
  </div>
@@ -48,9 +48,9 @@
48
48
  <tbody>
49
49
  <% @article_posts.each do |article_post| %>
50
50
  <tr>
51
- <td><%= article_post.post_title %></td>
52
- <td><%= truncate(article_post.post_text, :length => 80, :escape => false) %></td>
53
- <td><%= article_post.post_status.capitalize %></td>
51
+ <td><%= article_post.article_post_title %></td>
52
+ <td><%= truncate(article_post.article_post_text, :length => 80, :escape => false) %></td>
53
+ <td><%= article_post.article_post_status.capitalize %></td>
54
54
  <td>
55
55
  <div class="btn-group d-flex" role="group">
56
56
  <%= link_to "Update Post", edit_article_post_path(article_post), class: "btn btn-primary btn-xs" %>
@@ -0,0 +1,37 @@
1
+ <!-- Form - List Items - Posts -->
2
+ <%= form_with(model: [ @list_post, @list_item], url: form_url, local: true) do |form| %>
3
+
4
+ <!-- PHCNotifi Render Validation -->
5
+ <%= render "phcdevworks_notifications/bootstrap/validations", :object => @list_item %>
6
+ <!-- PHCNotifi Render Validation -->
7
+
8
+ <!-- Form Input Fields -->
9
+ <div class="form-group">
10
+ <%= form.label :list_item_title, "Product/Service Title" %>
11
+ <%= form.text_field :list_item_title, class: "form-control" %>
12
+ </div>
13
+
14
+ <div class="form-group">
15
+ <%= form.text_area :list_item_text, class: "form-control editor" %>
16
+ <div id="word-count" class="mt-3"></div>
17
+ </div>
18
+
19
+ <div class="form-group">
20
+ <%= form.label :list_item_url, "Product/Service URL" %>
21
+ <%= form.text_field :list_item_url, class: "form-control" %>
22
+ </div>
23
+
24
+ <div class="form-group">
25
+ <%= form.label :list_item_number, "Ordering Number" %>
26
+ <%= form.select( :list_item_number, [["01","01"],["02","02"],["03","03"],["04","04"],["05","05"],["06","06"],["07","07"],["08","08"],["09","09"],["10","10"],["11","11"],["12","12"],["13","13"],["14","14"],["15","15"],["16","16"],["17","17"],["18","18"],["19","19"],["20","20"]], {}, {class: "form-control"}) %>
27
+ </div>
28
+ <!-- Form Input Fields -->
29
+
30
+ <!-- Form Submition Button -->
31
+ <div class="actions">
32
+ <%= form.submit class: "btn btn-primary" %>
33
+ </div>
34
+ <!-- For Submition Button -->
35
+
36
+ <% end %>
37
+ <!-- Form - List Items - Posts -->
@@ -0,0 +1,47 @@
1
+ <!-- PHCTitleSEO Title Variables -->
2
+ <% phc_title "List Manager" %>
3
+ <% phc_title_tagline "Update List Item" %>
4
+ <% phc_breadcrumb_one yield(:phc_title) %>
5
+ <% phc_breadcrumb_two link_to "List Item Index", phcdevworks_press.list_posts_path %>
6
+ <!-- PHCTitleSEO Title Variables -->
7
+
8
+ <!-- Page Bradcrumbs -->
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>
12
+ </ol>
13
+ <!-- Page Bradcrumbs -->
14
+
15
+ <!-- Page Header -->
16
+ <h2 class="page-header"><%= yield(:phc_title) %></h2>
17
+ <!-- Page Header -->
18
+
19
+ <!-- Page Content -->
20
+ <div class="row">
21
+ <div class="col-lg-12">
22
+
23
+ <!-- Panel -->
24
+ <div class="panel panel-inverse">
25
+
26
+ <!-- Panel - Heading -->
27
+ <div class="panel-heading">
28
+ <h4 class="panel-title"><%= yield(:phc_title) %></h4>
29
+ </div>
30
+ <!-- Panel - Heading -->
31
+
32
+ <!-- Panel - Body -->
33
+ <div class="panel-body">
34
+
35
+ <!-- Edit Form -->
36
+ <%= render "form", { form_url: list_post_item_path } %>
37
+ <!-- Edit Form -->
38
+
39
+ </div>
40
+ <!-- Panel - Body -->
41
+
42
+ </div>
43
+ <!-- Panel -->
44
+
45
+ </div>
46
+ </div>
47
+ <!-- Page Content -->
@@ -0,0 +1,81 @@
1
+ <!-- PHCTitleSEO Title Variables -->
2
+ <% phc_title "List Manager" %>
3
+ <% phc_title_tagline "List Item Index" %>
4
+ <% phc_breadcrumb_one yield(:phc_title) %>
5
+ <% phc_breadcrumb_two yield(:phc_title_tagline) %>
6
+ <!-- PHCTitleSEO Title Variables -->
7
+
8
+ <!-- Page Bradcrumbs -->
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>
12
+ </ol>
13
+ <!-- Page Bradcrumbs -->
14
+
15
+ <!-- Page Header -->
16
+ <h2 class="page-header"><%= yield(:phc_title) %></h2>
17
+ <!-- Page Header -->
18
+
19
+ <!-- Page Content -->
20
+ <div class="row">
21
+ <div class="col-lg-12">
22
+
23
+ <!-- Panel -->
24
+ <div class="panel panel-inverse">
25
+
26
+ <!-- Panel - Heading -->
27
+ <div class="panel-heading">
28
+ <h4 class="panel-title"><%= yield(:phc_title) %></h4>
29
+ </div>
30
+ <!-- Panel - Heading -->
31
+
32
+ <!-- Panel - Body -->
33
+ <div class="panel-body">
34
+
35
+ <!-- Index - Table -->
36
+ <div class="table-responsive">
37
+ <table class="table table-striped table-bordered">
38
+
39
+ <thead>
40
+ <tr>
41
+ <th>Item Headline</th>
42
+ <th>Text Preview</th>
43
+ <th></th>
44
+ </tr>
45
+ </thead>
46
+
47
+ <tbody>
48
+ <% @list_items.each do |list_item| %>
49
+ <tr>
50
+ <td><%= list_item.list_item_title %></td>
51
+ <td><%= truncate(list_item.list_item_text, :length => 80, :escape => false) %></td>
52
+ <td>
53
+ <div class="btn-group d-flex" role="group">
54
+ <%= link_to "Update Item", edit_list_post_item_path(list_item.post, list_item), class: "btn btn-primary btn-xs" %>
55
+ <%= link_to "Remove Item", list_post_item_path(list_item.post, list_item), method: :delete, data: { confirm: "Are you sure? This Action Cannot be Reversed." }, class: "btn btn-danger btn-xs" %>
56
+ </div>
57
+ </td>
58
+ </tr>
59
+ <% end %>
60
+ </tbody>
61
+
62
+ </table>
63
+ </div>
64
+ <!-- Index - Table -->
65
+
66
+ <!-- New Button -->
67
+ <%= link_to phcdevworks_press.new_list_post_item_path, class: "btn btn-primary" do %>
68
+ <i class="fad fa-plus-circle"></i>
69
+ <%= "Add a New List Item" %>
70
+ <% end %>
71
+ <!-- New Button -->
72
+
73
+ </div>
74
+ <!-- Panel - Body -->
75
+
76
+ </div>
77
+ <!-- Panel -->
78
+
79
+ </div>
80
+ </div>
81
+ <!-- Page Content -->