phcpress 51.0.0 → 52.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e1070dd44b5b298bbfc4eb7a31a340a8e5421299a8b305a4fc054c5775a709a8
4
- data.tar.gz: 4a7a60ec096a23b1b17ddae135e627b9acc869968426184771ca08edb8eae211
3
+ metadata.gz: 47a44436bc644c21dc035d5fb9df21fb24e944c6176dadd0dc7aba055d9408e1
4
+ data.tar.gz: 5e7b88437374b44dab3a5e9696aaac8ef2ad7aae8e6c3648a2cdd0da0b2706d7
5
5
  SHA512:
6
- metadata.gz: cec17f084a06b3d7af9cbde652d597aac0ce39dbd8438eedfe33e8db23c0ad11ff3ef2eec89aec3cfc67ec0bf429c9706e3fcf7bfce9ec2a4897c651598def81
7
- data.tar.gz: dc56c5f4954b21ed7a932cd48ce91c5c239fbd02434c725523c9340b5a310c7b03580ea330132f8d209fa2d2a7c25076435d8222811ae95adf7d3ef1e9d99406
6
+ metadata.gz: d6efcc823c73a2830cd835da22e1e7fd998e62188828a0c132cc3120ddbd4caaf6b105362e54bc2ca2c1c8b163ca4fcd3e361ccb75ffe9c4778f670ca0d7e69d
7
+ data.tar.gz: 26e236161a279fcba2d481aef5113476278237b728edd6d97e08e90660a7ac52afb8b48a9dfb94d62e250904dca6085069d13215372e20947c94852d398e0d1d
@@ -11,7 +11,7 @@ module Phcpress
11
11
 
12
12
  # Categories Index
13
13
  def index
14
- @article_categories = Phcpress::Article::Category.where(org_id: current_user.org_id)
14
+ @article_categories = Phcpress::Article::Category.all
15
15
  end
16
16
 
17
17
  # Categories Show
@@ -33,7 +33,6 @@ module Phcpress
33
33
  def create
34
34
  @article_category = Phcpress::Article::Category.new(article_category_params)
35
35
  @article_category.user_id = current_user.id
36
- @article_category.org_id = current_user.org_id
37
36
  if @article_category.save
38
37
  redirect_to article_categories_url, notice: 'Category was successfully created.'
39
38
  else
@@ -65,7 +64,7 @@ module Phcpress
65
64
 
66
65
  # Only allow a trusted parameter "white list" through.
67
66
  def article_category_params
68
- params.require(:article_category).permit(:catname, :slug, :user_id, :org_id)
67
+ params.require(:article_category).permit(:category_name, :slug, :user_id)
69
68
  end
70
69
 
71
70
  end
@@ -11,7 +11,7 @@ module Phcpress
11
11
 
12
12
  # Article Index
13
13
  def index
14
- @article_posts = Phcpress::Article::Post.where(org_id: current_user.org_id)
14
+ @article_posts = Phcpress::Article::Post.all
15
15
  end
16
16
 
17
17
  # Article Show
@@ -33,7 +33,6 @@ module Phcpress
33
33
  def create
34
34
  @article_post = Phcpress::Article::Post.new(article_post_params)
35
35
  @article_post.user_id = current_user.id
36
- @article_post.org_id = current_user.org_id
37
36
  if @article_post.save
38
37
  redirect_to article_posts_url, notice: 'Post was successfully created.'
39
38
  else
@@ -65,7 +64,7 @@ module Phcpress
65
64
 
66
65
  # Only allow a trusted parameter "white list" through.
67
66
  def article_post_params
68
- params.require(:article_post).permit(:psttittle, :psttext, :pststatus, :pstimage, :remove_pstimage, :slug, :user_id, :org_id, category_ids: [])
67
+ params.require(:article_post).permit(:post_tittle, :post_text, :post_status, :post_image, :remove_post_image, :slug, :user_id, category_ids: [])
69
68
  end
70
69
 
71
70
  end
@@ -12,7 +12,7 @@ module Phcpress
12
12
  belongs_to :user, class_name: 'Phcaccounts::User'
13
13
 
14
14
  # Validation for Form Fields
15
- validates :catname,
15
+ validates :category_name,
16
16
  presence: true,
17
17
  uniqueness: true,
18
18
  length: { minimum: 3 }
@@ -23,7 +23,7 @@ module Phcpress
23
23
  # Define for Multiple Records
24
24
  def phcpress_category_slug
25
25
  [
26
- [:catname]
26
+ [:category_name]
27
27
  ]
28
28
  end
29
29
 
