cancer_predict/index.html.erb

231 lines
10 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<% if params[:is_frontend_view] == "true" %>
<% OrbitHelper.render_css_in_head(["basic/icon","lib/orbit_bar/orbit-bar"]) %>
<% else %>
<%= stylesheet_link_tag "basic/icon" %>
<%= stylesheet_link_tag "lib/orbit_bar/orbit-bar" %>
<% end %>
<div id="orbit-bar">
<% if current_user.nil? %>
<label for="open-orbit-login" style="display:none;">Open login</label>
<input type="checkbox" title="open login" id="open-orbit-login">
<label for="open-orbit-login" class="cover"></label>
<div class="login-window">
<div class="login-header">
<label for="open-orbit-login" class="close">×</label>
<h3><%= t(:login_orbit) %></h3>
</div>
<div class="login-body">
<%= form_tag "/sessions?locale=#{locale.to_s}", method: "post", :class => "container" do |f| %>
<div class="prepend input-group">
<span class="add input-group-addon"><i class="icon-user"></i></span>
<label for="user_user_id" style="display:none;">Username</label>
<input class="input" id="user_user_id" title="username" name="user_name" placeholder="<%= t("users.user_id") %>" size="30" title="username" type="text">
</div>
<div class="prepend input-group">
<span class="add input-group-addon"><i class="icon-lock"></i></span>
<label for="user_password" style="display:none;">Password</label>
<input class="input" id="user_password" name="password" placeholder="<%= t(:password) %>" title="password" size="30" type="password">
</div>
<div class="login-submit-wrap">
<div class="submit">
<button class="login-btn" type="submit"><%= t(:login) %></button>
</div>
<% if current_site.google_oauth_enabled %>
<div class="google-login">
<a class="login-btn" href="/auth/google_oauth2">
<i class="fa fa-google-plus"></i> Sign in
</a>
</div>
<% end %>
</div>
<% if !current_site.sign_up_roles.empty? %>
<div class="login-sign-up-btn"><a href="/users/new" rel="nofollow">Sign up now</a></div>
<% end %>
<% end %>
</div>
</div>
<% end %>
<input type="checkbox" id="open-orbit-nav" title="orbitbar">
<div class="orbit-bar-inner">
<label for="open-orbit-nav">
<i class="icons-list-2"></i>
</label>
<h2 class="orbit-bar-title">
<a href="/"><%= current_site.mobile_orbit_bar_title.nil? || current_site.mobile_orbit_bar_title == "" ? "Orbit" : current_site.mobile_orbit_bar_title %></a>
</h2>
<ul class="orbit-bar-menu">
<li>
<span class="orbit-bar-logo">
<img src="<%= current_site.default_image.url.nil? ? '/assets/orbit-logo.png' : current_site.default_image.url %>" alt="Orbit Bar Logo" />
</span>
<% if !current_user.nil? %>
<ul>
<li>
<a href="/<%= locale.to_s %>/admin/dashboards">
<i class="icons-gauge"></i> <%= t(:dashboard_) %>
</a>
</li>
<li>
<a href="/<%= locale.to_s %>/admin/members?at=thumbnail">
<i class="icons-users"></i> <%= t(:community_) %>
</a>
</li>
<% if current_user.is_admin? %>
<li class="divider"></li>
<li>
<a href="/<%= locale.to_s %>/admin/sites" tabindex="-1">
<i class="icons-cog"></i> <%= t(:settings) %>
</a>
</li>
<% end %>
</ul>
<% end %>
</li>
<li>
<a href="/" class="orbit-bar-home">
<i class="icons-house"></i>
</a>
</li>
<% if !current_user.nil? && current_user.is_admin? && TicketStatus.unread.count > 0 %>
<li>
<a href="/admin/sites" class="orbit-bar-notification">
<i class="icons-mail"></i>
</a>
</li>
<% end %>
</ul>
<ul class="link1" style="width: 240px;float: left;">
<li><a href="/">回首頁</a></li>
<li><a href="https://www.nccu.edu.tw/app/home.php">政治大學</a></li>
<li><a href="/zh_tw/sitemap">網站導覽</a></li>
</ul>
<ul class="orbit-bar-search-sign-language">
<%
google_search_cx = current_site.search['sitesearch'] rescue nil
is_google_seach_cx = google_search_cx =~ /^[0-9]+\:[0-9A-Za-z]+$/
if !google_search_cx.blank? and is_google_seach_cx
%>
<li>
<form id="search" method="get" action="http://www.google.com/cse" target="_blank">
<input type="hidden" name="cx" value="<%= google_search_cx %>">
<label style="display:none;" for="q">Google Search</label>
<%= text_field_tag 'q', '', {:type => "search", :placeholder => t("search.sitesearch"), 'x-webkit-speech' => '', :title => "search"} %>
</form>
</li>
<%
else
if !google_search_cx.blank? and !is_google_seach_cx
search_domain = google_search_cx
else
search_domain = request.host_with_port
end
%>
<li>
<form id="search" method="get" action="http://www.google.com/custom" target="_blank">
<input type="hidden" name="client" value="pub-&amp" />
<input type="hidden" name="ie" id="ie" value="utf-8" />
<input type="hidden" name="oe" id="oe" value="utf-8" />
<input type="hidden" name="cof" id="cof" value="AH:center;AWFID:03de271f1940eea3;" />
<input type='hidden' name='domains' value='<%= search_domain %>'>
<input type='hidden' name='sitesearch' value='<%= search_domain %>'>
<label style="display:none;" for="q">Google Search</label>
<%= text_field_tag 'q', '', {:type => "search", :placeholder => t("search.sitesearch"), 'x-webkit-speech' => '', :title => "search"} %>
</form>
</li>
<% end %>
<li>
<% if current_site.enable_language_options %>
<% if @site_in_use_locales.count > 1 || current_site.enable_zh_cn %>
<% zh_cn_added = 0 %>
<% locale = session[:zh_cn] ? :zh_cn : I18n.locale %>
<span id="language"><i class="icons-earth orbit-bar-language-icon"></i><span class="orbit-bar-language-text">Language</span></span>
<ul>
<% @site_in_use_locales.each do |l| %>
<%
case l
when :en
accesskey = "e"
when :zh_tw
accesskey = "t"
end
%>
<% if l.to_s == I18n.locale.to_s and !session['zh_cn'] %>
<li class="<%= (l == I18n.locale and !session['zh_cn']) ? "active" : "" %>">
<%= t((l==:zh_tw ? :zh_tw_ : :_locale ), :locale => l) %>
</li>
<% else %>
<li class="<%= (l == I18n.locale and !session['zh_cn']) ? "active" : "" %>">
<a accesskey="<%= accesskey %>" href="<%= switch_language(l) %>"><%= t((l==:zh_tw ? :zh_tw_ : :_locale ), :locale => l) %></a>
</li>
<% end %>
<% if current_site.enable_zh_cn and zh_cn_added == 0 and !request.path.include?("/admin/") %>
<% zh_cn_added = 1 %>
<% accesskey = "s" %>
<% if locale == :zh_cn %>
<li class="active">
<%= t(:zh_cn, :locale => :zh_tw) %>
</li>
<% else %>
<li>
<a accesskey="<%= accesskey %>" href="<%= switch_language(:zh_cn) %>"><%= t(:zh_cn, :locale => :zh_tw) %></a>
</li>
<% end %>
<% end %>
<% end %>
</ul>
<% end %>
<% end %>
</li>
<% if !current_user.nil? %>
<li>
<span id="user"><%= current_user.member_profile.name.nil? ? current_user.user_name : current_user.member_profile.name rescue nil %></span>
<ul>
<li><%= link_to content_tag(:i, nil, class: 'icons-tools') + ' ' + t("users.change_passwd"),admin_member_edit_passwd_path(current_user.member_profile.to_param), tabindex: '-1' rescue nil%></li>
<li><%= link_to content_tag(:i, nil, class: 'icons-vcard') + ' ' + t("users.user_basic_data"),admin_member_path(current_user.member_profile.to_param), tabindex: '-1' rescue nil %></li>
<% if current_user.is_admin? && params[:is_frontend_view] == "true" %>
<li>
<% if params[:editmode] == "on" %>
<a tabindex="-1" href="<%= request.fullpath.split("?").first %>" style="color:red;"><i class="icons-bolt"></i>Edit Mode Off</a>
<% else %>
<a tabindex="-1" href="<%= request.fullpath + "#{(request.query_parameters.empty? ? "?" : "&")}editmode=on" %>"><i class="icons-bolt"></i>Edit Mode On</a>
<% end %>
</li>
<% end %>
<li>
<a href="/logout"><i class="icons-logout"></i><%= t(:logout) %></a>
</li>
</ul>
</li>
<% else %>
<li>
<a id="accesskey_login" class="sr-only" accesskey="L" href="/<%= "#{locale.to_s}" %>/accesskey" title="Login">:::</a>
<label for="open-orbit-login">
<i class="icons-login"></i>
</label>
</li>
<% end %>
</ul>
</div>
</div>
<script type="text/javascript">
$("#open-orbit-login").on("change",function(){
if($(this).is(":checked")){
$("#user_user_id").focus();
}
})
$(".login-body form").on("submit",function(){
$(this).append("<input type='hidden' name='referer_url' value='<%= request.original_url %>'/>");
})
<%
for_js = @site_in_use_locales.map{|l| l.to_s}
for_js << "zh_cn" if current_site.enable_zh_cn
%>
var I18n = {
get locale(){ return "<%= (session[:locale] == 'zh_tw' ? (session[:zh_cn] ? 'zh_cn' : 'zh_tw' ) : session[:locale]) %>"},
get validLocales(){return <%= for_js.to_json.html_safe %>},
set locale(v){return false},
set validLocales(v){return false}
};
</script>