Sha256: ddb40f128813ccc9071a02e68d96ffa8f5ce4641853850908b72e7dc28a7c589

Contents?: true

Size: 426 Bytes

Versions: 3

Compression:

Stored size: 426 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

3 entries across 3 versions & 1 rubygems

Version Path
adminpanel-2.4.0 app/views/adminpanel/shared/_new_resource_button.html.erb
adminpanel-2.3.1 app/views/adminpanel/shared/_new_resource_button.html.erb
adminpanel-2.3.0 app/views/adminpanel/shared/_new_resource_button.html.erb