Sha256: 203a732144d44fa293685761aa74ca9746185c278f36d9c243663f9bce77366b

Contents?: true

Size: 425 Bytes

Versions: 2

Compression:

Stored size: 425 Bytes

Contents

<% if @model.has_route?(:new) && can?(:create, @model) %>
  <%= link_to(
    content_tag(:div,
      content_tag(:i, nil, :class => 'fa fa-plus-circle fa-2x') +
      content_tag(
        :span,
        I18n.t("action.create", resource: @model.display_name)
      ),
      class: 'btn btn-box span2'
    ),
    {
      controller: params[:controller],
      action: :new
    },
    id: 'new-resource-button'
  ) %>
<% end %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
adminpanel-2.4.2 app/views/adminpanel/shared/_new_resource_button.html.erb
adminpanel-2.4.1 app/views/adminpanel/shared/_new_resource_button.html.erb