aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/admin
diff options
context:
space:
mode:
authorPhilip Arndt <parndt@gmail.com>2010-09-03 23:32:07 +1200
committerPhilip Arndt <parndt@gmail.com>2010-09-03 23:32:07 +1200
commita2f655b55eb30a900020e8aff9601ed0606ce58f (patch)
treed57cf7aef6ae36a4751144587fab7fe2e508d491 /app/views/admin
parentc4222bfdf5733d1552a2ecf4468d89cf89a583b1 (diff)
downloadrefinerycms-blog-a2f655b55eb30a900020e8aff9601ed0606ce58f.tar.gz
refinerycms-blog-a2f655b55eb30a900020e8aff9601ed0606ce58f.tar.bz2
refinerycms-blog-a2f655b55eb30a900020e8aff9601ed0606ce58f.zip
Hello rails3 support.
Diffstat (limited to 'app/views/admin')
-rw-r--r--app/views/admin/blog/categories/_category.html.erb6
-rw-r--r--app/views/admin/blog/categories/_form.html.erb12
-rw-r--r--app/views/admin/blog/comments/_comment.html.erb4
-rw-r--r--app/views/admin/blog/posts/_form.html.erb10
-rw-r--r--app/views/admin/blog/posts/_post.html.erb4
5 files changed, 28 insertions, 8 deletions
diff --git a/app/views/admin/blog/categories/_category.html.erb b/app/views/admin/blog/categories/_category.html.erb
index 20c5c35..7997d68 100644
--- a/app/views/admin/blog/categories/_category.html.erb
+++ b/app/views/admin/blog/categories/_category.html.erb
@@ -4,11 +4,13 @@
<span class="preview">&nbsp;</span>
</span>
<span class='actions'>
- <%= link_to refinery_icon_tag("application_edit.png"),
+ <%= link_to refinery_icon_tag("application_edit.png"),
edit_admin_blog_category_path(category, :dialog => true, :height => 325),
:title => t('.edit') %>
<%= link_to refinery_icon_tag("delete.png"), admin_blog_category_path(category),
:class => "cancel confirm-delete",
- :title => t('.delete') %>
+ :title => t('.delete'),
+ :'data-method' => 'delete',
+ :'data-confirm' => t('shared.admin.delete.message', :title => category.title) %>
</span>
</li>
diff --git a/app/views/admin/blog/categories/_form.html.erb b/app/views/admin/blog/categories/_form.html.erb
index 0c5b9c4..247f31b 100644
--- a/app/views/admin/blog/categories/_form.html.erb
+++ b/app/views/admin/blog/categories/_form.html.erb
@@ -1,6 +1,14 @@
<% form_for [:admin, @blog_category] do |f| -%>
- <%= f.error_messages %>
-
+ <% if Rails.version < '3.0.0'%>
+ <%= f.error_messages %>
+ <% else %>
+ <%= render :partial => "/shared/admin/error_messages",
+ :locals => {
+ :object => f.object,
+ :include_object_name => true
+ } %>
+ <% end %>
+
<div class='field'>
<%= f.label :title -%>
<%= f.text_field :title, :class => 'larger widest' -%>
diff --git a/app/views/admin/blog/comments/_comment.html.erb b/app/views/admin/blog/comments/_comment.html.erb
index 3435c75..52a8167 100644
--- a/app/views/admin/blog/comments/_comment.html.erb
+++ b/app/views/admin/blog/comments/_comment.html.erb
@@ -11,10 +11,10 @@
<%= link_to refinery_icon_tag('zoom.png'), 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),
+ rejected_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),
+ approved_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/admin/blog/posts/_form.html.erb b/app/views/admin/blog/posts/_form.html.erb
index f6f332f..bf964e9 100644
--- a/app/views/admin/blog/posts/_form.html.erb
+++ b/app/views/admin/blog/posts/_form.html.erb
@@ -1,5 +1,13 @@
<% form_for [:admin, @blog_post] do |f| -%>
- <%= f.error_messages %>
+ <% if Rails.version < '3.0.0'%>
+ <%= f.error_messages %>
+ <% else %>
+ <%= render :partial => "/shared/admin/error_messages",
+ :locals => {
+ :object => f.object,
+ :include_object_name => true
+ } %>
+ <% end %>
<div class='field'>
<%= f.label :title -%>
diff --git a/app/views/admin/blog/posts/_post.html.erb b/app/views/admin/blog/posts/_post.html.erb
index 3e15543..a768279 100644
--- a/app/views/admin/blog/posts/_post.html.erb
+++ b/app/views/admin/blog/posts/_post.html.erb
@@ -11,6 +11,8 @@
:title => t('.edit') %>
<%= link_to refinery_icon_tag("delete.png"), admin_blog_post_path(post),
:class => "cancel confirm-delete",
- :title => t('.delete') %>
+ :title => t('.delete'),
+ :'data-method' => 'delete',
+ :'data-confirm' => t('shared.admin.delete.message', :title => post.title) %>
</span>
</li>