phcpress 4.0.0 → 5.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -4
- data/app/assets/javascripts/phcpress/modules/connections.js +2 -0
- data/app/assets/stylesheets/phcpress/_custom.scss +4 -0
- data/app/assets/stylesheets/phcpress/modules/connections.scss +3 -0
- data/app/assets/stylesheets/scaffolds.scss +89 -0
- data/app/controllers/phcpress/application_controller.rb +0 -7
- data/app/controllers/phcpress/articles/posts_controller.rb +68 -0
- data/app/controllers/phcpress/modules/categories_controller.rb +7 -9
- data/app/controllers/phcpress/modules/connections_controller.rb +66 -0
- data/app/helpers/phcpress/modules/connections_helper.rb +4 -0
- data/app/models/phcpress/{news.rb → articles.rb} +2 -2
- data/app/models/phcpress/articles/post.rb +12 -0
- data/app/models/phcpress/modules/category.rb +4 -0
- data/app/models/phcpress/modules/connection.rb +9 -0
- data/app/views/layouts/phcpress/application.html.erb +1 -3
- data/app/views/phcpress/{blog → articles}/posts/_form.html.erb +24 -14
- data/app/views/phcpress/articles/posts/edit.html.erb +2 -0
- data/app/views/phcpress/articles/posts/index.html.erb +42 -0
- data/app/views/phcpress/articles/posts/new.html.erb +2 -0
- data/app/views/phcpress/articles/posts/show.html.erb +4 -0
- data/app/views/phcpress/modules/categories/index.html.erb +2 -2
- data/app/views/phcpress/modules/connections/_form.html.erb +27 -0
- data/app/views/phcpress/modules/connections/edit.html.erb +6 -0
- data/app/views/phcpress/modules/connections/index.html.erb +29 -0
- data/app/views/phcpress/modules/connections/new.html.erb +5 -0
- data/app/views/phcpress/modules/connections/show.html.erb +14 -0
- data/config/routes.rb +7 -9
- data/db/migrate/20160716182848_create_phcpress_modules_categories.rb +8 -8
- data/db/migrate/20160720181307_create_phcpress_articles_posts.rb +15 -0
- data/db/migrate/20160720235314_create_phcpress_modules_connections.rb +10 -0
- data/lib/phcpress/version.rb +1 -1
- metadata +24 -21
- data/app/controllers/phcpress/blog/posts_controller.rb +0 -75
- data/app/controllers/phcpress/news/posts_controller.rb +0 -70
- data/app/models/phcpress/blog.rb +0 -7
- data/app/models/phcpress/blog/post.rb +0 -8
- data/app/models/phcpress/news/post.rb +0 -10
- data/app/views/phcpress/blog/posts/edit.html.erb +0 -12
- data/app/views/phcpress/blog/posts/index.html.erb +0 -42
- data/app/views/phcpress/blog/posts/new.html.erb +0 -12
- data/app/views/phcpress/blog/posts/show.html.erb +0 -4
- data/app/views/phcpress/news/posts/_form.html.erb +0 -72
- data/app/views/phcpress/news/posts/edit.html.erb +0 -12
- data/app/views/phcpress/news/posts/index.html.erb +0 -37
- data/app/views/phcpress/news/posts/new.html.erb +0 -12
- data/app/views/phcpress/news/posts/show.html.erb +0 -4
- data/db/migrate/20160716182441_create_phcpress_news_posts.rb +0 -18
- data/db/migrate/20160716182510_create_phcpress_blog_posts.rb +0 -18
data/app/models/phcpress/blog.rb
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
<!-- Main Content -->
|
2
|
-
<div class="wrapper wrapper-content">
|
3
|
-
<div class="panel panel-primary">
|
4
|
-
|
5
|
-
<div class="panel-heading">
|
6
|
-
<i class="fa fa-pencil-square-o"></i> Blog Post List
|
7
|
-
</div>
|
8
|
-
|
9
|
-
<div class="panel-body">
|
10
|
-
|
11
|
-
<table class="table table-bordered table-striped table-hover">
|
12
|
-
|
13
|
-
<thead>
|
14
|
-
<tr>
|
15
|
-
<th>Blog Title</th>
|
16
|
-
<th>Blog Text</th>
|
17
|
-
<th>Post Status</th>
|
18
|
-
<th></th>
|
19
|
-
</tr>
|
20
|
-
</thead>
|
21
|
-
|
22
|
-
<tbody>
|
23
|
-
<% @blog_posts.each do |blog_post| %>
|
24
|
-
<tr>
|
25
|
-
<td><%= blog_post.blogpsttitle %></td>
|
26
|
-
<td><%= truncate(blog_post.blogpsttext, :length => 80) %></td>
|
27
|
-
<td><%= blog_post.pststatus %></td>
|
28
|
-
<td><div class="btn-group" role="group" aria-label="Blog Articles">
|
29
|
-
<%= link_to 'Edit', edit_blog_post_path(blog_post), class: "btn btn-primary btn-xs" %>
|
30
|
-
<%= link_to 'Trash', blog_post, class: "btn btn-danger btn-xs", method: :delete, data: { confirm: 'Are you sure?' } %>
|
31
|
-
</div></td>
|
32
|
-
</tr>
|
33
|
-
<% end %>
|
34
|
-
</tbody>
|
35
|
-
|
36
|
-
</table>
|
37
|
-
|
38
|
-
<%= link_to 'New Blog Post', new_blog_post_path, class: "btn btn-primary" %>
|
39
|
-
</div>
|
40
|
-
|
41
|
-
</div>
|
42
|
-
</div>
|
@@ -1,72 +0,0 @@
|
|
1
|
-
<div class="row">
|
2
|
-
<%= form_for(@news_post, :html => {:multipart => true}) do |f| %>
|
3
|
-
|
4
|
-
<!-- PHC-Notifi Render Validation -->
|
5
|
-
<%= render 'phcnotifi/validations', :object => @news_post %>
|
6
|
-
|
7
|
-
<div class="col-md-3">
|
8
|
-
|
9
|
-
<div class="panel panel-primary">
|
10
|
-
<div class="panel-heading">
|
11
|
-
<i class="fa fa-paper-plane-o"></i> Publish Panel
|
12
|
-
</div>
|
13
|
-
<div class="panel-body">
|
14
|
-
<div class="form-group">
|
15
|
-
<%= f.label :pststatus, "Post Status" %>
|
16
|
-
<%= f.select( :pststatus, [['Draft','draft'],['Publish','publish'],['Review','review']], {}, {class: "form-control form-control-sm"}) %>
|
17
|
-
</div>
|
18
|
-
<div class="form-group">
|
19
|
-
<%= f.label :pstcategory, "Post Category" %>
|
20
|
-
<%= collection_select(:pstcategory, :pstcategory_id, Phcpress::Modules::Category.order('catname'), :id, :catname, {}, {class: "form-control form-control-sm"}) %>
|
21
|
-
</div>
|
22
|
-
<div class="actions">
|
23
|
-
<%= f.submit "Publish News Article", class: "btn btn-primary btn-sm" %>
|
24
|
-
</div>
|
25
|
-
</div>
|
26
|
-
</div>
|
27
|
-
|
28
|
-
<div class="panel panel-primary">
|
29
|
-
<div class="panel-heading">
|
30
|
-
<i class="fa fa-camera-retro"></i> Post Images
|
31
|
-
</div>
|
32
|
-
<div class="panel-body">
|
33
|
-
<div class="form-group">
|
34
|
-
<label><%= f.label :pstimage, "Featured Image" %></label>
|
35
|
-
<%= f.file_field :pstimage, class: "form-control" %>
|
36
|
-
</div>
|
37
|
-
<% if f.object.pstimage? %>
|
38
|
-
<%= image_tag f.object.pstimage, class: "img-responsive img-thumbnail" %>
|
39
|
-
<%= f.label :remove_pstimage %>
|
40
|
-
<%= f.check_box :remove_pstimage %>
|
41
|
-
<% end %>
|
42
|
-
</div>
|
43
|
-
</div>
|
44
|
-
|
45
|
-
</div>
|
46
|
-
|
47
|
-
<div class="col-md-9">
|
48
|
-
|
49
|
-
<div class="panel panel-primary">
|
50
|
-
<div class="panel-heading">
|
51
|
-
<i class="fa fa-newspaper-o"></i> News Post Publisher
|
52
|
-
</div>
|
53
|
-
<div class="panel-body">
|
54
|
-
<div class="form-group">
|
55
|
-
<%= f.label :newspsttitle, "Post Name" %>
|
56
|
-
<%= f.text_field :newspsttitle, class: "form-control" %>
|
57
|
-
</div>
|
58
|
-
<div class="form-group">
|
59
|
-
<%= f.label :newspsttext, "Post Text" %>
|
60
|
-
<%= f.text_area :newspsttext, class: "form-control" %>
|
61
|
-
</div>
|
62
|
-
<div class="form-group">
|
63
|
-
<%= f.label :newspstexcerpts, "Excerpts/Text Leads" %>
|
64
|
-
<%= f.text_area :newspstexcerpts, class: "form-control" %>
|
65
|
-
</div>
|
66
|
-
</div>
|
67
|
-
</div>
|
68
|
-
|
69
|
-
</div>
|
70
|
-
|
71
|
-
<% end %>
|
72
|
-
</div>
|
@@ -1,37 +0,0 @@
|
|
1
|
-
<!-- Main Content -->
|
2
|
-
<div class="wrapper wrapper-content">
|
3
|
-
<div class="panel panel-default">
|
4
|
-
<div class="panel-heading">
|
5
|
-
<i class="fa fa-newspaper-o"></i> News Post List
|
6
|
-
</div>
|
7
|
-
<div class="panel-body">
|
8
|
-
<table class="table table-bordered table-striped table-hover">
|
9
|
-
|
10
|
-
<thead>
|
11
|
-
<tr>
|
12
|
-
<th>Post Name</th>
|
13
|
-
<th>Post Text</th>
|
14
|
-
<th>Post Status</th>
|
15
|
-
<th></th>
|
16
|
-
</tr>
|
17
|
-
</thead>
|
18
|
-
|
19
|
-
<tbody>
|
20
|
-
<% @news_posts.each do |news_post| %>
|
21
|
-
<tr>
|
22
|
-
<td><%= news_post.newspsttitle %></td>
|
23
|
-
<td><%= truncate(news_post.newspsttext, :length => 80) %></td>
|
24
|
-
<td><%= news_post.pststatus %></td>
|
25
|
-
<td><div class="btn-group" role="group" aria-label="News Articles">
|
26
|
-
<%= link_to 'Edit', edit_news_post_path(news_post), class: "btn btn-primary btn-xs" %>
|
27
|
-
<%= link_to 'Destroy', news_post, class: "btn btn-danger btn-xs", method: :delete, data: { confirm: 'Are you sure?' } %>
|
28
|
-
</div></td>
|
29
|
-
</tr>
|
30
|
-
<% end %>
|
31
|
-
</tbody>
|
32
|
-
|
33
|
-
</table>
|
34
|
-
<%= link_to 'New Post', new_news_post_path, class: "btn btn-primary" %>
|
35
|
-
</div>
|
36
|
-
</div>
|
37
|
-
</div>
|
@@ -1,18 +0,0 @@
|
|
1
|
-
class CreatePhcpressNewsPosts < ActiveRecord::Migration[5.0]
|
2
|
-
def change
|
3
|
-
create_table :phcpress_news_posts do |t|
|
4
|
-
|
5
|
-
t.string :newspsttitle
|
6
|
-
t.text :newspsttext
|
7
|
-
t.string :pststatus
|
8
|
-
t.text :newspstexcerpts
|
9
|
-
t.string :pstimage
|
10
|
-
|
11
|
-
t.integer :user_id
|
12
|
-
t.integer :category_id
|
13
|
-
|
14
|
-
t.timestamps
|
15
|
-
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
class CreatePhcpressBlogPosts < ActiveRecord::Migration[5.0]
|
2
|
-
def change
|
3
|
-
create_table :phcpress_blog_posts do |t|
|
4
|
-
|
5
|
-
t.string :blogpsttitle
|
6
|
-
t.text :blogpsttext
|
7
|
-
t.string :pststatus
|
8
|
-
t.text :blogpstexcerpts
|
9
|
-
t.string :pstimage
|
10
|
-
|
11
|
-
t.integer :user_id
|
12
|
-
t.integer :category_id
|
13
|
-
|
14
|
-
t.timestamps
|
15
|
-
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|