phcpress 56.3.0 → 57.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +1 -1
  3. data/README.md +22 -9
  4. data/Rakefile +4 -18
  5. data/app/assets/config/phcpress_manifest.js +2 -2
  6. data/app/controllers/phcpress/application_controller.rb +6 -6
  7. data/app/controllers/phcpress/article/categories_controller.rb +1 -1
  8. data/app/controllers/phcpress/article/posts_controller.rb +1 -1
  9. data/app/models/phcpress/article/category.rb +18 -18
  10. data/app/models/phcpress/article/post.rb +21 -21
  11. data/app/views/layouts/phcpress/application.html.erb +58 -65
  12. data/app/views/layouts/phcpress/components/backend/footer/_footer.html.erb +14 -6
  13. data/app/views/layouts/phcpress/components/backend/navigation/_top_menu.html.erb +41 -37
  14. data/app/views/layouts/phcpress/components/backend/sidebars/_side_menu.html.erb +921 -189
  15. data/app/views/layouts/phcpress/frontend.html.erb +2 -2
  16. data/app/views/phcpress/article/categories/_form.html.erb +16 -16
  17. data/app/views/phcpress/article/categories/edit.html.erb +21 -17
  18. data/app/views/phcpress/article/categories/index.html.erb +28 -27
  19. data/app/views/phcpress/article/categories/new.html.erb +21 -17
  20. data/app/views/phcpress/article/posts/_form.html.erb +12 -16
  21. data/app/views/phcpress/article/posts/edit.html.erb +10 -10
  22. data/app/views/phcpress/article/posts/index.html.erb +30 -27
  23. data/app/views/phcpress/article/posts/new.html.erb +10 -10
  24. data/app/views/phcpress/blog/articles/index.html.erb +1 -1
  25. data/config/routes.rb +16 -19
  26. data/db/migrate/20170509002355_create_phcpress_friendly_id_slugs.rb +18 -0
  27. data/db/migrate/20170517064030_create_phcpress_post_versions.rb +17 -0
  28. data/db/migrate/20170517064427_create_phcpress_category_versions.rb +17 -0
  29. data/db/migrate/20190315010932_create_phcpress_article_posts.rb +17 -0
  30. data/db/migrate/20190315040834_create_phcpress_article_categories.rb +14 -0
  31. data/db/migrate/20190315173237_create_join_table_categories_posts.rb +8 -0
  32. data/lib/phcpress/engine.rb +30 -56
  33. data/lib/phcpress/version.rb +1 -1
  34. data/lib/phcpress.rb +1 -0
  35. metadata +72 -392
  36. data/app/assets/javascripts/phcpress/application.js +0 -2
  37. data/app/assets/stylesheets/phcpress/application.scss +0 -2
@@ -1,5 +1,5 @@
1
- <!-- Page Content -->
1
+ <!-- -PHCDEV- Panel -->
2
2
  <div id="content" class="content">
3
3
  <%= yield %>
4
4
  </div>
5
- <!-- Page Content -->
5
+ <!-- -PHCDEV- Panel -->
@@ -1,22 +1,22 @@
1
- <!-- Form - Article - Category -->
1
+ <!-- -PHCDEV- Form - Article - Category -->
2
2
  <%= form_with(model: article_category, local: true) do |form| %>
3
3
 
4
- <!-- PHCNotifi Render Validation -->
5
- <%= render 'phcnotifi/default/validations', :object => @article_category %>
6
- <!-- PHCNotifi Render Validation -->
4
+ <!-- -PHCDEV- Form Validation -->
5
+ <%= render "phcdevworks_notifications/bootstrap/validations", :object => @article_category %>
6
+ <!-- -PHCDEV- Form Validation -->
7
7
 
8
- <!-- Form Input Fields -->
9
- <div class="form-group field_with_errors">
10
- <%= form.label :category_name, "Category Name" %>
11
- <%= form.text_field :category_name, class: "form-control" %>
12
- </div>
13
- <!-- Form Input Fields -->
8
+ <!-- -PHCDEV- Form Input Fields -->
9
+ <div class="mb-3">
10
+ <%= form.label :category_name, "Category Name", class: "form-label" %>
11
+ <%= form.text_field :category_name, class: "form-control" %>
12
+ </div>
13
+ <!-- -PHCDEV- Form Input Fields -->
14
14
 
