OSDN Git Service

365d7b1108502b0a36bfa1a3a01e2d05c2208989
[mint/mint-server.git] / app / views / layouts / application.html.erb
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3           "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
5 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
6   <head>
7     <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
8     <meta http-equiv="Content-Script-Type" content="text/javascript" />
9     <meta http-equiv="Content-Style-Type" content="text/css" />
10     <%= google_jsapi_tag %>
11     <%= google_load_tag 'jquery', '1.3' %>
12     <%= google_load_tag 'jqueryui', '1.7' %>
13     <%= javascript_include_tag 'jquery.ui.datepicker-ja' %>
14     <%= javascript_include_tag 'jquery.json-2.2' %>
15     <%= javascript_include_tag 'application' %>
16     <%= yield :head %>
17     <%- javascript_tag do -%>
18       jQuery(function($){
19         window._token = "<%= form_authenticity_token() %>";
20         <%= yield :script %>
21       });
22     <%- end -%>
23     <%= stylesheet_link_tag 'base' %>
24     <%= stylesheet_link_tag 'mint' %>
25     <%= stylesheet_link_tag 'jquery-ui-1.7.2.custom' %>
26     <%= yield :stylesheet %>
27     <%= yield :multi_auth_additional_head %>
28     <title>Mint - <%= @title %></title>
29     <script type="text/javascript">
30     //<![CDATA[
31     jQuery(document).ready(function(){
32       if (navigator.cookieEnabled) {
33         $("#cookie_check").hide();
34       } else {
35         $("#cookie_check").show();
36       }
37     });
38     //]]>
39     </script>
40   </head>
41   <body>
42     <div id="wrapper">
43       <div id="header">
44
45         <%= link_to image_tag('mint_logo003.jpg'), '/' %>
46
47       </div>
48       <div id="navigation">
49         <ul>
50           <li><%= link_to 'Home', root_path %></li>
51           <%- if logged_in? -%>
52           <li><%= link_to 'Reports', :controller => 'reports' %></li>
53           <li><%= link_to 'Settings', settings_path %></li>
54           <li><%= link_to 'Logout', { :controller => '/auth', :action => 'logout' }, :method => :post %></li>
55           <%- else -%>
56           <li><%= link_to 'Signup', :controller => '/signup' %></li>
57           <li><%= link_to 'Login', :controller => '/auth' %></li>
58           <%- end -%>
59           <li><%= link_to 'Help', help_path %></li>
60           <%- show_to :admin do -%>
61             <%= link_to "admin", :controller => "/admin" %>
62           <%- end -%>
63         </ul>
64       </div>
65       <div id="leftcolumn">
66
67         <%- if logged_in? -%>
68           <%- if current_user.have_profile? -%>
69             <p><%= current_user.affiliation.try(:name) %></p>
70             <p><%= current_user.name %></p>
71           <%- else -%>
72             <p>
73               <%= link_to 'ユーザ情報', user_path %> からあなたの設定を確認してください。
74               名前やメールアドレスを設定していない場合は、レポートにそれらが出力されません。
75             </p>
76           <%- end -%>
77           <ul>
78             <%- ProblemGroup.all(:order => 'position').each do |g| -%>
79               <li><%= link_to g.label, :controller => "/problems", :action => "quiz", :id => g %></li>
80             <%- end -%>
81           </ul>
82         <%- end -%>
83
84       </div>
85       <div id="rightcolumn">
86         <div id="cookie_check" style="display:none">
87           <%=h("Please enable cookie.") %>
88         </div>
89         <noscript>
90           <%=h("Please enable javascript and cookie.") %>
91         </noscript>
92         <div class="notice"><p><%= flash[:notice] %></p></div>
93         <div class="error"><p><%= flash[:error] %></p></div>
94
95         <%= yield %>
96       </div>
97       <div id="footer">
98
99         <p>Powered by <%= link_to 'Mint', "http://sourceforge.jp/projects/mint/simple/" %></p>
100
101       </div>
102     </div>
103     <%- javascript_tag do -%>
104       justifyHeight();
105     <%- end -%>
106   </body>
107 </html>