mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-24 05:38:52 +00:00
Switch to correct grammatical ordering of child/parent enterprise on enterprise relationships page
This commit is contained in:
@@ -21,7 +21,7 @@ class EnterpriseRelationship < ActiveRecord::Base
|
||||
where('enterprise_relationship_permissions.name = ?', permission)
|
||||
}
|
||||
|
||||
scope :by_name, with_enterprises.order('parent_enterprises.name, child_enterprises.name')
|
||||
scope :by_name, with_enterprises.order('child_enterprises.name, parent_enterprises.name')
|
||||
|
||||
|
||||
def permissions_list=(perms)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
%td {{ enterprise_relationship.parent_name }}
|
||||
%td {{ enterprise_relationship.child_name }}
|
||||
%td
|
||||
%ul
|
||||
%li{"ng-repeat" => "permission in enterprise_relationship.permissions"}
|
||||
{{ EnterpriseRelationships.permission_presentation(permission.name) }}
|
||||
%td {{ enterprise_relationship.child_name }}
|
||||
%td {{ enterprise_relationship.parent_name }}
|
||||
%td.actions
|
||||
%a.delete-enterprise-relationship.icon-trash.no-text{'ng-click' => 'delete(enterprise_relationship)'}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
%tr
|
||||
%td
|
||||
%select{name: "enterprise_relationship_parent_id", "ng-model" => "parent_id", "ng-options" => "e.id as e.name for e in Enterprises.my_enterprises"}
|
||||
%select{name: "enterprise_relationship_child_id", "ng-model" => "child_id", "ng-options" => "e.id as e.name for e in Enterprises.all_enterprises"}
|
||||
%td
|
||||
permits
|
||||
/ %div{"ng-repeat" => "permission in EnterpriseRelationships.all_permissions"}
|
||||
@@ -8,7 +8,7 @@
|
||||
/ %input{type: "checkbox", "ng-model" => "permissions[permission]"}
|
||||
/ {{ EnterpriseRelationships.permission_presentation(permission) }}
|
||||
%td
|
||||
%select{name: "enterprise_relationship_child_id", "ng-model" => "child_id", "ng-options" => "e.id as e.name for e in Enterprises.all_enterprises"}
|
||||
%select{name: "enterprise_relationship_parent_id", "ng-model" => "parent_id", "ng-options" => "e.id as e.name for e in Enterprises.my_enterprises"}
|
||||
%td.actions
|
||||
%input{type: "button", value: "Create", "ng-click" => "create()"}
|
||||
.errors {{ EnterpriseRelationships.create_errors }}
|
||||
|
||||
Reference in New Issue
Block a user