<% editing = defined?(editing) && editing creating = defined?(creating) && creating # "Personal content" refers to whether the content we're looking at belongs to the user doing the looking personal_content = user_signed_in? && (@content.updatable_by?(current_user) || @content.new_record?) %> <%# Primary FAB %>
<% if personal_content %> <% if creating || editing %> <% else %> <%= link_to edit_polymorphic_path(@content), class: "btn-floating btn-large halfway-fab waves-effect waves-light #{@content.class.color} hoverable", style: 'z-index: 1;' do %> edit <% end %> <% end %> <% elsif @content.persisted? %> <%= link_to '#', class: "btn-floating btn-large halfway-fab waves-effect waves-light #{@content.class.color} share tooltipped hoverable", style: 'z-index: 1;', data: { position: 'bottom', enterDelay: '500', tooltip: "Share this #{@content.class.name.downcase}" } do %> share <% end %> <% end %> <%= link_to '#', class: "btn-floating btn-small halfway-fab waves-effect waves-light white expand tooltipped hoverable", style: 'z-index: 1; margin-right: 64px;', data: { position: 'bottom', enterDelay: '500', tooltip: 'Expand all tabs vertically'} do %> format_line_spacing <% end %> <% if personal_content %> <%= link_to attribute_customization_path(content_type: @content.class.name.downcase), class: "btn-floating btn-small halfway-fab waves-effect waves-light white lighten-3 tooltipped hoverable", style: 'z-index: 1; margin-right: 105px;', data: { position: 'bottom', enterDelay: '500', tooltip: "Configure the categories and fields #{@content.class.name.downcase.pluralize} use", confirm: editing ? "This will take you to a new page. Please make sure any changes are saved before proceeding." : nil } do %> tune <% end %> <% end %> <% if personal_content && @content.persisted? %> share <% end %>