15
- <!-- Form Submition Button -->
16
- <div class="actions">
17
- <%= form.submit class: "btn btn-primary" %>
18
- </div>
19
- <!-- For Submition Button -->
15
+ <!-- -PHCDEV- Form Submition Button -->
16
+ <div class="actions">
17
+ <%= form.submit class: "btn btn-primary" %>
18
+ </div>
19
+ <!-- -PHCDEV- Form Submition Button -->
20
20
 
21
21
  <% end %>
22
- <!-- Form - Article - Category -->
22
+ <!-- -PHCDEV- Form - Article - Category -->
@@ -1,37 +1,41 @@
1
- <!-- Title System -->
1
+ <!-- -PHCDEV- Title Variables -->
2
2
  <% phc_title "Article Category Manager" %>
3
3
  <% phc_title_tagline "Update Category Data" %>
4
4
  <% phc_breadcrumb_one yield(:phc_title) %>
5
5
  <% phc_breadcrumb_two link_to "Category Index", phcpress.article_categories_path %>
6
6
  <% phc_breadcrumb_three yield(:phc_title_tagline) %>
7
- <!-- Title System -->
7
+ <!-- -PHCDEV- Title Variables -->
8
8
 
9
- <!-- Page Bradcrumbs -->
10
- <ol class="breadcrumb pull-right">
9
+ <!-- -PHCDEV- Bradcrumbs -->
10
+ <ol class="breadcrumb float-xl-end">
11
11
  <li class="breadcrumb-item"><%= yield(:phc_breadcrumb_one) %></li>
12
12
  <li class="breadcrumb-item"><%= yield(:phc_breadcrumb_two) %></li>
13
13
  <li class="breadcrumb-item active"><%= yield(:phc_breadcrumb_three) %></li>
14
14
  </ol>
15
- <!-- Page Bradcrumbs -->
15
+ <!-- -PHCDEV- Bradcrumbs -->
16
16
 
17
- <!-- Page Header -->
17
+ <!-- -PHCDEV- Header -->
18
18
  <h1 class="page-header"><%= yield(:phc_title) %></h1>
19
- <!-- Page Header -->
19
+ <!-- -PHCDEV- Bradcrumbs -->
20
20
 
21
- <!-- Page Content -->
21
+ <!-- -PHCDEV- Panel -->
22
22
  <div class="panel panel-inverse">
23
+
24
+ <!-- -PHCDEV- Panel - Heading -->
23
25
  <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
26
  <h4 class="panel-title"><%= yield(:phc_title) %></h4>
30
27
  </div>
28
+ <!-- -PHCDEV- Panel - Heading -->
29
+
30
+ <!-- -PHCDEV- Panel - Body -->
31
31
  <div class="panel-body">
32
- <!-- Form to Edit Article Category -->
33
- <%= render 'form', article_category: @article_category %>
34
- <!-- Form to Edit Article Category -->
32
+
33
+ <!-- -PHCDEV- Form to Edit Article Category -->
34
+ <%= render "form", article_category: @article_category %>
35
+ <!-- -PHCDEV- Form to Edit Article Category -->
36
+
35
37
  </div>
38
+ <!-- -PHCDEV- Panel - Body -->
39
+
36
40
  </div>
37
- <!-- Page Content -->
41
+ <!-- -PHCDEV- Panel -->
@@ -1,37 +1,35 @@
1
- <!-- Title System -->
1
+ <!-- -PHCDEV- Title Variables -->
2
2
  <% phc_title "Article Category Manager" %>
3
3
  <% phc_title_tagline "Category Index" %>
4
4
  <% phc_breadcrumb_one yield(:phc_title) %>
5
5
  <% phc_breadcrumb_two link_to "Category Index", phcpress.article_categories_path %>
6
6
  <% phc_breadcrumb_three yield(:phc_title_tagline) %>
