diff --git a/app/views/plantings/_actions.html.haml b/app/views/plantings/_actions.html.haml index 2191358e6..87486c194 100644 --- a/app/views/plantings/_actions.html.haml +++ b/app/views/plantings/_actions.html.haml @@ -1,17 +1,12 @@ - if can?(:edit, planting) .dropdown.float-right.planting-actions - %button#planting-actions-button.btn.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", :type => "button"} Actions + %a#planting-actions-button.btn.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", :type => "button"} .dropdown-menu.dropdown-menu-xs{"aria-labelledby" => "planting-actions-button"} - = link_to edit_planting_path(planting), class: 'dropdown-item' do - = edit_icon - = t('.edit') - = link_to new_photo_path(id: planting.id, type: 'planting'), class: "dropdown-item" do - = photo_icon - = t('buttons.add_photo') - = add_photo_button(planting) + .dropdown-item= planting_edit_button(planting) + .dropdown-item= add_photo_button(planting) - if planting.active? - = planting_finish_button(planting) - = planting_harvest_button(planting) - = planting_save_seeds_button(planting) + .dropdown-item= planting_finish_button(planting) + .dropdown-item= planting_harvest_button(planting) + .dropdown-item= planting_save_seeds_button(planting) - if can? :destroy, planting - = delete_button(planting) + .dropdown-item= delete_button(planting) diff --git a/app/views/plantings/index.html.haml b/app/views/plantings/index.html.haml index 2ffa77097..6787f86a3 100644 --- a/app/views/plantings/index.html.haml +++ b/app/views/plantings/index.html.haml @@ -1,7 +1,14 @@ -- content_for :title, title('plantings', @owner, @crop, @planting) +%h1=title('plantings', @owner, @crop, @planting) = render 'layouts/nav', model: Planting +- content_for :breadcrumbs do + - if @owner + %li.breadcrumb-item= link_to 'Plantings', plantings_path + %li.breadcrumb-item.active= link_to "#{@owner}'s plantings", plantings_path(owner: @owner) + - else + %li.breadcrumb-item.active= link_to 'Plantings', plantings_path + = link_to plantings_active_tickbox_path(@owner, @show_all) do = check_box_tag 'active', 'all', @show_all include in-active diff --git a/app/views/plantings/show.html.haml b/app/views/plantings/show.html.haml index d43563634..d191ac693 100644 --- a/app/views/plantings/show.html.haml +++ b/app/views/plantings/show.html.haml @@ -9,13 +9,14 @@ = tag("meta", property: "og:url", content: request.original_url) = tag("meta", property: "og:site_name", content: ENV['GROWSTUFF_SITE_NAME']) -- content_for :buttonbar do - = render 'plantings/actions', planting: @planting .planting .row .col-md-8.col-xs-12 - %h2.h1= @planting + %h2.h1 + %strong= @planting + = render 'plantings/actions', planting: @planting + = render 'facts', planting: @planting - if @planting.description.present? %hr/