Merge branch 'dev_hjq' of http://repository.trustie.net/xianbo/trustie2 into dev_hjq
This commit is contained in:
commit
1ffa447767
|
@ -136,7 +136,7 @@ class VersionsController < ApplicationController
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html {
|
format.html {
|
||||||
flash[:notice] = l(:notice_successful_update)
|
flash[:notice] = l(:notice_successful_update)
|
||||||
redirect_back_or_default settings_project_path(@project, :tab => 'versions')
|
redirect_to settings_project_path(@project, :tab => 'versions')
|
||||||
}
|
}
|
||||||
format.api { render_api_ok }
|
format.api { render_api_ok }
|
||||||
end
|
end
|
||||||
|
|
|
@ -394,9 +394,9 @@ module ApplicationHelper
|
||||||
|
|
||||||
def format_version_name(version)
|
def format_version_name(version)
|
||||||
if version.project == @project
|
if version.project == @project
|
||||||
h(version)
|
h(truncate(version.name,:length=>20))
|
||||||
else
|
else
|
||||||
h("#{version.project} - #{version}")
|
h("#{version.project} - #{truncate(version.name,:length=>20)}")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -21,15 +21,14 @@
|
||||||
<% @project.repositories.sort.each do |repository| %>
|
<% @project.repositories.sort.each do |repository| %>
|
||||||
<tr class="pro_table_on">
|
<tr class="pro_table_on">
|
||||||
<td><a href="javascript:viod(0)" title="<%= repository.identifier %>">
|
<td><a href="javascript:viod(0)" title="<%= repository.identifier %>">
|
||||||
<%= link_to repository.identifier, ({:controller => 'repositories', :action => 'show', :id => @project, :repository_id => repository.identifier_param} if repository.identifier.present?), :class =>"c_blue" %></a></td>
|
<%= link_to truncate(repository.identifier), ({:controller => 'repositories', :action => 'show', :id => @project, :repository_id => repository.identifier_param} if repository.identifier.present?), :class =>"c_blue" %></a></td>
|
||||||
<td> <%= checked_image repository.is_default? %></td>
|
<td> <%= checked_image repository.is_default? %></td>
|
||||||
<td><%=h repository.scm_name %></td>
|
<td><%=h repository.scm_name %></td>
|
||||||
<%if repository.scm_name=="Git"%>
|
<%if repository.scm_name=="Git"%>
|
||||||
<td style="white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" class="c_blue" title="http://<%= repository.login.to_s %>_<%= repository.identifier.to_s%>@<%= ip %>
|
<td style="white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" class="c_blue" title="http://<%= repository.login.to_s %>_<%= repository.identifier.to_s%>@<%= ip %>
|
||||||
<%=h repository.url.slice(project_path_cut, repository.url.length) %>">http://<%= repository.login.to_s %>_<%= repository.identifier.to_s%>@<%= ip %>
|
<%=h repository.url.slice(project_path_cut, repository.url.length) %>"> <%=truncate( 'http://' << repository.login.to_s << '_'<< repository.identifier.to_s << '@'<< ip.to_s << h( repository.url.slice(project_path_cut, repository.url.length)),:length=>20)%></td><!--Modified by tanxianbo-->
|
||||||
<%=h repository.url.slice(project_path_cut, repository.url.length) %></td><!--Modified by tanxianbo-->
|
|
||||||
<%else %>
|
<%else %>
|
||||||
<td style="white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" ><%=h repository.url %></td>
|
<td style="white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" ><%=h truncate(repository.url,:length=>10) %></td>
|
||||||
<% end %>
|
<% end %>
|
||||||
<td><a href="javascript:viod(0)" class="c_blue" >
|
<td><a href="javascript:viod(0)" class="c_blue" >
|
||||||
<% if repository.scm_name=="Git"%>
|
<% if repository.scm_name=="Git"%>
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
<td class="status"><%= l("version_status_#{version.status}") %></td>
|
<td class="status"><%= l("version_status_#{version.status}") %></td>
|
||||||
<td class="sharing"><%=h format_version_sharing(version.sharing) %></td>
|
<td class="sharing"><%=h format_version_sharing(version.sharing) %></td>
|
||||||
<td style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" title="">
|
<td style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" title="">
|
||||||
<%= link_to_if_authorized(h(version.wiki_page_title), {:controller => 'wiki',
|
<%= link_to_if_authorized(h(truncate(version.wiki_page_title,:length=>20)), {:controller => 'wiki',
|
||||||
:action => 'show',
|
:action => 'show',
|
||||||
:project_id => version.project,
|
:project_id => version.project,
|
||||||
:id => Wiki.titleize(version.wiki_page_title)}) || h(version.wiki_page_title) unless version.wiki_page_title.blank? || version.project.wiki.nil? %>
|
:id => Wiki.titleize(version.wiki_page_title)}) || h(version.wiki_page_title) unless version.wiki_page_title.blank? || version.project.wiki.nil? %>
|
||||||
|
@ -57,29 +57,29 @@
|
||||||
<div id="pro_st_edit_ban" class="pro_st_edit_ban">
|
<div id="pro_st_edit_ban" class="pro_st_edit_ban">
|
||||||
<ul>
|
<ul>
|
||||||
<li >
|
<li >
|
||||||
<label class="label02"><span class="c_red">*</span> 名称 :</label>
|
<label class="label02"><span class="c_red">*</span>名称:</label>
|
||||||
<%= f.text_field :name, :maxlength => 60, :required => true %>
|
<%= f.text_field :name, :maxlength => 60, :required => true %>
|
||||||
</li>
|
</li>
|
||||||
<li >
|
<li >
|
||||||
<label class="label02"> 描述 :</label>
|
<label class="label02">描述:</label>
|
||||||
<%= f.text_field :description, :maxlength => 60 %>
|
<%= f.text_field :description, :maxlength => 60 %>
|
||||||
</li>
|
</li>
|
||||||
<li >
|
<li >
|
||||||
<label class="label02"> 状态 :</label>
|
<label class="label02">状态:</label>
|
||||||
<%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]} %>
|
<%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]} %>
|
||||||
</li>
|
</li>
|
||||||
<li >
|
<li >
|
||||||
<label class="label02"> Wiki 页面 :</label>
|
<label class="label02">Wiki 页面:</label>
|
||||||
<%= f.text_field :wiki_page_title, :size =>60, :label => :label_wiki_page, :disabled => @project.wiki.nil? %>
|
<%= f.text_field :wiki_page_title, :size =>60, :label => :label_wiki_page, :disabled => @project.wiki.nil? %>
|
||||||
</li>
|
</li>
|
||||||
<li >
|
<li >
|
||||||
<label class="label02"> 日期 :</label>
|
<label class="label02">日期:</label>
|
||||||
<%= f.text_field :effective_date, :size => 10, :readonly => true,:class=>" fl" %>
|
<%= f.text_field :effective_date, :size => 10, :readonly => true,:class=>" fl" %>
|
||||||
<%= calendar_for('version_effective_date') %>
|
<%= calendar_for('version_effective_date') %>
|
||||||
</li>
|
</li>
|
||||||
<div class="cl mb10"></div>
|
<div class="cl mb10"></div>
|
||||||
<li >
|
<li >
|
||||||
<label class="label02"> 共享 :</label>
|
<label class="label02">共享:</label>
|
||||||
<%= f.select :sharing, @project.versions.build.allowed_sharings.collect {|v| [format_version_sharing(v), v]} %>
|
<%= f.select :sharing, @project.versions.build.allowed_sharings.collect {|v| [format_version_sharing(v), v]} %>
|
||||||
</li>
|
</li>
|
||||||
<a href="#" onclick="$('#new_project_version_form').submit();" class="blue_btn ml110">保存</a>
|
<a href="#" onclick="$('#new_project_version_form').submit();" class="blue_btn ml110">保存</a>
|
||||||
|
|
|
@ -3,29 +3,29 @@
|
||||||
<div id="pro_st_edit_ban" class="pro_st_edit_ban_display">
|
<div id="pro_st_edit_ban" class="pro_st_edit_ban_display">
|
||||||
<ul>
|
<ul>
|
||||||
<li >
|
<li >
|
||||||
<label class="label02"><span class="c_red">*</span> 名称 :</label>
|
<label class="label02"><span class="c_red">*</span>名称:</label>
|
||||||
<%= f.text_field :name, :maxlength => 60,:class=>" w280", :label => ""%>
|
<%= f.text_field :name, :maxlength => 60,:class=>" w280", :label => ""%>
|
||||||
</li>
|
</li>
|
||||||
<li >
|
<li >
|
||||||
<label class="label02"> 描述 :</label>
|
<label class="label02">描述:</label>
|
||||||
<%= f.text_field :description, :maxlength => 60,:class=>" w280", :label => "" %>
|
<%= f.text_field :description, :maxlength => 60,:class=>" w280", :label => "" %>
|
||||||
</li>
|
</li>
|
||||||
<li >
|
<li >
|
||||||
<label class="label02"> 状态 :</label>
|
<label class="label02">状态:</label>
|
||||||
<%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]}, :label => "" %>
|
<%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]}, :label => "" %>
|
||||||
</li>
|
</li>
|
||||||
<li >
|
<li >
|
||||||
<label class="label02"> Wiki 页面 :</label>
|
<label class="label02">Wiki 页面:</label>
|
||||||
<%= f.text_field :wiki_page_title, :size =>60, :label => "", :disabled => @project.wiki.nil? %>
|
<%= f.text_field :wiki_page_title, :size =>60, :label => "", :disabled => @project.wiki.nil? %>
|
||||||
</li>
|
</li>
|
||||||
<li >
|
<li >
|
||||||
<label class="label02"> 日期 :</label>
|
<label class="label02">日期:</label>
|
||||||
<%= f.text_field :effective_date, :size => 10, :readonly => true,:class=>'f1',:label => "" %>
|
<%= f.text_field :effective_date, :size => 10, :readonly => true,:class=>"fl" ,:style=>"margin-left:7px;",:label=>""%>
|
||||||
<%= calendar_for('version_effective_date') %>
|
<%= calendar_for('version_effective_date') %>
|
||||||
</li>
|
</li>
|
||||||
<div class="cl mb10"></div>
|
<div class="cl mb10"></div>
|
||||||
<li >
|
<li >
|
||||||
<label class="label02"> 共享 :</label>
|
<label class="label02">共享:</label>
|
||||||
<%= f.select :sharing, @version.allowed_sharings.collect {|v| [format_version_sharing(v), v]},:label=>"" %>
|
<%= f.select :sharing, @version.allowed_sharings.collect {|v| [format_version_sharing(v), v]},:label=>"" %>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
Loading…
Reference in New Issue