phcdevworks_press 8.3.1 → 8.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +20 -20
  3. data/README.md +33 -33
  4. data/Rakefile +8 -8
  5. data/app/assets/config/phcdevworks_press_manifest.js +3 -3
  6. data/app/assets/stylesheets/phcdevworks_press/application.scss +0 -0
  7. data/app/assets/stylesheets/phcdevworks_press/article/posts.scss +0 -0
  8. data/app/assets/stylesheets/phcdevworks_press/blog/articles.scss +0 -0
  9. data/app/assets/stylesheets/phcdevworks_press/list/items.scss +3 -3
  10. data/app/assets/stylesheets/phcdevworks_press/list/posts.scss +3 -3
  11. data/app/assets/stylesheets/phcdevworks_press/review/posts.scss +3 -3
  12. data/app/controllers/phcdevworks_press/application_controller.rb +13 -13
  13. data/app/controllers/phcdevworks_press/article/posts_controller.rb +83 -83
  14. data/app/controllers/phcdevworks_press/blog/articles_controller.rb +29 -29
  15. data/app/controllers/phcdevworks_press/blog/lists_controller.rb +29 -29
  16. data/app/controllers/phcdevworks_press/blog/reviews_controller.rb +29 -29
  17. data/app/controllers/phcdevworks_press/list/items_controller.rb +89 -89
  18. data/app/controllers/phcdevworks_press/list/posts_controller.rb +82 -82
  19. data/app/controllers/phcdevworks_press/review/posts_controller.rb +82 -82
  20. data/app/helpers/phcdevworks_press/application_helper.rb +4 -4
  21. data/app/helpers/phcdevworks_press/article/posts_helper.rb +4 -4
  22. data/app/helpers/phcdevworks_press/blog/articles_helper.rb +4 -4
  23. data/app/helpers/phcdevworks_press/list/items_helper.rb +4 -4
  24. data/app/helpers/phcdevworks_press/list/posts_helper.rb +4 -4
  25. data/app/helpers/phcdevworks_press/review/posts_helper.rb +4 -4
  26. data/app/jobs/phcdevworks_press/application_job.rb +4 -4
  27. data/app/mailers/phcdevworks_press/application_mailer.rb +6 -6
  28. data/app/models/phcdevworks_press/application_record.rb +5 -5
  29. data/app/models/phcdevworks_press/article/post.rb +34 -34
  30. data/app/models/phcdevworks_press/article.rb +7 -7
  31. data/app/models/phcdevworks_press/article_post_versions.rb +0 -0
  32. data/app/models/phcdevworks_press/list/item.rb +33 -33
  33. data/app/models/phcdevworks_press/list/post.rb +34 -34
  34. data/app/models/phcdevworks_press/list.rb +7 -7
  35. data/app/models/phcdevworks_press/list_item_versions.rb +0 -0
  36. data/app/models/phcdevworks_press/list_post_versions.rb +0 -0
  37. data/app/models/phcdevworks_press/review/post.rb +33 -33
  38. data/app/models/phcdevworks_press/review.rb +7 -7
  39. data/app/models/phcdevworks_press/review_post_versions.rb +0 -0
  40. data/app/views/layouts/phcdevworks_press/application.html.erb +131 -131
  41. data/app/views/layouts/phcdevworks_press/components/backend/footer/_footer.html.erb +0 -0
  42. data/app/views/layouts/phcdevworks_press/components/backend/navigation/_top_menu.html.erb +0 -0
  43. data/app/views/layouts/phcdevworks_press/components/backend/sidebars/_side_menu.html.erb +0 -0
  44. data/app/views/layouts/phcdevworks_press/frontend.html.erb +5 -5
  45. data/app/views/phcdevworks_press/article/posts/_form.html.erb +105 -105
  46. data/app/views/phcdevworks_press/article/posts/edit.html.erb +23 -23
  47. data/app/views/phcdevworks_press/article/posts/index.html.erb +83 -83
  48. data/app/views/phcdevworks_press/article/posts/new.html.erb +23 -23
  49. data/app/views/phcdevworks_press/blog/articles/index.html.erb +69 -69
  50. data/app/views/phcdevworks_press/blog/articles/show.html.erb +0 -0
  51. data/app/views/phcdevworks_press/list/items/_form.html.erb +37 -37
  52. data/app/views/phcdevworks_press/list/items/edit.html.erb +47 -47
  53. data/app/views/phcdevworks_press/list/items/index.html.erb +81 -81
  54. data/app/views/phcdevworks_press/list/items/new.html.erb +48 -48
  55. data/app/views/phcdevworks_press/list/items/show.html.erb +0 -0
  56. data/app/views/phcdevworks_press/list/posts/_form.html.erb +86 -86
  57. data/app/views/phcdevworks_press/list/posts/edit.html.erb +23 -23
  58. data/app/views/phcdevworks_press/list/posts/index.html.erb +84 -84
  59. data/app/views/phcdevworks_press/list/posts/new.html.erb +23 -23
  60. data/app/views/phcdevworks_press/list/posts/show.html.erb +76 -76
  61. data/app/views/phcdevworks_press/review/posts/_form.html.erb +90 -90
  62. data/app/views/phcdevworks_press/review/posts/edit.html.erb +23 -23
  63. data/app/views/phcdevworks_press/review/posts/index.html.erb +83 -83
  64. data/app/views/phcdevworks_press/review/posts/new.html.erb +23 -23
  65. data/app/views/phcdevworks_press/review/posts/show.html.erb +9 -9
  66. data/config/routes.rb +38 -38
  67. data/config/spring.rb +1 -1
  68. data/db/migrate/20170517064030_create_phcdevworks_press_article_post_versions.rb +0 -0
  69. data/db/migrate/20190805232522_create_phcdevworks_press_article_posts.rb +19 -19
  70. data/db/migrate/20191024232406_create_phcdevworks_press_article_categories_posts.rb +10 -10
  71. data/db/migrate/20200708231335_create_phcdevworks_press_list_post_versions.rb +18 -18
  72. data/db/migrate/20200708231351_create_phcdevworks_press_review_post_versions.rb +18 -18
  73. data/db/migrate/20200712064624_create_phcdevworks_press_list_posts.rb +19 -19
  74. data/db/migrate/20200712064740_create_phcdevworks_press_review_posts.rb +21 -21
  75. data/db/migrate/20200712064920_create_phcdevworks_press_list_items.rb +22 -22
  76. data/db/migrate/20200712065808_create_phcdevworks_press_list_item_versions.rb +18 -18
  77. data/db/migrate/20200716224648_create_phcdevworks_press_review_categories_posts.rb +10 -10
  78. data/db/migrate/20200716224738_create_phcdevworks_press_list_categories_posts.rb +10 -10
  79. data/db/migrate/20210213025633_add_affiliatelink_to_article_posts.rb +5 -5
  80. data/lib/phcdevworks_press/engine.rb +47 -47
  81. data/lib/phcdevworks_press/version.rb +3 -3
  82. data/lib/phcdevworks_press.rb +6 -6
  83. data/lib/tasks/phcdevworks_press_tasks.rake +4 -4
  84. metadata +33 -33
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2a7e61ee48e50a824d6012fdf7e8afe8c37d808c7776bed43dda83a7d5a1b229
4
- data.tar.gz: 2e4266f9f70c167a0f364bf2963ff5e23a7c4ae732d7e26a7ff10cbc5d3b4893
3
+ metadata.gz: 608ece9fda4f65a238192b588615fcf000e45624096d6606266b13bb99c6c0f6
4
+ data.tar.gz: 72a795ec40fc29a611ec410d8a4331dd91c0c27fb29cffcba932ac4a04b85918
5
5
  SHA512:
