OSDN Git Service

merge i18n
authoryasushiito <yas@pen-chan.jp>
Fri, 7 Dec 2012 09:24:06 +0000 (18:24 +0900)
committeryasushiito <yas@pen-chan.jp>
Fri, 7 Dec 2012 09:24:06 +0000 (18:24 +0900)
1  2 
app/controllers/application_controller.rb
app/views/layouts/system.html.erb
app/views/layouts/test.html.erb
config/magic_number.yml
config/routes.rb
spec/controllers/comics_controller_spec.rb
spec/factories.rb
spec/models/comic_spec.rb

  <% end %>
  </div>
  <div>
-  <p class="notice"><%= notice %></p>
-  <p class="alert"><%= alert %></p>
 -user.resources
 -<%= link_to 'comics', main_app.comics_path %>
 -<%= link_to 'stories', main_app.new_story_path %>
 -<%= link_to 'panels', main_app.panels_path %>
 -<%= link_to 'original_pictures', main_app.original_pictures_path %>
 -<%= link_to 'resource_pictures', main_app.resource_pictures_path %>
 -<%= link_to 'panel_pictures', main_app.panel_pictures_path %>
 - : 
 -<%= link_to 'authors', main_app.authors_path %>
 -<%= link_to 'artists', main_app.artists_path %>
++  user.resources
++  <%= link_to 'comics', main_app.comics_path %>
++  <%= link_to 'stories', main_app.new_story_path %>
++  <%= link_to 'panels', main_app.panels_path %>
++  <%= link_to 'original_pictures', main_app.original_pictures_path %>
++  <%= link_to 'resource_pictures', main_app.resource_pictures_path %>
++  <%= link_to 'panel_pictures', main_app.panel_pictures_path %>
++   : 
++  <%= link_to 'authors', main_app.authors_path %>
++  <%= link_to 'artists', main_app.artists_path %>
  </div>
  <div>
 -system.resources
 -<%= link_to 'speech_balloon_templates', main_app.speech_balloon_templates_path %>
 -<%= link_to 'license_groups', main_app.license_groups_path %>
 -<%= link_to 'licenses', main_app.licenses_path %>
 -<%= link_to 'colors', main_app.colors_path %>
 -<%= link_to 'system_pictures', main_app.system_pictures_path %>
++  system.resources
++  <%= link_to 'speech_balloon_templates', main_app.speech_balloon_templates_path %>
++  <%= link_to 'license_groups', main_app.license_groups_path %>
++  <%= link_to 'licenses', main_app.licenses_path %>
++  <%= link_to 'colors', main_app.colors_path %>
++  <%= link_to 'system_pictures', main_app.system_pictures_path %>
+ </div>
+ <%= yield %>
++<div>
 +  <%= link_to "browse", '/system/browse' %>
 +  <%= link_to "approve", '/system/waiting_list' %>
 +  <%= link_to "import", '/system/import' %>
 +  <%= link_to "token", '/system/auth_token' %>
 +</div>
- <%= yield %>
+ <%= javascript_tag 'var server_result=' + @server_result.to_json + ';' %>
  
  </body>
  </html>
@@@ -8,58 -8,66 +8,75 @@@
  </head>\r
  <body>\r
  \r
- <div>\r
- <% if user_signed_in? %>\r
-   <%= link_to "my home", '/home' %>\r
-   <%= link_to 'my comics', '/home/comic' %>\r
-   <%= link_to 'my panels', '/home/panel' %>\r
-   <%= link_to 'my pictures', main_app.original_pictures_path %>\r
-   <%= link_to 'my panel pictures', '/home/panel_picture' %>\r
-   <%= link_to 'configure', '/home/configure' %>\r
-   <%= link_to "sign out", main_app.destroy_user_session_path, :method => :delete %>\r
- <% else %>\r
-   <%= link_to "sign in", main_app.new_user_session_path %>\r
- <% end %>\r
+ <div width="100%">\r
+ <table class="no-border">\r
+   <tr>\r
+     <td width="80%">\r
+       <h3>PettanR</h3>\r
+     </td>\r
+     <td>\r
+       <div>\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
+           <%= link_to h(truncate(@artist.name, :length => 12)), main_app.artist_path(@artist) %>\r
+         <% end %>\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
+   </tr>\r
+ </table>\r
  </div>\r
- <div>\r
- <% if admin_signed_in? %>\r
-   <%= link_to "system", '/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
- <% else %>\r
-   <%= link_to "sign in", main_app.new_admin_session_path %>\r
- <% end %>\r
+ <div width="100%" style="background-color: #ddfadd; padding: 5px;">\r
+   <%= link_to t('tab.reader.title'), '/' %>\r
+   <%= link_to t_m('Comic'), main_app.comics_path %>\r
+   <%= link_to t_m('Panel'), main_app.panels_path %>\r
+   <%= link_to t_m('ResourcePicture'), main_app.resource_pictures_path %>\r
+    : \r
+   <%= link_to t_m('Author'), main_app.authors_path %>\r
+   <%= link_to t_m('Artist'), main_app.artists_path %>\r
  </div>\r
