%li{id: "#{list.id}"}
  %span.name
    = link_to wrap(list.name), list_path(list.id)
    - if list.private?
      %i.icon-lock

    %span.item-count
    | #{pluralize(list.items.size, 'item')}

    %span.timestamp
      Updated #{time_ago_in_words(list.updated_at)} ago.

    - if signed_in? && current_user?(list.user)
      = link_to "delete", list, method: :delete, |
        data: { confirm: "You sure?" },          |
        title: list.name                         |

%li{id: "#{list.id}"}
  %span.name
    = link_to wrap(list.name), list_path(list.id)
    - if list.private?
      %i.icon-lock

    %span.item-count
    | #{pluralize(list.items.size, 'item')}

    %span.timestamp
      Updated #{time_ago_in_words(list.updated_at)} ago.

    - if signed_in? && current_user?(list.user) && list.items.count == 0
      = link_to "delete", list, method: :delete, |
        data: { confirm: "You sure?" },          |
        title: list.name                         |

Remove list delete link for lists with items.
Remove list delete link for lists with items.
