mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Adding data to groups page
This commit is contained in:
@@ -12,8 +12,14 @@
|
||||
"ng-debounce" => "150",
|
||||
"ofn-disable-enter" => true}
|
||||
|
||||
.row{bindonce: true}
|
||||
.row.group_table{bindonce: true}
|
||||
.small.12.columns
|
||||
.group_table
|
||||
.group{"ng-repeat" => "group in Groups.groups | filter:query | orderBy:order"}
|
||||
{{ group.name }}
|
||||
.group{"ng-repeat" => "group in Groups.groups | filter:query | orderBy:order"}
|
||||
%h2 {{ group.name }}
|
||||
%p {{ group.description }}
|
||||
%p {{ group.long_description }}
|
||||
%img{"bo-src" => "group.logo"}
|
||||
|
||||
%ul
|
||||
%li{"ng-repeat" => "enterprise in group.enterprises"}
|
||||
%a{"bo-href" => "enterprise.path"} {{ enterprise.name }}
|
||||
|
||||
@@ -4,3 +4,11 @@ attributes :name, :id, :description
|
||||
child :address do
|
||||
extends "json/partials/address"
|
||||
end
|
||||
|
||||
node :path do |enterprise|
|
||||
shop_enterprise_path(enterprise)
|
||||
end
|
||||
|
||||
node :hash do |enterprise|
|
||||
enterprise.to_param
|
||||
end
|
||||
|
||||
@@ -1,2 +1,10 @@
|
||||
collection @groups
|
||||
attributes :id, :name, :position
|
||||
attributes :id, :name, :position, :description, :long_description
|
||||
|
||||
child enterprises: :enterprises do
|
||||
extends 'json/enterprises'
|
||||
end
|
||||
|
||||
node :logo do |group|
|
||||
group.logo(:original)
|
||||
end
|
||||
|
||||
@@ -21,14 +21,6 @@ node :delivery do |hub|
|
||||
not hub.shipping_methods.where(:require_ship_address => true).empty?
|
||||
end
|
||||
|
||||
node :path do |hub|
|
||||
shop_enterprise_path(hub)
|
||||
end
|
||||
|
||||
node :hash do |hub|
|
||||
hub.to_param
|
||||
end
|
||||
|
||||
node :active do |hub|
|
||||
@active_distributors.include?(hub)
|
||||
end
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
%span.nav-primary Producers
|
||||
%li.divider
|
||||
%li
|
||||
%a{href: ""}
|
||||
%a{href: groups_path}
|
||||
%span.nav-primary Groups
|
||||
%li.divider
|
||||
- if spree_current_user.andand.has_spree_role? 'admin'
|
||||
|
||||
@@ -36,17 +36,14 @@
|
||||
%li
|
||||
%a{href: root_path + "#/#hubs"}
|
||||
%span.nav-primary Hubs
|
||||
|
||||
%li
|
||||
%a{href: ""}
|
||||
%span.nav-primary Map
|
||||
|
||||
%li
|
||||
%a{href: main_app.producers_path}
|
||||
%span.nav-primary Producers
|
||||
|
||||
%li
|
||||
%a{href: ""}
|
||||
%a{href: groups_path}
|
||||
%span.nav-primary Groups
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user