aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/refinery
diff options
context:
space:
mode:
authorJamie Winsor <jamie@enmasse.com>2011-09-02 16:01:58 -0700
committerJamie Winsor <jamie@enmasse.com>2011-09-03 21:55:30 -0700
commit6212e60f9e4d144f9a136f6c82b33abd47ddb237 (patch)
tree3ba02acc7861ef51045f0196dff6bac9efda40d5 /app/views/refinery
parent80ca7c1bf99befac70803309e542a4db54f1f198 (diff)
downloadrefinerycms-blog-6212e60f9e4d144f9a136f6c82b33abd47ddb237.tar.gz
refinerycms-blog-6212e60f9e4d144f9a136f6c82b33abd47ddb237.tar.bz2
refinerycms-blog-6212e60f9e4d144f9a136f6c82b33abd47ddb237.zip
index action of blog post controller now caches and sweeps on changes
fix various views which were broken and untested with rails-3-1 upgrade add request spec tests for admin blog comments Factory is now FactoryGirl Fix multiple issues around listing unmoderated comments use cleaner definitions to set per_page willpaginate attribute on models update all paginate calls to use new arel representation reorganize filter sections to be located at top of controller modify uncategorized class method to activerecord scope and perform a left outer join instead of iterate through an array to find uncategorized posts move request specs into their proper places update guardfile to ensure that request specs get run when their respective controllers are modified Fix show action for AdminBlogComments and added test Fix redirection link after approving or rejecting a comment
Diffstat (limited to 'app/views/refinery')
-rw-r--r--app/views/refinery/admin/blog/comments/_comment.html.erb8
-rw-r--r--app/views/refinery/admin/blog/comments/_sortable_list.html.erb2
-rw-r--r--app/views/refinery/admin/blog/comments/index.html.erb12
-rw-r--r--app/views/refinery/admin/blog/comments/show.html.erb8
-rw-r--r--app/views/refinery/admin/blog/settings/notification_recipients.html.erb2
5 files changed, 16 insertions, 16 deletions
diff --git a/app/views/refinery/admin/blog/comments/_comment.html.erb b/app/views/refinery/admin/blog/comments/_comment.html.erb
index 547b9e4..f5eba4d 100644
--- a/app/views/refinery/admin/blog/comments/_comment.html.erb
+++ b/app/views/refinery/admin/blog/comments/_comment.html.erb
@@ -5,16 +5,16 @@
</span>
<span class='actions'>
<%= link_to refinery_icon_tag("application_go.png"),
- blog_post_url(comment.post, :anchor => "comment-#{comment.to_param}"),
+ main_app.blog_post_path(comment.post, :anchor => "comment-#{comment.to_param}"),
:title => t('.view_live_html'),
:target => "_blank" unless comment.unmoderated? %>
- <%= link_to refinery_icon_tag('zoom.png'), admin_blog_comment_path(comment),
+ <%= link_to refinery_icon_tag('zoom.png'), main_app.refinery_admin_blog_comment_path(comment),
:title => t('.read') %>
<%= link_to refinery_icon_tag("cross.png"),
- rejected_admin_blog_comment_path(comment, :return_to => request.path.split('/').last.gsub(/^comments$/, 'index')),
+ main_app.rejected_refinery_admin_blog_comment_path(comment, :return_to => request.path.split('/').last.gsub(/^comments$/, 'index')),
:title => t('.reject') unless comment.rejected? %>
<%= link_to refinery_icon_tag("tick.png"),
- approved_admin_blog_comment_path(comment, :return_to => request.path.split('/').last.gsub(/^comments$/, 'index')),
+ main_app.approved_refinery_admin_blog_comment_path(comment, :return_to => request.path.split('/').last.gsub(/^comments$/, 'index')),
:title => t('.approve') unless comment.approved? %>
</span>
</li>
diff --git a/app/views/refinery/admin/blog/comments/_sortable_list.html.erb b/app/views/refinery/admin/blog/comments/_sortable_list.html.erb
index e141dee..f781ba1 100644
--- a/app/views/refinery/admin/blog/comments/_sortable_list.html.erb
+++ b/app/views/refinery/admin/blog/comments/_sortable_list.html.erb
@@ -1,7 +1,7 @@
<ul id='sortable_list'>
<%= render :partial => 'comment', :collection => @blog_comments %>
</ul>
-<%= render :partial => "/shared/admin/sortable_list",
+<%= render :partial => "/refinery/admin/sortable_list",
:locals => {
:continue_reordering => (defined?(continue_reordering) ? continue_reordering : true)
} %>
diff --git a/app/views/refinery/admin/blog/comments/index.html.erb b/app/views/refinery/admin/blog/comments/index.html.erb
index bf2be9c..059ef59 100644
--- a/app/views/refinery/admin/blog/comments/index.html.erb
+++ b/app/views/refinery/admin/blog/comments/index.html.erb
@@ -1,30 +1,30 @@
-<%= render :partial => '/admin/blog/submenu' %>
+<%= render :partial => '/refinery/admin/blog/submenu' %>
<div id='records'>
<% if searching? %>
<h2><%= t('results_for', :scope => 'shared.admin.search', :query => params[:search]) %></h2>
<% if @blog_comments.any? %>
- <%=# will_paginate @blog_comments %>
+ <%= will_paginate @blog_comments %>
<ul>
<%= render :partial => "blog_comments",
:collection => @blog_comments %>
</ul>
- <%=# will_paginate @blog_comments %>
+ <%= will_paginate @blog_comments %>
<% else %>
<p><%= t('search_no_results', :scope => 'admin') %></p>
<% end %>
<% else %>
<% if @blog_comments.any? %>
- <%=# will_paginate @blog_comments %>
+ <%= will_paginate @blog_comments %>
<%= render :partial => "sortable_list" %>
- <%=# will_paginate @blog_comments %>
+ <%= will_paginate @blog_comments %>
<% else %>
<h3>
<%= t('.no_items_yet',
- :type => t(action_name.gsub('index', 'new'), :scope => 'admin.blog.submenu.comments').downcase) %>
+ :type => action_name.gsub('index', 'new')).downcase %>
</h3>
<% end %>
<% end %>
diff --git a/app/views/refinery/admin/blog/comments/show.html.erb b/app/views/refinery/admin/blog/comments/show.html.erb
index 2e72eb0..3dc50ff 100644
--- a/app/views/refinery/admin/blog/comments/show.html.erb
+++ b/app/views/refinery/admin/blog/comments/show.html.erb
@@ -6,14 +6,14 @@
<h2><%= t('.actions') %></h2>
<ul>
<li>
- <%= link_to t('.back'), {:action => 'index'}, :class => "back_icon" %>
+ <%= link_to t('.back'), main_app.refinery_admin_blog_comments_path, :class => "back_icon" %>
</li>
<li>
- <%= link_to t('.reject'), rejected_admin_blog_comment_path(@blog_comment, :return_to => 'rejected'),
+ <%= link_to t('.reject'), main_app.rejected_refinery_admin_blog_comment_path(@blog_comment, :return_to => 'rejected'),
:class => 'comment_cross_icon' unless @blog_comment.rejected? %>
</li>
<li>
- <%= link_to t('.approve'), approved_admin_blog_comment_path(@blog_comment, :return_to => 'approved'),
+ <%= link_to t('.approve'), main_app.approved_refinery_admin_blog_comment_path(@blog_comment, :return_to => 'approved'),
:class => 'comment_tick_icon' unless @blog_comment.approved? %>
</li>
</ul>
@@ -27,7 +27,7 @@
</td>
<td>
<%= link_to @blog_comment.post.title,
- blog_post_url(@blog_comment.post, :anchor => "comment-#{@blog_comment.to_param}"),
+ main_app.blog_post_path(@blog_comment.post, :anchor => "comment-#{@blog_comment.to_param}"),
:target => '_blank' %>
</td>
</tr>
diff --git a/app/views/refinery/admin/blog/settings/notification_recipients.html.erb b/app/views/refinery/admin/blog/settings/notification_recipients.html.erb
index 41e7f2d..d321ded 100644
--- a/app/views/refinery/admin/blog/settings/notification_recipients.html.erb
+++ b/app/views/refinery/admin/blog/settings/notification_recipients.html.erb
@@ -14,7 +14,7 @@
<%= t('.example') %>
</p>
- <%= render :partial => "/shared/admin/form_actions",
+ <%= render :partial => "/refinery/admin/form_actions",
:locals => {
:f => nil,
:continue_editing => false,