From 95073f6fe7c863f10df236759e1fbdb984154042 Mon Sep 17 00:00:00 2001 From: Rob Harrington Date: Thu, 11 Jun 2015 10:42:19 +0800 Subject: [PATCH] Adding actual link to the manage link on enterprises index --- app/serializers/api/admin/index_enterprise_serializer.rb | 6 +++++- app/views/admin/enterprises/index.html.haml | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/serializers/api/admin/index_enterprise_serializer.rb b/app/serializers/api/admin/index_enterprise_serializer.rb index 189e6a08b5..0c5aef1b8e 100644 --- a/app/serializers/api/admin/index_enterprise_serializer.rb +++ b/app/serializers/api/admin/index_enterprise_serializer.rb @@ -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 diff --git a/app/views/admin/enterprises/index.html.haml b/app/views/admin/enterprises/index.html.haml index df8e2d4c49..662e1f6cb0 100644 --- a/app/views/admin/enterprises/index.html.haml +++ b/app/views/admin/enterprises/index.html.haml @@ -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