|
|
|
@ -7,36 +7,8 @@
|
|
|
|
|
<%= str = error_messages_for 'repository' %>
|
|
|
|
|
<% project_path_cut = RepositoriesHelper::PROJECT_PATH_CUT %>
|
|
|
|
|
<% ip = RepositoriesHelper::REPO_IP_ADDRESS %><!--Added by tanxianbo For formatting project's path-->
|
|
|
|
|
<% if @project.repositories.any? %>
|
|
|
|
|
<%= render :partial => 'projects/settings/rep_gitlab', :locals => {:project => @project, :ip => "ip", :project_path_cut => "project_path_cut" } %>
|
|
|
|
|
<%#= render :partial => 'projects/settings/rep_forge', :locals => {:project => @project, :ip => "ip", :project_path_cut => "project_path_cut" } %>
|
|
|
|
|
<div class="rep_history_title">历史版本库</div>
|
|
|
|
|
<table class="pro_table">
|
|
|
|
|
<tbody>
|
|
|
|
|
<% rep_forge(@project).sort.each do |repository| %>
|
|
|
|
|
<tr class="<%= cycle 'pro_table_on', '' %>">
|
|
|
|
|
<td class="w150"><span class="rep_history_grey" title="<%= repository.identifier %>">
|
|
|
|
|
<%= repository.identifier %></span></td>
|
|
|
|
|
<td class="w150"><span class="rep_history_grey"><%=h repository.scm_name %></span></td>
|
|
|
|
|
<%if repository.scm_name=="Git"%>
|
|
|
|
|
<td class="w360" style="white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" title="http://<%= repository.login.to_s %>_<%= repository.identifier.to_s%>@<%= ip %>
|
|
|
|
|
<%=h repository.url.slice(project_path_cut, repository.url.length) %>">
|
|
|
|
|
<span class="rep_history_grey">
|
|
|
|
|
<%=truncate( 'http://' << repository.login.to_s << '_'<< repository.identifier.to_s << '@'<< ip.to_s << h( repository.url.slice(project_path_cut, repository.url.length)),:length=>60) %>
|
|
|
|
|
</span>
|
|
|
|
|
</td><!--Modified by tanxianbo-->
|
|
|
|
|
<%else %>
|
|
|
|
|
<td class="w360" style="white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" ><%=h truncate(repository.url,:length=>10) %></td>
|
|
|
|
|
<% end %>
|
|
|
|
|
</tr>
|
|
|
|
|
<% end %>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
<% else %>
|
|
|
|
|
<p class="nodata"><%= l(:label_repository_no_data) %></p>
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
<%# 新建版本库 %>
|
|
|
|
|
<div style="padding-bottom: 40px">
|
|
|
|
|
<% if @project.repositories.count == 0 || rep_is_gitlab?(@project) %>
|
|
|
|
|
<a href="javascript:viod(0)" class="pic_add fl mr5" onclick="pro_st_show_ku();"></a>
|
|
|
|
|
<a href="javascript:viod(0)" class="c_blue fl" onclick="pro_st_show_ku();">
|
|
|
|
@ -77,4 +49,37 @@
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<% if @project.repositories.any? %>
|
|
|
|
|
<%= render :partial => 'projects/settings/rep_gitlab', :locals => {:project => @project, :ip => "ip", :project_path_cut => "project_path_cut" } %>
|
|
|
|
|
<%#= render :partial => 'projects/settings/rep_forge', :locals => {:project => @project, :ip => "ip", :project_path_cut => "project_path_cut" } %>
|
|
|
|
|
<div class="rep_history_title">历史版本库</div>
|
|
|
|
|
<table class="pro_table">
|
|
|
|
|
<tbody>
|
|
|
|
|
<% rep_forge(@project).sort.each do |repository| %>
|
|
|
|
|
<tr class="<%= cycle 'pro_table_on', '' %>">
|
|
|
|
|
<td class="w150"><span class="rep_history_grey" title="<%= repository.identifier %>">
|
|
|
|
|
<%= repository.identifier %></span></td>
|
|
|
|
|
<td class="w150"><span class="rep_history_grey"><%=h repository.scm_name %></span></td>
|
|
|
|
|
<%if repository.scm_name=="Git"%>
|
|
|
|
|
<td class="w362" style="white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" title="http://<%= repository.login.to_s %>_<%= repository.identifier.to_s%>@<%= ip %>
|
|
|
|
|
<%=h repository.url.slice(project_path_cut, repository.url.length) %>">
|
|
|
|
|
<span class="rep_history_grey">
|
|
|
|
|
<%=truncate( 'http://' << repository.login.to_s << '_'<< repository.identifier.to_s << '@'<< ip.to_s << h( repository.url.slice(project_path_cut, repository.url.length)),:length=>60) %>
|
|
|
|
|
</span>
|
|
|
|
|
</td><!--Modified by tanxianbo-->
|
|
|
|
|
<%else %>
|
|
|
|
|
<td class="w360" style="white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" ><%=h truncate(repository.url,:length=>10) %></td>
|
|
|
|
|
<% end %>
|
|
|
|
|
</tr>
|
|
|
|
|
<% end %>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
<% else %>
|
|
|
|
|
<p class="nodata"><%= l(:label_repository_no_data) %></p>
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|