Sha256: 7b7aae01decc08f422eccc511026d4b05c5950103cf70e5ec9b2f72ab49b95da

Contents?: true

Size: 474 Bytes

Versions: 6

Compression:

Stored size: 474 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") + " #{@model.display_name}"),
        :class => 'btn btn-box span2'
      ),
      {
        :controller => params[:controller],
        :action => 'new'
      },
      data: { no_turbolink: true },
      id: 'new-resource-button'
    )
  %>
<% end %>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
adminpanel-2.2.5 app/views/shared/_new_resource_button.html.erb
adminpanel-2.2.4 app/views/shared/_new_resource_button.html.erb
adminpanel-2.2.3 app/views/shared/_new_resource_button.html.erb
adminpanel-2.2.2 app/views/shared/_new_resource_button.html.erb
adminpanel-2.2.1 app/views/shared/_new_resource_button.html.erb
adminpanel-2.2.0 app/views/shared/_new_resource_button.html.erb