mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-14 03:05:59 -04:00
actions menu for harvests
This commit is contained in:
@@ -53,8 +53,8 @@ module ButtonsHelper
|
||||
edit_button(edit_seed_path(seed), classes: classes)
|
||||
end
|
||||
|
||||
def harvest_edit_button(harvest)
|
||||
edit_button(edit_harvest_path(harvest))
|
||||
def harvest_edit_button(harvest, classes: "btn btn-raised btn-info")
|
||||
edit_button(edit_harvest_path(harvest), classes: classes)
|
||||
end
|
||||
|
||||
def garden_edit_button(garden, classes: "btn btn-raised btn-info")
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
.harvest-actions
|
||||
.btn-group
|
||||
= harvest_edit_button(harvest) if can? :edit, harvest
|
||||
= add_photo_button(harvest)
|
||||
= delete_button(harvest)
|
||||
- if can?(:edit, harvest)
|
||||
.dropdown.float-right.harvest-actions
|
||||
%a#harvest-actions-button.btn.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", :type => "button"} Actions
|
||||
.dropdown-menu.dropdown-menu-xs{"aria-labelledby" => "harvest-actions-button"}
|
||||
= harvest_edit_button(harvest, classes: 'dropdown-item')
|
||||
= add_photo_button(harvest, classes: 'dropdown-item')
|
||||
.dropdown-divider
|
||||
= delete_button(harvest, classes: 'dropdown-item text-danger')
|
||||
|
||||
@@ -8,14 +8,12 @@
|
||||
= 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 'harvests/actions', harvest: @harvest
|
||||
|
||||
.row
|
||||
.col-md-8
|
||||
%h1
|
||||
= harvest_icon
|
||||
#{@harvest.crop} harvested by #{@harvest.owner}
|
||||
= render 'harvests/actions', harvest: @harvest
|
||||
%p
|
||||
%b Owner:
|
||||
= link_to @harvest.owner, @harvest.owner
|
||||
|
||||
Reference in New Issue
Block a user