- <div>\r
-  <p class="notice"><%= notice %></p>\r
-  <p class="alert"><%= alert %></p>\r
- <%= link_to 'comics', main_app.comics_path %>\r
- <%= link_to 'stories', main_app.new_story_path %>\r
- <%= link_to 'panels', main_app.panels_path %>\r
- <%= link_to 'original_pictures', main_app.original_pictures_path %>\r
- <%= link_to 'resource_pictures', main_app.resource_pictures_path %>\r
- <%= link_to 'panel_pictures', main_app.panel_pictures_path %>\r
-  : \r
- <%= link_to 'speech_balloon_templates', main_app.speech_balloon_templates_path %>\r
- <%= link_to 'colors', main_app.colors_path %>\r
-  : \r
- <%= link_to 'artists', main_app.artists_path %>\r
- <%= link_to 'system_pictures', main_app.system_pictures_path %>\r
+ <div width="100%" style="background-color: #fadddd; padding: 5px;">\r
+   <% if user_signed_in? %>\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
+     <% if @artist %>\r
+       <%= link_to t('tab.creator.picture'), main_app.original_pictures_path %>\r
+     <% end %>\r
+   <% else %>\r
+     <%= link_to "sign in", main_app.new_user_session_path %>\r
+   <% end %>\r
  </div>\r
  <%= yield %>\r
- demanders\r
- <% if demand_user_signed_in? %>\r
-   <%= link_to "demanders", main_app.demanders_path %>\r
-   <%= link_to "sign out", main_app.destroy_demand_user_session_path, :method => :delete %>\r
- <% else %>\r
-   <%= link_to "sign in", main_app.new_demand_user_session_path %>\r
- <% end %>\r
 +<div>\r
++  demanders\r
++  <% if demand_user_signed_in? %>\r
++    <%= link_to "demanders", main_app.demanders_path %>\r
++    <%= link_to "sign out", main_app.destroy_demand_user_session_path, :method => :delete %>\r
++  <% else %>\r
++    <%= link_to "sign in", main_app.new_demand_user_session_path %>\r
++  <% end %>\r
++</div>\r
+ <div width="100%" style="background-color: #ddddfa; padding: 5px;">\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
+   <% else %>\r
+     <%= link_to "sign in", main_app.new_admin_session_path %>\r
+   <% end %>\r
  </div>\r
  <%= javascript_tag 'var server_result=' + @server_result.to_json + ';' %>\r
  \r
@@@ -3,10 -3,6 +3,11 @@@
    thumbnail_width: 64
    thumbnail_height: 64
  
-   comic_visible_items: [['private', 0], ['public', 1]]
 +  provider_status_items: [['waiting', 0], ['receiving', 1]]
 +  demander_status_items: [['waiting', 0], ['rejected', 1], ['requesting', 2], ['approved', 3]]
 +  
+   comic_visible_items: [['select_items.comic.visible.private', 0], ['select_items.comic.visible.public', 1]]
+   panel_visible_items: [['select_items.panel.visible.private', 0], ['select_items.panel.visible.public', 1]]
    ground_picture_repeat_items: ['repeat', 'repeat-x', 'repeat-y', 'no-repeat']
 +
 +  provider_sources: ['http://sourceforge.jp/projects/pettanr/wiki/ProviderSource/attach/provider_source.json']
@@@ -1,8 -1,7 +1,8 @@@
  Pettanr::Application.routes.draw do
  
-   devise_for :users , :controllers => { :registrations => "user_registrations" }
+   devise_for :users
    devise_for :admins
 +  devise_for :demand_users
    
    Pettanr::Application.licenses.each do |name, klass|
      mount Module.const_get(klass)::Engine => "/#{name}"
@@@ -15,15 -13,8 +15,15 @@@ FactoryGirl.define d
    #  user.author FactoryGirl.create(:author_yas)
    end
  
 +  factory :demand_user, :class => DemandUser do |demand_user|
 +    demand_user.sequence(:email) { |n| "hoge#{n}@gmail.com"}
 +    demand_user.password "user0100"
 +    demand_user.password_confirmation "user0100"
 +  #  user.author FactoryGirl.create(:author_yas)
 +  end
 +
    factory :author, :class => Author do |author|
-     author.name nil
+     author.name 'test'
      author.sequence(:user_id) { |n| n}
    end
  
Simple merge