7
- <!-- Title System -->
7
+ <!-- -PHCDEV- Title Variables -->
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 active"><%= yield(:phc_breadcrumb_two) %></li>
9
+ <!-- -PHCDEV- Bradcrumbs -->
10
+ <ol class="breadcrumb float-xl-end">
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
- <!-- Page Bradcrumbs -->
14
+ <!-- -PHCDEV- Bradcrumbs -->
15
15
 
16
- <!-- Page Header -->
16
+ <!-- -PHCDEV- Header -->
17
17
  <h1 class="page-header"><%= yield(:phc_title) %></h1>
18
- <!-- Page Header -->
18
+ <!-- -PHCDEV- Header -->
19
19
 
20
- <!-- Page & Panel Content -->
20
+ <!-- -PHCDEV- Panel -->
21
21
  <div class="panel panel-inverse">
22
- <!-- Panel Heading -->
23
- <div class="panel-heading">
24
- <div class="panel-heading-btn">
25
- <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default" data-click="panel-expand"><i class="fa fa-expand"></i></a>
26
- <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-success" data-click="panel-reload"><i class="fa fa-redo"></i></a>
27
- <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-warning" data-click="panel-collapse"><i class="fa fa-minus"></i></a>
28
- </div>
29
- <h4 class="panel-title"><%= yield(:phc_title_tagline) %></h4>
30
- </div>
31
- <!-- Panel Heading -->
32
- <!-- Panel Body -->
33
- <div class="panel-body">
34
- <!-- Table - Category Index -->
22
+
23
+ <!-- -PHCDEV- Panel - Heading -->
24
+ <div class="panel-heading">
25
+ <h4 class="panel-title"><%= yield(:phc_title_tagline) %></h4>
26
+ </div>
27
+ <!-- -PHCDEV- Panel - Heading -->
28
+
29
+ <!-- -PHCDEV- Panel - Body -->
30
+ <div class="panel-body">
31
+
32
+ <!-- -PHCDEV- Table - Category Index -->
35
33
  <div class="table-responsive">
36
34
  <table class="table table-striped table-bordered">
37
35
  <thead>
@@ -46,8 +44,8 @@
46
44
  <td><%= link_to article_category.category_name, phcpress.edit_article_category_path(article_category) %></td>
47
45
  <td>
48
46
  <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?' } %>
47
+ <%= link_to "Edit Category", edit_article_category_path(article_category), class: "btn btn-primary btn-xs" %>
48
+ <%= link_to "Remove Category", article_category, class: "btn btn-danger btn-xs", method: :delete, data: { confirm: "Are you sure?" } %>
51
49
  </div>
52
50
  </td>
53
51
  </tr>
@@ -59,7 +57,10 @@
59
57
  <%= "Add a New Article Category" %>
60
58
  <% end %>
61
59
  </div>
62
- <!-- Table - Category Index -->
60
+ <!-- -PHCDEV- Table - Category Index -->
61
+
63
62
  </div>
63
+ <!-- -PHCDEV- Panel - Body -->
64
+
64
65
  </div>
65
- <!-- Page Content -->
66
+ <!-- -PHCDEV- Panel -->
@@ -1,37 +1,41 @@
1
- <!-- Title System -->
1
+ <!-- -PHCDEV- Title Variables -->
2
2
  <% phc_title "Article Category Manager" %>
3
3
  <% phc_title_tagline "Create a New Category" %>
4
4
  <% phc_breadcrumb_one yield(:phc_title) %>
5
5
  <% phc_breadcrumb_two link_to "Category Index", phcpress.article_categories_path %>
6
6
  <% phc_breadcrumb_three yield(:phc_title_tagline) %>
7
- <!-- Title System -->
7
+ <!-- -PHCDEV- Title Variables -->
8
8
 
9
- <!-- Page Bradcrumbs -->
10
- <ol class="breadcrumb pull-right">
9
+ <!-- -PHCDEV- Bradcrumbs -->
10
+ <ol class="breadcrumb float-xl-end">
11
11
  <li class="breadcrumb-item"><%= yield(:phc_breadcrumb_one) %></li>
12
12
  <li class="breadcrumb-item"><%= yield(:phc_breadcrumb_two) %></li>
13
13
  <li class="breadcrumb-item active"><%= yield(:phc_breadcrumb_three) %></li>
