<%
  branch = if list === @portfolio_entries.first
    "branch_start"
  elsif list === @portfolio_entries.last or (list.parent and list === list.parent.children.last)
    "branch_end"
  end
-%>
<li class='clearfix record<%= " #{branch}" %>' id="<%= dom_id(list) -%>">
  <div class='clearfix'>
    <span class='actions'>
      <% url = (::Refinery::Portfolio.multi_level? && list.parent ? portfolio_project_url(list.parent, list) : portfolio_url(list))  %>
      <%= link_to refinery_icon_tag('application_go.png'), url, :target => "_blank",
                 :title => t('.view_live') %>
      <%= link_to refinery_icon_tag('application_edit.png'), edit_admin_portfolio_entry_path(list),
                 :title => t('.edit_this_entry') %>
      <%= link_to refinery_icon_tag('delete.png'), admin_portfolio_entry_path(list),
                 :class => "cancel confirm-delete",
                 :title => t('.confirm_delete_entry_title'),
                 :'data-confirm' => t('shared.admin.delete.message', :title => list.title),
                 :'data-method' => "delete" %>
    </span>
    <%=h list.title %>
  </div>
  <% if (children = list.children).any? %>
    <ul<%= " class='nested'" %>>
      <%= render :partial => 'list', :collection => children %>
    </ul>
  <% end %>
</li>

<%
  branch = if list === @portfolio_entries.first
    "branch_start"
  elsif list === @portfolio_entries.last or (list.parent and list === list.parent.children.last)
    "branch_end"
  end
-%>
<li class='clearfix record<%= " #{branch}" %>' id="<%= dom_id(list) -%>">
  <div class='clearfix'>
    <span class='actions'>
      <% url = (::Refinery::Portfolio.multi_level? && list.parent ? portfolio_project_url(list.parent, list) : portfolio_url(list))  %>
      <%= link_to refinery_icon_tag('application_go.png'), url, :target => "_blank",
                 :title => t('.view_live') %>
      <%= link_to refinery_icon_tag('application_edit.png'), edit_admin_portfolio_entry_path(list),
                 :title => t('.edit_this_entry') %>
      <%= link_to refinery_icon_tag('delete.png'), admin_portfolio_entry_path(list),
                 :class => "cancel confirm-delete",
                 :title => t('.confirm_delete_entry_title'),
                 :confirm => t('shared.admin.delete.message', :title => list.title),
                 :method => :delete %>
    </span>
    <%=h list.title %>
  </div>
  <% if (children = list.children).any? %>
    <ul<%= " class='nested'" %>>
      <%= render :partial => 'list', :collection => children %>
    </ul>
  <% end %>
</li>

Use :confirm and :method link_to methods.
Use :confirm and :method link_to methods.
