phcdevworks_press 4.8.1 → 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 +8 -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/application.html.erb +0 -13
- data/app/views/layouts/phcdevworks_press/components/backend/sidebars/_side_menu.html.erb +75 -58
- data/app/views/phcdevworks_press/article/posts/_form.html.erb +16 -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/{article/categories → list/items}/edit.html.erb +6 -8
- data/app/views/phcdevworks_press/list/items/index.html.erb +81 -0
- data/app/views/phcdevworks_press/{article/categories → list/items}/new.html.erb +6 -8
- data/app/{assets/javascripts/phcdevworks_press/article/categories.coffee → 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/{article/categories → list/posts}/index.html.erb +16 -13
- 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 -17
- 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/{20170517064427_create_phcdevworks_press_category_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/{20170517064030_create_phcdevworks_press_post_versions.rb → 20200712065808_create_phcdevworks_press_list_item_versions.rb} +18 -17
- 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/engine.rb +1 -0
- data/lib/phcdevworks_press/version.rb +1 -1
- metadata +79 -33
- data/app/assets/stylesheets/phcdevworks_press/article/categories.scss +0 -0
- data/app/controllers/phcdevworks_press/article/categories_controller.rb +0 -83
- data/app/helpers/phcdevworks_press/article/categories_helper.rb +0 -4
- data/app/models/phcdevworks_press/article/category.rb +0 -27
- data/app/models/phcdevworks_press/article_category_versions.rb +0 -5
- data/app/views/phcdevworks_press/article/categories/_form.html.erb +0 -22
- data/db/migrate/20190805232733_create_phcdevworks_press_article_categories.rb +0 -15
- data/db/migrate/20191024232406_create_phcdevworks_press_categories_posts.rb +0 -10
@@ -1,16 +1,14 @@
|
|
1
1
|
<!-- PHCTitleSEO Title Variables -->
|
2
|
-
<% phc_title "
|
3
|
-
<% phc_title_tagline "Update
|
2
|
+
<% phc_title "List Manager" %>
|
3
|
+
<% phc_title_tagline "Update List Item" %>
|
4
4
|
<% phc_breadcrumb_one yield(:phc_title) %>
|
5
|
-
<% phc_breadcrumb_two link_to "
|
6
|
-
<% phc_breadcrumb_three yield(:phc_title_tagline) %>
|
5
|
+
<% phc_breadcrumb_two link_to "List Item Index", phcdevworks_press.list_posts_path %>
|
7
6
|
<!-- PHCTitleSEO Title Variables -->
|
8
7
|
|
9
8
|
<!-- Page Bradcrumbs -->
|
10
9
|
<ol class="breadcrumb pull-right">
|
11
|
-
|
12
|
-
|
13
|
-
<li class="breadcrumb-item active"><%= yield(:phc_breadcrumb_three) %></li>
|
10
|
+
<li class="breadcrumb-item"><%= yield(:phc_breadcrumb_one) %></li>
|
11
|
+
<li class="breadcrumb-item active"><%= yield(:phc_breadcrumb_two) %></li>
|
14
12
|
</ol>
|
15
13
|
<!-- Page Bradcrumbs -->
|
16
14
|
|
@@ -35,7 +33,7 @@
|
|
35
33
|
<div class="panel-body">
|
36
34
|
|
37
35
|
<!-- Edit Form -->
|
38
|
-
|
36
|
+
<%= render "form", { form_url: list_post_item_path } %>
|
39
37
|
<!-- Edit Form -->
|
40
38
|
|
41
39
|
</div>
|
@@ -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 -->
|
@@ -1,16 +1,15 @@
|
|
1
1
|
<!-- PHCTitleSEO Title Variables -->
|
2
|
-
<% phc_title "
|
3
|
-
<% phc_title_tagline "Create a New
|
2
|
+
<% phc_title "List Manager" %>
|
3
|
+
<% phc_title_tagline "Create a New List Item" %>
|
4
4
|
<% phc_breadcrumb_one yield(:phc_title) %>
|
5
|
-
<% phc_breadcrumb_two link_to "
|
5
|
+
<% phc_breadcrumb_two link_to "List Index", phcdevworks_press.list_post_items_path %>
|
6
6
|
<% phc_breadcrumb_three yield(:phc_title_tagline) %>
|
7
7
|
<!-- PHCTitleSEO Title Variables -->
|
8
8
|
|
9
9
|
<!-- Page Bradcrumbs -->
|
10
10
|
<ol class="breadcrumb pull-right">
|
11
|
-
|
12
|
-
|
13
|
-
<li class="breadcrumb-item active"><%= yield(:phc_breadcrumb_three) %></li>
|
11
|
+
<li class="breadcrumb-item"><%= yield(:phc_breadcrumb_one) %></li>
|
12
|
+
<li class="breadcrumb-item active"><%= yield(:phc_breadcrumb_two) %></li>
|
14
13
|
</ol>
|
15
14
|
<!-- Page Bradcrumbs -->
|
16
15
|
|
@@ -35,7 +34,7 @@
|
|
35
34
|
<div class="panel-body">
|
36
35
|
|
37
36
|
<!-- New Form -->
|
38
|
-
<%= render "form",
|
37
|
+
<%= render "form", { form_url: list_post_items_path } %>
|
39
38
|
<!-- New Form -->
|
40
39
|
|
41
40
|
</div>
|
@@ -47,4 +46,3 @@
|
|
47
46
|
</div>
|
48
47
|
</div>
|
49
48
|
<!-- Page Content -->
|
50
|
-
|
File without changes
|
@@ -0,0 +1,88 @@
|
|
1
|
+
<!-- Form - List - Posts -->
|
2
|
+
<%= form_with(model: list_post, local: true) do |form| %>
|
3
|
+
|
4
|
+
<div class="row">
|
5
|
+
<div class="col-md-3">
|
6
|
+
|
7
|
+
<!-- Panel - Publishing -->
|
8
|
+
<div class="panel panel-inverse">
|
9
|
+
<div class="panel-heading">
|
10
|
+
<h4 class="panel-title">List Publish Panel</h4>
|
11
|
+
</div>
|
12
|
+
<div class="panel-body">
|
13
|
+
<div class="form-group field_with_errors">
|
14
|
+
<%= form.label :list_post_status, "Post Status" %>
|
15
|
+
<%= form.select( :list_post_status, [["Draft","draft"],["Published","published"],["Review","review"]], {}, {class: "form-control"}) %>
|
16
|
+
</div>
|
17
|
+
<div class="actions">
|
18
|
+
<%= form.submit class: "btn btn-primary" %>
|
19
|
+
</div>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
<!-- Panel - Publishing -->
|
23
|
+
|
24
|
+
<!-- Panel - Image Uploading -->
|
25
|
+
<div class="panel panel-inverse">
|
26
|
+
<div class="panel-heading">
|
27
|
+
<h4 class="panel-title">List Images</h4>
|
28
|
+
</div>
|
29
|
+
<div class="panel-body">
|
30
|
+
<div class="form-group field_with_errors">
|
31
|
+
<%= form.label :list_post_image, "Featured Image" %>
|
32
|
+
<%= form.file_field :list_post_image, class: "form-control" %>
|
33
|
+
</div>
|
34
|
+
<% if form.object.list_post_image.attached? %>
|
35
|
+
<%= image_tag main_app.url_for(form.object.list_post_image), class: "img-responsive img-thumbnail" %>
|
36
|
+
<%= form.label :remove_list_post_image %>
|
37
|
+
<%= form.check_box :remove_list_post_image %>
|
38
|
+
<% end %>
|
39
|
+
</div>
|
40
|
+
</div>
|
41
|
+
<!-- Panel - Image Uploading -->
|
42
|
+
|
43
|
+
<!-- Panel - Article - Categories -->
|
44
|
+
<div class="panel panel-inverse">
|
45
|
+
<div class="panel-heading">
|
46
|
+
<h4 class="panel-title">List Options</h4>
|
47
|
+
</div>
|
48
|
+
<div class="panel-body">
|
49
|
+
<%= form.collection_check_boxes :category_ids, PhcdevworksCoreModules::Post::Category.all, :id, :post_category_name do |post_category| %>
|
50
|
+
<%= post_category.check_box %>
|
51
|
+
<%= post_category.label %><br>
|
52
|
+
<% end %>
|
53
|
+
<div class="form-group">
|
54
|
+
<label>Attach SEO Data</label>
|
55
|
+
<%= collection_select(:list_post, :optimization_id, PhcdevworksCoreModules::Marketing::Optimization.order("marketing_optimization_page_title"), :id, :marketing_optimization_page_title, {include_blank: true}, {class: "form-control"}) %>
|
56
|
+
</div>
|
57
|
+
</div>
|
58
|
+
</div>
|
59
|
+
<!-- Panel - Article - Categories -->
|
60
|
+
|
61
|
+
</div>
|
62
|
+
<div class="col-md-9 ">
|
63
|
+
|
64
|
+
<!-- PHCNotifi Render Validation -->
|
65
|
+
<%= render "phcdevworks_notifications/bootstrap/validations", :object => @list_post %>
|
66
|
+
<!-- PHCNotifi Render Validation -->
|
67
|
+
|
68
|
+
<div class="panel panel-inverse">
|
69
|
+
<div class="panel-heading">
|
70
|
+
<h4 class="panel-title"><%= yield(:phc_title_tagline) %></h4>
|
71
|
+
</div>
|
72
|
+
<div class="panel-body">
|
73
|
+
<div class="form-group field_with_errors">
|
74
|
+
<%= form.label :list_post_title, "List Title" %>
|
75
|
+
<%= form.text_field :list_post_title, class: "form-control" %>
|
76
|
+
</div>
|
77
|
+
<div class="form-group ">
|
78
|
+
<%= form.text_area :list_post_text, class: "form-control editor" %>
|
79
|
+
<div id="word-count" class="mt-3"></div>
|
80
|
+
</div>
|
81
|
+
</div>
|
82
|
+
</div>
|
83
|
+
|
84
|
+
</div>
|
85
|
+
</div>
|
86
|
+
|
87
|
+
<% end %>
|
88
|
+
<!-- Form - List - Posts -->
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<!-- PHCTitleSEO Title Variables -->
|
2
|
+
<% phc_title "List Manager" %>
|
3
|
+
<% phc_title_tagline "Update List" %>
|
4
|
+
<% phc_breadcrumb_one yield(:phc_title) %>
|
5
|
+
<% phc_breadcrumb_two link_to "List Index", phcdevworks_press.list_posts_path %>
|
6
|
+
<% phc_breadcrumb_three yield(:phc_title_tagline) %>
|
7
|
+
<!-- PHCTitleSEO Title Variables -->
|
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
|
+
<h2 class="page-header"><%= yield(:phc_title) %></h2>
|
19
|
+
<!-- Page Header -->
|
20
|
+
|
21
|
+
<!-- Edit Form -->
|
22
|
+
<%= render 'form', list_post: @list_post %>
|
23
|
+
<!-- Edit Form -->
|
@@ -1,16 +1,14 @@
|
|
1
1
|
<!-- PHCTitleSEO Title Variables -->
|
2
|
-
<% phc_title "
|
3
|
-
<% phc_title_tagline "
|
2
|
+
<% phc_title "List Manager" %>
|
3
|
+
<% phc_title_tagline "List Index" %>
|
4
4
|
<% phc_breadcrumb_one yield(:phc_title) %>
|
5
|
-
<% phc_breadcrumb_two
|
6
|
-
<% phc_breadcrumb_three yield(:phc_title_tagline) %>
|
5
|
+
<% phc_breadcrumb_two yield(:phc_title_tagline) %>
|
7
6
|
<!-- PHCTitleSEO Title Variables -->
|
8
7
|
|
9
8
|
<!-- Page Bradcrumbs -->
|
10
9
|
<ol class="breadcrumb pull-right">
|
11
10
|
<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>
|
11
|
+
<li class="breadcrumb-item active"><%= yield(:phc_breadcrumb_two) %></li>
|
14
12
|
</ol>
|
15
13
|
<!-- Page Bradcrumbs -->
|
16
14
|
|
@@ -40,19 +38,24 @@
|
|
40
38
|
|
41
39
|
<thead>
|
42
40
|
<tr>
|
43
|
-
<th>
|
41
|
+
<th>List Headline</th>
|
42
|
+
<th>Text Preview</th>
|
43
|
+
<th>List Status</th>
|
44
44
|
<th></th>
|
45
45
|
</tr>
|
46
46
|
</thead>
|
47
47
|
|
48
48
|
<tbody>
|
49
|
-
<% @
|
49
|
+
<% @list_posts.each do |list_post| %>
|
50
50
|
<tr>
|
51
|
-
<td><%=
|
51
|
+
<td><%= list_post.list_post_title %></td>
|
52
|
+
<td><%= truncate(list_post.list_post_text, :length => 80, :escape => false) %></td>
|
53
|
+
<td><%= list_post.list_post_status.capitalize %></td>
|
52
54
|
<td>
|
53
55
|
<div class="btn-group d-flex" role="group">
|
54
|
-
<%= link_to "
|
55
|
-
<%= link_to "
|
56
|
+
<%= link_to "List Details", list_post_path(list_post), class: "btn btn-primary btn-xs" %>
|
57
|
+
<%= link_to "Update List", edit_list_post_path(list_post), class: "btn btn-primary btn-xs" %>
|
58
|
+
<%= link_to "Remove List", list_post, class: "btn btn-danger btn-xs", method: :delete, data: { confirm: "Are you sure?" } %>
|
56
59
|
</div>
|
57
60
|
</td>
|
58
61
|
</tr>
|
@@ -64,9 +67,9 @@
|
|
64
67
|
<!-- Index - Table -->
|
65
68
|
|
66
69
|
<!-- New Button -->
|
67
|
-
<%= link_to phcdevworks_press.
|
70
|
+
<%= link_to phcdevworks_press.new_list_post_path, class: "btn btn-primary" do %>
|
68
71
|
<i class="fad fa-plus-circle"></i>
|
69
|
-
<%= "Add a New
|
72
|
+
<%= "Add a New Top List" %>
|
70
73
|
<% end %>
|
71
74
|
<!-- New Button -->
|
72
75
|
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<!-- PHCTitleSEO Title Variables -->
|
2
|
+
<% phc_title "Lists Manager" %>
|
3
|
+
<% phc_title_tagline "Create a New List" %>
|
4
|
+
<% phc_breadcrumb_one yield(:phc_title) %>
|
5
|
+
<% phc_breadcrumb_two link_to "List Index", phcdevworks_press.list_posts_path %>
|
6
|
+
<% phc_breadcrumb_three yield(:phc_title_tagline) %>
|
7
|
+
<!-- PHCTitleSEO Title Variables -->
|
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
|
+
<!-- New Form -->
|
22
|
+
<%= render 'form', list_post: @list_post %>
|
23
|
+
<!-- New Form -->
|
@@ -0,0 +1,76 @@
|
|
1
|
+
<!-- PHCTitleSEO Title Variables -->
|
2
|
+
<% phc_title "List Manager" %>
|
3
|
+
<% phc_title_tagline "List Index" %>
|
4
|
+
<% phc_breadcrumb_one yield(:phc_title) %>
|
5
|
+
<% phc_breadcrumb_two link_to "List 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
|
+
<!-- Index - Table -->
|
36
|
+
<div class="table-responsive">
|
37
|
+
<table class="table table-striped table-bordered">
|
38
|
+
|
39
|
+
<thead>
|
40
|
+
<tr>
|
41
|
+
<th>List Item Number</th>
|
42
|
+
<th>List Item Title</th>
|
43
|
+
<th>List Item Description</th>
|
44
|
+
</tr>
|
45
|
+
</thead>
|
46
|
+
|
47
|
+
<tbody>
|
48
|
+
<% @list_post.items.each do |list_item| %>
|
49
|
+
<tr>
|
50
|
+
<td><%= list_item.id %></td>
|
51
|
+
<td><%= list_item.list_item_title %></td>
|
52
|
+
<td><%= truncate(list_item.list_item_text, :length => 80, :escape => false) %></td>
|
53
|
+
</tr>
|
54
|
+
<% end %>
|
55
|
+
</tbody>
|
56
|
+
|
57
|
+
</table>
|
58
|
+
</div>
|
59
|
+
<!-- Index - Table -->
|
60
|
+
|
61
|
+
<!-- New Button -->
|
62
|
+
<%= link_to phcdevworks_press.list_post_items_path(@list_post), class: "btn btn-primary btn-sm" do %>
|
63
|
+
<i class="fad fa-plus-circle"></i>
|
64
|
+
Add or Update List Items
|
65
|
+
<% end %>
|
66
|
+
<!-- New Button -->
|
67
|
+
|
68
|
+
</div>
|
69
|
+
<!-- Panel - Body -->
|
70
|
+
|
71
|
+
</div>
|
72
|
+
<!-- Panel -->
|
73
|
+
|
74
|
+
</div>
|
75
|
+
</div>
|
76
|
+
<!-- Page Content -->
|
@@ -0,0 +1,92 @@
|
|
1
|
+
<!-- Form - Review - Posts -->
|
2
|
+
<%= form_with(model: review_post, local: true) do |form| %>
|
3
|
+
|
4
|
+
<div class="row">
|
5
|
+
<div class="col-md-3">
|
6
|
+
|
7
|
+
<!-- Panel - Publishing -->
|
8
|
+
<div class="panel panel-inverse">
|
9
|
+
<div class="panel-heading">
|
10
|
+
<h4 class="panel-title">Review Publish Panel</h4>
|
11
|
+
</div>
|
12
|
+
<div class="panel-body">
|
13
|
+
<div class="form-group field_with_errors">
|
14
|
+
<%= form.label :review_post_status, "Post Status" %>
|
15
|
+
<%= form.select( :review_post_status, [["Draft","draft"],["Published","published"],["Review","review"]], {}, {class: "form-control"}) %>
|
16
|
+
</div>
|
17
|
+
<div class="actions">
|
18
|
+
<%= form.submit class: "btn btn-primary" %>
|
19
|
+
</div>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
<!-- Panel - Publishing -->
|
23
|
+
|
24
|
+
<!-- Panel - Image Uploading -->
|
25
|
+
<div class="panel panel-inverse">
|
26
|
+
<div class="panel-heading">
|
27
|
+
<h4 class="panel-title">Review Images</h4>
|
28
|
+
</div>
|
29
|
+
<div class="panel-body">
|
30
|
+
<div class="form-group field_with_errors">
|
31
|
+
<%= form.label :review_post_image, "Featured Image" %>
|
32
|
+
<%= form.file_field :review_post_image, class: "form-control" %>
|
33
|
+
</div>
|
34
|
+
<% if form.object.review_post_image.attached? %>
|
35
|
+
<%= image_tag main_app.url_for(form.object.review_post_image), class: "img-responsive img-thumbnail" %>
|
36
|
+
<%= form.label :remove_review_post_image %>
|
37
|
+
<%= form.check_box :remove_review_post_image %>
|
38
|
+
<% end %>
|
39
|
+
</div>
|
40
|
+
</div>
|
41
|
+
<!-- Panel - Image Uploading -->
|
42
|
+
|
43
|
+
<!-- Panel - Article - Categories -->
|
44
|
+
<div class="panel panel-inverse">
|
45
|
+
<div class="panel-heading">
|
46
|
+
<h4 class="panel-title">Review Options</h4>
|
47
|
+
</div>
|
48
|
+
<div class="panel-body">
|
49
|
+
<%= form.collection_check_boxes :category_ids, PhcdevworksCoreModules::Post::Category.all, :id, :post_category_name do |post_category| %>
|
50
|
+
<%= post_category.check_box %>
|
51
|
+
<%= post_category.label %><br>
|
52
|
+
<% end %>
|
53
|
+
<div class="form-group">
|
54
|
+
<label>Attach SEO Data</label>
|
55
|
+
<%= collection_select(:review_post, :optimization_id, PhcdevworksCoreModules::Marketing::Optimization.order("marketing_optimization_page_title"), :id, :marketing_optimization_page_title, {include_blank: true}, {class: "form-control"}) %>
|
56
|
+
</div>
|
57
|
+
<div class="form-group">
|
58
|
+
<%= form.label :review_post_rating, "Review Rating" %>
|
59
|
+
<%= form.select( :review_post_rating, [["01","01"],["02","02"],["03","03"],["04","04"],["05","05"]], {}, {class: "form-control"}) %>
|
60
|
+
</div>
|
61
|
+
</div>
|
62
|
+
</div>
|
63
|
+
<!-- Panel - Article - Categories -->
|
64
|
+
|
65
|
+
</div>
|
66
|
+
<div class="col-md-9 ">
|
67
|
+
|
68
|
+
<!-- PHCNotifi Render Validation -->
|
69
|
+
<%= render "phcdevworks_notifications/bootstrap/validations", :object => @review_post %>
|
70
|
+
<!-- PHCNotifi Render Validation -->
|
71
|
+
|
72
|
+
<div class="panel panel-inverse">
|
73
|
+
<div class="panel-heading">
|
74
|
+
<h4 class="panel-title"><%= yield(:phc_title_tagline) %></h4>
|
75
|
+
</div>
|
76
|
+
<div class="panel-body">
|
77
|
+
<div class="form-group field_with_errors">
|
78
|
+
<%= form.label :review_post_title, "Article Title" %>
|
79
|
+
<%= form.text_field :review_post_title, class: "form-control" %>
|
80
|
+
</div>
|
81
|
+
<div class="form-group ">
|
82
|
+
<%= form.text_area :review_post_text, class: "form-control editor" %>
|
83
|
+
<div id="word-count" class="mt-3"></div>
|
84
|
+
</div>
|
85
|
+
</div>
|
86
|
+
</div>
|
87
|
+
|
88
|
+
</div>
|
89
|
+
</div>
|
90
|
+
|
91
|
+
<% end %>
|
92
|
+
<!-- Form - Review - Posts -->
|