修改版本库

This commit is contained in:
Administrator 2013-08-15 10:52:11 +08:00
parent 87ea299297
commit 90885a4eb5
5 changed files with 5 additions and 21 deletions

View File

@ -50,28 +50,10 @@ class MyController < ApplicationController
def account
@user = User.current
@pref = @user.pref
#Modified by young
unless @user.change_password_allowed?
flash[:error] = l(:notice_can_t_change_password)
redirect_to my_account_path
return
end
#Ended by young
if request.post?
@user.safe_attributes = params[:user]
@user.pref.attributes = params[:pref]
@user.pref[:no_self_notified] = (params[:no_self_notified] == '1')
#Added by young
if @user.check_password?(params[:password])
@user.password, @user.password_confirmation = params[:new_password], params[:new_password_confirmation]
if @user.save
flash[:notice] = l(:notice_account_password_updated)
# redirect_to my_account_path
end
else
flash[:error] = l(:notice_account_wrong_password)
end
#Ended by young
if @user.save
@user.pref.save
@user.notified_project_ids = (@user.mail_notification == 'selected' ? params[:notified_project_ids] : [])

View File

@ -22,7 +22,7 @@ border:none
<% end %>
</p>
<p><%= f.check_box :is_default, :label => :field_repository_is_default %></p>
<p><%= f.text_field :identifier, :required=>true, :disabled => @repository.identifier_frozen? %>
<p><%= f.text_field :identifier, :required=>true, :disabled => @repository.identifier_frozen?, :label => l(:label_repository_name) %>
<% unless @repository.identifier_frozen? %>
<em class="info"><%= l(:text_length_between, :min => 1, :max => Repository::IDENTIFIER_MAX_LENGTH) %>
<%= l(:text_repository_identifier_info).html_safe %></em>

View File

@ -137,7 +137,7 @@ software development and software crowdsourcing.</td></tr>
<!--add by huang-->
<!--add by huang-->
<div style="height:250px;">
<div style="height:230px;">
<div class="welcone_left">
<table width="350px">
<tr>

View File

@ -1245,3 +1245,4 @@ en:
label_tags_numbers: Tag numbers
label_max_number: Must be at most 25 characters long.
label_all_revisions: All revisions
label_repository_name: Repository name

View File

@ -1059,6 +1059,7 @@ zh:
label_repository_new: 连接到已有的SVN版本库
label_repository_no: 还没有版本库?
label_repository_new_repos: 新建版本库
label_repository_name: 版本库名
#end
field_repository_is_default: 主版本库
label_copy_attachments: 复制附件