lib/generators/sunrise/scaffold/templates/single/views/item.html.erb in sunrise-scaffold-0.1.5 vs lib/generators/sunrise/scaffold/templates/single/views/item.html.erb in sunrise-scaffold-0.2.0

- old
+ new

@@ -1,11 +1,15 @@ <%%= content_tag(:div, :id=>dom_id(<%= singular_name %>), :class=>"dinamic-bl") do %> <div class="act-bl" style="display:none;"> - <%%= link_to image_tag("manage/ico_edit.gif", :alt=>t('manage.edit'), :title=>t('manage.edit')), edit_manage_<%= singular_name %>_path(:id=><%= singular_name %>.id), :class=>"icons" %> - - <%%= link_to image_tag("manage/ico_del.gif", :alt=>t('manage.delete'), :title=>t('manage.delete')), manage_<%= singular_name %>_path(:id=><%= singular_name %>.id), + <%% if can? :update, <%= singular_name %>, :context => :manage %> + <%%= link_to manage_icon("edit"), edit_manage_<%= singular_name %>_path(:id=><%= singular_name %>.id), :class=>"icons" %> + <%% end -%> + + <%% if can? :delete, <%= singular_name %>, :context => :manage %> + <%%= link_to manage_icon("delete"), manage_<%= singular_name %>_path(:id=><%= singular_name %>.id), :method=>:delete, :confirm=>t("manage.confirm_delete"), :class=>"icons" %> + <%% end -%> </div> <div class="bot-bg"> <div class="dinamic-container"> <div class="right-data"> @@ -14,9 +18,10 @@ <div class="r-block"> <div class="r-block-cont"> <%%= link_to <%= singular_name %>.title, edit_manage_<%= singular_name %>_path(:id=><%= singular_name %>.id), :class=>"title" %> </div> </div> + <!--<div class="l-block"> ava img </div>--> </div> </div> </div> <div class="left-data"> <span class="data"><%%= raw I18n.l(<%= singular_name %>.created_at, :format=>"<span>%d/%m</span>%Y") %></span>