app/views/rademade_admin/abstract/index.html.erb in rademade_admin-0.1.5 vs app/views/rademade_admin/abstract/index.html.erb in rademade_admin-0.1.6
- old
+ new
@@ -2,11 +2,13 @@
<h3><%= @model_info.item_name %></h3>
<% end %>
<% content_for :nav_buttons do %><%
new_uri = admin_new_uri(@model_info)
- if new_uri
- concat link_to t('rademade_admin.new_record') + '+', new_uri, :class => 'btn yellow-btn fl-l'
+ concat link_to(t('rademade_admin.new_record') + '+', new_uri, :class => 'btn yellow-btn fl-l') if new_uri
+ if @model_info.has_csv?
+ csv_uri = admin_list_uri(@model_info, :format => :csv)
+ concat link_to(t('rademade_admin.export_to_csv'), csv_uri, :class => 'btn green-btn fl-l l-margin') if csv_uri
end
end %>
<% content_for :content do %><%
concat render @template_service.search_block
\ No newline at end of file