@@ -8,22 +8,22 @@ module Phcpress
8
8
  has_paper_trail :class_name => 'Phcpress::PostVersions'
9
9
 
10
10
  # Image Upload
11
- has_one_attached :pstimage
11
+ has_one_attached :post_image
12
12
 
13
13
  # Model Relationships
14
14
  has_and_belongs_to_many :categories, class_name: 'Phcpress::Article::Category', :join_table => 'categories_posts'
15
15
  belongs_to :user, class_name: 'Phcaccounts::User'
16
16
 
17
17
  # Validation for Form Fields
18
- validates :psttittle,
18
+ validates :post_tittle,
19
19
  presence: true,
20
20
  length: { minimum: 3 }
21
21
 
22
- validates :psttext,
22
+ validates :post_text,
23
23
  presence: true,
24
24
  length: { minimum: 3 }
25
25
 
26
- validates :pststatus,
26
+ validates :post_status,
27
27
  presence: true
28
28
 
29
29
  # Clean URL Define
@@ -32,7 +32,7 @@ module Phcpress
32
32
  # Define for Multiple Records
33
33
  def phcpress_post_slug
34
34
  [
35
- [:psttittle]
35
+ [:post_tittle]
36
36
  ]
37
37
  end
38
38
 
@@ -2,25 +2,27 @@
2
2
  <html>
3
3
  <head>
4
4
 
5
- <% phc_seo_title "PHCPress CMS" %>
6
- <% phc_seo_description "Content Management System by PHCDevworks" %>
5
+ <!-- SEO System -->
6
+ <% phc_seo_title "PHCPress by PHCDevworks" %>
7
+ <% phc_seo_description "PHCPress rails CMS engine to manage your website's articles, categories and media." %>
8
+ <!-- SEO System -->
7
9
 
8
- <!-- -PHC- SEO and Site Description -->
9
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
10
+ <!-- SEO and Site Description -->
11
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
10
12
  <title><%= yield(:phc_seo_title) %></title>
11
13
  <meta name="description" content="<%= yield(:phc_seo_description) %>">
12
14
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
13
- <link rel="canonical" href="http://phcmembers.com">
14
- <!-- -PHC- SEO and Site Description -->
15
-
16
- <!-- -PHC- Security -->
15
+ <link rel="canonical" href="http://phcdevworks.com">
16
+ <!-- SEO and Site Description -->
17
+
18
+ <!-- Rails Security Tags -->
17
19
  <%= csrf_meta_tags %>
18
20
  <%= csp_meta_tag %>
19
- <!-- -PHC- Security -->
20
-
21
- <!-- -PHC- CSS -->
21
+ <!-- Rails Security Tags -->
22
+
23
+ <!-- CSS Styles -->
22
24
  <%= stylesheet_link_tag 'phcpress/application', media: 'all', 'data-turbolinks-track': 'reload' %>
23
- <!-- -PHC- CSS -->
25
+ <!-- CSS Styles -->
24
26
 
25
27
  <!-- Font -->
26
28
  <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Open+Sans:300,400%7CRaleway:300,400,500,600,700%7CLato:300,400,400italic,600,700"/>
@@ -31,6 +33,7 @@
31
33
 
32
34
  <!-- Page Container -->
33
35
  <div id="page-container" class="page-container fade page-sidebar-fixed page-header-fixed">
36
+
34
37
  <!-- Page Header -->
35
38
  <div id="header" class="header navbar-default">
36
39
  <%= render 'layouts/phcpress/components/backend/navigation/top_menu' %>
@@ -51,7 +54,7 @@
51
54
  <!-- Page Content -->
52
55
 
53
56
  <!-- Footer Content -->
54
- <div id="footer" class="footer">
57
+ <div id="footer" class="footer mb-4">
55
58
  <%= render 'layouts/phcpress/components/backend/footer/footer' %>
56
59
  </div>
57
60
  <!-- Footer Content -->
@@ -65,15 +68,17 @@
65
68
  </div>
66
69
  <!-- Page Container -->
67
70
 
68
- <!-- Requried JavaScripts -->
71
+ <!-- JavaScript -->
69
72
  <%= javascript_include_tag "phcpress/application", 'data-turbolinks-track': 'reload' %>
70
- <script src="https://cdn.ckeditor.com/4.10.0/full/ckeditor.js"></script>
73
+ <!-- JavaScript -->
74
+
75
+ <!-- JavaScript Loader -->
71
76
  <script>
72
77
  $(document).ready(function() {
73
78
  App.init();
74
79
  });
75
80
  </script>
