= icon_tag @icon
%br
Keyword:
= @icon.keyword
- if @icon.credit
  %br
  Credit:
  = @icon.credit
- if @icon.user_id == current_user.try(:id)
  %br
  = link_to "Make avatar", avatar_icon_path(@icon), method: :post
  %br
  = link_to "Edit icon", edit_icon_path(@icon)
  %br
  = link_to "Delete icon", icon_path(@icon), method: :delete, confirm: 'Are you sure you want to delete this icon?'

= icon_tag @icon
%br
Keyword:
= @icon.keyword
- if @icon.credit
  %br
  Credit:
  = @icon.credit
- if @icon.user_id == current_user.try(:id)
  %br
  = link_to "Make avatar", avatar_icon_path(@icon), method: :post
  %br
  = link_to "Edit icon", edit_icon_path(@icon)
  %br
  = link_to "Delete icon", icon_path(@icon), method: :delete, confirm: 'Are you sure you want to delete this icon?'

- if @icon.galleries
  %br
  %br
  .post-header
    .padding-15 Galleries
  %table
    - @icon.galleries.order(:name).each do |gallery|
      = render partial: 'galleries/single', locals: {gallery: gallery, klass: 'subber', skip_forms: true}

Add galleries to icon view page
Add galleries to icon view page
