From 27fd2d07146e044e02a4a1dd1d2c3d25cbf76920 Mon Sep 17 00:00:00 2001 From: Christophe Vilayphiou Date: Thu, 17 May 2012 18:37:46 +0800 Subject: [PATCH] Hide assets links from side_bar --- app/views/admin/assets/_asset.html.erb | 4 ++-- app/views/admin/assets/_sort_headers.html.erb | 2 +- app/views/layouts/_side_bar.html.erb | 16 ++++++++-------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/views/admin/assets/_asset.html.erb b/app/views/admin/assets/_asset.html.erb index 9eb4e77a..3a8dc439 100644 --- a/app/views/admin/assets/_asset.html.erb +++ b/app/views/admin/assets/_asset.html.erb @@ -1,6 +1,6 @@ <%= check_box_tag 'to_delete[]', asset.id, false, :class => "checkbox_in_list" %> - <%= asset.i18n_variable[I18n.locale] rescue nil %> + <%= asset.title.i18n_variable[I18n.locale] rescue nil %>
@@ -12,7 +12,7 @@ <%= asset.data.file.content_type %> <%= number_to_human_size(asset.data.file.file_length) %> - <%= asset.category.i18n_variable[I18n.locale] rescue nil %> + <%= asset.description.i18n_variable[I18n.locale] rescue nil %>
diff --git a/app/views/admin/assets/_sort_headers.html.erb b/app/views/admin/assets/_sort_headers.html.erb index 86e5f86a..43cb5927 100644 --- a/app/views/admin/assets/_sort_headers.html.erb +++ b/app/views/admin/assets/_sort_headers.html.erb @@ -2,5 +2,5 @@ ['description', 'description', 'span1-2', 'admin.data'], ['intro', 'intro', 'span1-2', 'admin.file_type'], ['intro', 'intro', 'span1-2', 'admin.file_length'], - ['intro', 'intro', 'span1-2', 'admin.category'], + ['intro', 'intro', 'span1-2', 'admin.description'], ['intro', 'intro', 'span1-2', 'admin.tags']).html_safe %> diff --git a/app/views/layouts/_side_bar.html.erb b/app/views/layouts/_side_bar.html.erb index 53314765..ab5981a8 100644 --- a/app/views/layouts/_side_bar.html.erb +++ b/app/views/layouts/_side_bar.html.erb @@ -71,11 +71,11 @@ <% end -%> <% end -%> -<%= content_tag :li, :class => active_for_controllers('assets', '/admin/asset_tags', 'asset_categories') do -%> - <%= link_to content_tag(:i, nil, :class => 'icons-link') + t('admin.asset'), admin_assets_path %> - <%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('assets', '/admin/asset_tags', 'asset_categories')) do -%> - <%= content_tag :li, link_to(t('admin.all_assets'), admin_assets_path), :class => active_for_action('assets', 'index') %> - <%= content_tag :li, link_to(t('admin.categories'), admin_asset_categories_path), :class => active_for_action('asset_categories', 'index') %> - <%= content_tag :li, link_to(t('admin.tags'), admin_asset_tags_path), :class => active_for_action('/admin/asset_tags', 'index') %> - <% end -%> -<% end -%> +<%#= content_tag :li, :class => active_for_controllers('assets', '/admin/asset_tags', 'asset_categories') do -%> + <%#= link_to content_tag(:i, nil, :class => 'icons-link') + t('admin.asset'), admin_assets_path %> + <%#= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('assets', '/admin/asset_tags', 'asset_categories')) do -%> + <%#= content_tag :li, link_to(t('admin.all_assets'), admin_assets_path), :class => active_for_action('assets', 'index') %> + <%#= content_tag :li, link_to(t('admin.categories'), admin_asset_categories_path), :class => active_for_action('asset_categories', 'index') %> + <%#= content_tag :li, link_to(t('admin.tags'), admin_asset_tags_path), :class => active_for_action('/admin/asset_tags', 'index') %> + <%# end -%> +<%# end -%>