Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
722a568466
|
@ -5,11 +5,10 @@
|
||||||
<div class="splitcontent" style="display: block;">
|
<div class="splitcontent" style="display: block;">
|
||||||
<div class="splitcontentleft">
|
<div class="splitcontentleft">
|
||||||
<% if @issue.safe_attribute?('status_id') && @allowed_statuses.present? %>
|
<% if @issue.safe_attribute?('status_id') && @allowed_statuses.present? %>
|
||||||
<p><%= f.select :status_id, (@allowed_statuses.collect {|p| [p.name, p.id]}), {:required => true},
|
<p><%= f.select :status_id, (@allowed_statuses.collect {|p| [p.name, p.id]}), {:required => true}, :onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')" %></p>
|
||||||
:onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')" %></p>
|
|
||||||
|
|
||||||
<% else %>
|
<% else %>
|
||||||
<p><label><%= l(:field_status) %></label> <%= h(@issue.status.name) %></p>
|
<p><label><%= l(:field_status) %></label> <%= h(@issue.status.name) %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% if @issue.safe_attribute? 'priority_id' %>
|
<% if @issue.safe_attribute? 'priority_id' %>
|
||||||
|
@ -46,10 +45,28 @@
|
||||||
<% if @issue.safe_attribute? 'estimated_hours' %>
|
<% if @issue.safe_attribute? 'estimated_hours' %>
|
||||||
<p><%= f.text_field :estimated_hours, :size => 3, :disabled => !@issue.leaf?, :required => @issue.required_attribute?('estimated_hours') %> <%= l(:field_hours) %></p>
|
<p><%= f.text_field :estimated_hours, :size => 3, :disabled => !@issue.leaf?, :required => @issue.required_attribute?('estimated_hours') %> <%= l(:field_hours) %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function PrecentChange(obj){
|
||||||
|
var _v= obj;
|
||||||
|
if(_v==100)
|
||||||
|
{
|
||||||
|
//alert(3);
|
||||||
|
}
|
||||||
|
else if(_v==0)
|
||||||
|
{
|
||||||
|
//alert(1);
|
||||||
|
}
|
||||||
|
else if(_v!=100&&_v!=0)
|
||||||
|
{
|
||||||
|
// alert(2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<% if @issue.safe_attribute?('done_ratio') && @issue.leaf? && Issue.use_field_for_done_ratio? %>
|
||||||
|
<p><%= f.select :done_ratio, ((0..10).to_a.collect {|r| ["#{r*10} %", r*10] }), {:required => @issue.required_attribute?('done_ratio')},
|
||||||
|
{:onchange => "PrecentChange(this.value)"} %></p>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<% if @issue.safe_attribute?('done_ratio') && @issue.leaf? && Issue.use_field_for_done_ratio? %>
|
|
||||||
<p><%= f.select :done_ratio, ((0..10).to_a.collect {|r| ["#{r*10} %", r*10] }), :required => @issue.required_attribute?('done_ratio') %></p>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
|
@ -8,10 +8,13 @@
|
||||||
<p style="padding-right: 20px;">
|
<p style="padding-right: 20px;">
|
||||||
<%= f.text_area :description, :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;" %>
|
<%= f.text_area :description, :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;" %>
|
||||||
</p><!--by young-->
|
</p><!--by young-->
|
||||||
<p><%= f.text_field :identifier, :required => true, :size => 60, :style => "width:488px;", :disabled => @project.identifier_frozen?, :maxlength => Project::IDENTIFIER_MAX_LENGTH %>
|
|
||||||
|
<p style="display: none"><%= f.text_field :identifier, :required => true, :size => 60, :style => "width:488px;", :disabled => @project.identifier_frozen?, :maxlength => Project::IDENTIFIER_MAX_LENGTH,
|
||||||
|
value:"#{User.current.id.to_s + '_' +format_time(Time.now).to_s}" %>
|
||||||
<% unless @project.identifier_frozen? %>
|
<% unless @project.identifier_frozen? %>
|
||||||
<em class="info"><%= l(:text_length_between, :min => 1, :max => Project::IDENTIFIER_MAX_LENGTH) %> <%= l(:text_project_identifier_info).html_safe %></em>
|
<em class="info"><%= l(:text_length_between, :min => 1, :max => Project::IDENTIFIER_MAX_LENGTH) %> <%= l(:text_project_identifier_info).html_safe %></em>
|
||||||
<% end %></p>
|
<% end %></p>
|
||||||
|
|
||||||
<!-- <p style="margin-left:-10px;"><%#= f.text_field :homepage, :size => 60, :style => "width:488px;margin-left: 10px;" %></p> --> <!-- by huang -->
|
<!-- <p style="margin-left:-10px;"><%#= f.text_field :homepage, :size => 60, :style => "width:488px;margin-left: 10px;" %></p> --> <!-- by huang -->
|
||||||
<p style="margin-left:-10px;"><em style ="color: #888888;display: block;font-size: 90%;font-style: normal;"><%= f.check_box :is_public, :style => "margin-left:10px;" %></em></p>
|
<p style="margin-left:-10px;"><em style ="color: #888888;display: block;font-size: 90%;font-style: normal;"><%= f.check_box :is_public, :style => "margin-left:10px;" %></em></p>
|
||||||
<p style="margin-left:-10px;"><em style ="color: #888888;display: block;font-size: 90%;font-style: normal;"><%= f.check_box :hidden_repo, :style => "margin-left:10px;" %></em></p>
|
<p style="margin-left:-10px;"><em style ="color: #888888;display: block;font-size: 90%;font-style: normal;"><%= f.check_box :hidden_repo, :style => "margin-left:10px;" %></em></p>
|
||||||
|
|
|
@ -11,13 +11,14 @@
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p><%= f.check_box :is_default, :label => :field_repository_is_default %></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 style="display: none"><%= f.text_field :identifier, :required => true, :disabled => @repository.identifier_frozen?,
|
||||||
|
value:"#{User.current.id.to_s + '_' +format_time(Time.now).to_s}"%>
|
||||||
<% unless @repository.identifier_frozen? %>
|
<% 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>
|
<em class="info" ><%= l(:text_length_between, :min => 1, :max => Repository::IDENTIFIER_MAX_LENGTH) %> <%= l(:text_repository_identifier_info).html_safe %></em>
|
||||||
<% end %></p>
|
<% end %></p>
|
||||||
|
|
||||||
<!--Modified by tanxianbo-->
|
<!--Modified by tanxianbo-->
|
||||||
<p><%= f.text_field :url, :size => 60, :required => true, :disabled => !@repository.safe_attribute?('url') %>
|
<p><%= f.text_field :url, :size => 60, :required => true, :disabled => !@repository.safe_attribute?('url'), :id => "url_text_field" %>
|
||||||
<em class='info'><%= "#{l(:label_exist_repository_path)}" %></em>
|
<em class='info'><%= "#{l(:label_exist_repository_path)}" %></em>
|
||||||
</p>
|
</p>
|
||||||
<p><%= f.text_field :login, :size => 30 %></p>
|
<p><%= f.text_field :login, :size => 30 %></p>
|
||||||
|
@ -27,6 +28,7 @@
|
||||||
</div>
|
</div>
|
||||||
<!--Ended by tanxianbo-->
|
<!--Ended by tanxianbo-->
|
||||||
<p>
|
<p>
|
||||||
<%= submit_tag(@repository.new_record? ? l(:button_create) : l(:button_save)) %>
|
<%#= submit_tag(@repository.new_record? ? l(:button_create) : l(:button_save)) %>
|
||||||
|
<input type="button" class="enterprise" value="<%= @repository.new_record? ? l(:button_create) : l(:button_save) %>" onclick="createVersion();"/>
|
||||||
<%= link_to l(:button_cancel), settings_project_path(@project, :tab => 'repositories') %>
|
<%= link_to l(:button_cancel), settings_project_path(@project, :tab => 'repositories') %>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -1,5 +1,23 @@
|
||||||
<h3><%= l(:label_repository_new) %></h3>
|
<h3><%= l(:label_repository_new) %></h3>
|
||||||
|
<script type="text/javascript">
|
||||||
|
//var re=new RegExp(strRegex);
|
||||||
|
function createVersion(){
|
||||||
|
var re =new RegExp("^(https|http|file|svn)[?:]{1}/{1}/{1}.*$");
|
||||||
|
var strRegex = /^([https|http|file|svn]:){1}.*$/;
|
||||||
|
var name = $("#url_text_field").val();
|
||||||
|
if(name == "")
|
||||||
|
{
|
||||||
|
alert("URL不能为空");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else if(!re.test(name))
|
||||||
|
{
|
||||||
|
alert("URL路径不正确");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$("#repository-form").submit();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
<%= labelled_form_for :repository, @repository, :url => project_repositories_path(@project), :html => {:id => 'repository-form'} do |f| %>
|
<%= labelled_form_for :repository, @repository, :url => project_repositories_path(@project), :html => {:id => 'repository-form'} do |f| %>
|
||||||
<%= render :partial => 'form', :locals => {:f => f} %>
|
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -1557,7 +1557,7 @@ zh:
|
||||||
label_welcome_page_to: 参与了 %{project_count} 个项目!
|
label_welcome_page_to: 参与了 %{project_count} 个项目!
|
||||||
label_repository_path_not_null: 库路径 不能为空字符
|
label_repository_path_not_null: 库路径 不能为空字符
|
||||||
label_password_not_null: 密码不能设置为空。
|
label_password_not_null: 密码不能设置为空。
|
||||||
label_exist_repository_path: 定义已有版本库URL路径,定义格式file:///, http://, https://, svn://
|
label_exist_repository_path: 定义已有版本库URL路径,定义格式file://, http://, https://, svn://
|
||||||
label_project_no_activity: 该项目暂无动态!
|
label_project_no_activity: 该项目暂无动态!
|
||||||
label_course_homework_un: 暂未发布任何作业
|
label_course_homework_un: 暂未发布任何作业
|
||||||
label_follow_no_requirement: 暂未关注任何需求!
|
label_follow_no_requirement: 暂未关注任何需求!
|
||||||
|
|
Loading…
Reference in New Issue