14
14
  </ol>
15
- <!-- Page Bradcrumbs -->
15
+ <!-- -PHCDEV- Bradcrumbs -->
16
16
 
17
- <!-- Page Header -->
17
+ <!-- -PHCDEV- Header -->
18
18
  <h1 class="page-header"><%= yield(:phc_title) %></h1>
19
- <!-- Page Header -->
19
+ <!-- -PHCDEV- Bradcrumbs -->
20
20
 
21
- <!-- Page Content -->
21
+ <!-- -PHCDEV- Panel -->
22
22
  <div class="panel panel-inverse">
23
+
24
+ <!-- -PHCDEV- Panel - Heading -->
23
25
  <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
26
  <h4 class="panel-title"><%= yield(:phc_title) %></h4>
30
27
  </div>
28
+ <!-- -PHCDEV- Panel - Heading -->
29
+
30
+ <!-- -PHCDEV- Panel - Body -->
31
31
  <div class="panel-body">
32
- <!-- Form for New Article Category -->
33
- <%= render 'form', article_category: @article_category %>
34
- <!-- Form for New Article Category -->
32
+
33
+ <!-- -PHCDEV- Form for New Article Category -->
34
+ <%= render "form", article_category: @article_category %>
35
+ <!-- -PHCDEV- Form for New Article Category -->
36
+
35
37
  </div>
38
+ <!-- -PHCDEV- Panel - Body -->
39
+
36
40
  </div>
37
- <!-- Page Content -->
41
+ <!-- -PHCDEV- Panel -->
@@ -9,9 +9,9 @@
9
9
  <h4 class="panel-title">Publish Panel</h4>
10
10
  </div>
11
11
  <div class="panel-body">
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 form-control-sm"}) %>
12
+ <div class="mb-3">
13
+ <%= form.label :post_status, "Post Status", class: "form-label" %>
14
+ <%= form.select( :post_status, [["Draft","draft"],["Published","published"],["Review","review"]], {}, {class: "form-control form-control-sm"}) %>
15
15
  </div>
16
16
  <div class="actions">
17
17
  <%= form.submit class: "btn btn-primary" %>
@@ -26,8 +26,8 @@
26
26
  <h4 class="panel-title">Post Images</h4>
27
27
  </div>
28
28
  <div class="panel-body">
29
- <div class="form-group field_with_errors">
30
- <%= form.label :post_image, "Featured Image" %>
29
+ <div class="mb-3">
30
+ <%= form.label :post_image, "Featured Image", class: "form-label" %>
31
31
  <%= form.file_field :post_image, class: "form-control" %>
32
32
  </div>
33
33
  <% if form.object.post_image? %>
@@ -57,25 +57,21 @@
57
57
 
58
58
  <div class="col-md-9 ">
59
59
 
60
- <!-- PHCNotifi Render Validation -->
61
- <%= render 'phcnotifi/default/validations', :object => @article_post %>
62
- <!-- PHCNotifi Render Validation -->
60
+ <!-- -PHCDEV- Form Validation -->
61
+ <%= render "phcdevworks_notifications/bootstrap/validations", :object => @article_post %>
62
+ <!-- -PHCDEV- Form Validation -->
63
63
 
64
64
  <div class="panel panel-inverse">
65
65
  <div class="panel-heading">
66
- <div class="panel-heading-btn">
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>
70
- </div>
66
+
71
67
  <h4 class="panel-title"><%= yield(:phc_title_tagline) %></h4>
72
68
  </div>
73
69
  <div class="panel-body ">
74
- <div class="form-group field_with_errors">
75
- <%= form.label :post_title, "Article Title" %>
70
+ <div class="mb-3">
71
+ <%= form.label :post_title, "Article Title", class: "form-label" %>
76
72
  <%= form.text_field :post_title, class: "form-control" %>
77
73
  </div>
78
- <div class="form-group field_with_errors">
74
+ <div class="mb-3">
79
75
  <%= form.text_area :post_text, :class => "ckeditor form-control", :id => "editor1", :rows => 20, :cols => 60 %>
80
76
  </div>
81
77
  </div>
@@ -1,23 +1,23 @@
1
- <!-- Title System -->
1
+ <!-- -PHCDEV- Title Variables -->
2
2
  <% phc_title "Article Manager" %>
3
3
  <% phc_title_tagline "Update Article" %>
4
4
  <% phc_breadcrumb_one yield(:phc_title) %>
5
5
  <% phc_breadcrumb_two link_to "Article Index", phcpress.article_posts_path %>
6
6
  <% phc_breadcrumb_three yield(:phc_title_tagline) %>
7
- <!-- Title System -->
7
+ <!-- -PHCDEV- Title Variables -->
8
8
 
9
- <!-- Page Bradcrumbs -->
10
- <ol class="breadcrumb pull-right">
9
+ <!-- -PHCDEV- Bradcrumbs -->
10
+ <ol class="breadcrumb float-xl-end">
11
11
  <li class="breadcrumb-item"><%= yield(:phc_breadcrumb_one) %></li>
12
12
  <li class="breadcrumb-item"><%= yield(:phc_breadcrumb_two) %></li>
13
13
  <li class="breadcrumb-item active"><%= yield(:phc_breadcrumb_three) %></li>
14
14
  </ol>
15
- <!-- Page Bradcrumbs -->
15
+ <!-- -PHCDEV- Bradcrumbs -->
16
16
 
17
- <!-- Page Header -->
17
+ <!-- -PHCDEV- Header -->
18
18
  <h1 class="page-header"><%= yield(:phc_title) %></h1>
19
- <!-- Page Header -->
19
+ <!-- -PHCDEV- Bradcrumbs -->
20
20
 
21
- <!-- Form to Edit Article Post -->
22
- <%= render 'form', article_post: @article_post %>
23
- <!-- Form to Edit Article Post -->
21
+ <!-- -PHCDEV- Form to Edit Article Post -->
22
+ <%= render "form", article_post: @article_post %>
23
+ <!-- -PHCDEV- Form to Edit Article Post -->
@@ -1,37 +1,36 @@
1
- <!-- Title System -->
1
+ <!-- -PHCDEV- Title Variables -->
2
2
  <% phc_title "Article Manager" %>
3
3
  <% phc_title_tagline "Article Index" %>
4
4
  <% phc_breadcrumb_one yield(:phc_title) %>
5
5
  <% phc_breadcrumb_two yield(:phc_title_tagline) %>
6
- <!-- Title System -->
6
+ <!-- -PHCDEV- Title Variables -->
7
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>
8
+ <!-- -PHCDEV- Bradcrumbs -->
9
+ <ol class="breadcrumb float-xl-end">
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
- <!-- Page Bradcrumbs -->
13
+ <!-- -PHCDEV- Bradcrumbs -->
14
14
 
15
- <!-- Page Header -->
15
+ <!-- -PHCDEV- Header -->
16
16
  <h1 class="page-header"><%= yield(:phc_title) %></h1>
17
- <!-- Page Header -->
17
+ <!-- -PHCDEV- Header -->
18
18
 
19
- <!-- Page & Panel Content -->
19
+ <!-- -PHCDEV- Panel -->
20
20
  <div class="panel panel-inverse">
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">
33
- <!-- Table - Article Index -->
21
+
22
+ <!-- -PHCDEV- Panel - Heading -->
23
+ <div class="panel-heading">
24
+ <h4 class="panel-title"><%= yield(:phc_title_tagline) %></h4>
25
+ </div>
26
+ <!-- -PHCDEV- Panel - Heading -->
27
+
28
+ <!-- -PHCDEV- Panel - Body -->
29
+ <div class="panel-body">
30
+
31
+ <!-- -PHCDEV- Table - Article Index -->
34
32
  <div class="table-responsive">
33
+
35
34
  <table class="table table-striped table-bordered">
36
35
  <thead>
37
36
  <tr>
@@ -49,8 +48,8 @@
49
48
  <td><%= article_post.post_status.capitalize %></td>
50
49
  <td>
51
50
  <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?' } %>
51
+ <%= link_to "Update Post", edit_article_post_path(article_post), class: "btn btn-primary btn-xs" %>
52
+ <%= link_to "Remove Post", article_post, class: "btn btn-danger btn-xs", method: :delete, data: { confirm: "Are you sure?" } %>
54
53
  </div>
55
54
  </td>
56
55
  </tr>
@@ -61,8 +60,12 @@
61
60
  <i class="fas fa-plus-circle"></i>
62
61
  <%= "Add a New Article Post" %>
63
62
  <% end %>
63
+
64
64
  </div>
65
- <!-- Table - Article Index -->
65
+ <!-- -PHCDEV- Table - Article Index -->
66
+
66
67
  </div>
68
+ <!-- -PHCDEV- Panel - Body -->
69
+
67
70
  </div>
68
- <!-- Page Content -->
71
+ <!-- -PHCDEV- Panel -->
@@ -1,23 +1,23 @@
1
- <!-- Title System -->
1
+ <!-- -PHCDEV- Title Variables -->
2
2
  <% phc_title "Article Manager" %>
3
3
  <% phc_title_tagline "Create a New Article" %>
4
4
  <% phc_breadcrumb_one yield(:phc_title) %>
5
5
  <% phc_breadcrumb_two link_to "Article Index", phcpress.article_posts_path %>
6
6
  <% phc_breadcrumb_three yield(:phc_title_tagline) %>
7
- <!-- Title System -->
7
+ <!-- -PHCDEV- Title Variables -->
8
8
 
9
- <!-- Page Bradcrumbs -->
10
- <ol class="breadcrumb pull-right">
9
+ <!-- -PHCDEV- Bradcrumbs -->
10
+ <ol class="breadcrumb float-xl-end">
11
11
  <li class="breadcrumb-item"><%= yield(:phc_breadcrumb_one) %></li>
12
12
  <li class="breadcrumb-item"><%= yield(:phc_breadcrumb_two) %></li>
13
13
  <li class="breadcrumb-item active"><%= yield(:phc_breadcrumb_three) %></li>
14
14
  </ol>
15
- <!-- Page Bradcrumbs -->
15
+ <!-- -PHCDEV- Bradcrumbs -->
16
16
 
17
- <!-- Page Header -->
17
+ <!-- -PHCDEV- Header -->
18
18
  <h1 class="page-header"><%= yield(:phc_title) %></h1>
19
- <!-- Page Header -->
19
+ <!-- -PHCDEV- Bradcrumbs -->
20
20
 
21
- <!-- Form for New Article Post -->
22
- <%= render 'form', article_post: @article_post %>
23
- <!-- Form for New Article Post -->
21
+ <!-- -PHCDEV- Form for New Article Post -->
22
+ <%= render "form", article_post: @article_post %>
23
+ <!-- -PHCDEV- Form for New Article Post -->
@@ -56,7 +56,7 @@
56
56
  <% end %>
57
57
  </li>
58
58
  <li class="list-inline-item">
59
- <%= link_to blog_post_index, class: "btn btn-danger btn-sm", method: :delete, data: { confirm: 'Are you sure?' } do %>
59
+ <%= link_to blog_post_index, class: "btn btn-danger btn-sm", method: :delete, data: { confirm: "Are you sure?" } do %>
60
60
  <i class="fas fa-dumpster"></i> Delete Post
61
61
  <% end %>
62
62
  </li>
data/config/routes.rb CHANGED
@@ -1,25 +1,22 @@
1
1
  Phcpress::Engine.routes.draw do
2
2
 
3
- # API Routes
4
- namespace :api, :path => "", :constraints => {:subdomain => "api"} do
5
- namespace :v1 do
6
- resources :posts, defaults: {format: 'json'}
7
- resources :categories, defaults: {format: 'json'}
8
- end
9
- end
3
+ # API Routes
4
+ namespace :api, :path => "", :constraints => {:subdomain => "api"} do
5
+ namespace :v1 do
6
+ resources :posts, defaults: {format: "json"}
7
+ resources :categories, defaults: {format: "json"}
8
+ end
9
+ end
10
10
 
11
- # Article Routes
12
- namespace :article do
13
- resources :categories, class_name: 'Phcpress::Articles::Category'
14
- resources :posts, class_name: 'Phcpress::Articles::Post'
15
- end
11
+ # Article Routes
12
+ namespace :article do
13
+ resources :categories, class_name: "Phcpress::Articles::Category"
14
+ resources :posts, class_name: "Phcpress::Articles::Post"
15
+ end
16
16
 
