mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
Configurable FAQ url
This commit is contained in:
parent
d13166fa17
commit
94b8286819
5 changed files with 19 additions and 6 deletions
|
@ -308,3 +308,16 @@ Handlebars.registerHelper('date', function(property, options) {
|
|||
|
||||
});
|
||||
|
||||
/**
|
||||
Produces a link to the FAQ
|
||||
|
||||
@method faqLink
|
||||
@for Handlebars
|
||||
**/
|
||||
Handlebars.registerHelper('faqLink', function(property, options) {
|
||||
return new Handlebars.SafeString(
|
||||
"<a href='" +
|
||||
(Discourse.SiteSettings.faq_url.length > 0 ? Discourse.SiteSettings.faq_url : Discourse.getURL('/faq')) +
|
||||
"'>" + Em.String.i18n('faq') + "</a>"
|
||||
);
|
||||
});
|
|
@ -122,7 +122,7 @@
|
|||
<li>
|
||||
{{#titledLinkTo "list.latest" titleKey="filters.latest.help"}}{{i18n filters.latest.title}}{{/titledLinkTo}}
|
||||
</li>
|
||||
<li>{{#linkTo 'faq'}}{{i18n faq}}{{/linkTo}}</li>
|
||||
<li>{{faqLink}}</li>
|
||||
|
||||
{{#if categories}}
|
||||
<li class='heading' title="{{i18n filters.categories.help}}">
|
||||
|
|
|
@ -81,10 +81,6 @@ module ApplicationHelper
|
|||
result
|
||||
end
|
||||
|
||||
def faq_path
|
||||
return "#{Discourse::base_uri}/faq"
|
||||
end
|
||||
|
||||
def login_path
|
||||
return "#{Discourse::base_uri}/login"
|
||||
end
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
module ConfigurableUrls
|
||||
|
||||
def faq_path
|
||||
SiteSetting.faq_url.blank? ? "#{Discourse::base_uri}/faq" : SiteSetting.faq_url
|
||||
end
|
||||
|
||||
def tos_path
|
||||
SiteSetting.tos_url.blank? ? "#{Discourse::base_uri}/tos" : SiteSetting.tos_url
|
||||
end
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
/*jshint maxlen:10000000 */
|
||||
Discourse.SiteSettings = {"title":"Discourse Meta","logo_url":"/assets/logo.png","logo_small_url":"/assets/logo-single.png","traditional_markdown_linebreaks":false,"top_menu":"latest|new|unread|read|favorited|categories","post_menu":"like|edit|flag|delete|share|bookmark|reply","share_links":"twitter|facebook|google+|email","track_external_right_clicks":false,"must_approve_users":false,"ga_tracking_code":"UA-33736483-2","ga_domain_name":"","enable_long_polling":true,"polling_interval":3000,"anon_polling_interval":30000,"min_post_length":20,"max_post_length":16000,"min_topic_title_length":15,"max_topic_title_length":255,"min_private_message_title_length":2,"allow_uncategorized_topics":true,"min_search_term_length":3,"flush_timings_secs":5,"suppress_reply_directly_below":true,"email_domains_blacklist":"mailinator.com","email_domains_whitelist":null,"version_checks":true,"min_title_similar_length":10,"min_body_similar_length":15,"category_colors":"BF1E2E|F1592A|F7941D|9EB83B|3AB54A|12A89D|25AAE2|0E76BD|652D90|92278F|ED207B|8C6238|231F20|808281|B3B5B4|283890","max_upload_size_kb":1024,"category_featured_topics":6,"favicon_url":"/assets/favicon.ico","dynamic_favicon":false,"uncategorized_name":"uncategorized","uncategorized_color":"AB9364","uncategorized_text_color":"FFFFFF","invite_only":false,"login_required":false,"enable_local_logins":true,"enable_local_account_create":true,"enable_google_logins":true,"enable_yahoo_logins":true,"enable_twitter_logins":true,"enable_facebook_logins":true,"enable_cas_logins":false,"enable_github_logins":true,"enable_persona_logins":true,"educate_until_posts":2,"topic_views_heat_low":1000,"topic_views_heat_medium":2000,"topic_views_heat_high":5000,"min_private_message_post_length":5};
|
||||
Discourse.SiteSettings = {"title":"Discourse Meta","logo_url":"/assets/logo.png","logo_small_url":"/assets/logo-single.png","traditional_markdown_linebreaks":false,"top_menu":"latest|new|unread|read|favorited|categories","post_menu":"like|edit|flag|delete|share|bookmark|reply","share_links":"twitter|facebook|google+|email","track_external_right_clicks":false,"must_approve_users":false,"ga_tracking_code":"UA-33736483-2","ga_domain_name":"","enable_long_polling":true,"polling_interval":3000,"anon_polling_interval":30000,"min_post_length":20,"max_post_length":16000,"min_topic_title_length":15,"max_topic_title_length":255,"min_private_message_title_length":2,"allow_uncategorized_topics":true,"min_search_term_length":3,"flush_timings_secs":5,"suppress_reply_directly_below":true,"email_domains_blacklist":"mailinator.com","email_domains_whitelist":null,"version_checks":true,"min_title_similar_length":10,"min_body_similar_length":15,"category_colors":"BF1E2E|F1592A|F7941D|9EB83B|3AB54A|12A89D|25AAE2|0E76BD|652D90|92278F|ED207B|8C6238|231F20|808281|B3B5B4|283890","max_upload_size_kb":1024,"category_featured_topics":6,"favicon_url":"/assets/favicon.ico","dynamic_favicon":false,"uncategorized_name":"uncategorized","uncategorized_color":"AB9364","uncategorized_text_color":"FFFFFF","invite_only":false,"login_required":false,"enable_local_logins":true,"enable_local_account_create":true,"enable_google_logins":true,"enable_yahoo_logins":true,"enable_twitter_logins":true,"enable_facebook_logins":true,"enable_cas_logins":false,"enable_github_logins":true,"enable_persona_logins":true,"educate_until_posts":2,"topic_views_heat_low":1000,"topic_views_heat_medium":2000,"topic_views_heat_high":5000,"min_private_message_post_length":5,"faq_url":""};
|
||||
|
|
Loading…
Reference in a new issue