mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-20 00:37:26 +00:00
Add delete link
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
|
||||
//= require jquery
|
||||
//= require jquery_ujs
|
||||
//= require angular
|
||||
//= require admin/spree_core
|
||||
//= require admin/spree_auth
|
||||
//= require admin/spree_promo
|
||||
|
||||
@@ -5,9 +5,16 @@ function AdminEnterpriseFeesCtrl($scope, $http) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
angular.module('enterprise_fees', [])
|
||||
.directive('spreeDeleteResource', function() {
|
||||
return function(scope, element, attrs) {
|
||||
if(scope.enterprise_fee.id) {
|
||||
var url = "/admin/enterprise_fees/" + scope.enterprise_fee.id
|
||||
var html = '<a href="'+url+'" class="delete-resource" data-confirm="Are you sure?"><img alt="Delete" src="/assets/admin/icons/delete.png" /> Delete</a>';
|
||||
element.append(html);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user