mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-18 21:56:55 -04:00
DRY actions more
This commit is contained in:
@@ -6,8 +6,6 @@
|
||||
= render partial: "layouts/header"
|
||||
|
||||
#maincontainer
|
||||
.row
|
||||
.col-md-12= render partial: "shared/flash_messages", flash: flash
|
||||
.row
|
||||
.col-md-6
|
||||
- if content_for?(:title)
|
||||
@@ -25,6 +23,7 @@
|
||||
|
||||
.row
|
||||
.col-md-12
|
||||
= render partial: "shared/flash_messages", flash: flash
|
||||
= yield
|
||||
|
||||
%footer
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
- if can?(:edit, @photo) && can?(:destroy, @photo)
|
||||
%p
|
||||
- if can?(:edit, @photo)
|
||||
= render 'shared/buttons/edit', path: edit_photo_path(@photo)
|
||||
= edit_button(@photo)
|
||||
- if can?(:destroy, @photo)
|
||||
= render 'shared/buttons/delete', path: photo_path(@photo)
|
||||
= delete_button(@photo)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
- if can? :edit, photo
|
||||
= link_to photo_associations_path(photo_id: photo.id, type: type, id: thing.id),
|
||||
method: 'delete', class: 'btn btn-default btn-xs' do
|
||||
%span.glyphicon.glyphicon-remove{ title: "Remove link" }
|
||||
= delete_icon
|
||||
|
||||
Reference in New Issue
Block a user