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> <div class="side">
<b><%=t 'user.name' %>:</b> <h2>个人中心</h2>
<%= @user.name %> <div class="avatar"><%= @user.avatar %></div>
</p> <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> <li><a href="memcp.php?action=profile&amp;typeid=5">论坛个性化设定</a></li>
<b><%=t 'user.email' %>:</b> </ul>
<%= @user.email %> </div>
</p> <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> <ul>
<b><%=t 'user.credit' %>:</b> <% @user.errors.full_messages.each do |msg| %>
<%= @user.credit %> <li><%= msg %></li>
</p> <% 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) %> | <% else %>
<%= link_to 'Back', users_path %>
<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 ...@@ -4,12 +4,16 @@ Reliz::Application.routes.draw do
resources :boards resources :boards
resources :topics resources :topics
resources :posts resources :posts
resources :users resources :users do
get 'pms' => "pms#index"
get 'topics' => "users#topic"
end
get 'theme/:theme' => 'users#theme', :as => :theme get 'theme/:theme' => 'users#theme', :as => :theme
get 'login' => 'users#login' get 'login' => 'users#login'
post 'login' => 'users#login_do' post 'login' => 'users#login_do'
get 'logout' => 'users#logout' get 'logout' => 'users#logout'
get 'register' => 'users#new' get 'register' => 'users#new'
resources :pms
resources :links resources :links
resources :moderations resources :moderations
......
This diff is collapsed.
7748 6068
\ No newline at end of file \ 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