Commit 6d86d187 authored by Uģis Ozols's avatar Uģis Ozols
Browse files

Use shorter syntax of render where possible.

parent 731815d0
......@@ -5,7 +5,7 @@ module Refinery
items = Refinery::News::Item.select('publish_date').all_previous
return nil if items.blank?
render :partial => "/refinery/news/items/widgets/news_archive", :locals => { :items => items }
render "/refinery/news/items/widgets/news_archive", :items => items
end
alias_method :news_archive_list, :news_item_archive_widget
......
<%= form_for [refinery, :news, :admin, @item] do |f| %>
<%= render :partial => "/refinery/admin/error_messages",
:locals => {
:object => @item,
:include_object_name => true
} %>
<%= render "/refinery/admin/error_messages",
:object => @item,
:include_object_name => true %>
<%= render :partial => "locale_picker",
:locals => {
:current_locale => Thread.current[:globalize_locale]
} if defined?(::Refinery::I18n) %>
<%= render "locale_picker",
:current_locale => Thread.current[:globalize_locale] if defined?(::Refinery::I18n) %>
<div class='field'>
<%= f.label :title %>
......@@ -36,12 +32,10 @@
<%= f.text_field :source, :class => "larger widest" %>
</div>
<%= render :partial => "/refinery/admin/form_actions",
:locals => {
:f => f,
:continue_editing => true,
:delete_title => t('admin.news.items.item.delete'),
:delete_confirmation => t('shared.admin.delete.message', :title => @item.title)
} %>
<%= render "/refinery/admin/form_actions",
:f => f,
:continue_editing => true,
:delete_title => t('admin.news.items.item.delete'),
:delete_confirmation => t('shared.admin.delete.message', :title => @item.title) %>
<% end %>
<%= render :partial => "form" %>
\ No newline at end of file
<%= render "form" %>
<div id='actions'>
<ul>
<li>
<%= render :partial => "/refinery/admin/search", :locals => {:url => refinery.news_admin_items_path} %>
<%= render "/refinery/admin/search", :url => refinery.news_admin_items_path %>
</li>
<li>
<%= link_to t('.create'), refinery.new_news_admin_item_path, :class => "add_icon" %>
......
<%= render :partial => "form" %>
\ No newline at end of file
<%= render "form" %>
......@@ -11,7 +11,7 @@
<% end %>
<% end %>
<%= render :partial => '/refinery/news/shared/body_content_right' %>
<%= render '/refinery/news/shared/body_content_right' %>
<%= render :partial => "/refinery/content_page" %>
<%= render "/refinery/content_page" %>
<% content_for :stylesheets, stylesheet_link_tag('refinery/news/frontend') %>
......@@ -23,6 +23,6 @@
<% content_for :body_content_right_prepend do -%>
<%= raw @page.content_for(::Refinery::Pages.default_parts.second.to_sym) %>
<% end if ::Refinery::Pages.default_parts.many? -%>
<%= render :partial => '/refinery/news/shared/body_content_right' %>
<%= render '/refinery/news/shared/body_content_right' %>
<%= render :partial => "/refinery/content_page" %>
<%= render "/refinery/content_page" %>
......@@ -17,4 +17,4 @@
<% end %>
<% content_for :body_content_right, render(:partial => 'recent_posts') %>
<%= render :partial => "/refinery/content_page" %>
<%= render "/refinery/content_page" %>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment