phcpress 1.0.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ac76e2ec71011e6b59782b9ca5d79b197cd29168
4
- data.tar.gz: 6f3e34b9ff7edbece70dbcfaa94c24277fa91f16
3
+ metadata.gz: 24739e23457ad085fc5e25f68605f883ace99108
4
+ data.tar.gz: 0655bb4da83f0cc47490ff15ca9c75444a889aa6
5
5
  SHA512:
6
- metadata.gz: 8e25915f46e1bcd6fdb51c3299c06bcf77e8d6ba42011f2f319d388ae4be232447322a340276ccf49edb62566c1a86d2591beb6fdaec6641462171c14623e331
7
- data.tar.gz: b9277c99bff2715e06e241e9bf493c16a4519239312f95cc828a80f605e140f8c442178eeb249c9f9b4fd494a5443e0e120043c291c87c10612f0cc03e7fdafb
6
+ metadata.gz: 8ee6e205a80c7a1ac43f171a0ffb6d71e1c7850aa3995a0eb93b140fc49972794f0b92d652fca7a49ea4bd46aa4ae47da014ea433fa4d314a9dd0ebebf59d580
7
+ data.tar.gz: 6715644c5807d9754f0089ec1ea434eb6fe0de9790a2025faa5876e809eb4ce7ded85aeb5cacad6bccfc90058ff763e3466d2c01f83e76f3a79ed1dacb689a75
@@ -1,15 +1,5 @@
1
1
  module Phcpress
2
2
  module ApplicationHelper
3
3
 
4
- # Bootstrap Notification System
5
- def flash_class(level)
6
- case level.to_sym
7
- when :notice then "alert alert-info"
8
- when :success then "alert alert-success"
9
- when :error then "alert alert-danger"
10
- when :alert then "alert alert-warning"
11
- end
12
- end
13
-
14
4
  end
15
5
  end
@@ -0,0 +1,13 @@
1
+ <div class="row">
2
+ <div class=".col-md-12">
3
+ <div class="alert alert-dismissible alert-warning hidden alert-please-update" role="alert">
4
+ <button aria-label="Close" class="close" data-dismiss="alert" type="button"><span aria-hidden="true"> ×</span></button><strong>Please update</strong>Despite the fact that the record doens't show on your screen you must save it to delete it!
5
+ </div>
6
+ <% flash.each do |key, value| %>
7
+ <div class="<%= flash_class(key) %> fade in">
8
+ <a href="#" data-dismiss="alert" class="close">×</a>
9
+ <%= value %>
10
+ </div>
11
+ <% end %>
12
+ </div>
13
+ </div>
@@ -0,0 +1,11 @@
1
+ <% if object.errors.any? %>
2
+ <div class="alert alert alert-danger alert-dismissible" role="alert">
3
+ <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
4
+ <h4>The form contains <%= pluralize(object.errors.count, "error") %>.</h4>
5
+ <ul class="list-group">
6
+ <% object.errors.full_messages.each do |msg| %>
7
+ <li class="list-group-item list-group-item-danger borderless"><%= msg %></li>
8
+ <% end %>
9
+ </ul>
10
+ </div>
11
+ <% end %>
@@ -11,7 +11,7 @@
11
11
  </head>
12
12
 
13
13
  <body>
14
- <%= render 'layouts/phcpress/notifications' %>
14
+ <%= render 'layouts/phcnotifi/components/notifications' %>
15
15
  <div class="container">
16
16
  <div class="row">
17
17
  <%= yield %>
@@ -36,7 +36,7 @@
36
36
 
37
37
  <!-- Start Content -->
38
38
  <div class="container">
39
- <%= render 'layouts/phcpress/notifications' %>
39
+ <%= render 'layouts/phcnotifi/components/notifications' %>
40
40
  <!-- Start Main Content -->
41
41
  <div class="row">
42
42
  <!-- Start Blog Post Content Column -->
@@ -1,5 +1,9 @@
1
1
  <div class="row">
2
2
  <%= form_for(@blog_post, :html => {:multipart => true}) do |f| %>
3
+
4
+ <!-- PHC-Notifi Render Validation -->
5
+ <%= render 'layouts/phcnotifi/components/validations', :object => @blog_post %>
6
+
3
7
  <div class="col-md-3">