76
- <!-- Requried JavaScripts -->
81
+ <!-- JavaScript Loader -->
77
82
 
78
83
  </body>
79
84
  </html>
@@ -1,6 +1,6 @@
1
1
  <span class="float-left">
2
2
  &copy; 2012-<%= Time.now.year %> -
3
- <strong>PHC</strong><i>Press</i> -
3
+ <strong>PHC</strong>Press -
4
4
  Engine v<%= Gem.loaded_specs["phcpress"].version.to_s %>
5
5
  </span>
6
6
  <span class="float-right">
@@ -1,7 +1,7 @@
1
1
  <!-- Topbar - Navigation Header -->
2
2
  <div class="navbar-header">
3
3
  <%= link_to phcpress.article_posts_path, class: "navbar-brand" do %>
4
- <strong>PHC</strong><i>Press</i>
4
+ <strong>PHC</strong>Press
5
5
  <% end %>
6
6
  <button type="button" class="navbar-toggle" data-click="sidebar-toggled">
7
7
  <span class="icon-bar"></span>
@@ -2,8 +2,8 @@
2
2
 
3
3
  <!-- PHCPress - Category Form -->
4
4
  <div class="form-group">
5
- <%= form.label :catname, "Category Name" %>
6
- <%= form.text_field :catname, class: "form-control" %>
5
+ <%= form.label :category_name, "Category Name" %>
6
+ <%= form.text_field :category_name, class: "form-control" %>
7
7
  </div>
8
8
  <div class="actions">
9
9
  <%= form.submit class: "btn btn-primary" %>
@@ -40,12 +40,16 @@
40
40
  <tbody>
41
41
  <% @article_categories.each do |article_category| %>
42
42
  <tr>
43
- <td><%= link_to article_category.catname, phcpress.edit_article_category_path(article_category) %></td>
43
+ <td><%= link_to article_category.category_name, phcpress.edit_article_category_path(article_category) %></td>
44
44
  <td><%= link_to 'Trash', article_category, class: "btn btn-danger btn-xs", method: :delete, data: { confirm: 'Are you sure?' } %></td>
45
45
  </tr>
46
46
  <% end %>
47
47
  </tbody>
48
48
  </table>
49
+ <%= link_to phcpress.new_article_category_path, class: "btn btn-primary btn-sm" do %>
50
+ <i class="fas fa-plus-circle"></i>
51
+ <%= "Add a New Article Category" %>
52
+ <% end %>
49
53
  </div>
50
54
  <!-- Table - Category Index -->
51
55
  </div>
@@ -1,8 +1,8 @@
1
1
  <p id="notice"><%= notice %></p>
2
2
 
3
3
  <p>
4
- <strong>Catname:</strong>
5
- <%= @article_category.catname %>
4
+ <strong>category_name:</strong>
5
+ <%= @article_category.category_name %>
6
6
  </p>
7
7
 
8
8
  <%= link_to 'Edit', edit_article_category_path(@article_category) %> |
@@ -8,8 +8,8 @@
8
8
  </div>
9
9
  <div class="panel-body">
10
10
  <div class="form-group">
11
- <%= form.label :pststatus, "Post Status" %>
12
- <%= form.select( :pststatus, [['Draft','draft'],['Published','published'],['Review','review']], {}, {class: "form-control form-control-sm"}) %>
11
+ <%= form.label :post_status, "Post Status" %>
12
+ <%= form.select( :post_status, [['Draft','draft'],['Published','published'],['Review','review']], {}, {class: "form-control form-control-sm"}) %>
13
13
  </div>
14
14
  <div class="actions">
15
15
  <%= form.submit class: "btn btn-primary waves-effect" %>
@@ -23,13 +23,13 @@
23
23
  </div>
24
24
  <div class="panel-body">
25
25
  <div class="form-group">
26
- <%= form.label :pstimage, "Featured Image" %>
27
- <%= form.file_field :pstimage, class: "form-control" %>
26
+ <%= form.label :post_image, "Featured Image" %>
27
+ <%= form.file_field :post_image, class: "form-control" %>
28
28
  </div>
29
- <% if form.object.pstimage? %>
30
- <%= image_tag form.object.pstimage_url, class: "img-responsive img-thumbnail" %>
31
- <%= form.label :remove_pstimage %>
32
- <%= form.check_box :remove_pstimage %>
29
+ <% if form.object.post_image? %>
30
+ <%= image_tag form.object.post_image_url, class: "img-responsive img-thumbnail" %>
31
+ <%= form.label :remove_post_image %>
32
+ <%= form.check_box :remove_post_image %>
33
33
  <% end %>
