-if current_user == @user
  .row
    .col.s12
      =link_to user_list_edit_path(current_user.name, @list), class: 'waves-effect waves-light btn' do
        %i.material-icons.left mode_edit
        Edit this list
-if @list
  .row
    .col.s12
      %p.flow-text=@list.title
      %p
        by
        =link_to @user.name, user_path(@user.name)
      %p=@list.description
  -if @list.tags
    .row
      .col.s12
        =render partial: "tags/tag", collection: @list.tags
  .row
    .col.s12
      %ul.collection
        =render partial: "lists/list_item", collection: @list.list_items
-else
  .row
    %p No list found.

-if current_user == @user
  .row
    .col.s12
      =link_to user_list_edit_path(current_user.name, @list), class: 'waves-effect waves-light btn' do
        %i.material-icons.left mode_edit
        Edit this list

-if current_user == @user
  =link_to 'Edit', user_list_edit_path(current_user.name, @list)
  =link_to 'Delete', user_list_destroy_path(current_user.name, @list), method: :delete

-if @list
  %p=@list.title
  %p
    by
    =link_to @user.name, user_path(@user.name)
  %p=@list.description

  -if @list.tags
    =render partial: "tags/tag", collection: @list.tags

  =render partial: "lists/list_item", collection: @list.list_items
-else
  .row
    %p No list found.

-if current_user == @user
  =link_to 'Edit this list', user_list_edit_path(current_user.name, @list)

Remove materialize, add delete button.
Remove materialize, add delete button.

