tkh_content 0.9.9 → 0.9.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f230ccfce698411234a73a0f7af063514073b454
4
- data.tar.gz: 2cbf6a17b28cc3f33a9315d27c1d633ea968ae27
3
+ metadata.gz: a07b81f33459760971cfaaee1ccb390c2439c62d
4
+ data.tar.gz: 311e44c99984a7d609e12d085a52508fe4a22303
5
5
  SHA512:
6
- metadata.gz: a0c01a592713676df2ba8e61823714c2177703d66e62023f7d974587289a3c940f23dc5fa9c8d1a8a9a7f33a872302cd58a519edb46b3a803a1dfbbf7dfa474e
7
- data.tar.gz: 370e7f3ee81d01bc54b17a636534c3329cb763d3e848d506ca61f02f7791c8e93c880afe3c3f0cf355da95b1da0a908586dea3e43b91bfdd299bc29c490d1e9a
6
+ metadata.gz: 5ab9a39a8147ef5fd5b72734c6af2c464cf03273def8afb7c41df514d462ed4d876d51b04191bf3968dbb50a2f65a42ed1d3f1289673190be301048e4753dc37
7
+ data.tar.gz: c327e267dae0e50665e30768c3775387877b16d766627679d827d465f6308323a3349fb9e5747616849f4d4afaf63f34c5b8e47ee43960bc214ed572a1f92c82
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
 
4
4
 
5
+ ## 0.9.10
6
+
7
+ * Fixed up paginators
8
+ * Replaced div with article tag for individual post partial. Semantically correct AND easier to style first_of_type
9
+ * Fixed up controllers code for flash warnings
10
+
5
11
 
6
12
  ## 0.9.9
7
13
 
@@ -24,7 +24,8 @@ class CommentsController < ApplicationController
24
24
  if @comment.save
25
25
  redirect_to @comment.page, notice: t('comments.create.notice')
26
26
  else
27
- redirect_to @comment.page, warning: t('comments.create.warning')
27
+ flash[:warning] = t('comments.create.warning')
28
+ redirect_to @comment.page
28
29
  end
29
30
  end
30
31
 
@@ -33,6 +34,7 @@ class CommentsController < ApplicationController
33
34
  if @comment.update_attributes(comment_params)
34
35
  redirect_to comments_path, notice: t('comments.update.notice')
35
36
  else
37
+ flash[:warning] = t('comments.update.warning')
36
38
  render action: "edit", warning: t('comments.update.warning'), layout: 'admin'
37
39
  end
38
40
  end
@@ -49,7 +51,8 @@ class CommentsController < ApplicationController
49
51
  if @comment.save
50
52
  redirect_to :back, notice: t('comments.moderation.accept.notice')
51
53
  else
52
- redirect_to comments_path, warning: t('comments.moderation.accept.warning')
54
+ flash[:warning] = t('comments.moderation.accept.warning')
55
+ redirect_to comments_path
53
56
  end
54
57
  end
55
58
 
@@ -59,7 +62,8 @@ class CommentsController < ApplicationController
59
62
  if @comment.save
60
63
  redirect_to :back, notice: t('comments.moderation.block.notice')
61
64
  else
62
- redirect_to comments_path, warning: t('comments.moderation.block.warning')
65
+ flash[:warning] = t('commentns.moderation.block.warning')
66
+ redirect_to comments_path
63
67
  end
64
68
  end
65
69
 
@@ -29,7 +29,8 @@ class PagesController < ApplicationController
29
29
  if @page.save
30
30
  redirect_to @page, notice: t('pages.create.notice')
31
31
  else
32
- render action: "new", flash: { error: t('pages.create.warning') }, layout: 'admin'
32
+ flash[:warning] = t('pages.create.warning')
33
+ render action: "new", layout: 'admin'
33
34
  end
34
35
  end
35
36
 
@@ -38,7 +39,8 @@ class PagesController < ApplicationController
38
39
  if @page.update_attributes(page_params)
