OSDN Git Service

4e1115bad16e79eac99881d4390dc6722bd557d7
[pettanr/pettanr.git] / app / views / layouts / test.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(MagicNumber['profile']['users']['caption']) %>\r
11   </title>\r
12   <%= stylesheet_link_tag "test.css" %>\r
13   <%= javascript_include_tag "application" %>\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 MagicNumber['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 @author %>\r
32           <%= link_to h(truncate(@author.name, :length => 12)), main_app.author_path(@author) %>\r
33         <% end %>\r
34       </div>\r
35       <div>\r
36         <% if @artist %>\r
37           <%= link_to h(truncate(@artist.name, :length => 12)), main_app.artist_path(@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   </td>\r
49   </tr>\r
50 </table>\r
51 </div>\r
52 <div width="100%" style="background-color: #ddfadd; padding: 5px;">\r
53   <%= link_to t('tab.reader.title'), '/' %>\r
54   <%= link_to t_m('Comic'), main_app.comics_path %>\r
55   <%= link_to t_m('Panel'), main_app.panels_path %>\r
56   <%= link_to t_m('ResourcePicture'), main_app.resource_pictures_path %>\r
57    : \r
58   <%= link_to t_m('Author'), main_app.authors_path %>\r
59   <%= link_to t_m('Artist'), main_app.artists_path %>\r
60 </div>\r
61 <% if @author %>\r
62   <div width="100%" style="background-color: #fadddd; padding: 5px;">\r
63     <%= link_to t('tab.creator.home'), '/home' %>\r
64     <%= link_to t('tab.creator.comic'), '/home/comics' %>\r
65     <%= link_to t('tab.creator.panel'), '/home/panels' %>\r
66     <% if @artist %>\r
67       <%= link_to t('tab.creator.picture'), main_app.original_pictures_path %>\r
68     <% end %>\r
69   </div>\r
70 <% end %>\r
71 <%= yield %>\r
72 <div width="100%" style="background-color: #faddfa; padding: 5px;">\r
73   <%= link_to t('tab.demander.title'), main_app.demanders_path %>\r
74   <% if demand_user_signed_in? %>\r
75     <%= link_to t_m('Demander'), main_app.demanders_path %>\r
76     <%= link_to t('home.sign_out.title'), main_app.destroy_demand_user_session_path, :method => :delete %>\r
77   <% else %>\r
78     <%= link_to t('home.sign_in.title'), main_app.new_demand_user_session_path %>\r
79   <% end %>\r
80 </div>\r
81 <div width="100%" style="background-color: #ddddfa; padding: 5px;">\r
82   <%= link_to t('tab.system.title'), '/system' %>\r
83   <% if admin_signed_in? %>\r
84     <%= link_to t('tab.system.browse'), '/system/browse' %>\r
85     <%= link_to t('tab.system.approve'), '/system/waiting_list' %>\r
86     <%= link_to t('tab.system.port'), '/system/import' %>\r
87     <%= link_to t('tab.system.token'), '/system/auth_token' %>\r
88     <%= t('tab.system.layout') %>:\r
89     <%= link_to t('tab.system.test'), '/system/test_layout' %>\r
90     <%= link_to t('tab.system.production'), '/system/production_layout' %>\r
91     <%= link_to t('home.sign_out.title'), main_app.destroy_admin_session_path, :method => :delete %>\r
92   <% else %>\r
93     <%= link_to t('home.sign_in.title'), main_app.new_admin_session_path %>\r
94   <% end %>\r
95 </div>\r
96 <%= javascript_tag 'var server_result=' + @server_result.to_json + ';' %>\r
97 \r
98 </body>\r
99 </html>\r