4
8
  <div class="panel panel-default">
5
9
  <div class="panel-heading">
@@ -49,5 +53,6 @@
49
53
  </div>
50
54
  </div>
51
55
  </div>
56
+
52
57
  <% end %>
53
58
  </div>
@@ -1,5 +1,9 @@
1
1
  <div class="row">
2
2
  <%= form_for(@news_post, :html => {:multipart => true}) do |f| %>
3
+
4
+ <!-- PHC-Notifi Render Validation -->
5
+ <%= render 'layouts/phcnotifi/components/validations', :object => @news_post %>
6
+
3
7
  <div class="col-md-3">
4
8
  <div class="panel panel-default">
5
9
  <div class="panel-heading">
@@ -49,5 +53,6 @@
49
53
  </div>
50
54
  </div>
51
55
  </div>
56
+
52
57
  <% end %>
53
58
  </div>
data/config/routes.rb CHANGED
@@ -13,5 +13,8 @@ Phcpress::Engine.routes.draw do
13
13
  # Serve Out Pages
14
14
  get 'website/pages/newspage', :path => "news"
15
15
  get 'website/pages/blogpage', :path => "blog"
16
+
17
+ # Mount PHCEngines
18
+ mount Phcnotifi::Engine, :at => '/'
16
19
 
17
20
  end
@@ -1,3 +1,3 @@
1
1
  module Phcpress
2
- VERSION = "1.0.0"
2
+ VERSION = "2.0.0"
3
3
  end
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: 1.0.0
4
+ version: 2.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: 2016-03-01 00:00:00.000000000 Z
11
+ date: 2016-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg
@@ -132,6 +132,20 @@ dependencies:
132
132
  - - ">="
133
133
  - !ruby/object:Gem::Version
134
134
  version: 5.0.4
135
+ - !ruby/object:Gem::Dependency
136
+ name: phcnotifi
137
+ requirement: !ruby/object:Gem::Requirement
138
+ requirements:
139
+ - - "~>"
140
+ - !ruby/object:Gem::Version
141
+ version: 0.2.5
142
+ type: :runtime
143
+ prerelease: false
144
+ version_requirements: !ruby/object:Gem::Requirement
145
+ requirements:
146
+ - - "~>"
147
+ - !ruby/object:Gem::Version
148
+ version: 0.2.5
135
149
  - !ruby/object:Gem::Dependency
136
150
  name: sqlite3
137
151
  requirement: !ruby/object:Gem::Requirement
@@ -236,7 +250,7 @@ dependencies:
236
250
  - - "~>"
237
251
  - !ruby/object:Gem::Version
238
252
  version: '2.52'
239
- description: PHCPress is a simple news and blog posting engine for your ruby on rails
253
+ description: PHC-Press is a simple news and blog posting engine for your ruby on rails
240
254
  powered site.
241
255
  email:
242
256
  - brad.potts@phcnetworks.net
@@ -269,7 +283,8 @@ files:
269
283
  - app/models/phcpress/news.rb
270
284
  - app/models/phcpress/news/post.rb
271
285
  - app/uploaders/phcpress/pstimage_uploader.rb
272
- - app/views/layouts/phcpress/_notifications.html.erb
286
+ - app/views/layouts/phcnotifi/components/_notifications.html.erb
287
+ - app/views/layouts/phcnotifi/components/_validations.html.erb
273
288
  - app/views/layouts/phcpress/application.html.erb
274
289
  - app/views/layouts/phcpress/pagelayout.html.erb
275
290
  - app/views/phcpress/blog/posts/_form.html.erb
@@ -1,11 +0,0 @@
1
- <div class="container">
2
- <div class="alert alert-dismissible alert-warning hidden alert-please-update" role="alert">
3
- <button aria-label="Close" class="close" data-dismiss="alert" type="button"><span aria-hidden="true"> ×</span></button><strong>Please update</strong>Despite the fact that the record doens't show on your screen you must save it to delete it!
4
- </div>
5
- <% flash.each do |key, value| %>
6
- <div class="<%= flash_class(key) %> fade in">
7
- <a href="#" data-dismiss="alert" class="close">×</a>
8
- <%= value %>
9
- </div>
10
- <% end %>
11
- </div>