39
40
  redirect_to @page, notice: t('pages.update.notice')
40
41
  else
41
- render action: "edit", warning: t('pages.update.warning'), layout: 'admin'
42
+ flash[:warning] = t('pages.update.warning')
43
+ render action: "edit", layout: 'admin'
42
44
  end
43
45
  end
44
46
 
@@ -18,7 +18,8 @@ class TagsController < ApplicationController
18
18
  if @tag.update_attributes(tag_params)
19
19
  redirect_to tags_path, notice: t('tags.update.notice')
20
20
  else
21
- render action: "edit", warning: t('tags.update.warning'), layout: 'admin'
21
+ flash[:warning] = t('tags.update.warning')
22
+ render action: "edit", layout: 'admin'
22
23
  end
23
24
  end
24
25
 
@@ -11,11 +11,13 @@
11
11
  </div>
12
12
  </div>
13
13
 
14
+ <%= will_paginate @posts, inner_window: 2 %>
15
+
14
16
  <% for post in @posts %>
15
17
  <%= render '/pages/individual_blog_post_in_list', post: post %>
16
18
  <% end %>
17
19
 
18
- <%= will_paginate @posts %>
20
+ <%= will_paginate @posts, inner_window: 2 %>
19
21
 
20
22
  <%= render 'all_tags_list' %>
21
23
  <%= render( 'admin_context_menu', page: @page) %>
@@ -2,12 +2,13 @@
2
2
  <% content_for :meta_description, "#{Setting.first.try(:blog_tagline)} - #{Setting.first.try(:company_name)}#{t('colon')} #{t('blog.official')}" %>
3
3
  <% content_for :canonical_link, link_to('', blog_path, rel: 'canonical') %>
4
4
 
5
+ <%= will_paginate @posts, inner_window: 2 %>
5
6
 
6
7
  <% for post in @posts %>
7
8
  <%= render '/pages/individual_blog_post_in_list', post: post %>
8
9
  <% end %>
9
10
 
10
- <%= will_paginate @posts %>
11
+ <%= will_paginate @posts, inner_window: 2 %>
11
12
 
12
13
  <%= render 'all_tags_list' %>
13
14
  <%= render( 'admin_context_menu', page: @page) %>
@@ -2,7 +2,7 @@
2
2
 
3
3
  <%= render 'tab_admin_menu' %>
4
4
 
5
- <%= will_paginate @comments %>
5
+ <%= will_paginate @comments, inner_window: 2 %>
6
6
 
7
7
  <table class='table table-striped'>
8
8
  <thead>
@@ -27,6 +27,6 @@
27
27
  </tbody>
28
28
  </table>
29
29
 
30
- <%= will_paginate @comments %>
30
+ <%= will_paginate @comments, inner_window: 2 %>
31
31
 
32
32
  <%= render 'shared/admin_sidebar' %>
@@ -1,5 +1,5 @@
1
- <div class="individual-post">
1
+ <article class="individual-post">
2
2
  <h1><%= link_to post.title, post %></h1>
3
3
  <%= render '/pages/blog_post_meta', post: post %>
4
4
  <%= raw post.body %>
5
- </div>
5
+ </article>
data/lib/tkh_content.rb CHANGED
@@ -1,7 +1,6 @@
1
1
  require "tkh_content/version"
2
2
  require 'rails'
3
3
  require 'bootstrap-sass'
4
- require 'bootstrap-will_paginate'
5
4
  require 'simple_form'
6
5
  require 'stringex'
7
6
  require 'globalize'
@@ -1,3 +1,3 @@
1
1
  module TkhContent
2
- VERSION = "0.9.9"
2
+ VERSION = "0.9.10"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tkh_content
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.9
4
+ version: 0.9.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Swami Atma
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-08 00:00:00.000000000 Z
11
+ date: 2014-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -52,20 +52,6 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: bootstrap-will_paginate
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :runtime
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: simple_form
71
57
  requirement: !ruby/object:Gem::Requirement