34
34
  </div>
35
35
  </div>
@@ -39,7 +39,7 @@
39
39
  <h4 class="panel-title">Post Categories</h4>
40
40
  </div>
41
41
  <div class="panel-body">
42
- <%= form.collection_check_boxes :category_ids, Phcpress::Article::Category.where(org_id: current_user.org_id), :id, :catname do |post_category| %>
42
+ <%= form.collection_check_boxes :category_ids, Phcpress::Article::Category.all, :id, :category_name do |post_category| %>
43
43
  <%= post_category.check_box %>
44
44
  <%= post_category.label %></br>
45
45
  <% end %>
@@ -64,11 +64,11 @@
64
64
  </div>
65
65
  <div class="panel-body ">
66
66
  <div class="form-group">
67
- <%= form.label :psttittle, "Article Title" %>
68
- <%= form.text_field :psttittle, class: "form-control" %>
67
+ <%= form.label :post_tittle, "Article Title" %>
68
+ <%= form.text_field :post_tittle, class: "form-control" %>
69
69
  </div>
70
70
  <div class="form-group">
71
- <%= form.text_area :psttext, :class => "ckeditor form-control", :id => "editor1", :rows => 20, :cols => 60 %>
71
+ <%= form.text_area :post_text, :class => "ckeditor form-control", :id => "editor1", :rows => 20, :cols => 60 %>
72
72
  </div>
73
73
  </div>
74
74
  </div>
@@ -41,9 +41,9 @@
41
41
  <tbody>
42
42
  <% @article_posts.each do |article_post| %>
43
43
  <tr>
44
- <td><%= article_post.psttittle %></td>
45
- <td><%= truncate(article_post.psttext, :length => 80, :escape => false) %></td>
46
- <td><%= article_post.pststatus.capitalize %></td>
44
+ <td><%= article_post.post_tittle %></td>
45
+ <td><%= truncate(article_post.post_text, :length => 80, :escape => false) %></td>
46
+ <td><%= article_post.post_status.capitalize %></td>
47
47
  <td><div class="btn-group" role="group" aria-label="Blog Articles">
48
48
  <%= link_to 'Edit Post', edit_article_post_path(article_post), class: "btn btn-primary btn-xs" %>
49
49
  <%= link_to 'Trash Post', article_post, class: "btn btn-danger btn-xs", method: :delete, data: { confirm: 'Are you sure?' } %>
@@ -52,6 +52,10 @@
52
52
  <% end %>
53
53
  </tbody>
54
54
  </table>
55
+ <%= link_to phcpress.new_article_post_path, class: "btn btn-primary" do %>
56
+ <i class="fas fa-plus-circle"></i>
57
+ <%= "Add a New Article Post" %>
58
+ <% end %>
55
59
  </div>
56
60
  <!-- Table - Article Index -->
57
61
  </div>
@@ -2,15 +2,14 @@ class CreatePhcpressArticlePosts < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  create_table :phcpress_article_posts do |t|
4
4
 
5
- t.string :psttittle
6
- t.string :psttext
7
- t.string :pststatus
8
- t.string :pstimage
5
+ t.string :post_tittle
6
+ t.string :post_text
7
+ t.string :post_status
8
+ t.string :post_image
9
9
 
10
10
  t.string :slug
11
- t.string :user_id
12
- t.string :org_id
13
11
 
12
+ t.string :user_id
14
13
  t.timestamps
15
14
 
16
15
  end
@@ -2,11 +2,10 @@ class CreatePhcpressArticleCategories < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  create_table :phcpress_article_categories do |t|
4
4
 
5
- t.string :catname
5
+ t.string :category_name
6
6
 
7
7
  t.string :slug
8
8
  t.string :user_id
9
- t.string :org_id
10
9
 
11
10
  t.timestamps
12
11
 
@@ -1,3 +1,3 @@
1
1
  module Phcpress
2
- VERSION = '51.0.0'
2
+ VERSION = '52.0.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phcpress
3
3
  version: !ruby/object:Gem::Version
4
- version: 51.0.0
4
+ version: 52.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - BradPotts
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-22 00:00:00.000000000 Z
11
+ date: 2019-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -624,7 +624,8 @@ dependencies:
624
624
  - - "~>"
625
625
  - !ruby/object:Gem::Version
626
626
  version: '2.4'
627
- description: Ruby on Rails 5.2 Content Management Engine
627
+ description: PHCPress rails CMS engine to manage your website's articles, categories
628
+ and media.
628
629
  email:
629
630
  - info@phcdevworks.com
630
631
  executables: []