mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-04 22:16:08 +00:00
Make home page what's happening text and about URL configurable
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
module Admin
|
||||
class ContentsController < Spree::Admin::BaseController
|
||||
def edit
|
||||
@preferences = [:home_tagline_cta]
|
||||
@preferences = [:home_tagline_cta, :home_whats_happening, :footer_about_url]
|
||||
end
|
||||
|
||||
def update
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
class ContentConfiguration < Spree::Preferences::Configuration
|
||||
preference :home_tagline_cta, :string, default: "Browse Open Food Network Australia"
|
||||
preference :home_whats_happening, :string, default: "Thanks for making the Open Food Network possible. Our vision is a better food system, and we're proud of what we're achieving together."
|
||||
|
||||
preference :footer_about_url, :string, default: "http://global.openfoodnetwork.org/ofn-local/open-food-network-australia/"
|
||||
end
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.row
|
||||
.small-12.medium-8.medium-offset-2.columns.text-center
|
||||
%h3 What's happening on OFN Australia?
|
||||
%p.text-big Thanks for making the Open Food Network possible. Our vision is a better food system, and we're proud of what we're achieving together.
|
||||
%p.text-big= ContentConfig.home_whats_happening
|
||||
%br
|
||||
%br
|
||||
-# .stat1
|
||||
|
||||
@@ -85,8 +85,7 @@
|
||||
%p
|
||||
%a{href: "/groups"} Groups
|
||||
%p
|
||||
// Needs to link to correct About page as per menu
|
||||
%a{href: "/about"} About
|
||||
%a{href: ContentConfig.footer_about_url} About
|
||||
|
||||
.small-12.medium-2.columns.text-left
|
||||
%h4 Join us
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
%section.top-bar-section
|
||||
%ul.left{}
|
||||
%li.ofn-logo
|
||||
%a{href: root_path}
|
||||
%a{href: root_path}
|
||||
%img{src: "/assets/logo-white.png", srcset: "/assets/logo-white.svg", width: "75", height: "26"}
|
||||
%li.divider
|
||||
%li.divider
|
||||
%li
|
||||
%a{href: main_app.shops_path}
|
||||
%span.nav-primary Shops
|
||||
@@ -22,8 +22,7 @@
|
||||
%span.nav-primary Groups
|
||||
%li.divider
|
||||
%li
|
||||
// TODO: Rohan - About path is content manageable:
|
||||
%a{href: main_app.groups_path}
|
||||
%a{href: ContentConfig.footer_about_url}
|
||||
%span.nav-primary About
|
||||
%li.divider
|
||||
%section.top-bar-section
|
||||
@@ -36,7 +35,7 @@
|
||||
%li.divider
|
||||
%li.current_hub{"ng-controller" => "CurrentHubCtrl", "ng-show" => "CurrentHub.hub.id", "ng-cloak" => true}
|
||||
%a{href: main_app.shop_path}
|
||||
%em Shopping @
|
||||
%em Shopping @
|
||||
%span.nav-primary.nav-branded {{ CurrentHub.hub.name }}
|
||||
%li.divider
|
||||
%li.cart{"ng-cloak" => true}
|
||||
|
||||
@@ -15,28 +15,27 @@
|
||||
%img{src: "/assets/logo-white.png", srcset: "/assets/logo-white.svg", width: "75", height: "26"}
|
||||
%li.li-menu
|
||||
%a{href: main_app.shops_path}
|
||||
%span.nav-primary
|
||||
%span.nav-primary
|
||||
%i.ofn-i_019-map-pin
|
||||
Shops
|
||||
%li.li-menu
|
||||
%a{href: main_app.map_path}
|
||||
%span.nav-primary
|
||||
%span.nav-primary
|
||||
%i.ofn-i_037-map
|
||||
Map
|
||||
%li.li-menu
|
||||
%a{href: main_app.producers_path}
|
||||
%span.nav-primary
|
||||
%span.nav-primary
|
||||
%i.ofn-i_036-producers
|
||||
Producers
|
||||
%li.li-menu
|
||||
%a{href: main_app.groups_path}
|
||||
%span.nav-primary
|
||||
%span.nav-primary
|
||||
%i.ofn-i_035-groups
|
||||
Groups
|
||||
%li.li-menu
|
||||
%a{href: main_app.groups_path}
|
||||
// TODO: Rohan - About path is content manageable:
|
||||
%span.nav-primary
|
||||
%a{href: ContentConfig.footer_about_url}
|
||||
%span.nav-primary
|
||||
%i.ofn-i_013-help
|
||||
About
|
||||
|
||||
|
||||
Reference in New Issue
Block a user