phcpress 0.3.1b → 0.4.1b
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/phcpress/blog/posts_controller.rb +3 -3
- data/app/controllers/phcpress/news/posts_controller.rb +3 -3
- data/app/views/phcpress/blog/posts/_form.html.erb +37 -22
- data/app/views/phcpress/blog/posts/edit.html.erb +1 -8
- data/app/views/phcpress/blog/posts/index.html.erb +3 -4
- data/app/views/phcpress/blog/posts/new.html.erb +1 -8
- data/app/views/phcpress/news/posts/_form.html.erb +37 -20
- data/app/views/phcpress/news/posts/edit.html.erb +1 -8
- data/app/views/phcpress/news/posts/new.html.erb +1 -8
- data/lib/phcpress/version.rb +1 -1
- metadata +2 -4
- data/app/views/phcpress/blog/posts/show.html.erb +0 -17
- data/app/views/phcpress/news/posts/show.html.erb +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 372903fa89b7978fef3c3a2bdb3d300f082a1ad0
|
4
|
+
data.tar.gz: 47956106b8d088a538197652c1ad42475e2335fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 269aa90530e3e87a240104772af515dc97ce6fdf10e54da3142b61bb7184ced8de735840f39c9bb9692fc1012a9b93b307c5a25369cb5c97d9bee700efd2d394
|
7
|
+
data.tar.gz: 87a93e4fbd033b9b69ff192e63b7405b8148b82b2d73f9fbe3277559a6a757e36a5860e9c9484cc97115fb7b8d58222114a6cc32eda15d2a6ec89ce47d9bfad5
|
@@ -6,7 +6,7 @@ module Phcpress
|
|
6
6
|
class Blog::PostsController < ApplicationController
|
7
7
|
|
8
8
|
# Filters & Security
|
9
|
-
before_action :set_blog_post, only: [:
|
9
|
+
before_action :set_blog_post, only: [:edit, :update, :destroy]
|
10
10
|
|
11
11
|
# Blog Post Index (/blog/posts)
|
12
12
|
def index
|
@@ -14,8 +14,8 @@ module Phcpress
|
|
14
14
|
end
|
15
15
|
|
16
16
|
# Single Blog Post (/blog/posts/1)
|
17
|
-
def show
|
18
|
-
end
|
17
|
+
#def show
|
18
|
+
#end
|
19
19
|
|
20
20
|
# Create a New Blog Post (/blog/posts/new)
|
21
21
|
def new
|
@@ -6,7 +6,7 @@ module Phcpress
|
|
6
6
|
class News::PostsController < ApplicationController
|
7
7
|
|
8
8
|
# Filters & Security
|
9
|
-
before_action :set_news_post, only: [:
|
9
|
+
before_action :set_news_post, only: [:edit, :update, :destroy]
|
10
10
|
|
11
11
|
# News Post Index (/news/posts)
|
12
12
|
def index
|
@@ -14,8 +14,8 @@ module Phcpress
|
|
14
14
|
end
|
15
15
|
|
16
16
|
# Single News Post (/news/posts/1)
|
17
|
-
def show
|
18
|
-
end
|
17
|
+
#def show
|
18
|
+
#end
|
19
19
|
|
20
20
|
# Create a New News Post (/news/posts/new)
|
21
21
|
def new
|
@@ -1,22 +1,37 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
1
|
+
<div class="row">
|
2
|
+
<%= form_for(@blog_post) do |f| %>
|
3
|
+
<div class="col-md-3">
|
4
|
+
<div class="panel panel-default">
|
5
|
+
<div class="panel-heading">
|
6
|
+
<i class="fa fa-paper-plane-o"></i> Publish Panel
|
7
|
+
</div>
|
8
|
+
<div class="panel-body">
|
9
|
+
<div class="form-group">
|
10
|
+
<label><%= f.label :pststatus, "Post Status" %></label>
|
11
|
+
<%= f.select :pststatus, [['Draft','draft'],['Publish','publish'],['Review','review']], class: "form-control" %>
|
12
|
+
</div>
|
13
|
+
<div class="actions">
|
14
|
+
<%= f.submit "Publish Blog Article", class: "btn btn-primary btn-sm" %>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
<div class="col-md-9 ">
|
20
|
+
<div class="panel panel-default">
|
21
|
+
<div class="panel-heading">
|
22
|
+
<i class="fa fa-pencil-square-o"></i> Blog Post Publisher
|
23
|
+
</div>
|
24
|
+
<div class="panel-body">
|
25
|
+
<div class="form-group">
|
26
|
+
<label><%= f.label :blogpsttitle, "Title" %></label>
|
27
|
+
<%= f.text_field :blogpsttitle, class: "form-control" %>
|
28
|
+
</div>
|
29
|
+
<div class="form-group">
|
30
|
+
<label><%= f.label :blogpsttext, "Text" %></label>
|
31
|
+
<%= f.text_area :blogpsttext, class: "form-control" %>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
<% end %>
|
37
|
+
</div>
|
@@ -1,10 +1,3 @@
|
|
1
1
|
<div class="wrapper wrapper-content">
|
2
|
-
|
3
|
-
<div class="panel-heading">
|
4
|
-
<i class="fa fa-newspaper-o"></i> Edit Blog Post
|
5
|
-
</div>
|
6
|
-
<div class="panel-body">
|
7
|
-
<%= render 'form' %>
|
8
|
-
</div>
|
9
|
-
</div>
|
2
|
+
<%= render 'form' %>
|
10
3
|
</div>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<div class="panel panel-default">
|
4
4
|
|
5
5
|
<div class="panel-heading">
|
6
|
-
<i class="fa fa-
|
6
|
+
<i class="fa fa-pencil-square-o"></i> Blog Post List
|
7
7
|
</div>
|
8
8
|
|
9
9
|
<div class="panel-body">
|
@@ -26,9 +26,8 @@
|
|
26
26
|
<td><%= blog_post.blogpsttext %></td>
|
27
27
|
<td><%= blog_post.pststatus %></td>
|
28
28
|
<td><div class="btn-group" role="group" aria-label="Blog Articles">
|
29
|
-
<%= link_to 'Show', blog_post, class: "btn btn-primary btn-xs" %>
|
30
29
|
<%= link_to 'Edit', edit_blog_post_path(blog_post), class: "btn btn-primary btn-xs" %>
|
31
|
-
<%= link_to '
|
30
|
+
<%= link_to 'Trash', blog_post, class: "btn btn-danger btn-xs", method: :delete, data: { confirm: 'Are you sure?' } %>
|
32
31
|
</div></td>
|
33
32
|
</tr>
|
34
33
|
<% end %>
|
@@ -36,7 +35,7 @@
|
|
36
35
|
|
37
36
|
</table>
|
38
37
|
|
39
|
-
<%= link_to 'New Post', new_blog_post_path, class: "btn btn-primary" %>
|
38
|
+
<%= link_to 'New Blog Post', new_blog_post_path, class: "btn btn-primary" %>
|
40
39
|
</div>
|
41
40
|
|
42
41
|
</div>
|
@@ -1,10 +1,3 @@
|
|
1
1
|
<div class="wrapper wrapper-content">
|
2
|
-
|
3
|
-
<div class="panel-heading">
|
4
|
-
<i class="fa fa-newspaper-o"></i> Create a Blog Post
|
5
|
-
</div>
|
6
|
-
<div class="panel-body">
|
7
|
-
<%= render 'form' %>
|
8
|
-
</div>
|
9
|
-
</div>
|
2
|
+
<%= render 'form' %>
|
10
3
|
</div>
|
@@ -1,20 +1,37 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
1
|
+
<div class="row">
|
2
|
+
<%= form_for(@news_post) do |f| %>
|
3
|
+
<div class="col-md-3">
|
4
|
+
<div class="panel panel-default">
|
5
|
+
<div class="panel-heading">
|
6
|
+
<i class="fa fa-paper-plane-o"></i> Publish Panel
|
7
|
+
</div>
|
8
|
+
<div class="panel-body">
|
9
|
+
<div class="form-group">
|
10
|
+
<label><%= f.label :pststatus, "Post Status" %></label>
|
11
|
+
<%= f.select :pststatus, [['Draft','draft'],['Publish','publish'],['Review','review']], class: "form-control" %>
|
12
|
+
</div>
|
13
|
+
<div class="actions">
|
14
|
+
<%= f.submit "Publish News Article", class: "btn btn-primary btn-sm" %>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
<div class="col-md-9 ">
|
20
|
+
<div class="panel panel-default">
|
21
|
+
<div class="panel-heading">
|
22
|
+
<i class="fa fa-newspaper-o"></i> News Post Publisher
|
23
|
+
</div>
|
24
|
+
<div class="panel-body">
|
25
|
+
<div class="form-group">
|
26
|
+
<label><%= f.label :newspsttitle, "Post Name" %></label>
|
27
|
+
<%= f.text_field :newspsttitle, class: "form-control" %>
|
28
|
+
</div>
|
29
|
+
<div class="form-group">
|
30
|
+
<label><%= f.label :newspsttext, "Post Text" %></label>
|
31
|
+
<%= f.text_area :newspsttext, class: "form-control" %>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
<% end %>
|
37
|
+
</div>
|
@@ -1,10 +1,3 @@
|
|
1
1
|
<div class="wrapper wrapper-content">
|
2
|
-
|
3
|
-
<div class="panel-heading">
|
4
|
-
<i class="fa fa-newspaper-o"></i> Edit News Post
|
5
|
-
</div>
|
6
|
-
<div class="panel-body">
|
7
|
-
<%= render 'form' %>
|
8
|
-
</div>
|
9
|
-
</div>
|
2
|
+
<%= render 'form' %>
|
10
3
|
</div>
|
@@ -1,10 +1,3 @@
|
|
1
1
|
<div class="wrapper wrapper-content">
|
2
|
-
|
3
|
-
<div class="panel-heading">
|
4
|
-
<i class="fa fa-newspaper-o"></i> Create a News Post
|
5
|
-
</div>
|
6
|
-
<div class="panel-body">
|
7
|
-
<%= render 'form' %>
|
8
|
-
</div>
|
9
|
-
</div>
|
2
|
+
<%= render 'form' %>
|
10
3
|
</div>
|
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: 0.
|
4
|
+
version: 0.4.1b
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BradPotts
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|
@@ -263,12 +263,10 @@ files:
|
|
263
263
|
- app/views/phcpress/blog/posts/edit.html.erb
|
264
264
|
- app/views/phcpress/blog/posts/index.html.erb
|
265
265
|
- app/views/phcpress/blog/posts/new.html.erb
|
266
|
-
- app/views/phcpress/blog/posts/show.html.erb
|
267
266
|
- app/views/phcpress/news/posts/_form.html.erb
|
268
267
|
- app/views/phcpress/news/posts/edit.html.erb
|
269
268
|
- app/views/phcpress/news/posts/index.html.erb
|
270
269
|
- app/views/phcpress/news/posts/new.html.erb
|
271
|
-
- app/views/phcpress/news/posts/show.html.erb
|
272
270
|
- config/routes.rb
|
273
271
|
- db/migrate/20160219213259_create_phcpress_news_posts.rb
|
274
272
|
- db/migrate/20160219213313_create_phcpress_blog_posts.rb
|
@@ -1,17 +0,0 @@
|
|
1
|
-
<p>
|
2
|
-
<strong>Blog Title:</strong>
|
3
|
-
<%= @blog_post.blogpsttitle %>
|
4
|
-
</p>
|
5
|
-
|
6
|
-
<p>
|
7
|
-
<strong>Blog Text:</strong>
|
8
|
-
<%= @blog_post.blogpsttext %>
|
9
|
-
</p>
|
10
|
-
|
11
|
-
<p>
|
12
|
-
<strong>Post Status:</strong>
|
13
|
-
<%= @blog_post.pststatus %>
|
14
|
-
</p>
|
15
|
-
|
16
|
-
<%= link_to 'Edit', edit_blog_post_path(@blog_post) %> |
|
17
|
-
<%= link_to 'Back', blog_posts_path %>
|
@@ -1,17 +0,0 @@
|
|
1
|
-
<p>
|
2
|
-
<strong>Newspsttitle:</strong>
|
3
|
-
<%= @news_post.newspsttitle %>
|
4
|
-
</p>
|
5
|
-
|
6
|
-
<p>
|
7
|
-
<strong>Newspsttext:</strong>
|
8
|
-
<%= @news_post.newspsttext %>
|
9
|
-
</p>
|
10
|
-
|
11
|
-
<p>
|
12
|
-
<strong>Pststatus:</strong>
|
13
|
-
<%= @news_post.pststatus %>
|
14
|
-
</p>
|
15
|
-
|
16
|
-
<%= link_to 'Edit', edit_news_post_path(@news_post) %> |
|
17
|
-
<%= link_to 'Back', news_posts_path %>
|