17
- # Frontend Routes
18
- namespace :blog do
19
- resources :articles, only: [:index, :show]
20
- end
21
-
22
- # PHCAccounts Routes
23
- mount Phcaccounts::Engine, :at => '/'
17
+ # Frontend Routes
18
+ namespace :blog do
19
+ resources :articles, only: [:index, :show]
20
+ end
24
21
 
25
22
  end
@@ -0,0 +1,18 @@
1
+ class CreatePhcpressFriendlyIdSlugs < ActiveRecord::Migration[7.0]
2
+ def change
3
+
4
+ create_table :phcpress_friendly_id_slugs do |t|
5
+ t.string :slug, :null => false
6
+ t.integer :sluggable_id, :null => false
7
+ t.string :sluggable_type, :limit => 50
8
+ t.string :scope
9
+ t.datetime :created_at
10
+ end
11
+
12
+ add_index :phcpress_friendly_id_slugs, :sluggable_id
13
+ add_index :phcpress_friendly_id_slugs, [:slug, :sluggable_type], length: { slug: 140, sluggable_type: 50 }
14
+ add_index :phcpress_friendly_id_slugs, [:slug, :sluggable_type, :scope], name: 'phcpress_fri_id_slugable_scope_type', length: { slug: 70, sluggable_type: 50, scope: 70 }, unique: true
15
+ add_index :phcpress_friendly_id_slugs, :sluggable_type
16
+
17
+ end
18
+ end
@@ -0,0 +1,17 @@
1
+ class CreatePhcpressPostVersions < ActiveRecord::Migration[7.0]
2
+ TEXT_BYTES = 1_073_741_823
3
+ def change
4
+
5
+ create_table :phcpress_post_versions do |t|
6
+ t.string :item_type, {:null=>false}
7
+ t.integer :item_id, null: false
8
+ t.string :event, null: false
9
+ t.string :whodunnit
10
+ t.text :object, limit: TEXT_BYTES
11
+ t.datetime :created_at
12
+ end
13
+
14
+ add_index :phcpress_post_versions, %i(item_type item_id), :name => 'press_post_versions'
15
+
16
+ end
17
+ end
@@ -0,0 +1,17 @@
1
+ class CreatePhcpressCategoryVersions < ActiveRecord::Migration[7.0]
2
+ TEXT_BYTES = 1_073_741_823
3
+ def change
4
+
5
+ create_table :phcpress_category_versions do |t|
6
+ t.string :item_type, {:null=>false}
7
+ t.integer :item_id, null: false
8
+ t.string :event, null: false
9
+ t.string :whodunnit
10
+ t.text :object, limit: TEXT_BYTES
11
+ t.datetime :created_at
12
+ end
13
+
14
+ add_index :phcpress_category_versions, %i(item_type item_id), :name => 'press_category_versions'
15
+
16
+ end
17
+ end
@@ -0,0 +1,17 @@
1
+ class CreatePhcpressArticlePosts < ActiveRecord::Migration[7.0]
2
+ def change
3
+ create_table :phcpress_article_posts do |t|
4
+
5
+ t.string :post_title
6
+ t.text :post_text
7
+ t.string :post_status
8
+ t.string :post_image
9
+
10
+ t.string :slug
11
+ t.string :user_id
12
+
13
+ t.timestamps
14
+
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,14 @@
1
+ class CreatePhcpressArticleCategories < ActiveRecord::Migration[7.0]
2
+ def change
3
+ create_table :phcpress_article_categories do |t|
4
+
5
+ t.string :category_name
6
+
7
+ t.string :slug
8
+ t.string :user_id
9
+
10
+ t.timestamps
11
+
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,8 @@
1
+ class CreateJoinTableCategoriesPosts < ActiveRecord::Migration[7.0]
2
+ def change
3
+ create_join_table :categories, :posts do |t|
4
+ # t.index [:category_id, :post_id]
5
+ # t.index [:post_id, :category_id]
6
+ end
7
+ end
8
+ end