mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-09 23:06:06 +00:00
Adding actual link to the manage link on enterprises index
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
class Api::Admin::IndexEnterpriseSerializer < ActiveModel::Serializer
|
||||
attributes :name, :id, :permalink, :is_primary_producer, :sells, :producer_profile_only, :owned
|
||||
attributes :name, :id, :permalink, :is_primary_producer, :sells, :producer_profile_only, :owned, :edit_path
|
||||
|
||||
def owned
|
||||
return true if options[:spree_current_user].admin?
|
||||
object.owner == options[:spree_current_user]
|
||||
end
|
||||
|
||||
def edit_path
|
||||
edit_admin_enterprise_path(object)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
%td.status.panel-toggle.text-center{ ng: { show: 'columns.status.visible' }, name: "status" }
|
||||
%h5 Status
|
||||
%td.manage{ ng: { show: 'columns.manage.visible' } }
|
||||
%a.button.fullwidth{ href: '#' }
|
||||
%a.button.fullwidth{ bo: { href: 'enterprise.edit_path' } }
|
||||
Manage
|
||||
%i.icon-arrow-right
|
||||
|
||||
|
||||
Reference in New Issue
Block a user