OSDN Git Service

try sort
[pettanr/pettanr.git] / app / views / layouts / test.html.erb
index 6f902e3..7279ce5 100644 (file)
@@ -1,8 +1,16 @@
 <!DOCTYPE html>\r
 <html>\r
 <head>\r
-  <title>Pettanr</title>\r
+  <title>\r
+    <% if @page_title %>\r
+      <%= h @page_title %>\r
+    <% else %>\r
+      <%= t("#{params[:controller]}.#{params[:action]}.title") %>\r
+    <% end %>\r
+    - <%= h(MagicNumber['profile']['users']['caption']) %>\r
+  </title>\r
   <%= stylesheet_link_tag "test.css" %>\r
+  <%= stylesheet_link_tag "jquery-ui.css" %>\r
   <%= javascript_include_tag "application" %>\r
   <%= csrf_meta_tags %>\r
 </head>\r
 <div width="100%">\r
 <table class="no-border">\r
   <tr>\r
-    <td width="80%">\r
-      <h3>PettanR</h3>\r
+    <td width="50%">\r
+      <h3><%= link_to MagicNumber['profile']['users']['caption'], main_app.root_path %></h3>\r
+    </td>\r
+    <td width="30%">\r
+      <% if user_signed_in? %>\r
+        <%= link_to t('top.metro.title'), '/top/metro' %>\r
+      <% end %>\r
     </td>\r
     <td>\r
       <div>\r
-        <%= link_to h(truncate(@author.name, :length => 12)), main_app.author_path(@author) %>\r
+        <% if @author %>\r
+          <%= link_to h(truncate(@author.name, :length => 12)), main_app.author_path(@author) %>\r
+        <% end %>\r
       </div>\r
       <div>\r
         <% if @artist %>\r
       </div>\r
     </td>\r
     <td>\r
-      <%= link_to t('home.configure.title'), '/home/configure' %>\r
-      <%= link_to t('home.sign_out.title'), main_app.destroy_user_session_path, :method => :delete %>\r
-    </td>\r
+      <% if user_signed_in? %>\r
+        <%= link_to t('home.configure.title'), '/home/configure' %>\r
+        <%= link_to t('home.sign_out.title'), main_app.destroy_user_session_path, :method => :delete %>\r
+      <% else %>\r
+        <%= link_to "sign in", main_app.new_user_session_path %>\r
+      <% end %>\r
+  </td>\r
   </tr>\r
 </table>\r
 </div>\r
   <%= link_to t_m('Author'), main_app.authors_path %>\r
   <%= link_to t_m('Artist'), main_app.artists_path %>\r
 </div>\r
-<div width="100%" style="background-color: #fadddd; padding: 5px;">\r
-  <% if user_signed_in? %>\r
+<% if @author %>\r
+  <div width="100%" style="background-color: #fadddd; padding: 5px;">\r
     <%= link_to t('tab.creator.home'), '/home' %>\r
-    <%= link_to t('tab.creator.comic'), '/home/comic' %>\r
-    <%= link_to t('tab.creator.panel'), '/home/panel' %>\r
+    <%= link_to t('tab.creator.comic'), '/home/comics' %>\r
+    <%= link_to t('tab.creator.panel'), '/home/panels' %>\r
     <% if @artist %>\r
       <%= link_to t('tab.creator.picture'), main_app.original_pictures_path %>\r
     <% end %>\r
+  </div>\r
+<% end %>\r
+<%= yield %>\r
+<div width="100%" style="background-color: #faddfa; padding: 5px;">\r
+  <%= link_to t('tab.demander.title'), main_app.demanders_path %>\r
+  <% if demand_user_signed_in? %>\r
+    <%= link_to t_m('Demander'), main_app.demanders_path %>\r
+    <%= link_to t('home.sign_out.title'), main_app.destroy_demand_user_session_path, :method => :delete %>\r
   <% else %>\r
-    <%= link_to "sign in", main_app.new_user_session_path %>\r
+    <%= link_to t('home.sign_in.title'), main_app.new_demand_user_session_path %>\r
   <% end %>\r
 </div>\r
-<%= yield %>\r
 <div width="100%" style="background-color: #ddddfa; padding: 5px;">\r
+  <%= link_to t('tab.system.title'), '/system' %>\r
   <% if admin_signed_in? %>\r
-    <%= link_to t('tab.system.title'), '/system' %>\r
-    <%= link_to "browse", '/system/browse' %>\r
-    <%= link_to "approve", '/system/waiting_list' %>\r
-    <%= link_to "token", '/system/auth_token' %>\r
-    layout:\r
-    <%= link_to "test", '/system/test_layout' %>\r
-    <%= link_to "production", '/system/production_layout' %>\r
-    <%= link_to "sign out", main_app.destroy_admin_session_path, :method => :delete %>\r
+    <%= link_to t('tab.system.browse'), '/system/browse' %>\r
+    <%= link_to t('tab.system.approve'), '/system/waiting_list' %>\r
+    <%= link_to t('tab.system.port'), '/system/import' %>\r
+    <%= link_to t('tab.system.token'), '/system/auth_token' %>\r
+    <%= t('tab.system.layout') %>:\r
+    <%= link_to t('tab.system.test'), '/system/test_layout' %>\r
+    <%= link_to t('tab.system.production'), '/system/production_layout' %>\r
+    <%= link_to t('home.sign_out.title'), main_app.destroy_admin_session_path, :method => :delete %>\r
   <% else %>\r
-    <%= link_to "sign in", main_app.new_admin_session_path %>\r
+    <%= link_to t('home.sign_in.title'), main_app.new_admin_session_path %>\r
   <% end %>\r
 </div>\r
 <%= javascript_tag 'var server_result=' + @server_result.to_json + ';' %>\r