Add phone numbers to mobile front_end

This commit is contained in:
Manson Wang 2013-12-12 17:59:56 +08:00
parent afb5afeceb
commit e9a40774ac
2 changed files with 10 additions and 4 deletions

View File

@ -84,6 +84,9 @@ class Admin::SitesController < OrbitBackendController
def responsive_setting
@module = ModuleApp.where(:key => "announcement").first
if @site.phone_number.class.to_s == "BSON::OrderedHash"
@site.phone_number = []
end
end

View File

@ -4,9 +4,12 @@
<ul>
<li><%= @site.address.html_safe %></li>
<% @site.phone_number.each do |key, value| %>
<%= value %>
<% @site.phone_number.each_with_index do |phone,i| %>
<li>
<%= phone['title'] %> :
<a href="tel:+<%= phone['number'] %>">
<%= phone['number'] %>
</a>
</li>
<% end %>
<!-- <li>總值日室:<a href="tel:+88229387132">02-29387132</a></li>
<li>駐警衛室:<a href="tel:+88229387129">02-29387129</a></li> -->
</ul>