OSDN Git Service

t#30143:au and ar change
[pettanr/pettanr.git] / app / views / home / configure.html.erb
index 02196cd..70dea5c 100644 (file)
@@ -1,15 +1,42 @@
-<h2>認証トークン</h2>
-<div>
-あなたの認証トークンは<%= @user.authentication_token %>です
-</div>
-<div>
-  <% if @user.authentication_token %>
-    <%= link_to 'delete token', :action => :delete_token %>
-  <% else %>
-    <%= link_to 'generate token', :action => :create_token %>
-  <% end %>
-</div>
-<h2>退会</h2>
-<div>
-  <%= link_to('退会する', {:controller => 'user_registrations', :action => :destroy, :id => @user.id}, {:method => :delete}) %>
-</div>
+<h1><%= t '.title' -%></h1>
+<p id="notice"><%= notice %></p>
+
+<%= t('home.configure.caption', :email => @user.email) %>
+<table class="no-border" width="100%">
+  <tr>
+    <td width="70%">
+      <h2><%= t 'home.configure.password_caption' -%></h2>
+      <%= render '/users/registrations/form', :resource => @user %>
+      <h2><%= t 'home.configure.token_caption' -%></h2>
+      <% if @user.authentication_token %>
+        <div><%= t 'home.configure.your_token', :token => @user.authentication_token -%></div>
+        <%= link_to t('home.configure.delete_token'), :action => :delete_token %>
+      <% else %>
+        <div><%= t 'home.configure.about_token' -%></div>
+        <%= link_to t('home.configure.generate_token'), :action => :create_token %>
+      <% end %>
+      <h2><%= t 'home.configure.cancel_caption' -%></h2>
+      <%= link_to t('home.configure.cancel_account'), registration_path('user'), :confirm => "Are you sure?", :method => :delete %>
+    </td>
+    <td width="30%">
+      <h2><%= t_m 'Author' -%></h2>
+      <% if @author %>
+        <%= render '/authors/form', :au => @author %>
+      <% else %>
+        <div><%= t 'home.configure.no_author' -%></div>
+        <div><%= t 'home.configure.about_author' -%></div>
+        <% @au = Author.new ; @au.supply_default %>
+        <%= render '/authors/form', :au => @au %>
+      <% end %>
+      <h2><%= t_m 'Artist' -%></h2>
+      <% if @artist %>
+        <%= render '/artists/form', :ar => @artist %>
+      <% else %>
+        <div><%= t 'home.configure.no_artist' -%></div>
+        <div><%= t 'home.configure.about_artist' -%></div>
+        <% @ar = Artist.new ; @ar.supply_default %>
+        <%= render '/artists/form', :ar => @ar %>
+      <% end %>
+    </td>
+  </tr>
+</table>