Adding actual link to the manage link on enterprises index

This commit is contained in:
Rob Harrington
2015-06-11 10:42:19 +08:00
parent e575b0e490
commit 95073f6fe7
2 changed files with 6 additions and 2 deletions

View File

@@ -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

View File

@@ -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