-
-
Notifications
You must be signed in to change notification settings - Fork 725
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refacto edit method for content controller and enable custom user gui…
…de link
- Loading branch information
1 parent
5e0997d
commit cc43d78
Showing
14 changed files
with
172 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
app/models/preference_sections/footer_and_external_links_section.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
module PreferenceSections | ||
class FooterAndExternalLinksSection | ||
def name | ||
I18n.t('admin.contents.edit.footer_and_external_links') | ||
end | ||
|
||
def preferences | ||
[ | ||
:footer_logo, | ||
:footer_facebook_url, | ||
:footer_twitter_url, | ||
:footer_instagram_url, | ||
:footer_linkedin_url, | ||
:footer_googleplus_url, | ||
:footer_pinterest_url, | ||
:footer_email, | ||
:community_forum_url, | ||
:footer_links_md, | ||
:footer_about_url | ||
] | ||
end | ||
end | ||
end |
15 changes: 15 additions & 0 deletions
15
app/models/preference_sections/group_signup_page_section.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module PreferenceSections | ||
class GroupSignupPageSection | ||
def name | ||
I18n.t('admin.contents.edit.group_signup_page') | ||
end | ||
|
||
def preferences | ||
[ | ||
:group_signup_pricing_table_html, | ||
:group_signup_case_studies_html, | ||
:group_signup_detail_html | ||
] | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module PreferenceSections | ||
class HeaderSection | ||
def name | ||
I18n.t('admin.contents.edit.header') | ||
end | ||
|
||
def preferences | ||
[ | ||
:logo, | ||
:logo_mobile, | ||
:logo_mobile_svg | ||
] | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module PreferenceSections | ||
class HomePageSection | ||
def name | ||
I18n.t('admin.contents.edit.home_page') | ||
end | ||
|
||
def preferences | ||
[ | ||
:home_hero, | ||
:home_show_stats | ||
] | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module PreferenceSections | ||
class HubSignupPageSection | ||
def name | ||
I18n.t('admin.contents.edit.hub_signup_page') | ||
end | ||
|
||
def preferences | ||
[ | ||
:hub_signup_pricing_table_html, | ||
:hub_signup_case_studies_html, | ||
:hub_signup_detail_html | ||
] | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
module PreferenceSections | ||
class MainLinksSection | ||
def name | ||
I18n.t('admin.contents.edit.main_links') | ||
end | ||
|
||
def preferences | ||
[ | ||
:menu_1, | ||
:menu_1_icon_name, | ||
:menu_2, | ||
:menu_2_icon_name, | ||
:menu_3, | ||
:menu_3_icon_name, | ||
:menu_4, | ||
:menu_4_icon_name, | ||
:menu_5, | ||
:menu_5_icon_name, | ||
:menu_6, | ||
:menu_6_icon_name, | ||
:menu_7, | ||
:menu_7_icon_name | ||
] | ||
end | ||
end | ||
end |
15 changes: 15 additions & 0 deletions
15
app/models/preference_sections/producer_signup_page_section.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module PreferenceSections | ||
class ProducerSignupPageSection | ||
def name | ||
I18n.t('admin.contents.edit.producer_signup_page') | ||
end | ||
|
||
def preferences | ||
[ | ||
:producer_signup_pricing_table_html, | ||
:producer_signup_case_studies_html, | ||
:producer_signup_detail_html | ||
] | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module PreferenceSections | ||
class UserGuideSection | ||
def name | ||
I18n.t('admin.contents.edit.user_guide') | ||
end | ||
|
||
def preferences | ||
[:user_guide_link] | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
= button_link_to t('.user_guide'), "http://www.openfoodnetwork.org/platform/user-guide/", icon: 'icon-external-link', target: '_blank' | ||
= button_link_to t('.user_guide'), ContentConfig.user_guide_link, icon: 'icon-external-link', target: '_blank' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters