Add "tag" icon to orbit bar

This commit is contained in:
chris 2013-01-09 21:16:29 +08:00
parent d8f6ebb153
commit 1d405c3ffe
4 changed files with 49 additions and 6 deletions

View File

@ -282,4 +282,9 @@ module ApplicationHelper
end end
end end
# NTU link
def get_link(site_number)
"http://#{request.host}:2#{site_number}00"
end
end end

View File

@ -13,6 +13,14 @@
<!-- <li><a href="<%= desktop_path %>" data-icon="&#xe060;"></a></li> --> <!-- <li><a href="<%= desktop_path %>" data-icon="&#xe060;"></a></li> -->
</ul> </ul>
<ul class="nav pull-right"> <ul class="nav pull-right">
<li class="dropdown">
<a class="dropdown-toggle" data-icon="&#xe02d;" href="#" data-toggle="dropdown"></a>
<ul class="dropdown-menu">
<% t('ntu.site_names').each do |site| %>
<li><%= link_to site[1], get_link(site[0]) %></li>
<% end %>
</ul>
</li>
<li class="dropdown language"> <li class="dropdown language">
<a class="dropdown-toggle" href="#" data-toggle="dropdown" data-icon="&#xe054;"></a> <a class="dropdown-toggle" href="#" data-toggle="dropdown" data-icon="&#xe054;"></a>
<ul class="dropdown-menu language-menu"> <ul class="dropdown-menu language-menu">

15
config/locales/ntu.en.yml Normal file
View File

@ -0,0 +1,15 @@
en:
ntu:
site_names:
"00": "Dean of General Affairs"
"01": "Documentation Division"
"02": "Cashier Division"
"03": "General Service Division"
"04": "General Affairs Division, College of Social Science"
"05": "Property Management Division"
"06": "Procurement Division"
"07": "Facilities Service Division"
"08": "General Service Division"
"09": "Campus Security"
"10": "Construction and Maintenance Division"

View File

@ -0,0 +1,15 @@
zh_tw:
ntu:
site_names:
"00": "總務處"
"01": "文書組"
"02": "出納組"
"03": "事務組"
"04": "社科院總務分處"
"05": "保管組"
"06": "採購組"
"07": "經營管理組"
"08": "事務組"
"09": "駐警隊"
"10": "營繕組"