Sha256: 49f5a19364578579e545a872c90af20dc12d2fe421a6b8607d33ea24b0a1cf87
Contents?: true
Size: 1.78 KB
Versions: 4
Compression:
Stored size: 1.78 KB
Contents
.btn-group.span4.pull-right.text-right - if content_for?(:page_actions) = yield(:page_actions) - else - case action_name.to_sym - when :index, :query = render "forms/buttons/create", url: new_resource_path if can? :create, resource_class -# TODO - query_resources_path.. does not work for some cases - incompatibility with Rails 4? = render "forms/buttons/query", url: polymorphic_path([:query, route_prefix, association_chain, resource_class].flatten), url_params: query_params if can? :query, resource_class = render "forms/buttons/export", url: polymorphic_path([:export, route_prefix, association_chain, resource_class].flatten, query_params), url_params: query_params if can? :export, resource_class = render "forms/buttons/import", url: polymorphic_path([:import, route_prefix, association_chain, resource_class].flatten) if can? :import, resource_class - if list_section.bulk_actions = render "forms/buttons/bulk_delete", url: polymorphic_path([:bulk_delete, route_prefix, association_chain, resource_class].flatten) if can? :bulk_delete, resource_class - when :show = render "forms/buttons/edit", url: edit_resource_path if can? :edit, resource -#= render "forms/buttons/create", url: new_resource_path if can? :create, resource_class = render "forms/buttons/delete", url: resource_path if can? :destroy, resource - when :create, :new = render "forms/buttons/cancel", url: return_to_path || collection_path - when :edit, :update = render "forms/buttons/cancel", url: return_to_path || resource_path = render "forms/buttons/delete", url: resource_path if can? :destroy, resource - else = render "forms/buttons/cancel", url: return_to_path || (collection_action? ? collection_path : resource_path)
Version data entries
4 entries across 4 versions & 1 rubygems