refinerycms-whatson 1.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (137) hide show
  1. data/.gitignore +48 -0
  2. data/.tork.rb +2 -0
  3. data/.travis.yml +2 -0
  4. data/Gemfile +7 -0
  5. data/Rakefile +3 -0
  6. data/app/controllers/admin/whatson/categories_controller.rb +11 -0
  7. data/app/controllers/admin/whatson/comments_controller.rb +40 -0
  8. data/app/controllers/admin/whatson/posts_controller.rb +97 -0
  9. data/app/controllers/admin/whatson/settings_controller.rb +53 -0
  10. data/app/controllers/whatson/categories_controller.rb +13 -0
  11. data/app/controllers/whatson/posts_controller.rb +109 -0
  12. data/app/controllers/whatson_controller.rb +16 -0
  13. data/app/helpers/whatson_posts_helper.rb +56 -0
  14. data/app/mailers/whatson/comment_mailer.rb +13 -0
  15. data/app/models/categorization.rb +7 -0
  16. data/app/models/whatson/comment_mailer.rb +1 -0
  17. data/app/models/whatson_category.rb +19 -0
  18. data/app/models/whatson_comment.rb +137 -0
  19. data/app/models/whatson_post.rb +114 -0
  20. data/app/views/admin/whatson/_submenu.html.erb +96 -0
  21. data/app/views/admin/whatson/categories/_category.html.erb +16 -0
  22. data/app/views/admin/whatson/categories/_form.html.erb +19 -0
  23. data/app/views/admin/whatson/categories/_sortable_list.html.erb +7 -0
  24. data/app/views/admin/whatson/categories/edit.html.erb +1 -0
  25. data/app/views/admin/whatson/categories/index.html.erb +26 -0
  26. data/app/views/admin/whatson/categories/new.html.erb +1 -0
  27. data/app/views/admin/whatson/comments/_comment.html.erb +20 -0
  28. data/app/views/admin/whatson/comments/_sortable_list.html.erb +7 -0
  29. data/app/views/admin/whatson/comments/index.html.erb +35 -0
  30. data/app/views/admin/whatson/comments/show.html.erb +63 -0
  31. data/app/views/admin/whatson/posts/_form.css.erb +20 -0
  32. data/app/views/admin/whatson/posts/_form.html.erb +110 -0
  33. data/app/views/admin/whatson/posts/_form.js.erb +23 -0
  34. data/app/views/admin/whatson/posts/_form_part.html.erb +3 -0
  35. data/app/views/admin/whatson/posts/_post.html.erb +24 -0
  36. data/app/views/admin/whatson/posts/_sortable_list.html.erb +7 -0
  37. data/app/views/admin/whatson/posts/_teaser_part.html.erb +11 -0
  38. data/app/views/admin/whatson/posts/edit.html.erb +1 -0
  39. data/app/views/admin/whatson/posts/index.html.erb +28 -0
  40. data/app/views/admin/whatson/posts/new.html.erb +1 -0
  41. data/app/views/admin/whatson/posts/uncategorized.html.erb +26 -0
  42. data/app/views/admin/whatson/settings/notification_recipients.html.erb +24 -0
  43. data/app/views/shared/admin/_autocomplete.html.erb +55 -0
  44. data/app/views/whatson/categories/show.html.erb +21 -0
  45. data/app/views/whatson/comment_mailer/notification.html.erb +17 -0
  46. data/app/views/whatson/posts/_comment.html.erb +10 -0
  47. data/app/views/whatson/posts/_nav.html.erb +11 -0
  48. data/app/views/whatson/posts/archive.html.erb +20 -0
  49. data/app/views/whatson/posts/index.html.erb +24 -0
  50. data/app/views/whatson/posts/index.rss.builder +17 -0
  51. data/app/views/whatson/posts/show.html.erb +98 -0
  52. data/app/views/whatson/posts/tagged.html.erb +22 -0
  53. data/app/views/whatson/shared/_archive_list.html.erb +9 -0
  54. data/app/views/whatson/shared/_categories.html.erb +10 -0
  55. data/app/views/whatson/shared/_post.html.erb +46 -0
  56. data/app/views/whatson/shared/_related_posts.html.erb +10 -0
  57. data/app/views/whatson/shared/_rss_feed.html.erb +2 -0
  58. data/app/views/whatson/shared/_tags.html.erb +8 -0
  59. data/config/locales/bg.yml +158 -0
  60. data/config/locales/cs.yml +128 -0
  61. data/config/locales/de.yml +130 -0
  62. data/config/locales/en.yml +159 -0
  63. data/config/locales/es.yml +159 -0
  64. data/config/locales/fr.yml +154 -0
  65. data/config/locales/it.yml +156 -0
  66. data/config/locales/ja.yml +159 -0
  67. data/config/locales/nb.yml +30 -0
  68. data/config/locales/nl.yml +134 -0
  69. data/config/locales/pl.yml +134 -0
  70. data/config/locales/pt-BR.yml +143 -0
  71. data/config/locales/ru.yml +135 -0
  72. data/config/locales/sk.yml +128 -0
  73. data/config/locales/zh-CN.yml +128 -0
  74. data/config/routes.rb +47 -0
  75. data/db/migrate/1_create_whatson_structure.rb +54 -0
  76. data/db/migrate/2_add_user_id_to_whatson_posts.rb +11 -0
  77. data/db/migrate/3_acts_as_taggable_on_migration.rb +28 -0
  78. data/db/migrate/4_create_seo_meta_for_whatson.rb +25 -0
  79. data/db/migrate/5_add_cached_slugs.rb +11 -0
  80. data/db/migrate/6_add_custom_url_field_to_whatson_posts.rb +9 -0
  81. data/db/migrate/7_add_custom_teaser_field_to_whatson_posts.rb +10 -0
  82. data/db/migrate/8_add_primary_key_to_categorizations.rb +12 -0
  83. data/db/seeds/refinerycms_whatson.rb +20 -0
  84. data/features/authors.feature +15 -0
  85. data/features/category.feature +23 -0
  86. data/features/support/factories/whatson_categories.rb +5 -0
  87. data/features/support/factories/whatson_comments.rb +8 -0
  88. data/features/support/factories/whatson_posts.rb +9 -0
  89. data/features/support/paths.rb +24 -0
  90. data/features/support/step_definitions/authors_steps.rb +7 -0
  91. data/features/support/step_definitions/category_steps.rb +11 -0
  92. data/features/support/step_definitions/tags_steps.rb +13 -0
  93. data/features/tags.feature +26 -0
  94. data/lib/gemspec.rb +37 -0
  95. data/lib/generators/refinerycms_whatson_generator.rb +8 -0
  96. data/lib/refinery/whatson/tabs.rb +28 -0
  97. data/lib/refinery/whatson/version.rb +17 -0
  98. data/lib/refinerycms-whatson.rb +41 -0
  99. data/public/images/refinerycms-whatson/icons/cog.png +0 -0
  100. data/public/images/refinerycms-whatson/icons/comment.png +0 -0
  101. data/public/images/refinerycms-whatson/icons/comment_cross.png +0 -0
  102. data/public/images/refinerycms-whatson/icons/comment_tick.png +0 -0
  103. data/public/images/refinerycms-whatson/icons/comments.png +0 -0
  104. data/public/images/refinerycms-whatson/icons/down.gif +0 -0
  105. data/public/images/refinerycms-whatson/icons/folder.png +0 -0
  106. data/public/images/refinerycms-whatson/icons/folder_add.png +0 -0
  107. data/public/images/refinerycms-whatson/icons/folder_edit.png +0 -0
  108. data/public/images/refinerycms-whatson/icons/page.png +0 -0
  109. data/public/images/refinerycms-whatson/icons/page_add.png +0 -0
  110. data/public/images/refinerycms-whatson/icons/page_copy.png +0 -0
  111. data/public/images/refinerycms-whatson/icons/up.gif +0 -0
  112. data/public/images/refinerycms-whatson/rss-feed.png +0 -0
  113. data/public/javascripts/refinery/refinerycms-whatson.js +50 -0
  114. data/public/javascripts/refinerycms-whatson.js +25 -0
  115. data/public/stylesheets/refinery/refinerycms-whatson.css +57 -0
  116. data/public/stylesheets/refinerycms-whatson.css +93 -0
  117. data/public/stylesheets/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
  118. data/public/stylesheets/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
  119. data/public/stylesheets/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
  120. data/public/stylesheets/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
  121. data/public/stylesheets/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
  122. data/public/stylesheets/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  123. data/public/stylesheets/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
  124. data/public/stylesheets/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
  125. data/public/stylesheets/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
  126. data/public/stylesheets/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
  127. data/public/stylesheets/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
  128. data/public/stylesheets/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
  129. data/public/stylesheets/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
  130. data/public/stylesheets/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
  131. data/public/stylesheets/ui-lightness/jquery-ui-1.8.13.custom.css +330 -0
  132. data/readme.md +41 -0
  133. data/refinerycms-whatson.gemspec +18 -0
  134. data/spec/models/whatson_category_spec.rb +41 -0
  135. data/spec/models/whatson_comment_spec.rb +21 -0
  136. data/spec/models/whatson_post_spec.rb +217 -0
  137. metadata +235 -0
