Sha256: b31e783a202adbf007fd8f516f30a3e3f417602ee4367b9c56193aa7399d5139

Contents?: true

Size: 1.1 KB

Versions: 1

Compression:

Stored size: 1.1 KB

Contents

- if authorized? :show, @abstract_model, object
  - link = show_path(model_name, object.id)
  %li.show_object_link{:class => ('active' if add_active_class && current_page?(link))}
    = link_to t("admin.index.show_action"), link

- if authorized? :edit, @abstract_model, object
  - link = edit_path(model_name, object.id)
  %li.edit_object_link{:class => ('active' if add_active_class && current_page?(link))}
    = link_to t("admin.index.edit_action"), link

- if authorized? :delete, @abstract_model, object
  - link = delete_path(model_name, object.id)
  %li.delete_object_link{:class => ('active' if add_active_class && current_page?(link))}
    = link_to t("admin.index.delete_action"), link

- if authorized? :history, @abstract_model, object
  - link = history_object_path(model_name, object.id)
  %li.history_object_link{:class => ('active' if add_active_class && current_page?(link))}
    = link_to t("admin.history.name"), link

- if authorized?(:show_in_app, @abstract_model, object) && (link = (main_app.url_for(object.id) rescue nil))
  %li.show_in_app_object_link
    = link_to t("admin.show.show_in_app"), link

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
elucid-rails_admin-0.0.1 app/views/rails_admin/main/_object_links.html.haml