phcpress 10.0.0 → 11.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/models/phcpress/article/post.rb +15 -15
- data/app/models/phcpress/connection_versions.rb +5 -0
- data/app/models/phcpress/modules/category.rb +12 -2
- data/app/models/phcpress/modules/connection.rb +13 -3
- data/app/views/layouts/components/backend/footer/_footer.html.erb +1 -1
- data/app/views/layouts/components/backend/navigation/_navigation.html.erb +2 -2
- data/app/views/layouts/phcpress/application.html.erb +1 -1
- data/app/views/phcpress/article/posts/index.html.erb +13 -10
- data/config/routes.rb +1 -1
- data/db/migrate/20170509002355_create_phcpress_friendly_id_slugs.rb +1 -1
- data/db/migrate/20170517064114_create_phcpress_connection_versions.rb +16 -0
- data/lib/phcpress/version.rb +1 -1
- metadata +10 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e62cf3e3c0ce308b9163c135a50dff9b56c19fce
|
4
|
+
data.tar.gz: ef17d12204b5061abc2cf4a504cd03b325186ac2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9386ce67809d9146305f87a4d685362b7862e6d00c8920787793092ef83782be351a47229b015bcb51e90c34a11d4fa8343763bad9ae48343cc6ed7c5f2c82b0
|
7
|
+
data.tar.gz: e707cd9f71a4f5d7c2c0e22bd9d9937b00c5193b2bccdbcfbdb196917028e7e8e7b99bd8727fd0116abf05b25df75930f9c5c97bcd994ae0e11d926b071ee266
|
@@ -5,7 +5,7 @@ module Phcpress
|
|
5
5
|
extend FriendlyId
|
6
6
|
|
7
7
|
# Add Paper Trail
|
8
|
-
has_paper_trail :class_name => '
|
8
|
+
has_paper_trail :class_name => 'Phcpress::PostVersions'
|
9
9
|
|
10
10
|
# Image Upload Initialize
|
11
11
|
mount_uploader :pstimage, Phcpress::PstimageUploader
|
@@ -19,22 +19,22 @@ module Phcpress
|
|
19
19
|
presence: true,
|
20
20
|
length: { minimum: 3 }
|
21
21
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
validates :pststatus,
|
27
|
-
presence: true
|
22
|
+
validates :psttext,
|
23
|
+
presence: true,
|
24
|
+
length: { minimum: 3 }
|
28
25
|
|
29
|
-
|
30
|
-
|
26
|
+
validates :pststatus,
|
27
|
+
presence: true
|
31
28
|
|
32
|
-
|
33
|
-
|
34
|
-
[
|
35
|
-
[:psttitle]
|
36
|
-
]
|
37
|
-
end
|
29
|
+
# Clean URL Define
|
30
|
+
friendly_id :phcpress_post_slug, use: [:slugged, :finders]
|
38
31
|
|
32
|
+
# Define for Multiple Records
|
33
|
+
def phcpress_post_slug
|
34
|
+
[
|
35
|
+
[:psttitle]
|
36
|
+
]
|
39
37
|
end
|
38
|
+
|
39
|
+
end
|
40
40
|
end
|
@@ -4,8 +4,8 @@ module Phcpress
|
|
4
4
|
# Clean URL Initialize
|
5
5
|
extend FriendlyId
|
6
6
|
|
7
|
-
#
|
8
|
-
has_paper_trail
|
7
|
+
# Add Paper Trail
|
8
|
+
has_paper_trail :class_name => 'Phcpress::CategoryVersions'
|
9
9
|
|
10
10
|
# Relationships
|
11
11
|
has_many :connections, class_name: 'Phcpress::Modules::Connection', dependent: :destroy
|
@@ -16,5 +16,15 @@ module Phcpress
|
|
16
16
|
presence: true,
|
17
17
|
length: { minimum: 3 }
|
18
18
|
|
19
|
+
# Clean URL Define
|
20
|
+
friendly_id :phcpress_category_slug, use: [:slugged, :finders]
|
21
|
+
|
22
|
+
# Define for Multiple Records
|
23
|
+
def phcpress_category_slug
|
24
|
+
[
|
25
|
+
[:catname]
|
26
|
+
]
|
27
|
+
end
|
28
|
+
|
19
29
|
end
|
20
30
|
end
|
@@ -4,12 +4,22 @@ module Phcpress
|
|
4
4
|
# Clean URL Initialize
|
5
5
|
extend FriendlyId
|
6
6
|
|
7
|
-
#
|
8
|
-
has_paper_trail
|
7
|
+
# Add Paper Trail
|
8
|
+
has_paper_trail :class_name => 'Phcpress::ConnectionVersions'
|
9
9
|
|
10
10
|
# Relationships
|
11
|
-
belongs_to :post, class_name: 'Phcpress::
|
11
|
+
belongs_to :post, class_name: 'Phcpress::Article::Post'
|
12
12
|
belongs_to :category, class_name: 'Phcpress::Modules::Category'
|
13
13
|
|
14
|
+
# Clean URL Define
|
15
|
+
friendly_id :phcpress_connections_slug, use: [:slugged, :finders]
|
16
|
+
|
17
|
+
# Define for Multiple Records
|
18
|
+
def phcpress_connections_slug
|
19
|
+
[
|
20
|
+
[:post_id, :category_id]
|
21
|
+
]
|
22
|
+
end
|
23
|
+
|
14
24
|
end
|
15
25
|
end
|
@@ -1,4 +1,4 @@
|
|
1
1
|
<div class="pull-right hidden-xs">
|
2
|
-
<b>Version</b>
|
2
|
+
<b>Version</b> 10.0.0 - JUN-07-<%= Date.today.year %>
|
3
3
|
</div>
|
4
4
|
<strong>© 2012-<%= Time.now.year %> <%= link_to "https://phcnetworks.net", target: "_blank", rel: "nofollow" do %>PHCNetworks<% end %></strong>
|
@@ -9,13 +9,13 @@
|
|
9
9
|
<% end %>
|
10
10
|
<ul class="treeview-menu">
|
11
11
|
<li class="">
|
12
|
-
<%= link_to
|
12
|
+
<%= link_to article_posts_path do %>
|
13
13
|
<i class="fa fa-circle-o"></i>
|
14
14
|
Article Index
|
15
15
|
<% end %>
|
16
16
|
</li>
|
17
17
|
<li class="">
|
18
|
-
<%= link_to
|
18
|
+
<%= link_to new_article_post_path do %>
|
19
19
|
<i class="fa fa-circle-o"></i>
|
20
20
|
New Article
|
21
21
|
<% end %>
|
@@ -19,7 +19,7 @@
|
|
19
19
|
<header class="main-header">
|
20
20
|
|
21
21
|
<!-- Logo with Link -->
|
22
|
-
<%= link_to phcpress.
|
22
|
+
<%= link_to phcpress.article_posts_path, class: "logo" do %>
|
23
23
|
<span class="logo-mini">PHC</span>
|
24
24
|
<span class="logo-lg"><b>PHC</b>Press</span>
|
25
25
|
<% end %>
|
@@ -26,28 +26,31 @@
|
|
26
26
|
<h3 class="box-title"><%= yield(:phc_title) %></h3>
|
27
27
|
</div>
|
28
28
|
<div class="box-body">
|
29
|
-
|
30
29
|
<!-- Index Table -->
|
31
30
|
<div class="table-responsive">
|
32
31
|
<table class="table table-bordered table-striped table-hover">
|
33
32
|
<thead>
|
34
33
|
<tr>
|
35
34
|
<th>Title</th>
|
36
|
-
<th>Text Preview</th>
|
37
35
|
<th>Article Status</th>
|
36
|
+
<th>Date Posted</th>
|
37
|
+
<th>Last Update</th>
|
38
38
|
<th></th>
|
39
39
|
</tr>
|
40
40
|
</thead>
|
41
41
|
<tbody>
|
42
42
|
<% @article_posts.each do |article_post| %>
|
43
43
|
<tr>
|
44
|
-
<td><%= article_post.psttitle %></td>
|
45
|
-
<td><%=
|
46
|
-
<td><%= article_post.
|
47
|
-
<td
|
48
|
-
|
49
|
-
|
50
|
-
|
44
|
+
<td><%= article_post.psttitle.titleize %></td>
|
45
|
+
<td><%= article_post.pststatus.capitalize %></td>
|
46
|
+
<td><%= l(article_post.created_at, format: "%-d/%m/%Y - %H:%M:%S %Z") %></td>
|
47
|
+
<td><%= l(article_post.updated_at, format: "%-d/%m/%Y - %H:%M:%S %Z") %></td>
|
48
|
+
<td>
|
49
|
+
<div class="btn-group" role="group" aria-label="Blog Articles">
|
50
|
+
<%= link_to 'Edit', edit_article_post_path(article_post), class: "btn btn-primary btn-xs" %>
|
51
|
+
<%= link_to 'Delete', article_post, class: "btn btn-danger btn-xs", method: :delete, data: { confirm: 'Are you sure?' } %>
|
52
|
+
</div>
|
53
|
+
</td>
|
51
54
|
</tr>
|
52
55
|
<% end %>
|
53
56
|
</tbody>
|
@@ -57,7 +60,7 @@
|
|
57
60
|
|
58
61
|
<!-- Panel Footer -->
|
59
62
|
<div class="box-footer clearfix">
|
60
|
-
|
63
|
+
<%= link_to 'New Blog Post', new_article_post_path, class: "btn btn-primary" %>
|
61
64
|
</div>
|
62
65
|
<!-- Panel Footer -->
|
63
66
|
|
data/config/routes.rb
CHANGED
@@ -0,0 +1,16 @@
|
|
1
|
+
class CreatePhcpressConnectionVersions < ActiveRecord::Migration[5.1]
|
2
|
+
TEXT_BYTES = 1_073_741_823
|
3
|
+
def change
|
4
|
+
|
5
|
+
create_table :phcpress_connection_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
|
+
add_index :phcpress_connection_versions, %i(item_type item_id), :name => 'press_connection_versions'
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
data/lib/phcpress/version.rb
CHANGED
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:
|
4
|
+
version: 11.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: 2017-06-
|
11
|
+
date: 2017-06-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -523,6 +523,9 @@ dependencies:
|
|
523
523
|
- - "~>"
|
524
524
|
- !ruby/object:Gem::Version
|
525
525
|
version: '2.14'
|
526
|
+
- - ">="
|
527
|
+
- !ruby/object:Gem::Version
|
528
|
+
version: 2.14.1
|
526
529
|
type: :development
|
527
530
|
prerelease: false
|
528
531
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -530,6 +533,9 @@ dependencies:
|
|
530
533
|
- - "~>"
|
531
534
|
- !ruby/object:Gem::Version
|
532
535
|
version: '2.14'
|
536
|
+
- - ">="
|
537
|
+
- !ruby/object:Gem::Version
|
538
|
+
version: 2.14.1
|
533
539
|
- !ruby/object:Gem::Dependency
|
534
540
|
name: nokogiri
|
535
541
|
requirement: !ruby/object:Gem::Requirement
|
@@ -702,6 +708,7 @@ files:
|
|
702
708
|
- app/models/phcpress/article.rb
|
703
709
|
- app/models/phcpress/article/post.rb
|
704
710
|
- app/models/phcpress/category_versions.rb
|
711
|
+
- app/models/phcpress/connection_versions.rb
|
705
712
|
- app/models/phcpress/frontend.rb
|
706
713
|
- app/models/phcpress/frontend/article.rb
|
707
714
|
- app/models/phcpress/modules.rb
|
@@ -744,6 +751,7 @@ files:
|
|
744
751
|
- db/migrate/20160720235314_create_phcpress_modules_connections.rb
|
745
752
|
- db/migrate/20170509002355_create_phcpress_friendly_id_slugs.rb
|
746
753
|
- db/migrate/20170517064030_create_phcpress_post_versions.rb
|
754
|
+
- db/migrate/20170517064114_create_phcpress_connection_versions.rb
|
747
755
|
- db/migrate/20170517064427_create_phcpress_category_versions.rb
|
748
756
|
- lib/phcpress.rb
|
749
757
|
- lib/phcpress/engine.rb
|