OSDN Git Service

0cb2c2a5acb94448490fe6a57d2cebaf4a535317
[pettanr/pettanr.git] / app / views / layouts / application.html.erb
1 <!DOCTYPE html>\r
2 <html>\r
3 <head>\r
4   <title>\r
5     <% if @page_title %>\r
6       <%= h @page_title %>\r
7     <% else %>\r
8       <%= t("#{params[:controller]}.#{params[:action]}.title") %>\r
9     <% end %>\r
10     - <%= h(manifest.magic_numbers['profile']['users']['caption']) %>\r
11   </title>\r
12   <%= stylesheet_link_tag "test" %>\r
13   <%= javascript_include_tag "ap" %>\r
14   <%= csrf_meta_tags %>\r
15 </head>\r
16 <body>\r
17 \r
18 <div width="100%">\r
19 <table class="no-border">\r
20   <tr>\r
21     <td width="50%">\r
22       <h3><%= link_to manifest.magic_numbers['profile']['users']['caption'], main_app.root_path %></h3>\r
23     </td>\r
24     <td width="30%">\r
25       <% if user_signed_in? %>\r
26         <%# link_to t('top.metro.title'), '/top/metro' %>\r
27       <% end %>\r
28     </td>\r
29     <td>\r
30       <div>\r
31         <% if @operators.author %>\r
32           <%= link_to h(truncate(@operators.author.name, :length => 12)), main_app.author_path(@operators.author) %>\r
33         <% end %>\r
34       </div>\r
35       <div>\r
36         <% if @operators.artist %>\r
37           <%= link_to h(truncate(@operators.artist.name, :length => 12)), main_app.artist_path(@operators.artist) %>\r
38         <% end %>\r
39       </div>\r
40     </td>\r
41     <td>\r
42       <% if user_signed_in? %>\r
43         <%= link_to t('home.configure.title'), '/home/configure' %>\r
44         <%= link_to t('home.sign_out.title'), main_app.destroy_user_session_path, :method => :delete %>\r
45       <% else %>\r
46         <%= link_to "sign in", main_app.new_user_session_path %>\r
47       <% end %>\r
48       <br>\r
49   </td>\r
50   </tr>\r
51 </table>\r
52 </div>\r
53 <%= yield %>\r
54 <div width="100%" style="background-color: #faddfa; padding: 5px;">\r
55   <%= link_to t('tab.demander.title'), main_app.demanders_path %>\r
56   <% if demand_user_signed_in? %>\r
57     <%= link_to t_m('Demander'), main_app.demanders_path %>\r
58     <%= link_to t('home.sign_out.title'), main_app.destroy_demand_user_session_path, :method => :delete %>\r
59   <% else %>\r
60     <%= link_to t('home.sign_in.title'), main_app.new_demand_user_session_path %>\r
61   <% end %>\r
62 </div>\r
63 <div width="100%" style="background-color: #ddddfa; padding: 5px;">\r
64   <%= link_to t('tab.system.title'), '/system' %>\r
65   <% if admin_signed_in? %>\r
66     <%= link_to t('tab.system.browse'), '/system/browse' %>\r
67     <%= link_to t('tab.system.approve'), '/system/waiting_list' %>\r
68     <%= link_to t('tab.system.port'), '/system/import' %>\r
69     <%= link_to t('tab.system.token'), '/system/auth_token' %>\r
70     <%= link_to t('home.sign_out.title'), main_app.destroy_admin_session_path, :method => :delete %>\r
71   <% else %>\r
72     <%= link_to t('home.sign_in.title'), main_app.new_admin_session_path %>\r
73   <% end %>\r
74 </div>\r
75 <%= javascript_tag 'var server_result=' + @server_result.to_json + ';' %>\r
76 \r
77 </body>\r
78 </html>\r