6
- metadata.gz: 2a08d82c8278f4f197fa58ea96392c20eb524fc42a70624fc741073917d5c28fe4b00c7272ece2b983b92a5f8e8d2420de50dbab193a0944ca1b009f299bc6d9
7
- data.tar.gz: 8d8c0a7f69a292f2fcd2b9c5b797089d930264ec0ceee2a17e8f45e302e6a1d9e9292d1a3e5b0387c7b1fdb5a52e08e8ad0e0c7b5f611b82fe333626528aa826
6
+ metadata.gz: 89e11eee35cb103699b95ab5fa51b71fa6356d9b5c1d99f8e89e46a52296ee782b69ac47004f43548b3ee010d5e27b644026bfd74bcf2d91992c2760defba3fa
7
+ data.tar.gz: e4e472e8e192074923700e27cb48b229b63c9dace59e276119195f822d04a3ea087653945f69e05628115bbb6204d25119dc1665c4cee8719694697b2e770a14
data/MIT-LICENSE CHANGED
@@ -1,20 +1,20 @@
1
- Copyright 2020 BradPotts
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ Copyright 2020 BradPotts
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,34 +1,34 @@
1
- ### Phcdevworks Press (News/Blog Engine) Documentation
2
- Phcdevworks Press rails CMS engine to manage your website's articles, categories and media.
3
-
4
- * Website article posts with WYSIWYG editor.
5
- * Upload images locally or use any popular cloud service.
6
- * Customizable article categories module included.
7
-
8
- #### Step 1 - Add Phcdevworks Press to your gemfile and run command
9
-
10
- gem 'phcdevworks_press'
11
- bundle install
12
-
13
- #### Step 2 - Copy Phcdevworks Press Database Tables
14
- To copy Phcdevworks Press' requried database migrations, copy each command individually to your terminal's command line.
15
-
16
- rails phcdevworks_press:install:migrations
17
- rails db:migrate
18
-
19
- #### Step 3 - Mount Phcdevworks Press & Add Routes
20
- Mount Phcdevworks Press by adding code below to your routes file.
21
-
22
- mount PhcdevworksPress::Engine, :at => '/'
23
-
24
- #### Step 4 - Recompile Assets
25
- To properly function re-compile your application's assets to copy over required files.
26
-
27
- rails assets:clobber
28
- rails assets:precompile
29
-
30
- #### Step 5 - Generate Contact Form View (Customization)
31
- All Phcdevworks Press views and layouts can be overwritten by copying files to your application.
32
-
33
- rails generate phcdevworks_press:views
1
+ ### Phcdevworks Press (News/Blog Engine) Documentation
2
+ Phcdevworks Press rails CMS engine to manage your website's articles, categories and media.
3
+
4
+ * Website article posts with WYSIWYG editor.
5
+ * Upload images locally or use any popular cloud service.
6
+ * Customizable article categories module included.
7
+
8
+ #### Step 1 - Add Phcdevworks Press to your gemfile and run command
9
+
10
+ gem 'phcdevworks_press'
11
+ bundle install
12
+
13
+ #### Step 2 - Copy Phcdevworks Press Database Tables
14
+ To copy Phcdevworks Press' requried database migrations, copy each command individually to your terminal's command line.
15
+
16
+ rails phcdevworks_press:install:migrations
17
+ rails db:migrate
18
+
19
+ #### Step 3 - Mount Phcdevworks Press & Add Routes
20
+ Mount Phcdevworks Press by adding code below to your routes file.
21
+
22
+ mount PhcdevworksPress::Engine, :at => '/'
23
+
24
+ #### Step 4 - Recompile Assets
25
+ To properly function re-compile your application's assets to copy over required files.
26
+
27
+ rails assets:clobber
28
+ rails assets:precompile
29
+
30
+ #### Step 5 - Generate Contact Form View (Customization)
31
+ All Phcdevworks Press views and layouts can be overwritten by copying files to your application.
32
+
33
+ rails generate phcdevworks_press:views
34
34
 
