Support for Custom FAQ content

This commit is contained in:
Robin Ward 2013-06-27 12:50:24 -04:00
parent 94b8286819
commit bf96c8ad01
6 changed files with 36 additions and 16 deletions

View file

@ -19,6 +19,7 @@ class SiteContent < ActiveRecord::Base
add_content_type :tos_miscellaneous, default_18n_key: 'terms_of_service.miscellaneous'
add_content_type :login_required_welcome_message, default_18n_key: 'login_required.welcome_message'
add_content_type :privacy_policy, allow_blank: true
add_content_type :faq, allow_blank: true
def site_content_type
@site_content_type ||= SiteContent.content_types.find {|t| t.content_type == content_type.to_sym}

View file

@ -4,6 +4,8 @@
<li><a href="<%=privacy_path%>">Ochrana soukromí</a></li>
</ul>
<%= markdown_content(:faq) do %>
<div id="civilized"></div>
<h2><a href="#civilized">Toto je 'Civilizované místo pro veřejnou diskuzi'</a></h2>
<p>
@ -129,3 +131,5 @@
</p>
<div class="more">
</div>
<% end %>

View file

@ -4,6 +4,8 @@
<li><a href="<%=privacy_path%>">Privacy</a></li>
</ul>
<%= markdown_content(:faq) do %>
<div id="civilized"></div>
<h2><a href="#civilized">This is a Civilized Place for Public Discussion</a></h2>
<p>
@ -129,3 +131,5 @@
</p>
<div class="more">
</div>
<% end %>

View file

@ -4,6 +4,8 @@
<li><a href="<%=privacy_path%>">Конфиденциальность</a></li>
</ul>
<%= markdown_content(:faq) do %>
<div id="civilized"></div>
<h2><a href="#civilized">Это цивилизованное место для открытого общения</a></h2>
<p>
@ -127,3 +129,5 @@
</p>
<div class="more">
</div>
<% end %>

View file

@ -4,6 +4,8 @@
<li><a href="/privacy">隐私条款</a></li>
</ul>
<%= markdown_content(:faq) do %>
<div id="civilized"></div>
<h2><a href="#civilized">这是一个供公众讨论的文明场所</a></h2>
<p>
@ -129,3 +131,5 @@
</p>
<div class="more">
</div>
<% end %>

View file

@ -416,6 +416,9 @@ en:
privacy_policy:
title: "Privacy Policy"
description: "Your site's privacy policy. Leave blank for default policy."
faq:
title: "FAQ"
description: "Your site's FAQ. Leave blank for the default FAQ."
login_required_welcome_message:
title: "Login Required: Welcome Message"
description: "Welcome message that is displayed to logged out users when