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,26 @@
1
+ <%= render :partial => '/admin/whatson/submenu' %>
2
+ <div id='records'>
3
+ <% if searching? %>
4
+ <h2><%= t('results_for', :scope => 'shared.admin.search', :query => params[:search]) %></h2>
5
+ <% if @whatson_categories.any? %>
6
+ <%= render :partial => "whatson_categories",
7
+ :collection => @whatson_categories %>
8
+ <% else %>
9
+ <p><%= t('search_no_results', :scope => 'admin') %></p>
10
+ <% end %>
11
+ <% else %>
12
+ <% if @whatson_categories.any? %>
13
+ <%= will_paginate @whatson_categories %>
14
+
15
+ <%= render :partial => "sortable_list" %>
16
+
17
+ <%= will_paginate @whatson_categories %>
18
+ <% else %>
19
+ <p>
20
+ <strong>
21
+ <%= t('.no_items_yet', :create => t('new', :scope => 'admin.whatson.submenu.categories')) %>
22
+ </strong>
23
+ </p>
24
+ <% end %>
25
+ <% end %>
26
+ </div>
@@ -0,0 +1 @@
1
+ <%= render :partial => "form" %>
@@ -0,0 +1,20 @@
1
+ <li class='clearfix record <%= cycle("on", "on-hover") %>' id="<%= "comment-#{comment.to_param}" -%>">
2
+ <span class='title'>
3
+ <%= comment.name %>
4
+ <span class="preview"> - <%= truncate(comment.message, :length => 75) %></span>
5
+ </span>
6
+ <span class='actions'>
7
+ <%= link_to refinery_icon_tag("application_go.png"),
8
+ whatson_post_url(comment.post, :anchor => "comment-#{comment.to_param}"),
9
+ :title => t('.view_live_html'),
10
+ :target => "_blank" unless comment.unmoderated? %>
11
+ <%= link_to refinery_icon_tag('zoom.png'), admin_whatson_comment_path(comment),
12
+ :title => t('.read') %>
13
+ <%= link_to refinery_icon_tag("cross.png"),
14
+ rejected_admin_whatson_comment_path(comment, :return_to => request.path.split('/').last.gsub(/^comments$/, 'index')),
15
+ :title => t('.reject') unless comment.rejected? %>
16
+ <%= link_to refinery_icon_tag("tick.png"),
17
+ approved_admin_whatson_comment_path(comment, :return_to => request.path.split('/').last.gsub(/^comments$/, 'index')),
18
+ :title => t('.approve') unless comment.approved? %>
19
+ </span>
20
+ </li>
@@ -0,0 +1,7 @@
1
+ <ul id='sortable_list'>
2
+ <%= render :partial => 'comment', :collection => @whatson_comments %>
3
+ </ul>
4
+ <%= render :partial => "/shared/admin/sortable_list",
5
+ :locals => {
6
+ :continue_reordering => (defined?(continue_reordering) ? continue_reordering : true)
7
+ } %>
@@ -0,0 +1,35 @@
1
+ <%= render :partial => '/admin/whatson/submenu' %>
2
+ <div id='records'>
3
+ <% if searching? %>
4
+ <h2><%= t('results_for', :scope => 'shared.admin.search', :query => params[:search]) %></h2>
5
+ <% if @whatson_comments.any? %>
6
+ <%=# will_paginate @whatson_comments
7
+ %>
8
+
9
+ <ul>
10
+ <%= render :partial => "whatson_comments",
11
+ :collection => @whatson_comments %>
12
+ </ul>
13
+
14
+ <%=# will_paginate @whatson_comments
15
+ %>
16
+ <% else %>
17
+ <p><%= t('search_no_results', :scope => 'admin') %></p>
18
+ <% end %>
19
+ <% else %>
20
+ <% if @whatson_comments.any? %>
21
+ <%=# will_paginate @whatson_comments
22
+ %>
23
+
24
+ <%= render :partial => "sortable_list" %>
25
+
26
+ <%=# will_paginate @whatson_comments
27
+ %>
28
+ <% else %>
29
+ <h3>
30
+ <%= t('.no_items_yet',
31
+ :type => t(action_name.gsub('index', 'new'), :scope => 'admin.whatson.submenu.comments').downcase) %>
32
+ </h3>
33
+ <% end %>
34
+ <% end %>
35
+ </div>
@@ -0,0 +1,63 @@
1
+ <div id='actions'>
2
+ <h2><%= t('.details')%></h2>
3
+ <p>
4
+ <strong><%= t('.age') %>:</strong> <%= time_ago_in_words(@whatson_comment.created_at) %>
5
+ </p>
6
+ <h2><%= t('.actions') %></h2>
7
+ <ul>
8
+ <li>
9
+ <%= link_to t('.back'), {:action => 'index'}, :class => "back_icon" %>
10
+ </li>
11
+ <li>
12
+ <%= link_to t('.reject'), rejected_admin_whatson_comment_path(@whatson_comment, :return_to => 'rejected'),
13
+ :class => 'comment_cross_icon' unless @whatson_comment.rejected? %>
14
+ </li>
15
+ <li>
16
+ <%= link_to t('.approve'), approved_admin_whatson_comment_path(@whatson_comment, :return_to => 'approved'),
17
+ :class => 'comment_tick_icon' unless @whatson_comment.approved? %>
18
+ </li>
19
+ </ul>
20
+ </div>
21
+ <div id='records'>
22
+ <h2><%= t('.comment') %></h2>
23
+ <table id='inquiry'>
24
+ <tr>
25
+ <td>
26
+ <strong><%= t('.whatson_post') %></strong>
27
+ </td>
28
+ <td>
29
+ <%= link_to @whatson_comment.post.title,
30
+ whatson_post_url(@whatson_comment.post, :anchor => "comment-#{@whatson_comment.to_param}"),
31
+ :target => '_blank' %>
32
+ </td>
33
+ </tr>
34
+ <tr>
35
+ <td>
36
+ <strong><%= t('.from') %></strong>
37
+ </td>
38
+ <td>
39
+ <%= @whatson_comment.name %> [<%= mail_to @whatson_comment.email, @whatson_comment.email, {:title => t('.click_to_email')} %>]
40
+ </td>
41
+ </tr>
42
+ <tr>
43
+ <td>
44
+ <strong><%= t('.date') %></strong>
45
+ </td>
46
+ <td>
47
+ <%= l(Date.parse(@whatson_comment.created_at.to_s), :format => :long) %>
48
+ </td>
49
+ </tr>
50
+ <tr>
51
+ <td valign='top'>
52
+ <strong><%= t('.message') %></strong>
53
+ </td>
54
+ <td>
55
+ <p style='margin-top: 0px'>
56
+ <%= @whatson_comment.message.gsub("\r\n\r\n", "\r\n").gsub("\r\n", "</p><p>") %>
57
+ </p>
58
+ </td>
59
+ </tr>
60
+ </table>
61
+ </div>
62
+
63
+ <% content_for :stylesheets, stylesheet_link_tag('refinery/refinerycms-whatson') %>
@@ -0,0 +1,20 @@
1
+ <style type='text/css'>
2
+ ul.whatson_categories{
3
+ height:200px;
4
+ overflow:auto;
5
+ border:1px solid #ccc;
6
+ padding:5px;
7
+ }
8
+ ul.whatson_categories, ul.whatson_categories li {
9
+ list-style: none;
10
+ margin:5px 0;
11
+ }
12
+ a#copy_body_link {
13
+ background: url("/images/refinery/icons/add.png") no-repeat scroll 0 6px transparent;
14
+ border-bottom: 0 none;
15
+ display: inline;
16
+ line-height: 29px;
17
+ margin-top: 0;
18
+ padding-left: 20px;
19
+ }
20
+ </style>
@@ -0,0 +1,110 @@
1
+ <%= form_for [:admin, @whatson_post] do |f| -%>
2
+ <%= render :partial => "/shared/admin/error_messages",
3
+ :locals => {
4
+ :object => f.object,
5
+ :include_object_name => true
6
+ } %>
7
+
8
+ <div class='field'>
9
+ <%= f.label :title -%>
10
+ <%= f.text_field :title, :class => 'larger widest' -%>
11
+ </div>
12
+ <div class="field">
13
+ <p>
14
+ <%= f.check_box :draft %>
15
+ <%= f.label :draft, t('.save_as_draft'), :class => "stripped" %>
16
+ </p>
17
+ </div>
18
+ <div class='field'>
19
+ <div id='page-tabs' class='clearfix ui-tabs ui-widget ui-widget-content ui-corner-all'>
20
+ <ul id='page_parts'>
21
+ <li class='ui-state-default ui-state-active'>
22
+ <%= link_to t('body', :scope => 'activerecord.attributes.whatson_post'), "#page_part_body" %>
23
+ </li>
24
+ <li class='ui-state-default'>
25
+ <%= link_to t('teaser', :scope => 'activerecord.attributes.whatson_post'), "#page_part_teaser" %>
26
+ </li>
27
+ <% Refinery::Whatson.tabs.each_with_index do |tab, tab_index| %>
28
+ <li class='ui-state-default' id="custom_<%= tab.name %>_tab">
29
+ <%= link_to tab.name.titleize, "#custom_tab_#{tab_index}" %>
30
+ </li>
31
+ <% end %>
32
+ </ul>
33
+
34
+ <div id='page_part_editors'>
35
+
36
+ <% part_index = -1 %>
37
+ <%= render :partial => 'form_part',
38
+ :locals => {
39
+ :f => f,
40
+ :part_index => (part_index += 1),
41
+ } -%>
42
+ <%= render :partial => 'teaser_part',
43
+ :locals => {
44
+ :f => f,
45
+ :part_index => (part_index += 1),
46
+ } if f.object.respond_to?(:custom_teaser) -%>
47
+ <% Refinery::Whatson.tabs.each_with_index do |tab, tab_index| %>
48
+ <div class='page_part' id='<%= "custom_tab_#{tab_index}" %>'>
49
+ <%= render :partial => tab.partial, :locals => {:f => f} %>
50
+ </div>
51
+ <% end %>
52
+ </div>
53
+ </div>
54
+ </div>
55
+
56
+ <div class='field'>
57
+ <%= f.label :tag_list, t('whatson.shared.tags.title') -%>
58
+ <%= f.text_field :tag_list, :class => 'larger' -%>
59
+ </div>
60
+
61
+ <div id='more_options_field'>
62
+ <p>
63
+ <%= link_to t('.advanced_options'), "#",
64
+ :id => 'toggle_advanced_options',
65
+ :title => t('.toggle_advanced_options') %>
66
+ </p>
67
+
68
+ </div>
69
+ <div id='more_options' style="display:none;">
70
+ <div class="hemisquare">
71
+ <h3><%= t('title', :scope => 'admin.whatson.submenu.categories') %></h3>
72
+ <ul class='whatson_categories'>
73
+ <% @whatson_categories.each do |category| %>
74
+ <li>
75
+ <%= check_box_tag 'whatson_post[category_ids][]', category.id,
76
+ @whatson_post.categories.include?(category),
77
+ :id => (id="whatson_post_category_ids_#{category.id}") %>
78
+ <%= label_tag 'whatson_post[category_ids][]', category.title,
79
+ :class => 'stripped',
80
+ :for => id %>
81
+ </li>
82
+ <% end %>
83
+ </ul>
84
+ <h3><%= t('.published_at') %></h3>
85
+ <%= f.datetime_select :published_at %>
86
+
87
+ <div class='field'>
88
+ <span class='label_with_help'>
89
+ <%= f.label :custom_url, t('.custom_url') %>
90
+ <%= refinery_help_tag t('.custom_url_help') %>
91
+ </span>
92
+ <%= f.text_field :custom_url, :class => "widest" %>
93
+ </div>
94
+
95
+ </div>
96
+ <div class='hemisquare right_side'>
97
+ <%= render :partial => '/seo_meta/form', :locals => {:form => f} %>
98
+ </div>
99
+ </div>
100
+ <%= render :partial => "/shared/admin/form_actions",
101
+ :locals => {
102
+ :f => f,
103
+ :continue_editing => true,
104
+ :delete_title => t('delete', :scope => 'admin.whatson.posts.post')
105
+ } %>
106
+ <% end -%>
107
+
108
+ <% content_for :stylesheets, render(:partial => 'form.css') -%>
109
+ <% content_for :javascripts, render(:partial => 'form.js') -%>
110
+ <%= render 'shared/admin/autocomplete', :dom_id => '#whatson_post_tag_list', :url => tags_admin_whatson_posts_url %>
@@ -0,0 +1,23 @@
1
+ <script>
2
+ (function($) {
3
+ $(function() {
4
+ $('#page-tabs').tabs();
5
+ $('#copy_body_link').click(function(event) {
6
+ // Find the WYMEditor that maps to the custom_teaser field
7
+ var teaserTextArea = $('#whatson_post_custom_teaser')[0];
8
+ var teaserEditor = null;
9
+ $.each(WYMeditor.INSTANCES, function(index, editor) {
10
+ if (editor._element[0] == teaserTextArea) {
11
+ teaserEditor = editor;
12
+ }
13
+ });
14
+
15
+ if (teaserEditor) {
16
+ teaserEditor.html($('#whatson_post_body').attr('value'));
17
+ }
18
+
19
+ event.preventDefault();
20
+ });
21
+ });
22
+ })(jQuery);
23
+ </script>
@@ -0,0 +1,3 @@
1
+ <div class='page_part' id='page_part_body'>
2
+ <%= f.text_area :body, :rows => 20, :class => 'wymeditor widest' -%>
3
+ </div>
@@ -0,0 +1,24 @@
1
+ <li class='clearfix record <%= cycle("on", "on-hover") %>' id="<%= dom_id(post) -%>">
2
+ <span class='title'>
3
+ <%= post.title %>
4
+ <span class="preview">
5
+ <%= post.published_at.try(:strftime, '%b %d, %Y') || 'draft' %>
6
+ <%= " by #{post.author.username}" if post.author.present? %>
7
+ </span>
8
+ </span>
9
+ <% if post.draft? %>
10
+ <span class="label notice">Draft</span>
11
+ <% end %>
12
+ <span class='actions'>
13
+ <%= link_to refinery_icon_tag("application_go.png"), whatson_post_url(post),
14
+ :title => t('.view_live_html'),
15
+ :target => "_blank" %>
16
+ <%= link_to refinery_icon_tag("application_edit.png"), edit_admin_whatson_post_path(post),
17
+ :title => t('.edit') %>
18
+ <%= link_to refinery_icon_tag("delete.png"), admin_whatson_post_path(post),
19
+ :class => "cancel confirm-delete",
20
+ :title => t('.delete'),
21
+ :method => :delete,
22
+ :confirm => t('message', :scope => 'shared.admin.delete', :title => post.title) %>
23
+ </span>
24
+ </li>
@@ -0,0 +1,7 @@
1
+ <ul id='sortable_list'>
2
+ <%= render :partial => 'post', :collection => @whatson_posts %>
3
+ </ul>
4
+ <%= render :partial => "/shared/admin/sortable_list",
5
+ :locals => {
6
+ :continue_reordering => (defined?(continue_reordering) ? continue_reordering : true)
7
+ } %>
@@ -0,0 +1,11 @@
1
+ <div class='page_part' id='page_part_teaser'>
2
+ <%= f.text_area :custom_teaser, :rows => 20, :class => 'wymeditor widest' -%>
3
+ <p>
4
+ <span class='clearfix label_inline_with_link'>
5
+ <%= link_to t('copy_body', :scope => 'admin.whatson.posts.form'), "#",
6
+ :id => 'copy_body_link',
7
+ :title => t('copy_body_help', :scope => 'admin.whatson.posts.form') %>
8
+ </span>
9
+ </p>
10
+ </div>
11
+
@@ -0,0 +1 @@
1
+ <%= render :partial => "form" %>
@@ -0,0 +1,28 @@
1
+ <%= render :partial => '/admin/whatson/submenu' %>
2
+ <div id='records'>
3
+ <% if searching? %>
4
+ <h2><%= t('results_for', :scope => 'shared.admin.search', :query => params[:search]) %></h2>
5
+ <% if @whatson_posts.any? %>
6
+ <ul>
7
+ <%= render :partial => "post",
8
+ :collection => @whatson_posts %>
9
+ </ul>
10
+ <% else %>
11
+ <p><%= t('no_results', :scope => 'shared.admin.search') %></p>
12
+ <% end %>
13
+ <% else %>
14
+ <% if @whatson_posts.any? %>
15
+ <%= will_paginate @whatson_posts %>
16
+
17
+ <%= render :partial => "sortable_list" %>
18
+
19
+ <%= will_paginate @whatson_posts %>
20
+ <% else %>
21
+ <p>
22
+ <strong>
23
+ <%= t('.no_items_yet', :create => t('new', :scope => 'admin.whatson.submenu.posts')) %>
24
+ </strong>
25
+ </p>
26
+ <% end %>
27
+ <% end %>
28
+ </div>
@@ -0,0 +1 @@
1
+ <%= render :partial => "form" %>
@@ -0,0 +1,26 @@
1
+ <%= render :partial => '/admin/whatson/submenu' %>
2
+ <div id='records'>
3
+ <% if searching? %>
4
+ <h2><%= t('results_for', :scope => 'shared.admin.search', :query => params[:search]) %></h2>
5
+ <% if @whatson_posts.any? %>
6
+ <%= render :partial => "whatson_posts",
7
+ :collection => @whatson_posts %>
8
+ <% else %>
9
+ <p><%= t('search_no_results', :scope => 'admin') %></p>
10
+ <% end %>
11
+ <% else %>
12
+ <% if @whatson_posts.any? %>
13
+ <%= will_paginate @whatson_posts %>
14
+
15
+ <%= render :partial => "sortable_list" %>
16
+
17
+ <%= will_paginate @whatson_posts %>
18
+ <% else %>
19
+ <p>
20
+ <strong>
21
+ <%= t('.no_items_yet', :create => t('new', :scope => 'admin.whatson.submenu.posts')) %>
22
+ </strong>
23
+ </p>
24
+ <% end %>
25
+ <% end %>
26
+ </div>
@@ -0,0 +1,24 @@
1
+ <%= form_tag do %>
2
+
3
+ <div class='field'>
4
+ <span class='label_with_help'>
5
+ <%= label_tag :recipients, t('.value') %>
6
+ </span>
7
+ <%= text_field_tag :recipients, @recipients, :class => "larger widest" %>
8
+ </div>
9
+
10
+ <p>
11
+ <%= t('.hint') %>
12
+ </p>
13
+ <p>
14
+ <%= t('.example') %>
15
+ </p>
16
+
17
+ <%= render :partial => "/shared/admin/form_actions",
18
+ :locals => {
19
+ :f => nil,
20
+ :continue_editing => false,
21
+ :cancel_url => admin_whatson_posts_url,
22
+ :hide_delete => true
23
+ } %>
24
+ <% end %>