FEATURE: new site setting contact_url

This commit is contained in:
Arpit Jalan 2015-02-23 23:09:13 +05:30
parent e684d7689e
commit a25e3cca8e
5 changed files with 10 additions and 4 deletions

View File

@ -4,8 +4,10 @@ export default ObjectController.extend({
faqOverriden: Ember.computed.gt('siteSettings.faq_url.length', 0), faqOverriden: Ember.computed.gt('siteSettings.faq_url.length', 0),
contactInfo: function() { contactInfo: function() {
if (Discourse.SiteSettings.contact_email) { if (this.siteSettings.contact_url) {
return I18n.t('about.contact_info', {contact_email: Discourse.SiteSettings.contact_email}); return I18n.t('about.contact_info', {contact_info: "<a href='"+ this.siteSettings.contact_url +"' target='_blank'>"+ this.siteSettings.contact_url +"</a>"});
} else if (this.siteSettings.contact_email) {
return I18n.t('about.contact_info', {contact_info: this.siteSettings.contact_email});
} else { } else {
return null; return null;
} }

View File

@ -89,7 +89,7 @@
{{#if contactInfo}} {{#if contactInfo}}
<section class='about contact'> <section class='about contact'>
<h3>{{i18n 'about.contact'}}</h3> <h3>{{i18n 'about.contact'}}</h3>
<p>{{contactInfo}}</p> <p>{{{contactInfo}}}</p>
</section> </section>
{{/if}} {{/if}}

View File

@ -163,7 +163,7 @@ en:
user_count: "New Users" user_count: "New Users"
active_user_count: "Active Users" active_user_count: "Active Users"
contact: "Contact Us" contact: "Contact Us"
contact_info: "In the event of a critical issue or urgent matter affecting this site, please contact us at %{contact_email}." contact_info: "In the event of a critical issue or urgent matter affecting this site, please contact us at %{contact_info}."
bookmarked: bookmarked:
title: "Bookmark" title: "Bookmark"

View File

@ -756,6 +756,7 @@ en:
title: "The name of this site, as used in the title tag." title: "The name of this site, as used in the title tag."
site_description: "Describe this site in one sentence, as used in the meta description tag." site_description: "Describe this site in one sentence, as used in the meta description tag."
contact_email: "Email address of key contact responsible for this site. Used for critical notifications such as unhandled flags, as well as on the /about contact form for urgent matters." contact_email: "Email address of key contact responsible for this site. Used for critical notifications such as unhandled flags, as well as on the /about contact form for urgent matters."
contact_url: "Contact URL for this site. Used on the /about contact form for urgent matters."
queue_jobs: "DEVELOPER ONLY! WARNING! By default, queue jobs in sidekiq. If disabled, your site will be broken." queue_jobs: "DEVELOPER ONLY! WARNING! By default, queue jobs in sidekiq. If disabled, your site will be broken."
crawl_images: "Retrieve images from remote URLs to insert the correct width and height dimensions." crawl_images: "Retrieve images from remote URLs to insert the correct width and height dimensions."
download_remote_images_to_local: "Convert remote images to local images by downloading them; this prevents broken images." download_remote_images_to_local: "Convert remote images to local images by downloading them; this prevents broken images."

View File

@ -25,6 +25,9 @@ required:
client: true client: true
default: '' default: ''
type: email type: email
contact_url:
client: true
default: ''
notification_email: notification_email:
default: 'noreply@unconfigured.discourse.org' default: 'noreply@unconfigured.discourse.org'
type: email type: email