phcpress 0.4.9b → 0.5.9b
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/phcpress/application.css.scss +0 -3
- data/app/controllers/phcpress/application_controller.rb +23 -0
- data/app/controllers/phcpress/news/posts_controller.rb +1 -0
- data/app/controllers/phcpress/website/pages_controller.rb +5 -0
- data/app/views/layouts/phcpress/pagelayout.html.erb +54 -0
- data/app/views/phcpress/news/posts/index.html.erb +1 -1
- data/app/views/phcpress/website/pages/blogpage.html.erb +23 -40
- data/app/views/phcpress/website/pages/newspage.html.erb +20 -33
- data/lib/phcpress/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b9abe9bd3b9633a201873379ef04d9dfb1ec861
|
4
|
+
data.tar.gz: 1707f9b8ce26a7b3b4d7d05f74488cb79e460d70
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51c72fadab88d6f9459d45fbff29b8a2cb349dab421dc68284b0a5ba66034e4e70ae2257a8695520f1cb7072e8ca55dc8f2b32dc4ac58e2c7ae5d9bebb1988f2
|
7
|
+
data.tar.gz: 9a2eed3881d21f6dfe829cd7b6afedca347ad72154458b6d62dada8d8d04f30fb3a4081ef052c1a27cbd92e249f9df0db79472424a9e1d506e0f332074e0c63d
|
@@ -1,4 +1,27 @@
|
|
1
1
|
module Phcpress
|
2
2
|
class ApplicationController < ActionController::Base
|
3
|
+
|
4
|
+
private
|
5
|
+
|
6
|
+
# Resolve Application Layouts
|
7
|
+
def layouts_resolver_application
|
8
|
+
case action_name
|
9
|
+
when "index"
|
10
|
+
"layouts/phcpress/application"
|
11
|
+
else
|
12
|
+
"layouts/phcpress/application"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
# Resolve Webpage Layouts
|
17
|
+
def layouts_resolver_webpages
|
18
|
+
case action_name
|
19
|
+
when "newspage"
|
20
|
+
"layouts/phcpress/pagelayout"
|
21
|
+
when "blogpage"
|
22
|
+
"layouts/phcpress/pagelayout"
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
3
26
|
end
|
4
27
|
end
|
@@ -3,10 +3,15 @@ require_dependency "phcpress/application_controller"
|
|
3
3
|
module Phcpress
|
4
4
|
class Website::PagesController < ApplicationController
|
5
5
|
|
6
|
+
# Resolve Layout for Web Pages
|
7
|
+
layout :layouts_resolver_webpages
|
8
|
+
|
9
|
+
# Retrieve News Posts for News Page
|
6
10
|
def newspage
|
7
11
|
@news_posts = News::Post.all
|
8
12
|
end
|
9
13
|
|
14
|
+
# Retrieve Blog Posts for Blog Page
|
10
15
|
def blogpage
|
11
16
|
@blog_posts = Blog::Post.all
|
12
17
|
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
|
5
|
+
<title>PHCPress - News Post & Blogging System</title>
|
6
|
+
|
7
|
+
<%= stylesheet_link_tag "phcpress/application", media: "all" %>
|
8
|
+
<%= javascript_include_tag "phcpress/application" %>
|
9
|
+
<%= csrf_meta_tags %>
|
10
|
+
|
11
|
+
</head>
|
12
|
+
|
13
|
+
<body>
|
14
|
+
|
15
|
+
<!-- Start Navigation -->
|
16
|
+
<nav class="navbar navbar-default" role="navigation">
|
17
|
+
<div class="container-fluid">
|
18
|
+
<div class="navbar-header">
|
19
|
+
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
|
20
|
+
<span class="sr-only">Toggle navigation</span>
|
21
|
+
<span class="icon-bar"></span>
|
22
|
+
<span class="icon-bar"></span>
|
23
|
+
<span class="icon-bar"></span>
|
24
|
+
</button>
|
25
|
+
<a class="navbar-brand" href="#">PHCPress</a>
|
26
|
+
</div>
|
27
|
+
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
28
|
+
<ul class="nav navbar-nav">
|
29
|
+
<li><%= link_to "News", phcpress.website_pages_newspage_path %></li>
|
30
|
+
<li><%= link_to "Blog", phcpress.website_pages_blogpage_path %></li>
|
31
|
+
</ul>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
</nav>
|
35
|
+
<!-- End Navigation -->
|
36
|
+
|
37
|
+
<!-- Start Content -->
|
38
|
+
<div class="container">
|
39
|
+
<%= render 'layouts/phcpress/notifications' %>
|
40
|
+
<!-- Start Main Content -->
|
41
|
+
<div class="row">
|
42
|
+
<!-- Start Blog Post Content Column -->
|
43
|
+
<div class="col-lg-8">
|
44
|
+
<%= yield %>
|
45
|
+
</div>
|
46
|
+
<!-- End Blog Post Content Column -->
|
47
|
+
</div>
|
48
|
+
<!-- End Main Content -->
|
49
|
+
</div>
|
50
|
+
<!-- End Content -->
|
51
|
+
|
52
|
+
</body>
|
53
|
+
|
54
|
+
</html>
|
@@ -1,42 +1,25 @@
|
|
1
|
-
|
2
|
-
<div class="
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
<% @blog_posts.each do |blog_post| %>
|
2
|
+
<div class="row">
|
3
|
+
<div class="col-lg-12">
|
4
|
+
<article>
|
5
|
+
<!-- Title -->
|
6
|
+
<h1><%= blog_post.blogpsttitle %></h1>
|
7
|
+
|
8
|
+
<!-- Author (Next Release)
|
9
|
+
<p class="lead">
|
10
|
+
by <a href="#">Authour</a>
|
11
|
+
</p>
|
12
|
+
-->
|
13
|
+
|
14
|
+
<!-- Date -->
|
15
|
+
<hr>
|
16
|
+
<p>
|
17
|
+
<span class="fa fa-calendar"></span> Posted on <%= blog_post.created_at %>
|
18
|
+
</p>
|
19
|
+
<hr>
|
20
|
+
|
21
|
+
<p><%= blog_post.blogpsttext %></p>
|
22
|
+
</article>
|
7
23
|
</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>BlogPage Title</th>
|
16
|
-
<th>BlogPage Text</th>
|
17
|
-
<th>BlogPage 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><%= blog_post.blogpsttext %></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
24
|
</div>
|
42
|
-
|
25
|
+
<% end %>
|
@@ -1,38 +1,25 @@
|
|
1
|
-
|
2
|
-
<div class="
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
<div class="panel-body">
|
8
|
-
<table class="table table-bordered table-striped table-hover">
|
1
|
+
<% @news_posts.each do |news_post| %>
|
2
|
+
<div class="row">
|
3
|
+
<div class="col-lg-12">
|
4
|
+
<article>
|
5
|
+
<!-- Title -->
|
6
|
+
<h1><%= news_post.newspsttitle %></h1>
|
9
7
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
<th></th>
|
16
|
-
</tr>
|
17
|
-
</thead>
|
8
|
+
<!-- Author (Next Release)
|
9
|
+
<p class="lead">
|
10
|
+
by <a href="#">Authour</a>
|
11
|
+
</p>
|
12
|
+
-->
|
18
13
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
<td><div class="btn-group" role="group" aria-label="News Articles">
|
26
|
-
<%= link_to 'Show', news_post, class: "btn btn-primary btn-xs" %>
|
27
|
-
<%= link_to 'Edit', edit_news_post_path(news_post), class: "btn btn-primary btn-xs" %>
|
28
|
-
<%= link_to 'Destroy', news_post, class: "btn btn-danger btn-xs", method: :delete, data: { confirm: 'Are you sure?' } %>
|
29
|
-
</div></td>
|
30
|
-
</tr>
|
31
|
-
<% end %>
|
32
|
-
</tbody>
|
14
|
+
<!-- Date -->
|
15
|
+
<hr>
|
16
|
+
<p>
|
17
|
+
<span class="fa fa-calendar"></span> Posted on <%= news_post.created_at %>
|
18
|
+
</p>
|
19
|
+
<hr>
|
33
20
|
|
34
|
-
|
35
|
-
|
21
|
+
<p><%= news_post.newspsttext %></p>
|
22
|
+
</article>
|
36
23
|
</div>
|
37
24
|
</div>
|
38
|
-
|
25
|
+
<% 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: 0.
|
4
|
+
version: 0.5.9b
|
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-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|
@@ -254,6 +254,7 @@ files:
|
|
254
254
|
- app/models/phcpress/news/post.rb
|
255
255
|
- app/views/layouts/phcpress/_notifications.html.erb
|
256
256
|
- app/views/layouts/phcpress/application.html.erb
|
257
|
+
- app/views/layouts/phcpress/pagelayout.html.erb
|
257
258
|
- app/views/phcpress/blog/posts/_form.html.erb
|
258
259
|
- app/views/phcpress/blog/posts/edit.html.erb
|
259
260
|
- app/views/phcpress/blog/posts/index.html.erb
|