如何从rails_admin中删除图像?

时间:2015-04-16 15:59:37

标签: ruby-on-rails ruby gem rails-admin

我正在使用rails_admin gem

我想知道如何删除右上角的重力图像?

如何更改其他视图元素?

1 个答案:

答案 0 :(得分:2)

可以通过将_secondary_navigation.html.haml复制到您应用的应用/视图/布局/ rails_admin / _secondary_navigation.html.haml 并按您希望的方式进行编辑来实现。 还不够吗?

%ul.nav.navbar-nav.navbar-right.root_links
  - actions(:root).each do |action|
    %li{class: "#{action.action_name}_root_link"}= link_to wording_for(:menu, action), { action: action.action_name, controller: 'rails_admin/main' }, class: "pjax"
  - if main_app_root_path = (main_app.root_path rescue false)
    %li= link_to t('admin.home.name'), main_app_root_path
  - if _current_user
    - if user_link = edit_user_link
      %li= user_link
    - if logout_path.present?
      %li= link_to content_tag('span', t('admin.misc.log_out'), class: 'label label-danger'), logout_path, method: logout_method
    - if _current_user.respond_to?(:email) && _current_user.email.present?
      %li= image_tag "#{(request.ssl? ? 'https://secure' : 'http://www')}.gravatar.com/avatar/#{Digest::MD5.hexdigest _current_user.email}?s=30", style: 'padding-top:5px'

密钥为%li= image_tag "#{(request.ssl? ? 'https://secure' : 'http://www')}.gravatar.com/avatar/#{Digest::MD5.hexdigest _current_user.email}?s=30", style: 'padding-top:5px'