个人主页

This commit is contained in:
yutao 2015-07-18 12:50:44 +08:00
parent 8ca7444792
commit f4b88dce70
3 changed files with 9 additions and 5 deletions

View File

@ -12,6 +12,8 @@ class UserExtensions < ActiveRecord::Base
belongs_to :user
belongs_to :school, :class_name => 'School', :foreign_key => :school_id
attr_accessible :user_id,:birthday,:brief_introduction,:gender,:location,:occupation,:work_experience,:zip_code,:identity, :technical_title,:student_id
validates_length_of :description, :maximum => 255
validates_length_of :brief_introduction, :maximum => 255
TEACHER = 0
STUDENT = 1
ENTERPRISE = 2

View File

@ -17,7 +17,7 @@
<div class="users_dis" id="users_tbc_01">
<% if( @act.nil? || @act != 'password') %>
<%= render_flash_messages %>
<%= error_messages_for 'user' %>
<%= error_messages_for 'user',@user.user_extensions %>
<% end %>
<ul class="setting_left">
<li>登录名&nbsp;:&nbsp;</li>
@ -141,8 +141,8 @@
<%= select_tag( 'user[mail_notification]', options_for_select( user_mail_notification_options(@user), @user.mail_notification) ) %>
<label>不要发送对我自己提交的修改的通知<%= check_box_tag 'no_self_notified', 1, @user.pref[:no_self_notified],:style=>"height:14px;" %></label>
</li>
<li><input name="brief_introduction" class="w450" type="text" value="<%= (@user.user_extensions.nil?) ? '' : @user.user_extensions.brief_introduction %>"></li>
<li style="height:auto;"><textarea name="description" class="w450 h200" style="resize:none;"><%= (@user.user_extensions.nil?) ? '' : @user.user_extensions.description %></textarea></li>
<li><input name="brief_introduction" class="w450" type="text" maxlength="255" value="<%= (@user.user_extensions.nil?) ? '' : @user.user_extensions.brief_introduction %>"></li>
<li style="height:auto;"><textarea name="description" class="w450 h200" maxlength="255" style="resize:none;"><%= (@user.user_extensions.nil?) ? '' : @user.user_extensions.description %></textarea></li>
<li style="display:none;"><%= f.select :language, :Chinese => :zh, :English => :en %></li>
<li class="ml2">
<a href="javascript:;" id="my_account_form_link" class="blue_btn fl">确认</a>

View File

@ -31,9 +31,11 @@ zh:
label_account_identity_developer: 开发者
label_account_identity_enterprise: 组织
label_account_identity_studentID: 请输入学号
field_brief_introduction_my: 个人签名
field_description: 个人简介
field_is_required: 必填
field_firstname: 名字
field_firstname: 名字或组织名
firstname_empty: 名字不能为空
field_firstname_eg: '(例:张三丰,请填写[三丰])'
field_lastname: 姓氏