aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/refinery
diff options
context:
space:
mode:
authorUģis Ozols <ugis.ozolss@gmail.com>2012-07-06 15:13:50 +0300
committerUģis Ozols <ugis.ozolss@gmail.com>2012-07-06 15:16:15 +0300
commit36881f83c74a12b754ef4e5c9b1781e6d39dc2a5 (patch)
tree4a9f64e3a9f6fe1cf78437b6f920ed3f4ee2cc1c /app/views/refinery
parentbb5a9adb50e8330f8b3af2ccfd5029243573e0a4 (diff)
downloadrefinerycms-blog-36881f83c74a12b754ef4e5c9b1781e6d39dc2a5.tar.gz
refinerycms-blog-36881f83c74a12b754ef4e5c9b1781e6d39dc2a5.tar.bz2
refinerycms-blog-36881f83c74a12b754ef4e5c9b1781e6d39dc2a5.zip
Split rejected and approved comment actions into separate controller actions.
Diffstat (limited to 'app/views/refinery')
-rw-r--r--app/views/refinery/blog/admin/comments/_comment.html.erb6
-rw-r--r--app/views/refinery/blog/admin/comments/show.html.erb10
2 files changed, 10 insertions, 6 deletions
diff --git a/app/views/refinery/blog/admin/comments/_comment.html.erb b/app/views/refinery/blog/admin/comments/_comment.html.erb
index c007294..fe72030 100644
--- a/app/views/refinery/blog/admin/comments/_comment.html.erb
+++ b/app/views/refinery/blog/admin/comments/_comment.html.erb
@@ -11,10 +11,12 @@
<%= link_to refinery_icon_tag('zoom.png'), refinery.blog_admin_comment_path(comment),
:title => t('.read') %>
<%= link_to refinery_icon_tag("cross.png"),
- refinery.rejected_blog_admin_comment_path(comment, :return_to => request.path.split('/').last.gsub(/^comments$/, 'index')),
+ refinery.reject_blog_admin_comment_path(comment),
+ :method => :post,
:title => t('.reject') unless comment.rejected? %>
<%= link_to refinery_icon_tag("tick.png"),
- refinery.approved_blog_admin_comment_path(comment, :return_to => request.path.split('/').last.gsub(/^comments$/, 'index')),
+ refinery.approve_blog_admin_comment_path(comment),
+ :method => :post,
:title => t('.approve') unless comment.approved? %>
</span>
</li>
diff --git a/app/views/refinery/blog/admin/comments/show.html.erb b/app/views/refinery/blog/admin/comments/show.html.erb
index 2246c2f..5cd34f9 100644
--- a/app/views/refinery/blog/admin/comments/show.html.erb
+++ b/app/views/refinery/blog/admin/comments/show.html.erb
@@ -9,12 +9,14 @@
<%= link_to t('.back'), refinery.blog_admin_comments_path, :class => "back_icon" %>
</li>
<li>
- <%= link_to t('.reject'), refinery.rejected_blog_admin_comment_path(@comment, :return_to => 'rejected'),
- :class => 'comment_cross_icon' unless @comment.rejected? %>
+ <%= link_to t('.reject'), refinery.reject_blog_admin_comment_path(@comment),
+ :method => :post,
+ :class => 'comment_cross_icon' unless @comment.rejected? %>
</li>
<li>
- <%= link_to t('.approve'), refinery.approved_blog_admin_comment_path(@comment, :return_to => 'approved'),
- :class => 'comment_tick_icon' unless @comment.approved? %>
+ <%= link_to t('.approve'), refinery.approve_blog_admin_comment_path(@comment),
+ :method => :post,
+ :class => 'comment_tick_icon' unless @comment.approved? %>
</li>
</ul>
</div>