phcpress 42.0.0 → 43.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/MIT-LICENSE +1 -1
- data/README.md +2 -14
- data/Rakefile +3 -0
- data/app/assets/javascripts/phcpress/application.js +2 -2
- data/app/assets/stylesheets/phcpress/application.scss +2 -2
- data/app/controllers/phcpress/article/posts_controller.rb +2 -1
- data/app/models/phcpress/article/post.rb +1 -1
- data/app/views/layouts/phcpress/application.html.erb +79 -54
- data/app/views/layouts/phcpress/components/backend/footer/_footer.html.erb +1 -0
- data/app/views/layouts/phcpress/components/backend/navigation/_top_menu.html.erb +143 -0
- data/app/views/layouts/phcpress/components/backend/sidebars/_side_menu.html.erb +116 -0
- data/app/views/phcpress/article/posts/_form.html.erb +67 -62
- data/app/views/phcpress/article/posts/edit.html.erb +24 -23
- data/app/views/phcpress/article/posts/index.html.erb +39 -63
- data/app/views/phcpress/article/posts/new.html.erb +5 -25
- data/app/views/phcpress/article/posts/show.html.erb +39 -28
- data/app/views/phcpress/modules/categories/_form.html.erb +6 -9
- data/app/views/phcpress/modules/categories/edit.html.erb +15 -30
- data/app/views/phcpress/modules/categories/index.html.erb +32 -58
- data/app/views/phcpress/modules/categories/new.html.erb +14 -31
- data/app/views/phcpress/modules/categories/show.html.erb +13 -31
- data/config/routes.rb +6 -0
- data/db/migrate/20160716182936_create_phcpress_modules_categories.rb +16 -0
- data/db/migrate/20160718204718_create_phcpress_article_posts.rb +19 -0
- data/db/migrate/20160719221205_create_phcpress_modules_connections.rb +17 -0
- data/db/migrate/20170509002355_create_phcpress_friendly_id_slugs.rb +18 -0
- data/lib/phcpress.rb +1 -0
- data/lib/phcpress/engine.rb +61 -59
- data/lib/phcpress/version.rb +1 -1
- metadata +93 -63
- data/app/views/layouts/components/backend/footer/_footer.html.erb +0 -4
- data/app/views/layouts/components/backend/navigation/_navigation.html.erb +0 -48
- data/app/views/layouts/components/backend/topbar/_topbar.html.erb +0 -5
- data/app/views/layouts/components/backend/topbar/_topbar_links.html.erb +0 -0
@@ -1,80 +1,85 @@
|
|
1
|
+
<%= form_for(@article_post, :html => {:multipart => true}) do |phc_press_article_post| %>
|
1
2
|
<div class="row">
|
2
|
-
|
3
|
+
<div class="col-md-3">
|
3
4
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
5
|
+
<div class="panel panel-inverse">
|
6
|
+
<div class="panel-heading">
|
7
|
+
<h4 class="panel-title">Publish Panel</h4>
|
8
|
+
</div>
|
9
|
+
<div class="panel-body">
|
10
|
+
<div class="form-group">
|
11
|
+
<%= phc_press_article_post.label :pststatus, "Post Status" %>
|
12
|
+
<%= phc_press_article_post.select( :pststatus, [['Draft','draft'],['Published','published'],['Review','review']], {}, {class: "form-control form-control-sm"}) %>
|
12
13
|
</div>
|
13
|
-
<div class="
|
14
|
-
|
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="actions">
|
19
|
-
<%= f.submit "Publish", class: "btn btn-primary btn-sm" %>
|
20
|
-
</div>
|
14
|
+
<div class="actions">
|
15
|
+
<%= phc_press_article_post.submit class: "btn btn-primary waves-effect" %>
|
21
16
|
</div>
|
22
17
|
</div>
|
18
|
+
</div>
|
23
19
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
</div>
|
33
|
-
<% if f.object.pstimage? %>
|
34
|
-
<%= image_tag f.object.pstimage_url, class: "img-responsive img-thumbnail" %>
|
35
|
-
<%= f.label :remove_pstimage %>
|
36
|
-
<%= f.check_box :remove_pstimage %>
|
37
|
-
<% end %>
|
20
|
+
<div class="panel panel-inverse">
|
21
|
+
<div class="panel-heading">
|
22
|
+
<h4 class="panel-title">Post Images</h4>
|
23
|
+
</div>
|
24
|
+
<div class="panel-body">
|
25
|
+
<div class="form-group">
|
26
|
+
<%= phc_press_article_post.label :pstimage, "Featured Image" %>
|
27
|
+
<%= phc_press_article_post.file_field :pstimage, class: "form-control" %>
|
38
28
|
</div>
|
29
|
+
<% if phc_press_article_post.object.pstimage? %>
|
30
|
+
<%= image_tag phc_press_article_post.object.pstimage_url, class: "img-responsive img-thumbnail" %>
|
31
|
+
<%= phc_press_article_post.label :remove_pstimage %>
|
32
|
+
<%= phc_press_article_post.check_box :remove_pstimage %>
|
33
|
+
<% end %>
|
39
34
|
</div>
|
35
|
+
</div>
|
40
36
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
<% end %>
|
51
|
-
</div>
|
52
|
-
</div>
|
37
|
+
<div class="panel panel-inverse">
|
38
|
+
<div class="panel-heading">
|
39
|
+
<h4 class="panel-title">Post Categories</h4>
|
40
|
+
</div>
|
41
|
+
<div class="panel-body">
|
42
|
+
<%= phc_press_article_post.collection_check_boxes :category_ids, Phcpress::Modules::Category.all, :id, :catname do |post_category| %>
|
43
|
+
<%= post_category.check_box %>
|
44
|
+
<%= post_category.label %></br>
|
45
|
+
<% end %>
|
53
46
|
</div>
|
47
|
+
</div>
|
48
|
+
|
49
|
+
</div>
|
50
|
+
<div class="col-md-9 ">
|
54
51
|
|
52
|
+
<!-- PHCNotifi Render Validation -->
|
53
|
+
<%= render 'phcnotifi/validations', :object => @article_post %>
|
54
|
+
<!-- PHCNotifi Render Validation -->
|
55
|
+
<div class="panel panel-inverse">
|
56
|
+
<div class="panel-heading">
|
57
|
+
<h4 class="panel-title">Article TItle</h4>
|
58
|
+
</div>
|
59
|
+
<div class="panel-body">
|
60
|
+
<div class="form-group">
|
61
|
+
<%= phc_press_article_post.label :psttitle, "Article Title" %>
|
62
|
+
<%= phc_press_article_post.text_field :psttitle, class: "form-control" %>
|
63
|
+
</div>
|
64
|
+
</div>
|
55
65
|
</div>
|
56
|
-
<div class="col-md-9 ">
|
57
66
|
|
58
|
-
|
59
|
-
|
60
|
-
|
67
|
+
<div class="panel panel-inverse">
|
68
|
+
<div class="panel-heading">
|
69
|
+
<div class="panel-heading-btn">
|
70
|
+
<a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default" data-click="panel-expand"><i class="fa fa-expand"></i></a>
|
71
|
+
<a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-success" data-click="panel-reload"><i class="fa fa-redo"></i></a>
|
72
|
+
<a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-warning" data-click="panel-collapse"><i class="fa fa-minus"></i></a>
|
61
73
|
</div>
|
62
|
-
<
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
</div>
|
68
|
-
<div class="form-group">
|
69
|
-
<%= f.label :psttext, "Post Text" %>
|
70
|
-
<%= f.text_area :psttext, :class => "tinymce form-control", :rows => 20, :cols => 60 %>
|
71
|
-
</div>
|
74
|
+
<h4 class="panel-title"><%= yield(:phc_title_tagline) %></h4>
|
75
|
+
</div>
|
76
|
+
<div class="panel-body panel-form">
|
77
|
+
<div class="form-group">
|
78
|
+
<%= phc_press_article_post.text_area :psttext, :class => "ckeditor form-control", :id => "editor1", :rows => 20, :cols => 60 %>
|
72
79
|
</div>
|
73
80
|
</div>
|
74
|
-
|
75
81
|
</div>
|
76
|
-
<% end %>
|
77
|
-
</div>
|
78
82
|
|
79
|
-
|
80
|
-
|
83
|
+
</div>
|
84
|
+
</div>
|
85
|
+
<% end %>
|
@@ -5,28 +5,29 @@
|
|
5
5
|
<% phc_breadcrumb_two yield(:phc_title_tagline) %>
|
6
6
|
<!-- Title System -->
|
7
7
|
|
8
|
-
<!-- Page
|
9
|
-
<
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
<
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
<!-- Page Form (Edit) -->
|
26
|
-
<%= render 'form', article_post: @article_post %>
|
27
|
-
<!-- Page Form (Edit) -->
|
28
|
-
|
8
|
+
<!-- Page Header -->
|
9
|
+
<div class="row wrapper border-bottom white-bg page-heading">
|
10
|
+
<div class="col-sm-8">
|
11
|
+
<h2><%= yield(:phc_title) %></h2>
|
12
|
+
<!-- Bread Crumb -->
|
13
|
+
<ol class="breadcrumb">
|
14
|
+
<li><%= yield(:phc_breadcrumb_one) %></li>
|
15
|
+
<li class="active"><%= yield(:phc_breadcrumb_two) %></li>
|
16
|
+
</ol>
|
17
|
+
<!-- Bread Crumb -->
|
18
|
+
</div>
|
19
|
+
<div class="col-sm-4">
|
20
|
+
<div class="title-action">
|
21
|
+
<%= link_to phcpress.article_posts_path, class: "btn btn-default" do %>
|
22
|
+
<i class="fa fa fa-arrow-left"></i> Back to Article Index
|
23
|
+
<% end %>
|
29
24
|
</div>
|
30
25
|
</div>
|
31
|
-
</
|
32
|
-
<!--
|
26
|
+
</div>
|
27
|
+
<!-- Page Header -->
|
28
|
+
|
29
|
+
<!-- Page Content -->
|
30
|
+
<div class="wrapper wrapper-content animated fadeInRight">
|
31
|
+
<%= render 'form', article_post: @article_post %>
|
32
|
+
</div>
|
33
|
+
<!-- Page Content -->
|
@@ -5,68 +5,44 @@
|
|
5
5
|
<% phc_breadcrumb_two yield(:phc_title_tagline) %>
|
6
6
|
<!-- Title System -->
|
7
7
|
|
8
|
-
<!-- Page
|
9
|
-
<
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
</
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
<
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
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>
|
54
|
-
</tr>
|
55
|
-
<% end %>
|
56
|
-
</tbody>
|
57
|
-
</table>
|
58
|
-
</div>
|
59
|
-
<!-- Index Table -->
|
60
|
-
|
61
|
-
<!-- Panel Footer -->
|
62
|
-
<div class="box-footer clearfix">
|
63
|
-
<%= link_to 'New Blog Post', new_article_post_path, class: "btn btn-primary" %>
|
64
|
-
</div>
|
65
|
-
<!-- Panel Footer -->
|
66
|
-
|
67
|
-
</div>
|
68
|
-
</div>
|
8
|
+
<!-- Page Content -->
|
9
|
+
<div class="panel panel-inverse">
|
10
|
+
<div class="panel-heading">
|
11
|
+
<div class="panel-heading-btn">
|
12
|
+
<a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default" data-click="panel-expand"><i class="fa fa-expand"></i></a>
|
13
|
+
<a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-success" data-click="panel-reload"><i class="fa fa-redo"></i></a>
|
14
|
+
<a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-warning" data-click="panel-collapse"><i class="fa fa-minus"></i></a>
|
15
|
+
</div>
|
16
|
+
<h4 class="panel-title"><%= yield(:phc_title_tagline) %></h4>
|
17
|
+
</div>
|
18
|
+
<div class="panel-body">
|
19
|
+
<!-- Table - Article Index -->
|
20
|
+
<div class="table-responsive">
|
21
|
+
<table class="table table-striped table-bordered table-hover dataTables-example">
|
22
|
+
<thead>
|
23
|
+
<tr>
|
24
|
+
<th>Post Headline</th>
|
25
|
+
<th>Post Preview</th>
|
26
|
+
<th>Post Status</th>
|
27
|
+
<th></th>
|
28
|
+
</tr>
|
29
|
+
</thead>
|
30
|
+
<tbody>
|
31
|
+
<% @article_posts.each do |article_post| %>
|
32
|
+
<tr>
|
33
|
+
<td><%= article_post.psttitle %></td>
|
34
|
+
<td><%= truncate(article_post.psttext, :length => 80, :escape => false) %></td>
|
35
|
+
<td><%= article_post.pststatus.capitalize %></td>
|
36
|
+
<td><div class="btn-group" role="group" aria-label="Blog Articles">
|
37
|
+
<%= link_to 'Edit Post', edit_article_post_path(article_post), class: "btn btn-primary btn-xs" %>
|
38
|
+
<%= link_to 'Trash Post', article_post, class: "btn btn-danger btn-xs", method: :delete, data: { confirm: 'Are you sure?' } %>
|
39
|
+
</div></td>
|
40
|
+
</tr>
|
41
|
+
<% end %>
|
42
|
+
</tbody>
|
43
|
+
</table>
|
69
44
|
</div>
|
45
|
+
<!-- Table - Article Index -->
|
70
46
|
</div>
|
71
|
-
</
|
72
|
-
<!--
|
47
|
+
</div>
|
48
|
+
<!-- Page Content -->
|
@@ -5,28 +5,8 @@
|
|
5
5
|
<% phc_breadcrumb_two yield(:phc_title_tagline) %>
|
6
6
|
<!-- Title System -->
|
7
7
|
|
8
|
-
<!-- Page
|
9
|
-
<
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
<li><%= yield(:phc_breadcrumb_one) %></li>
|
14
|
-
<li class="active"><%= yield(:phc_breadcrumb_two) %></li>
|
15
|
-
</ol>
|
16
|
-
<!-- Page Title and BreadCrumb -->
|
17
|
-
</section>
|
18
|
-
<!-- Page Title Bar -->
|
19
|
-
|
20
|
-
<!-- Main Content -->
|
21
|
-
<section class="content">
|
22
|
-
<div class="row">
|
23
|
-
<div class="col-lg-12">
|
24
|
-
|
25
|
-
<!-- Page Form (New) -->
|
26
|
-
<%= render 'form', article_post: @article_post %>
|
27
|
-
<!-- Page Form (New) -->
|
28
|
-
|
29
|
-
</div>
|
30
|
-
</div>
|
31
|
-
</section>
|
32
|
-
<!-- Main Content -->
|
8
|
+
<!-- Page Content -->
|
9
|
+
<div class="wrapper wrapper-content animated fadeInRight">
|
10
|
+
<%= render 'form', article_post: @article_post %>
|
11
|
+
</div>
|
12
|
+
<!-- Page Content -->
|
@@ -5,36 +5,47 @@
|
|
5
5
|
<% phc_breadcrumb_two yield(:phc_title_tagline) %>
|
6
6
|
<!-- Title System -->
|
7
7
|
|
8
|
-
<!-- Page
|
9
|
-
<
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
<
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
8
|
+
<!-- Page Header -->
|
9
|
+
<div class="row wrapper border-bottom white-bg page-heading">
|
10
|
+
<div class="col-sm-8">
|
11
|
+
<h2><%= yield(:phc_title) %></h2>
|
12
|
+
<!-- Bread Crumb -->
|
13
|
+
<ol class="breadcrumb">
|
14
|
+
<li><%= yield(:phc_breadcrumb_one) %></li>
|
15
|
+
<li class="active"><%= yield(:phc_breadcrumb_two) %></li>
|
16
|
+
</ol>
|
17
|
+
<!-- Bread Crumb -->
|
18
|
+
</div>
|
19
|
+
<div class="col-sm-4">
|
20
|
+
<div class="title-action">
|
21
|
+
<%= link_to phcpress.article_posts_path, class: "btn btn-default" do %>
|
22
|
+
<i class="fa fa fa-arrow-left"></i> Back to Article Index
|
23
|
+
<% end %>
|
24
|
+
</div>
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
<!-- Page Header -->
|
19
28
|
|
20
|
-
<!--
|
21
|
-
<
|
29
|
+
<!-- Page Content -->
|
30
|
+
<div class="wrapper wrapper-content animated fadeInRight">
|
22
31
|
<div class="row">
|
23
32
|
<div class="col-lg-12">
|
24
|
-
<div class="box">
|
25
|
-
<div class="box-header with-border">
|
26
|
-
<h3 class="box-title"><%= yield(:phc_title) %></h3>
|
27
|
-
</div>
|
28
|
-
<div class="box-body">
|
29
|
-
|
30
|
-
<!-- Show Content -->
|
31
|
-
<%= link_to 'Edit', edit_article_post_path(@article_post) %> |
|
32
|
-
<%= link_to 'Back', article_posts_path %>
|
33
|
-
<!-- Show Content -->
|
34
33
|
|
34
|
+
<div class="ibox float-e-margins">
|
35
|
+
<div class="ibox-title">
|
36
|
+
<h5><%= yield(:phc_title_tagline) %></h5>
|
37
|
+
<div class="ibox-tools">
|
38
|
+
<a class="collapse-link">
|
39
|
+
<i class="fa fa-chevron-up"></i>
|
40
|
+
</a>
|
41
|
+
<a class="close-link">
|
42
|
+
<i class="fa fa-times"></i>
|
43
|
+
</a>
|
44
|
+
</div>
|
35
45
|
</div>
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
46
|
+
<div class="ibox-content">
|
47
|
+
<p id="notice"><%= notice %></p>
|
48
|
+
<%= link_to 'Edit', phcpress.edit_article_post_path(@article_post) %> |
|
49
|
+
<%= link_to 'Back', phcpress.article_posts_path %>
|
50
|
+
</div>
|
51
|
+
<!-- Page Content -->
|
@@ -1,20 +1,17 @@
|
|
1
1
|
<%= form_for(@modules_category) do |f| %>
|
2
2
|
|
3
|
-
<!--
|
3
|
+
<!-- PHCNotifi Render Validation -->
|
4
4
|
<%= render 'phcnotifi/validations', :object => @modules_category %>
|
5
|
-
<!--
|
5
|
+
<!-- PHCNotifi Render Validation -->
|
6
6
|
|
7
|
-
<!-- Form
|
8
|
-
<div class="form-group
|
9
|
-
|
7
|
+
<!-- PHCPressPro - Category Form -->
|
8
|
+
<div class="form-group">
|
9
|
+
<%= f.label :catname, "Category Name" %>
|
10
10
|
<%= f.text_field :catname, class: "form-control" %>
|
11
11
|
</div>
|
12
|
-
<!-- Form Fields -->
|
13
|
-
|
14
|
-
<!-- Form Button -->
|
15
12
|
<div class="actions">
|
16
13
|
<%= f.submit class: "btn btn-primary" %>
|
17
14
|
</div>
|
18
|
-
<!-- Form
|
15
|
+
<!-- PHCPressPro - Category Form -->
|
19
16
|
|
20
17
|
<% end %>
|