diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/admin/blog/categories/_category.html.erb | 6 | ||||
-rw-r--r-- | app/views/admin/blog/categories/_form.html.erb | 12 | ||||
-rw-r--r-- | app/views/admin/blog/comments/_comment.html.erb | 4 | ||||
-rw-r--r-- | app/views/admin/blog/posts/_form.html.erb | 10 | ||||
-rw-r--r-- | app/views/admin/blog/posts/_post.html.erb | 4 | ||||
-rw-r--r-- | app/views/blog_posts/show.html.erb | 14 |
6 files changed, 42 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"> </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> diff --git a/app/views/blog_posts/show.html.erb b/app/views/blog_posts/show.html.erb index 57b2f92..9e3cf4d 100644 --- a/app/views/blog_posts/show.html.erb +++ b/app/views/blog_posts/show.html.erb @@ -35,7 +35,21 @@ <% if BlogPost.comments_allowed? %> <hr /> + <% flash.each do |key, value| %> + <div id='flash' class="flash flash_<%= key %>"> + <%= value %> + </div> + <% end %> <% form_for [:blog_post, @blog_comment] do |f| %> + <% 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 :name %> <%= f.text_field :name %> |