app/helpers/alchemy/admin/contents_helper.rb in alchemy_cms-2.5.0.b5 vs app/helpers/alchemy/admin/contents_helper.rb in alchemy_cms-2.5.0.b9
- old
+ new
@@ -24,11 +24,11 @@
else
content_name = content.name_for_label
end
if content.description.blank?
warning("Content #{content.name} is missing its description")
- title = t("Warning: Content is missing its description.", :contentname => content.name)
+ title = _t(:content_description_missing)
content_name = %(<span class="warning icon" title="#{title}"></span> #{content_name}).html_safe
end
content.has_validations? ? "#{content_name}<span class='validation_indicator'>*</span>".html_safe : content_name
end
@@ -36,15 +36,15 @@
#
# See +render_create_content_link+ helper for exmaples on how to define additional contents.
#
def render_new_content_link(element)
link_to_overlay_window(
- render_icon(:create) + t('add new content'),
+ render_icon(:create) + _t('add new content'),
alchemy.new_admin_element_content_path(element),
{
:size => '310x115',
- :title => t('Select an content'),
+ :title => _t('Select an content'),
:overflow => true
},
{
:id => "add_content_for_element_#{element.id}",
:class => 'button with_icon new_content_link'
@@ -75,11 +75,11 @@
#
# <%= render_create_content_link(element, 'file', :label => 'Add a file') %>
#
def render_create_content_link(element, content_name, options = {}, options_for_content = {})
defaults = {
- :label => t('Add %{name}', :name => t(content_name, :scope => :content_names))
+ :label => _t('Add %{name}', :name => _t(content_name, :scope => :content_names))
}
options = defaults.merge(options)
link_to(render_icon(:create) + options[:label], alchemy.admin_contents_path(
:content => {
:name => content_name,
@@ -96,13 +96,13 @@
# Renders a link for removing that content
def delete_content_link(content)
link_to_confirmation_window(
render_icon('delete-small'),
- t('Do you really want to delete this content?'),
+ _t('Do you really want to delete this content?'),
alchemy.admin_content_path(content),
:class => 'icon_button small',
- :title => t('Remove this content')
+ :title => _t('Remove this content')
) if content.settings[:deletable]
end
# Renders the label and a remove link for a content.
def label_and_remove_link(content)