phcdevworks_press 6.0.0 → 7.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/phcdevworks_press/list/items.coffee +3 -0
- data/app/assets/javascripts/phcdevworks_press/list/posts.coffee +3 -0
- data/app/assets/javascripts/phcdevworks_press/review/posts.coffee +3 -0
- data/app/assets/stylesheets/phcdevworks_press/list/items.scss +3 -0
- data/app/assets/stylesheets/phcdevworks_press/list/posts.scss +3 -0
- data/app/assets/stylesheets/phcdevworks_press/review/posts.scss +3 -0
- data/app/assets/stylesheets/scaffolds.scss +65 -0
- data/app/controllers/phcdevworks_press/article/posts_controller.rb +1 -1
- data/app/controllers/phcdevworks_press/list/items_controller.rb +89 -0
- data/app/controllers/phcdevworks_press/list/posts_controller.rb +82 -0
- data/app/controllers/phcdevworks_press/review/posts_controller.rb +82 -0
- data/app/helpers/phcdevworks_press/list/items_helper.rb +4 -0
- data/app/helpers/phcdevworks_press/list/posts_helper.rb +4 -0
- data/app/helpers/phcdevworks_press/review/posts_helper.rb +4 -0
- data/app/models/phcdevworks_press/article/post.rb +7 -7
- data/app/models/phcdevworks_press/article_post_versions.rb +1 -1
- data/app/models/phcdevworks_press/list.rb +7 -0
- data/app/models/phcdevworks_press/list/item.rb +33 -0
- data/app/models/phcdevworks_press/list/post.rb +34 -0
- data/app/models/phcdevworks_press/list_item_versions.rb +5 -0
- data/app/models/phcdevworks_press/list_post_versions.rb +5 -0
- data/app/models/phcdevworks_press/review.rb +7 -0
- data/app/models/phcdevworks_press/review/post.rb +33 -0
- data/app/models/phcdevworks_press/review_post_versions.rb +5 -0
- data/app/views/layouts/phcdevworks_press/components/backend/sidebars/_side_menu.html.erb +54 -32
- data/app/views/phcdevworks_press/article/posts/_form.html.erb +12 -12
- data/app/views/phcdevworks_press/article/posts/index.html.erb +3 -3
- data/app/views/phcdevworks_press/list/items/_form.html.erb +37 -0
- data/app/views/phcdevworks_press/list/items/edit.html.erb +47 -0
- data/app/views/phcdevworks_press/list/items/index.html.erb +81 -0
- data/app/views/phcdevworks_press/list/items/new.html.erb +48 -0
- data/app/views/phcdevworks_press/list/items/show.html.erb +0 -0
- data/app/views/phcdevworks_press/list/posts/_form.html.erb +88 -0
- data/app/views/phcdevworks_press/list/posts/edit.html.erb +23 -0
- data/app/views/phcdevworks_press/list/posts/index.html.erb +84 -0
- data/app/views/phcdevworks_press/list/posts/new.html.erb +23 -0
- data/app/views/phcdevworks_press/list/posts/show.html.erb +76 -0
- data/app/views/phcdevworks_press/review/posts/_form.html.erb +92 -0
- data/app/views/phcdevworks_press/review/posts/edit.html.erb +23 -0
- data/app/views/phcdevworks_press/review/posts/index.html.erb +83 -0
- data/app/views/phcdevworks_press/review/posts/new.html.erb +23 -0
- data/app/views/phcdevworks_press/review/posts/show.html.erb +9 -0
- data/config/routes.rb +28 -16
- data/db/migrate/20170517064030_create_phcdevworks_press_article_post_versions.rb +18 -0
- data/db/migrate/20190805232522_create_phcdevworks_press_article_posts.rb +5 -4
- data/db/migrate/20191024232406_create_phcdevworks_press_article_categories_posts.rb +10 -0
- data/db/migrate/{20170517064030_create_phcdevworks_press_post_versions.rb → 20200708231335_create_phcdevworks_press_list_post_versions.rb} +18 -17
- data/db/migrate/20200708231351_create_phcdevworks_press_review_post_versions.rb +18 -0
- data/db/migrate/20200712064624_create_phcdevworks_press_list_posts.rb +19 -0
- data/db/migrate/20200712064740_create_phcdevworks_press_review_posts.rb +20 -0
- data/db/migrate/20200712064920_create_phcdevworks_press_list_items.rb +22 -0
- data/db/migrate/20200712065808_create_phcdevworks_press_list_item_versions.rb +18 -0
- data/db/migrate/20200716224648_create_phcdevworks_press_review_categories_posts.rb +10 -0
- data/db/migrate/20200716224738_create_phcdevworks_press_list_categories_posts.rb +10 -0
- data/lib/phcdevworks_press/version.rb +1 -1
- metadata +70 -28
- data/db/migrate/20191024232406_create_phcdevworks_press_categories_posts.rb +0 -10
- data/db/migrate/20200702121306_remove_images_cols_from_phcdevworks_press.rb +0 -7
- data/db/migrate/20200707115652_create_phcdevworks_press_add_seo.rb +0 -7
@@ -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,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
|
@@ -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>
|
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
|
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
|
105
|
+
<!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Portfolio -->
|
84
106
|
<% end %>
|
85
107
|
|
86
108
|
<% if defined?phcdevworks_tutorials %>
|
@@ -112,34 +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 Core Modules -->
|
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/post/categories") %>"><%= link_to("Category Index", phcdevworks_core_modules.post_categories_path) %></li>
|
126
|
-
<li class="<%= phc_menu_active_controller("phcdevworks_core_modules/post/categories#new") %>"><%= link_to("New Category", phcdevworks_core_modules.new_post_category_path) %></li>
|
127
|
-
</ul>
|
128
|
-
</li>
|
129
|
-
<li class="has-sub">
|
130
|
-
<a href="javascript:;">
|
131
|
-
<b class="caret"></b>
|
132
|
-
<i class="fad fa-analytics"></i>
|
133
|
-
<span>Marketing</span>
|
134
|
-
</a>
|
135
|
-
<ul class="sub-menu">
|
136
|
-
<li class="<%= phc_menu_active_controller("phcdevworks_core_modules/marketing/optimizations") %>"><%= link_to("SEO Data Index", phcdevworks_core_modules.marketing_optimizations_path) %></li>
|
137
|
-
<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>
|
138
|
-
</ul>
|
139
|
-
</li>
|
140
|
-
<!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Core Modules -->
|
141
|
-
<% end %>
|
142
|
-
|
143
137
|
<% if defined?phcdevworks_members %>
|
144
138
|
<!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Members -->
|
145
139
|
<li class="nav-header">Membership Manager</li>
|
@@ -238,6 +232,34 @@
|
|
238
232
|
<!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks RealEstate -->
|
239
233
|
<% end %>
|
240
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
|
+
|
241
263
|
<% if current_user && current_user.admin? %>
|
242
264
|
<!-- -PHC- Sidebar - Sidebar Navigation - PHCAccounts Admin Options -->
|
243
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 :
|
14
|
-
<%= form.select( :
|
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 :
|
31
|
-
<%= form.file_field :
|
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.
|
33
|
+
<% if form.object.article_post_image.attached? %>
|
34
34
|
<%= image_tag main_app.url_for(form.object.post_image), class: "img-responsive img-thumbnail" %>
|
35
|
-
<%= form.label :
|
36
|
-
<%= form.check_box :
|
35
|
+
<%= form.label :remove_article_post_image %>
|
36
|
+
<%= form.check_box :remove_article_post_image %>
|
37
37
|
<% end %>
|
38
38
|
</div>
|
39
39
|
</div>
|
@@ -45,13 +45,13 @@
|
|
45
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::Post::Category.all, :id, :
|
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
52
|
<div class="form-group">
|
53
53
|
<label>Attach SEO Data</label>
|
54
|
-
<%= collection_select(:article_post, :optimization_id, PhcdevworksCoreModules::Marketing::Optimization.order("
|
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
55
|
</div>
|
56
56
|
</div>
|
57
57
|
</div>
|
@@ -75,11 +75,11 @@
|
|
75
75
|
</div>
|
76
76
|
<div class="panel-body">
|
77
77
|
<div class="form-group field_with_errors">
|
78
|
-
<%= form.label :
|
79
|
-
<%= form.text_field :
|
78
|
+
<%= form.label :article_post_title, "Article Title" %>
|
79
|
+
<%= form.text_field :article_post_title, class: "form-control" %>
|
80
80
|
</div>
|
81
81
|
<div class="form-group ">
|
82
|
-
<%= form.text_area :
|
82
|
+
<%= form.text_area :article_post_text, class: "form-control editor" %>
|
83
83
|
<div id="word-count" class="mt-3"></div>
|
84
84
|
</div>
|
85
85
|
</div>
|
@@ -48,9 +48,9 @@
|
|
48
48
|
<tbody>
|
49
49
|
<% @article_posts.each do |article_post| %>
|
50
50
|
<tr>
|
51
|
-
<td><%= article_post.
|
52
|
-
<td><%= truncate(article_post.
|
53
|
-
<td><%= article_post.
|
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 -->
|