wheelhouse-blog 1.0.4 → 1.0.5

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: f0cfc6b5046f139c9cddb6c9fcf1400d13d5c776
4
- data.tar.gz: 8352caac4c126120878fb06ed8600f8ab1e89140
3
+ metadata.gz: 65654a38dfe3eaf36ed6e87e29aefadac3ec47b4
4
+ data.tar.gz: 8afc245e00073202262222dffe2843fbd604b9eb
5
5
  SHA512:
6
- metadata.gz: b2720ecaf821bbd4ad77d56c53d60a024718699a529588b868ac9f31853f5f11b437058dbac33f418676cfd39035fa0f848d6bb30bd51a1472fbd068b3e84dd4
7
- data.tar.gz: 20807ca9f2c5f41cb2d86072de2e925a154d298d25fda7ab48713119e9c5316c2f883f840def35d6ab509452a8dd84dadd4c83837772ee1db2ce5ce938722122
6
+ metadata.gz: 3768572cbcc000bdb1b7351c9608e4ec0269d1353640274c9c261d1f8ee7f198ebb78d027bd9ab83ef4ea1d9e5a3dcc766315c177e6152098321822379b7b0eb
7
+ data.tar.gz: 868a2760aab3aef051878033d1ada20bbaa41840327bfbba14d828edeb16af3df53b71f1c1492af44648a62ddb6e1782d4f9da0785e7e01ebd2af45813b7371c
@@ -2,7 +2,22 @@
2
2
 
3
3
  #blog-posts
4
4
  +orange-table
5
+
6
+ .published-at
7
+ text-align: center
8
+
9
+ td.published-at
10
+ padding: 6px 12px
11
+
12
+ .draft
13
+ color: #999
14
+ text-transform: uppercase
15
+ font-size: 90%
5
16
 
17
+ small
18
+ display: block
19
+ font-size: 90%
20
+
6
21
  #blog-categories
7
22
  +clearfix
8
23
 
@@ -22,4 +37,3 @@
22
37
  input[type="text"]
23
38
  width: 4em
24
39
  float: left
25
-
@@ -4,6 +4,13 @@ module Blog::PaginationHelper
4
4
  class LinkRenderer < WILL_PAGINATE_BASE
5
5
  PAGE_PARAMETER = /\/page\/\d+$/
6
6
 
7
+ def pagination
8
+ items = @options[:page_links] ? windowed_page_numbers : []
9
+ items.unshift :previous_page unless @options[:previous_link] == false
10
+ items.push :next_page unless @options[:next_link] == false
11
+ items
12
+ end
13
+
7
14
  protected
8
15
  def url(page)
9
16
  path = @template.request.path
@@ -9,7 +9,13 @@
9
9
 
10
10
  = row.column(:title, :link => true)
11
11
  = row.column(:author) { post.author_name || 'None' }
12
- = row.column(:published_at) { post.published? ? post.published_at.to_s(:short) : 'Draft' }
12
+ = row.column(:published_at, :class => "published-at") do
13
+ - if post.published?
14
+ =l post.published_at, :format => :blog_date
15
+ %small=l post.published_at, :format => :blog_time
16
+ - else
17
+ %span.draft Draft
18
+
13
19
  = row.controls do |c|
14
20
  = c.delete
15
21
 
@@ -0,0 +1,12 @@
1
+ {
2
+ :en => {
3
+ :time => {
4
+ :formats => {
5
+ :blog_date => lambda { |time, _| "#{time.day.ordinalize} %b %Y" }, # 14th Apr 2013
6
+ :blog_time => "%-I:%M %p" # 3:15 PM
7
+ },
8
+ :am => "AM",
9
+ :pm => "PM"
10
+ }
11
+ }
12
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wheelhouse-blog
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Pohlenz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-11 00:00:00.000000000 Z
11
+ date: 2014-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: wheelhouse
@@ -87,6 +87,7 @@ files:
87
87
  - app/views/blog/blogs/_posts.haml
88
88
  - app/views/blog/blogs/form.haml
89
89
  - app/views/blog/posts/form.haml
90
+ - config/locales/en.rb
90
91
  - config/locales/en.yml
91
92
  - config/routes.rb
92
93
  - lib/blog/wheelhouse_route_constraints.rb