mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-04-15 20:40:50 -04:00
tidy up plantings
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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/
|
||||
|
||||
Reference in New Issue
Block a user