@@ -0,0 +1,55 @@
1
+ <% content_for :stylesheets, stylesheet_link_tag("ui-lightness/jquery-ui-1.8.13.custom.css") -%>
2
+
3
+ <% content_for :javascripts do %>
4
+ <%= javascript_include_tag "https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/jquery-ui.min.js" %>
5
+ <script>
6
+ function split( val ) {
7
+ return val.split( /,\s*/ );
8
+ }
9
+ function extractLast( term ) {
10
+ return split( term ).pop();
11
+ }
12
+
13
+
14
+ $(document).ready(function(){
15
+ page_options.init(false, '', '')
16
+
17
+ $('<%= dom_id %>')
18
+ .bind( "keydown", function( event ) {
19
+ if ( event.keyCode === $.ui.keyCode.TAB &&
20
+ $( this ).data( "autocomplete" ).menu.active ) {
21
+ event.preventDefault()
22
+ }
23
+ })
24
+ .autocomplete({
25
+ source: function( request, response ) {
26
+ $.getJSON( "<%= url %>", {
27
+ term: extractLast( request.term )
28
+ }, response );
29
+ },
30
+ search: function() {
31
+ // custom minLength
32
+ var term = extractLast( this.value );
33
+ if ( term.length < 2 ) {
34
+ return false;
35
+ }
36
+ },
37
+ focus: function() {
38
+ // prevent value inserted on focus
39
+ return false;
40
+ },
41
+ select: function( event, ui ) {
42
+ var terms = split( this.value );
43
+ // remove the current input
44
+ terms.pop();
45
+ // add the selected item
46
+ terms.push( ui.item.value );
47
+ // add placeholder to get the comma-and-space at the end
48
+ terms.push( "" );
49
+ this.value = terms.join( ", " );
50
+ return false;
51
+ }
52
+ })
53
+ });
54
+ </script>
55
+ <% end %>
@@ -0,0 +1,21 @@
1
+ <% content_for :body_content_title, @category.title %>
2
+
3
+ <% content_for :body_content_left do %>
4
+ <% if @whatson_posts.any? %>
5
+ <section id="whatson_posts">
6
+ <%= render :partial => "/whatson/shared/post", :collection => @whatson_posts %>
7
+ <%= will_paginate @whatson_posts %>
8
+ </section>
9
+ <% else %>
10
+ <p>
11
+ <%= t('.no_posts') %>
12
+ </p>
13
+ <% end %>
14
+ <% end %>
15
+
16
+ <% content_for :body_content_right do %>
17
+ <%= render :partial => "/whatson/shared/categories" %>
18
+ <% end %>
19
+
20
+ <%= render :partial => "/shared/content_page" %>
21
+ <% content_for :stylesheets, stylesheet_link_tag('refinerycms-whatson') %>
@@ -0,0 +1,17 @@
1
+ <%=raw t('.greeting') %>,
2
+
3
+ <%=raw t('.you_recieved_new_comment') %>
4
+
5
+ <%=raw t('.comment_starts') %>
6
+
7
+ <%=raw t('.from') %>: <%= @comment.name %>
8
+ <%=raw t('.email') %>: <%= @comment.email %>
9
+ <%=raw t('.message') %>:
10
+ <%=simple_format strip_tags(@comment.body) %>
11
+
12
+ <%=raw t('.comment_ends') %>
13
+
14
+ <%=raw t('.closing_line') %>,
15
+ <%=raw RefinerySetting[:site_name] %>
16
+
17
+ <%=raw t('.ps') %>
@@ -0,0 +1,10 @@
1
+ <article class='whatson_comment_message' id='<%= "comment-#{comment.to_param}" %>'>
2
+ <%= image_tag comment.avatar_url, :alt => comment.name, :class => 'avatar' %>
3
+ <%= simple_format auto_link(comment.message.to_s) %>
4
+ <footer class='whatson_comment_author'>
5
+ <p>
6
+ <%= t('by', :scope => 'whatson.posts.comments', :who => comment.name) %>,
7
+ <%= t('time_ago', :scope => 'whatson.posts.comments', :time => time_ago_in_words(comment.created_at)) %>
8
+ </p>
9
+ </footer>
10
+ </article>
@@ -0,0 +1,11 @@
1
+ <nav id="next_prev_article">
2
+ <% if @whatson_post.next.present? -%>
3
+ <%= link_to (truncate(@whatson_post.next.title) + " &#187;").html_safe, @whatson_post.next, :class => 'next' %>
4
+ <% end -%>
5
+
6
+ <%= link_to t('whatson_home', :scope => 'whatson.posts.show'), whatson_root_path, :class => 'home' %>
7
+
8
+ <% if @whatson_post.prev.present? -%>
9
+ <%= link_to ("&#171; " + truncate(@whatson_post.prev.title)).html_safe, @whatson_post.prev, :class => 'prev' %>
10
+ <% end -%>
11
+ </nav><!-- /next_prev_article -->
@@ -0,0 +1,20 @@
1
+ <% content_for :body_content_left do %>
2
+ <h1><%= t('.whatson_archive_for', :date => @archive_date.strftime('%B %Y')) %></h1>
3
+ <% if @whatson_posts.any? %>
4
+ <section id="whatson_posts">
5
+ <%= render :partial => "/whatson/shared/post", :collection => @whatson_posts %>
6
+ </section>
7
+ <% else %>
8
+ <p><%= t('.no_whatson_articles_posted', :date => @archive_date.strftime('%B %Y')) %></p>
9
+ <% end %>
10
+ <% end %>
11
+
12
+ <% content_for :body_content_right do %>
13
+ <%= render :partial => "/whatson/shared/categories" %>
14
+ <%= render :partial => "/whatson/shared/tags" %>
15
+ <%= render :partial => "/whatson/shared/rss_feed" %>
16
+ <%= render :partial => "/whatson/shared/archive_list" %>
17
+ <% end %>
18
+
19
+ <%= render :partial => "/shared/content_page" %>
20
+ <% content_for :stylesheets, stylesheet_link_tag('refinerycms-whatson') %>
@@ -0,0 +1,24 @@
1
+ <% content_for :body_content_left do %>
2
+ <%=raw @page[Page.default_parts.first.to_sym] if Page.default_parts.any? %>
3
+
4
+ <% if @whatson_posts.any? %>
5
+ <section id="whatson_posts">
6
+ <%= render :partial => "/whatson/shared/post", :collection => @whatson_posts %>
7
+ <%= will_paginate @whatson_posts %>
8
+ </section>
9
+ <% else %>
10
+ <p><%= t('.no_whatson_articles_yet') %></p>
11
+ <% end %>
12
+ <% end %>
13
+
14
+ <% content_for :body_content_right do %>
15
+ <%=raw @page[Page.default_parts.second.to_sym] if Page.default_parts.many? %>
16
+
17
+ <%= render :partial => "/whatson/shared/categories" %>
18
+ <%= render :partial => "/whatson/shared/tags" %>
19
+ <%= render :partial => "/whatson/shared/rss_feed" %>
20
+ <%= render :partial => "/whatson/shared/archive_list" %>
21
+ <% end %>
22
+
23
+ <%= render :partial => "/shared/content_page" %>
24
+ <% content_for :stylesheets, stylesheet_link_tag('refinerycms-whatson') %>
@@ -0,0 +1,17 @@
1
+ xml.instruct! :xml, :version => "1.0"
2
+ xml.rss :version => "2.0" do
3
+ xml.channel do
4
+ xml.title RefinerySetting.find_or_set(:site_name, "Company Name")
5
+ xml.description RefinerySetting.find_or_set(:site_name, "Company Name") + " Whatson Posts"
6
+ xml.link whatson_root_url
7
+
8
+ @whatson_posts.each do |post|
9
+ xml.item do
10
+ xml.title post.title
11
+ xml.description post.body
12
+ xml.pubDate post.published_at.to_s(:rfc822)
13
+ xml.link whatson_post_url(post)
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,98 @@
1
+ <% content_for :body_content_left do %>
2
+ <div id="show_whatson_post">
3
+ <% flash.each do |key, value| %>
4
+ <div id='flash' class="flash flash_<%= key %>">
5
+ <%= value %>
6
+ </div>
7
+ <% end %>
8
+ <article id="whatson_post">
9
+ <header>
10
+ <h1><%= @whatson_post.title %></h1>
11
+ <section class='details'>
12
+ <time datetime="<%=l @whatson_post.published_at.to_date, :format => :default %>" class='posted_at'>
13
+ <%= t('created_at', :scope => 'whatson.shared.posts', :when => l(@whatson_post.published_at.to_date, :format => :short)) %>
14
+ </time>
15
+ <%= "#{t('by', :scope => 'whatson.posts.show')} #{@whatson_post.author.username}" if @whatson_post.author.present? %>.
16
+ <% if (categories = @whatson_post.categories).any? %>
17
+ <aside class='filed_in'>
18
+ <%= t('filed_in', :scope => 'whatson.posts.show') %>
19
+ <% categories.each_with_index do |category, index| %>
20
+ <%= link_to category.title, whatson_category_url(category) -%><%= ',' if index < ((categories.length) - 1) %>
21
+ <% end %>
22
+ </aside>
23
+ <% end %>
24
+ </section>
25
+ </header>
26
+ <%= @whatson_post.body.html_safe %>
27
+
28
+ <% if WhatsonPost::ShareThis.enabled? %>
29
+ <span class="st_sharethis" displayText="ShareThis"></span>
30
+ <% end %>
31
+ </article>
32
+ <%= render :partial => '/shared/draft_page_message' unless @whatson_post.nil? or @whatson_post.live? -%>
33
+ <%= render 'nav' if next_or_previous?(@whatson_post) %>
34
+
35
+ </div>
36
+
37
+ <% if WhatsonPost.comments_allowed? %>
38
+ <aside id="comments">
39
+ <h2><%= t('.comments.title') %></h2>
40
+ <% if (comments = @whatson_post.comments.approved).any? %>
41
+ <%= render :partial => "comment", :collection => comments %>
42
+ <% else %>
43
+ <p>
44
+ <%= t('none', :scope => 'whatson.shared.comments') %>.
45
+ </p>
46
+ <% end %>
47
+
48
+ <% flash.each do |key, value| %>
49
+ <div id='flash' class="flash flash_<%= key %>">
50
+ <%= value %>
51
+ </div>
52
+ <% end %>
53
+
54
+ <h2><%= t('.comments.add') %></h2>
55
+ <%= form_for [:whatson_post, @whatson_comment] do |f| %>
56
+ <%= render :partial => "/shared/admin/error_messages",
57
+ :locals => {
58
+ :object => f.object,
59
+ :include_object_name => true
60
+ } %>
61
+ <div class='field'>
62
+ <%= f.label :name %>
63
+ <%= f.text_field :name %>
64
+ </div>
65
+ <div class='field'>
66
+ <%= f.label :email %>
67
+ <%= f.email_field :email %>
68
+ </div>
69
+ <div class='field message_field'>
70
+ <%= f.label :message %>
71
+ <%= f.text_area :message, :rows => 6 %>
72
+ </div>
73
+ <div class='field form-actions'>
74
+ <%= f.submit t('.submit') %>
75
+ </div>
76
+ <% end %>
77
+ </aside>
78
+ <% end %>
79
+ <% end %>
80
+
81
+ <% content_for :body_content_right do %>
82
+ <%= render :partial => "/whatson/shared/categories" %>
83
+ <%= render :partial => "/whatson/shared/tags" %>
84
+ <%= render :partial => "/whatson/shared/related_posts" %>
85
+ <%= render :partial => "/whatson/shared/rss_feed" %>
86
+ <%= render :partial => "/whatson/shared/archive_list" %>
87
+ <% end %>
88
+
89
+ <%= render :partial => "/shared/content_page", :locals => { :remove_automatic_sections => true } %>
90
+
91
+ <% content_for :stylesheets, stylesheet_link_tag('refinerycms-whatson') %>
92
+ <% content_for :before_javascript_libraries, jquery_include_tags(:jquery_ui => false) %>
93
+ <% content_for :javascripts do %>
94
+ <%# enable AJAX'd post nav at your own risk until html5 history API implemented. %>
95
+ <%#= javascript_include_tag('refinerycms-whatson') %>
96
+ <script src="http://w.sharethis.com/button/buttons.js"></script>
97
+ <script>stLight.options({publisher:'<%= WhatsonPost::ShareThis.key %>'});</script>
98
+ <% end if WhatsonPost::ShareThis.enabled? %>
@@ -0,0 +1,22 @@
1
+ <% content_for :body_content_title, "#{t('.posts_tagged')} &#8220;#{@tag_name.titleize}&#8221;".html_safe -%>
2
+
3
+ <% content_for :body_content_left do %>
4
+ <% if @whatson_posts.any? %>
5
+ <section id="whatson_posts">
6
+ <%= render :partial => "/whatson/shared/post", :collection => @whatson_posts %>
7
+ <%= will_paginate @whatson_posts %>
8
+ </section>
9
+ <% else %>
10
+ <p><%= t('.no_whatson_articles_yet') %></p>
11
+ <% end %>
12
+ <% end %>
13
+
14
+ <% content_for :body_content_right do %>
15
+ <%= render :partial => "/whatson/shared/categories" %>
16
+ <%= render :partial => "/whatson/shared/tags" %>
17
+ <%= render :partial => "/whatson/shared/rss_feed" %>
18
+ <%= render :partial => "/whatson/shared/archive_list" %>
19
+ <% end %>
20
+
21
+ <%= render :partial => "/shared/content_page" %>
22
+ <% content_for :stylesheets, stylesheet_link_tag('refinerycms-whatson') %>
@@ -0,0 +1,9 @@
1
+ <%
2
+ archive_posts = whatson_archive_list
3
+ %>
4
+ <% if archive_posts.present? %>
5
+ <h2><%= t('archives', :scope => 'whatson.shared') %></h2>
6
+ <ul>
7
+ <%= archive_posts %>
8
+ </ul>
9
+ <% end %>
@@ -0,0 +1,10 @@
1
+ <% if @whatson_categories.any? %>
2
+ <h2><%= t('.title') %></h2>
3
+ <ul id='categories'>
4
+ <% @whatson_categories.each do |category| %>
5
+ <li<%= " class='selected'" if @category.present? and @category.id == category.id %>>
6
+ <%= link_to "#{category.title} (#{category.post_count})", whatson_category_url(category) %>
7
+ </li>
8
+ <% end %>
9
+ </ul>
10
+ <% end %>
@@ -0,0 +1,46 @@
1
+ <% if post.live? %>
2
+ <article class="whatson_post" id="<%= dom_id(post) %>">
3
+ <header>
4
+ <h1><%= link_to post.title, whatson_post_url(post) %></h1>
5
+ <section class='details'>
6
+ <time datetime="<%=l post.published_at.to_date, :format => :default %>" class='posted_at'>
7
+ <%= t('created_at', :scope => 'whatson.shared.posts', :when => l(post.published_at.to_date, :format => :short)) %>
8
+ </time>
9
+ <%= "#{t('by', :scope => 'whatson.posts.show')} #{post.author.username}" if post.author.present? %>.
10
+ <% if (categories = post.categories).any? %>
11
+ <aside class='filed_in'>
12
+ <%= t('filed_in', :scope => 'whatson.posts.show') %>
13
+ <%=raw categories.collect { |category| link_to category.title, whatson_category_url(category) }.to_sentence %>
14
+ </aside>
15
+ <% end %>
16
+ <% if (tags = post.tags).any? %>
17
+ <aside class='tagged'>
18
+ <%= t('tagged', :scope => 'whatson.posts.show') %>
19
+ <%=raw tags.collect { |tag| link_to tag, tagged_posts_path(tag.id, tag.name.parameterize) }.to_sentence %>
20
+ </aside>
21
+ <% end %>
22
+ </section>
23
+ </header>
24
+ <section class='clearfix'>
25
+ <% if whatson_post_teaser_enabled? %>
26
+ <%= whatson_post_teaser(post) %>
27
+ <% else %>
28
+ <%= post.body.html_safe %>
29
+ <% end %>
30
+ </section>
31
+ <footer>
32
+ <p>
33
+ <%= link_to t('read_more', :scope => 'whatson.shared.posts'), whatson_post_url(post) if whatson_post_teaser_enabled? %>
34
+ </p>
35
+ <aside class='comment_count'>
36
+ <% if WhatsonPost.comments_allowed? %>
37
+ <% if post.comments.any? %>
38
+ (<%= pluralize(post.comments.approved.count, t('singular', :scope => 'whatson.shared.comments')) %>)
39
+ <% else %>
40
+ (<%= t('none', :scope => 'whatson.shared.comments') %>)
41
+ <% end %>
42
+ <% end %>
43
+ </aside>
44
+ </footer>
45
+ </article>
46
+ <% end %>
@@ -0,0 +1,10 @@
1
+ <% if @whatson_posts.many? %>
2
+ <h2><%= t('.other') %></h2>
3
+ <ul id="whatson_posts">
4
+ <% @whatson_posts.each do |whatson_post| %>
5
+ <li class='clearfix'>
6
+ <%= link_to whatson_post.title, whatson_post_url(whatson_post) %>
7
+ </li>
8
+ <% end %>
9
+ </ul>
10
+ <% end %>
@@ -0,0 +1,2 @@
1
+ <h2><%= t('.title') %></h2>
2
+ <%= link_to t('.subscribe'), whatson_rss_feed_url, :id => "rss_feed_subscribe"%>
@@ -0,0 +1,8 @@
1
+ <% if @tags.any? %>
2
+ <h2><%= t('.title') %></h2>
3
+ <nav id='tags'>
4
+ <% tag_cloud(@tags, %w(tag1 tag2 tag3 tag4)) do |tag, css_class| %>
5
+ <%= link_to tag.name, tagged_posts_path(tag.id, tag.name.parameterize), :class => css_class %>
6
+ <% end %>
7
+ </nav>
8
+ <% end %>
@@ -0,0 +1,158 @@
1
+ bg:
2
+ plugins:
3
+ refinerycms_whatson:
4
+ title: Блог
5
+ admin:
6
+ whatson:
7
+ categories:
8
+ category:
9
+ edit: Редактиране на тази категория
10
+ delete: Изтриване на тази категория завинаги
11
+ index:
12
+ no_items_yet: 'Все още няма категории. Натиснете "%{create}", за да въведете нова.'
13
+ comments:
14
+ approved: 'Коментара от "%{author}" бе одобрен.'
15
+ comment:
16
+ view_live_html: 'Преглед на този коментар <br/><em>(ще се отвори се в нов прозорец)</em>'
17
+ read: Прочитане на този коментар
18
+ reject: Отхвърляне на този коментар
19
+ approve: Одобряване на този коментар
20
+ rejected: 'Коментара от "%{author}" бе отхвърлен.'
21
+ index:
22
+ no_items_yet: '%{type} коментари не бяха намерени.'
23
+ show:
24
+ comment: Коментар
25
+ whatson_post: Публикация
26
+ from: Публикувано от
27
+ date: Публикувано на
28
+ message: Коментар
29
+ details: Детайли
30
+ age: Възраст
31
+ actions: Действия
32
+ back: Обратно към всички коментари
33
+ reject: Отхвърляне на този коментар
34
+ approve: Одобряване на този коментар
35
+ posts:
36
+ form:
37
+ advanced_options: Разширени настройки
38
+ toggle_advanced_options: Натиснете, за да достъпите настройките за етикета "meta" и менюто
39
+ save_as_draft: Запис като чернова
40
+ published_at: Дата на публикуване
41
+ custom_url: Уеб адрес по избор
42
+ custom_url_help: Вместо от заглавието, генерирайте уеб адреса за тази публикация чрез този текст.
43
+ copy_body: Копиране на съдържанието на публикацията като извадка
44
+ copy_body_help: Съдържанието на публикацията ще се копира като извадка. Оставете извадката празна и Refinery автоматично ще я сглоби.
45
+ index:
46
+ no_items_yet: 'Все още няма публикации. Натиснете "%{create}", за да въведете нова.'
47
+ uncategorized:
48
+ no_items_yet: 'Не съществуват некатегоризирани публикации.'
49
+ post:
50
+ view_live_html: 'Преглед на този публикация <br/><em>(ще се отвори се в нов прозорец)</em>'
51
+ edit: Редактиране на тази публикация
52
+ delete: Изтриване на тази публикация завинаги
53
+ settings:
54
+ notification_recipients:
55
+ value: Изпращане на уведомления до
56
+ explanation: 'Всеки път, когато някой коментира публикация, Refinery ще изпраща е-писмо, за да уведоми, че съществува нов коментар.'
57
+ hint: 'При добавяне на коментар, Refinery ще Ви уведоми по е-пощата.'
58
+ example: "Въведете адреса(ите) на Вашата е-поща. Например: jack@work.com, jill@office.com"
59
+ updated: 'Уведомления бяха изпратени до "%{recipients}"'
60
+ submenu:
61
+ categories:
62
+ title: Категории
63
+ manage: Управление
64
+ new: Добавяне на нова категория
65
+ comments:
66
+ title: Коментари
67
+ title_with_count: 'Коментари (%{new_count} нови)'
68
+ new: Нови
69
+ unmoderated: Нови
70
+ approved: Одобрени
71
+ rejected: Отхвърлени
72
+ posts:
73
+ title: Публикации
74
+ manage: Управление на публикации
75
+ new: Добавяне на нова публикация
76
+ uncategorized: Некатегоризирани публикации
77
+ settings:
78
+ title: Настройки
79
+ moderation: Модерация
80
+ update_notified: Получатели на уведомления
81
+ comments: Коментари
82
+ whatson:
83
+ comment_mailer:
84
+ notification:
85
+ greeting: Здравейте
86
+ you_recieved_new_comment: Току що получихте нов коментар на Вашия уебсайт.
87
+ comment_starts: --- Начало на коментара ---
88
+ comment_ends: --- Край на коментара ---
89
+ from: От
90
+ email: Е-поща
91
+ message: Съобщение
92
+ closing_line: Поздрави
93
+ ps: 'П.П. Всички Ваши коментари се съхраняват от Refinery в секция "Блог" в подменю "Коментари" и могат да бъдат прегледани по-късно.'
94
+ shared:
95
+ categories:
96
+ title: Категории
97
+ rss_feed:
98
+ title: RSS хранилка
99
+ subscribe: Абониране
100
+ posts:
101
+ other: Други публикации
102
+ created_at: 'Публикувано на %{when}'
103
+ read_more: Цялата публикация
104
+ comments:
105
+ singular: коментар
106
+ none: няма коментари
107
+ archives: Архиви
108
+ tags:
109
+ title: "Етикети"
110
+ categories:
111
+ show:
112
+ no_posts: Тук все още няма публикации.
113
+ posts:
114
+ post:
115
+ filed_in: Категория
116
+ comment: коментар
117
+ comments:
118
+ by: 'Публикувано от %{who}'
119
+ time_ago: 'преди %{time}'
120
+ thank_you: 'Благодаря за Вашия коментар.'
121
+ thank_you_moderated: 'Благодаря за Вашия коментар. Съобщението Ви е в опашката за модерация и скоро ще бъде показано.'
122
+ index:
123
+ no_whatson_articles_yet: Все още няма публикувани статии. Очаквайте скоро.
124
+ show:
125
+ whatson_home: Обратно към началото на блога
126
+ comments:
127
+ title: Коментари
128
+ add: Вашият коментар
129
+ other: Други публикации
130
+ filed_in: Категория
131
+ tagged: Отбелязано с
132
+ submit: Изпращане на коментар
133
+ name: Име
134
+ email: Е-поща
135
+ message: Съобщение
136
+ by: от
137
+ tagged:
138
+ no_whatson_articles_yet: Все още няма публикувани статии. Очаквайте скоро.
139
+ posts_tagged: Публикации отбелязани с
140
+ archive:
141
+ whatson_archive_for: 'Архив на блога за %{date}'
142
+ no_whatson_articles_posted: 'Все още няма публикувани статии за %{date}. Очаквайте скоро.'
143
+ activerecord:
144
+ models:
145
+ whatson_category: Категория
146
+ whatson_comment: Коментар
147
+ whatson_post: Публикация
148
+ attributes:
149
+ whatson_category:
150
+ title: Заглавие
151
+ whatson_comment:
152
+ name: Име
153
+ email: Е-поща
154
+ message: Съобщение
155
+ whatson_post:
156
+ title: Заглавие
157
+ body: Съдържание
158
+ teaser: Извадка