Commit 28badc3e authored by 神楽坂玲奈's avatar 神楽坂玲奈

用户中心初步

git-svn-id: http://glupx.googlecode.com/svn/trunk/Reliz@83 189f022a-1064-8ae2-3e6f-c4a67275c50b
parent 2d2bf8cb
<p id="notice"><%= notice %></p>
<% if @user == @corrent_user %>
<p>
<b><%=t 'user.name' %>:</b>
<%= @user.name %>
</p>
<div class="side">
<h2>个人中心</h2>
<div class="avatar"><%= @user.avatar %></div>
<ul class="tabs">
<li><%= link_to '个人资料', @user %></li>
<li><%= link_to '短消息', pms_path %></li>
<!--<li><a href="notice.php">提醒</a></li>
<li><a href="my.php?item=buddylist&amp;">我的好友</a></li>
<li><a href="http://www.touhou.cc/blog/space.php?uid=359" target="_blank">我的空间</a></li>-->
<hr class="shadowline">
<p>
<b><%=t 'user.email' %>:</b>
<%= @user.email %>
</p>
<li><a href="memcp.php?action=profile&amp;typeid=5">论坛个性化设定</a></li>
</ul>
</div>
<div id="content">
<%= form_for(@user) do |f| %>
<% if @user.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@user.errors.count, "error") %> prohibited this user from being saved:</h2>
<p>
<b><%=t 'user.credit' %>:</b>
<%= @user.credit %>
</p>
<ul>
<% @user.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="field">
<%= f.label t 'user.avatar' %>
修改头像请到 <%= link_to "http://gravatar.com" %>
</div>
<div class="field">
<%= f.label t 'user.nickname' %>
<%= f.text_field :nickname %>
</div>
<div class="field">
<%= f.label t 'user.password' %>
<%= f.text_field :password %>
</div>
<div class="field">
<%= f.label t 'user.email' %>
<%= f.text_field :email %>
</div>
<div class="field">
<%= f.label t 'user.credit' %>
<%= @user.credit %>
</div>
<div class="actions">
<%= f.submit %>
</div>
<% end %>
</div>
<%= link_to 'Edit', edit_user_path(@user) %> |
<%= link_to 'Back', users_path %>
<% else %>
<p id="notice"><%= notice %></p>
<p>
<b><%=t 'user.name' %>:</b>
<%= @user.name %>
</p>
<p>
<b><%=t 'user.email' %>:</b>
<%= @user.email %>
</p>
<p>
<b><%=t 'user.credit' %>:</b>
<%= @user.credit %>
</p>
<% end %>
\ No newline at end of file
......@@ -4,12 +4,16 @@ Reliz::Application.routes.draw do
resources :boards
resources :topics
resources :posts
resources :users
resources :users do
get 'pms' => "pms#index"
get 'topics' => "users#topic"
end
get 'theme/:theme' => 'users#theme', :as => :theme
get 'login' => 'users#login'
post 'login' => 'users#login_do'
get 'logout' => 'users#logout'
get 'register' => 'users#new'
resources :pms
resources :links
resources :moderations
......
This diff is collapsed.
7748
\ No newline at end of file
6068
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment