Sha256: 499e1e5cc841af37fc8d2e601f01a3fcaf77817a32ac02839f06bd1941eec013
Contents?: true
Size: 1.24 KB
Versions: 1
Compression:
Stored size: 1.24 KB
Contents
<ul class="nav"> <li style="float:left"> <a href="/" class="<%= 'active' unless request.fullpath =~ /register|login|change_password/ %>"> <i class="fa fa-home" aria-hidden="true"></i>首页 </a> </li> <li> <select class="country_lang"> <% if I18n.locale.to_s == "en" %> <option value="US">English</option> <option value="CN">中文</option> <% else %> <option value="CN">中文</option> <option value="US">English</option> <% end %> </select> </li> <li><a href="#" class="<%= 'active' if request.fullpath =~ /register/ %>">注册</a></li> <li><a href="#" class="<%= 'active' if request.fullpath =~ /login/ %>">登录</a></li> </ul> <script type="text/javascript"> function setCookie(name,value) { var Days = 7; var exp = new Date(); exp.setTime(exp.getTime() + Days*24*60*60*1000); document.cookie = name + "="+ escape (value) + ";path=/;expires=" + exp.toGMTString(); } $(".country_lang").change(function(){ var country = $(this).val(); if(country == "US"){ setCookie('country_id', '1') window.location.reload(); } else if(country == "CN"){ setCookie('country_id', '0') window.location.reload(); } }); </script>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
admin_help-0.1.4 | lib/generators/admin_help/templates/layouts/header.html.erb |