From a45722b0f5cf3f476f6fff6aa049ff1fd85b5c64 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 15 Oct 2015 09:11:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E4=B8=AA=E9=A1=B9=E7=9B=AE=E5=8F=AA?= =?UTF-8?q?=E8=83=BD=E5=BB=BA=E4=B8=80=E4=B8=AA=E7=89=88=E6=9C=AC=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../settings/_new_repositories.html.erb | 179 +++++++++--------- 1 file changed, 92 insertions(+), 87 deletions(-) diff --git a/app/views/projects/settings/_new_repositories.html.erb b/app/views/projects/settings/_new_repositories.html.erb index 410bd8c32..0859e5e19 100644 --- a/app/views/projects/settings/_new_repositories.html.erb +++ b/app/views/projects/settings/_new_repositories.html.erb @@ -8,93 +8,98 @@ <% project_path_cut = RepositoriesHelper::PROJECT_PATH_CUT %> <% ip = RepositoriesHelper::REPO_IP_ADDRESS %> <% if @project.repositories.any? %> - - - - - - - - - - - <% @project.repositories.sort.each do |repository| %> - - - - - <%if repository.scm_name=="Git"%> - + + + + + + + + + <% @project.repositories.sort.each do |repository| %> + + + + + <%if repository.scm_name=="Git"%> + - <%else %> - - <% end %> - - - - <% end %> -<% else %> -

<%= l(:label_no_data) %>

-<% end %> - - -
<%= l(:field_identifier) %> <%= l(:field_repository_is_default) %><%= l(:label_scm) %> <%= l(:label_repository_path) %>
- <%= link_to truncate(repository.identifier), ({:controller => 'repositories', :action => 'show', :id => @project, :repository_id => repository.identifier_param} if repository.identifier.present?) %> <%= checked_image repository.is_default? %><%=h repository.scm_name %> +
<%= l(:field_identifier) %> <%= l(:field_repository_is_default) %><%= l(:label_scm) %> <%= l(:label_repository_path) %>
+ <%= link_to truncate(repository.identifier), ({:controller => 'repositories', :action => 'show', :id => @project, :repository_id => repository.identifier_param} if repository.identifier.present?) %> <%= checked_image repository.is_default? %><%=h repository.scm_name %> <%=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)%><%=h truncate(repository.url,:length=>10) %> - <% if repository.scm_name=="Git"%> - <%if User.current.allowed_to?(:manage_repository, @project) %> - <%= link_to(l(:label_user_plural), committers_repository_path(repository)) %> - <% end %> - <% end %> - - <% if repository.login.to_s==User.current.login.to_s %> - <%= delete_new_link repository_path(repository) %> - <% end %>
- - - <% course_tag = @project.project_type %> - <% if User.current.allowed_to?(:manage_repository, @project) %> - - <%= link_to l(:label_repository_new_repos),"#" , :onclick=>"pro_st_show_ku();", :class => 'c_blue fl' %>

- <% end %> -
-
- -<%= labelled_form_for :repository, @repository, :url =>project_repositories_path(@project),:html => {:id => 'repository-form',:method=>"post",:autocomplete=>'off'} do |f| %> -
- - <%=l(:button_save)%> - <%=l(:button_cancel)%> -
+ + +<% else %> +

<%= l(:label_repository_no_data) %>

<% end %> + +<%# 新建版本库 %> +<% if @project.repositories.count == 0 %> + + + <% course_tag = @project.project_type %> + <% if User.current.allowed_to?(:manage_repository, @project) %> + + <%= link_to l(:label_repository_new_repos),"#" , :onclick=>"pro_st_show_ku();", :class => 'c_blue fl' %>

+ <% end %> +
+
+ + <%= labelled_form_for :repository, @repository, :url =>project_repositories_path(@project),:html => {:id => 'repository-form',:method=>"post",:autocomplete=>'off'} do |f| %> +
+ + <%=l(:button_save)%> + <%=l(:button_cancel)%> +
+ <% end %> + +<% end %> +