data/Rakefile CHANGED
@@ -1,8 +1,8 @@
1
- require "bundler/setup"
2
-
3
- APP_RAKEFILE = File.expand_path("spec/test_app/Rakefile", __dir__)
4
- load "rails/tasks/engine.rake"
5
-
6
- load "rails/tasks/statistics.rake"
7
-
8
- require "bundler/gem_tasks"
1
+ require "bundler/setup"
2
+
3
+ APP_RAKEFILE = File.expand_path("spec/test_app/Rakefile", __dir__)
4
+ load "rails/tasks/engine.rake"
5
+
6
+ load "rails/tasks/statistics.rake"
7
+
8
+ require "bundler/gem_tasks"
@@ -1,3 +1,3 @@
1
- //= link_directory ../stylesheets/phcdevworks_press .scss
2
- //= link phcthemes_admin_panel_pack_coloradmin.css
3
- //= link phcthemes_admin_panel_pack_coloradmin.js
1
+ //= link_directory ../stylesheets/phcdevworks_press .scss
2
+ //= link phcthemes_admin_panel_pack_coloradmin.css
3
+ //= link phcthemes_admin_panel_pack_coloradmin.js
@@ -1,3 +1,3 @@
1
- // Place all the styles related to the list::items controller here.
2
- // They will automatically be included in application.css.
3
- // You can use Sass (SCSS) here: https://sass-lang.com/
1
+ // Place all the styles related to the list::items controller here.
2
+ // They will automatically be included in application.css.
3
+ // You can use Sass (SCSS) here: https://sass-lang.com/
@@ -1,3 +1,3 @@
1
- // Place all the styles related to the list::posts controller here.
2
- // They will automatically be included in application.css.
3
- // You can use Sass (SCSS) here: https://sass-lang.com/
1
+ // Place all the styles related to the list::posts controller here.
2
+ // They will automatically be included in application.css.
3
+ // You can use Sass (SCSS) here: https://sass-lang.com/
@@ -1,3 +1,3 @@
1
- // Place all the styles related to the review::posts controller here.
2
- // They will automatically be included in application.css.
3
- // You can use Sass (SCSS) here: https://sass-lang.com/
1
+ // Place all the styles related to the review::posts controller here.
2
+ // They will automatically be included in application.css.
3
+ // You can use Sass (SCSS) here: https://sass-lang.com/
@@ -1,13 +1,13 @@
1
- module PhcdevworksPress
2
- class ApplicationController < ActionController::Base
3
-
4
- # Security Filters
5
- protect_from_forgery with: :exception
6
-
7
- # Load Requried Helper Files
8
- helper PhcdevworksActiveMenus::Engine.helpers
9
- helper PhcdevworksNotifications::Engine.helpers
10
- helper PhcdevworksTitleseo::Engine.helpers
11
-
12
- end
13
- end
1
+ module PhcdevworksPress
2
+ class ApplicationController < ActionController::Base
3
+
4
+ # Security Filters
5
+ protect_from_forgery with: :exception
6
+
7
+ # Load Requried Helper Files
8
+ helper PhcdevworksActiveMenus::Engine.helpers
9
+ helper PhcdevworksNotifications::Engine.helpers
10
+ helper PhcdevworksTitleseo::Engine.helpers
11
+
12
+ end
13
+ end
@@ -1,83 +1,83 @@
1
- require_dependency "phcdevworks_press/application_controller"
2
-
3
- module PhcdevworksPress
4
- class Article::PostsController < ApplicationController
5
-
6
- # Filters & Security
7
- #include PhcdevworksCore::PhcpluginsHelper
8
- before_action :authenticate_user!
9
- before_action :set_paper_trail_whodunnit
10
- before_action :set_article_post, only: [:show, :edit, :update, :destroy]
11
-
12
- # GET /article/posts
13
- def index
14
- @article_posts = Article::Post.all
15
- end
16
-
17
- # GET /article/posts/1
18
- def show
19
- @article_post = Article::Post.friendly.find(params[:id])
20
- @versions = PhcdevworksPress::ArticlePostVersions.where(item_id: params[:id], item_type: 'PhcdevworksPress::Article::Post')
21
- end
22
-
23
- # GET /article/posts/new
24
- def new
25
- @article_post = Article::Post.new
26
- end
27
-
28
- # GET /article/posts/1/edit
29
- def edit
30
- end
31
-
32
- # POST /article/posts
33
- def create
34
- @article_post = Article::Post.new(article_post_params)
35
- @article_post.user_id = current_user.id
36
- @article_post.org_id = current_user.org_id
37
- respond_to do |format|
38
- if @article_post.save
39
- format.html { redirect_to article_posts_path, :flash => { :success => 'Article has been Added.' }}
40
- format.json { render :show, status: :created, location: @article_post }
41
- else
42
- format.html { render :new }
43
- format.json { render json: @article_post.errors, status: :unprocessable_entity }
44
- end
45
- end
46
- end
47
-
48
- # PATCH/PUT /article/posts/1
49
- def update
50
- respond_to do |format|
51
- if @article_post.update(article_post_params)
52
- format.html { redirect_to article_posts_path, :flash => { :notice => 'Article has been Updated.' }}
53
- format.json { render :show, status: :ok, location: @article_post }
54
- else
55
- format.html { render :edit }
56
- format.json { render json: @article_post.errors, status: :unprocessable_entity }
57
- end
58
- end
59
- end
60
-
61
- # DELETE /article/posts/1
62
- def destroy
63
- @article_post.destroy
64
- respond_to do |format|
65
- format.html { redirect_to article_posts_path, :flash => { :error => 'Article has been Removed.' }}
66
- format.json { head :no_content }
67
- end
68
- end
69
-
70
- private
71
-
72
- # Common Callbacks
73
- def set_article_post
74
- @article_post = Article::Post.friendly.find(params[:id])
75
- end
76
-
77
- # Whitelist
78
- def article_post_params
79
- params.require(:article_post).permit(:article_post_title, :article_post_text, :article_post_status, :article_post_image, :remove_article_post_image, :slug, :optimization_id, :link_id, :org_id, :user_id, category_ids: [])
80
- end
81
-
82
- end
83
- end
1
+ require_dependency "phcdevworks_press/application_controller"
2
+
3
+ module PhcdevworksPress
4
+ class Article::PostsController < ApplicationController
5
+
6
+ # Filters & Security
7
+ #include PhcdevworksCore::PhcpluginsHelper
8
+ before_action :authenticate_user!
9
+ before_action :set_paper_trail_whodunnit
10
+ before_action :set_article_post, only: [:show, :edit, :update, :destroy]
11
+
12
+ # GET /article/posts
13
+ def index
14
+ @article_posts = Article::Post.all
15
+ end
16
+
17
+ # GET /article/posts/1
18
+ def show
19
+ @article_post = Article::Post.friendly.find(params[:id])
20
+ @versions = PhcdevworksPress::ArticlePostVersions.where(item_id: params[:id], item_type: 'PhcdevworksPress::Article::Post')
21
+ end
22
+
23
+ # GET /article/posts/new
24
+ def new
25
+ @article_post = Article::Post.new
26
+ end
27
+
28
+ # GET /article/posts/1/edit
29
+ def edit
30
+ end
31
+
32
+ # POST /article/posts
33
+ def create
34
+ @article_post = Article::Post.new(article_post_params)
35
+ @article_post.user_id = current_user.id
36
+ @article_post.org_id = current_user.org_id
37
+ respond_to do |format|
38
+ if @article_post.save
39
+ format.html { redirect_to article_posts_path, :flash => { :success => 'Article has been Added.' }}
40
+ format.json { render :show, status: :created, location: @article_post }
41
+ else
42
+ format.html { render :new }
43
+ format.json { render json: @article_post.errors, status: :unprocessable_entity }
44
+ end
45
+ end
46
+ end
47
+
48
+ # PATCH/PUT /article/posts/1
49
+ def update
50
+ respond_to do |format|
51
+ if @article_post.update(article_post_params)
52
+ format.html { redirect_to article_posts_path, :flash => { :notice => 'Article has been Updated.' }}
53
+ format.json { render :show, status: :ok, location: @article_post }
54
+ else
55
+ format.html { render :edit }
56
+ format.json { render json: @article_post.errors, status: :unprocessable_entity }
57
+ end
58
+ end
59
+ end
60
+
61
+ # DELETE /article/posts/1
62
+ def destroy
63
+ @article_post.destroy
64
+ respond_to do |format|
65
+ format.html { redirect_to article_posts_path, :flash => { :error => 'Article has been Removed.' }}
66
+ format.json { head :no_content }
67
+ end
68
+ end
69
+
70
+ private
71
+
72
+ # Common Callbacks
73
+ def set_article_post
74
+ @article_post = Article::Post.friendly.find(params[:id])
75
+ end
76
+
77
+ # Whitelist
78
+ def article_post_params
79
+ params.require(:article_post).permit(:article_post_title, :article_post_text, :article_post_status, :article_post_image, :remove_article_post_image, :slug, :optimization_id, :link_id, :org_id, :user_id, category_ids: [])
80
+ end
81
+
82
+ end
83
+ end
@@ -1,29 +1,29 @@
1
- require_dependency "phcdevworks_press/application_controller"
2
-
3
- module PhcdevworksPress
4
- class Blog::ArticlesController < ApplicationController
5
-
6
- # Filters
7
- before_action :phc_blog_index_all
8
-
9
- # Layout
10
- layout "phcdevworks_press/frontend"
11
-
12
- # INDEX
13
- def index
14
- end
15
-
16
- # SHOW
17
- def show
18
- @phcdevworks_cms_press_article_single = Article::Post.friendly.find(params[:id])
19
- end
20
-
21
- # Index All for Blog
22
- def phc_blog_index_all
23
- @phcdevworks_cms_press_article_index = Article::Post.where(article_post_status: "published").order("created_at DESC")
24
- @phcdevworks_cms_press_list_index = List::Post.where(list_post_status: "published").order("created_at DESC")
25
- @phcdevworks_cms_press_review_index = Review::Post.where(review_post_status: "published").order("created_at DESC")
26
- end
27
-
28
- end
29
- end
1
+ require_dependency "phcdevworks_press/application_controller"
2
+
3
+ module PhcdevworksPress
4
+ class Blog::ArticlesController < ApplicationController
5
+
6
+ # Filters
7
+ before_action :phc_blog_index_all
8
+
9
+ # Layout
10
+ layout "phcdevworks_press/frontend"
11
+
12
+ # INDEX
13
+ def index
14
+ end
15
+
16
+ # SHOW
17
+ def show
18
+ @phcdevworks_cms_press_article_single = Article::Post.friendly.find(params[:id])
19
+ end
20
+
21
+ # Index All for Blog
22
+ def phc_blog_index_all
23
+ @phcdevworks_cms_press_article_index = Article::Post.where(article_post_status: "published").order("created_at DESC")
24
+ @phcdevworks_cms_press_list_index = List::Post.where(list_post_status: "published").order("created_at DESC")
25
+ @phcdevworks_cms_press_review_index = Review::Post.where(review_post_status: "published").order("created_at DESC")
26
+ end
27
+
28
+ end
29
+ end
@@ -1,29 +1,29 @@
1
- require_dependency "phcdevworks_press/application_controller"
2
-
3
- module PhcdevworksPress
4
- class Blog::ListsController < ApplicationController
5
-
6
- # Filters
7
- before_action :phc_blog_index_all
8
-
9
- # Layout
10
- layout "phcdevworks_press/frontend"
11
-
12
- # INDEX
13
- def index
14
- end
15
-
16
- # SHOW
17
- def show
18
- @phcdevworks_cms_press_list_single = List::Post.friendly.find(params[:id])
19
- end
20
-
21
- # Index All for Blog
22
- def phc_blog_index_all
23
- @phcdevworks_cms_press_article_index = Article::Post.where(article_post_status: "published").order("created_at DESC")
24
- @phcdevworks_cms_press_list_index = List::Post.where(list_post_status: "published").order("created_at DESC")
25
- @phcdevworks_cms_press_review_index = Review::Post.where(review_post_status: "published").order("created_at DESC")
26
- end
27
-
28
- end
29
- end
1
+ require_dependency "phcdevworks_press/application_controller"
2
+
3
+ module PhcdevworksPress
4
+ class Blog::ListsController < ApplicationController
5
+
6
+ # Filters
7
+ before_action :phc_blog_index_all
8
+
9
+ # Layout
10
+ layout "phcdevworks_press/frontend"
11
+
12
+ # INDEX
13
+ def index
14
+ end
15
+
16
+ # SHOW
17
+ def show
18
+ @phcdevworks_cms_press_list_single = List::Post.friendly.find(params[:id])
19
+ end
20
+
21
+ # Index All for Blog
22
+ def phc_blog_index_all
23
+ @phcdevworks_cms_press_article_index = Article::Post.where(article_post_status: "published").order("created_at DESC")
24
+ @phcdevworks_cms_press_list_index = List::Post.where(list_post_status: "published").order("created_at DESC")
25
+ @phcdevworks_cms_press_review_index = Review::Post.where(review_post_status: "published").order("created_at DESC")
26
+ end
27
+
28
+ end
29
+ end
@@ -1,29 +1,29 @@
1
- require_dependency "phcdevworks_press/application_controller"
2
-
3
- module PhcdevworksPress
4
- class Blog::ReviewsController < ApplicationController
5
-
6
- # Filters
7
- before_action :phc_blog_index_all
8
-
9
- # Layout
10
- layout "phcdevworks_press/frontend"
11
-
12
- # INDEX
13
- def index
14
- end
15
-
16
- # SHOW
17
- def show
18
- @phcdevworks_cms_press_review_single = Review::Post.friendly.find(params[:id])
19
- end
20
-
21
- # Index All for Blog
22
- def phc_blog_index_all
23
- @phcdevworks_cms_press_article_index = Article::Post.where(article_post_status: "published").order("created_at DESC")
24
- @phcdevworks_cms_press_list_index = List::Post.where(list_post_status: "published").order("created_at DESC")
25
- @phcdevworks_cms_press_review_index = Review::Post.where(review_post_status: "published").order("created_at DESC")
26
- end
27
-
28
- end
29
- end
1
+ require_dependency "phcdevworks_press/application_controller"
2
+
3
+ module PhcdevworksPress
4
+ class Blog::ReviewsController < ApplicationController
5
+
6
+ # Filters
7
+ before_action :phc_blog_index_all
8
+
9
+ # Layout
10
+ layout "phcdevworks_press/frontend"
11
+
12
+ # INDEX
13
+ def index
14
+ end
15
+
16
+ # SHOW
17
+ def show
18
+ @phcdevworks_cms_press_review_single = Review::Post.friendly.find(params[:id])
19
+ end
20
+
21
+ # Index All for Blog
22
+ def phc_blog_index_all
23
+ @phcdevworks_cms_press_article_index = Article::Post.where(article_post_status: "published").order("created_at DESC")
24
+ @phcdevworks_cms_press_list_index = List::Post.where(list_post_status: "published").order("created_at DESC")
25
+ @phcdevworks_cms_press_review_index = Review::Post.where(review_post_status: "published").order("created_at DESC")
26
+ end
27
+
28
+ end
29
+ end