版本库相关界面调整
This commit is contained in:
parent
83486c745e
commit
4d5d012ecf
|
@ -215,11 +215,11 @@ update
|
|||
end
|
||||
end
|
||||
|
||||
# unless @repository.gitlab?
|
||||
# # redirect_to to_gitlab_project_repository_path(@project, @repository)
|
||||
# render :to_gitlab
|
||||
# return
|
||||
# end
|
||||
unless @repository.gitlab?
|
||||
# redirect_to to_gitlab_project_repository_path(@project, @repository)
|
||||
render :to_gitlab
|
||||
return
|
||||
end
|
||||
|
||||
#if( !User.current.member_of?(@project) || @project.hidden_repo)
|
||||
@repository.fetch_changesets if Setting.autofetch_changesets? && @path.empty?
|
||||
|
@ -252,11 +252,16 @@ update
|
|||
project_path_cut = RepositoriesHelper::PROJECT_PATH_CUT
|
||||
ip = RepositoriesHelper::REPO_IP_ADDRESS
|
||||
gitlab_address = Redmine::Configuration['gitlab_address']
|
||||
if @repository.type.to_s=="Repository::Gitlab"
|
||||
if @repository.type.to_s == "Repository::Gitlab"
|
||||
@repos_url = gitlab_address.to_s+"/"+@project.owner.to_s+"/"+@repository.identifier+"."+"git"
|
||||
else
|
||||
@repos_url = "http://"+@repository.login.to_s+"_"+@repository.identifier.to_s+"@"+ip.to_s+
|
||||
@repository.url.slice(project_path_cut, @repository.url.length).to_s
|
||||
# 默认选择历史版本库情况
|
||||
rep = Repository.where("project_id =? and type =?", @project, "Repository::Gitlab")
|
||||
unless rep.blank?
|
||||
@repos_url = gitlab_address.to_s+"/"+@project.owner.to_s+"/"+rep.identifier+"."+"git"
|
||||
else
|
||||
@repos_url = "http://"+@repository.login.to_s+"_"+@repository.identifier.to_s+"@"+ip.to_s + @repository.url.slice(project_path_cut, @repository.url.length).to_s
|
||||
end
|
||||
end
|
||||
if @course_tag == 1
|
||||
render :action => 'show', :layout => 'base_courses'
|
||||
|
|
|
@ -8,8 +8,9 @@
|
|||
<% project_path_cut = RepositoriesHelper::PROJECT_PATH_CUT %>
|
||||
<% ip = RepositoriesHelper::REPO_IP_ADDRESS %><!--Added by tanxianbo For formatting project's path-->
|
||||
<%# 新建版本库 %>
|
||||
<div style="padding-bottom: 40px">
|
||||
<% if @project.repositories.count == 0 || rep_is_gitlab?(@project) %>
|
||||
|
||||
<% if @project.repositories.count == 0 || rep_is_gitlab?(@project) %>
|
||||
<div style="padding-bottom: 40px">
|
||||
<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();">
|
||||
<% course_tag = @project.project_type %>
|
||||
|
@ -23,11 +24,11 @@
|
|||
<%= labelled_form_for :repository, @repository, :url =>project_repositories_path(@project),:html => {:id => 'repository-form',:method=>"post",:autocomplete=>'off'} do |f| %>
|
||||
<div id="pro_st_edit_ku" class="pro_st_edit_ku">
|
||||
<ul>
|
||||
<li >
|
||||
<li style="display: none">
|
||||
<label class="label02"><%=l(:label_scm)%>:</label>
|
||||
<%= select_tag('repository_scm',
|
||||
options_for_select(["Git"],@repository.class.name.demodulize),
|
||||
:data => {:remote => true, :method => 'get'})%>
|
||||
:data => {:remote => true, :method => 'get'}) %>
|
||||
<% if @repository && ! @repository.class.scm_available %>
|
||||
<span class="c_grey"><%= l(:text_scm_command_not_available) %></span>
|
||||
<% end %>
|
||||
|
@ -43,22 +44,22 @@
|
|||
</li>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
<a href="#" onclick="$('#repository-form').submit();" class="blue_btn fl ml110"><%=l(:button_save)%></a>
|
||||
<a href="<%= settings_project_path(@project, :tab => 'repositories')%>" class="grey_btn fl ml10"><%=l(:button_cancel)%></a>
|
||||
<a href="#" onclick="$('#repository-form').submit();" class="blue_btn fl ml38 "><%=l(:lable_project_rep_create) %></a>
|
||||
<a href="<%= settings_project_path(@project, :tab => 'repositories')%>" class="grey_btn fl ml38 "><%=l(:button_cancel)%></a>
|
||||
</div><!--pro_st_edit_issues end-->
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% if @project.repositories.any? %>
|
||||
<% 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', '' %>">
|
||||
<tr class="<%= cycle 'pro_table_on_forge', '' %>">
|
||||
<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>
|
||||
|
@ -76,9 +77,9 @@
|
|||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% else %>
|
||||
<p class="nodata"><%= l(:label_repository_no_data) %></p>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<p class="nodata">温馨提示:<%= l(:label_repository_no_data) %></p>
|
||||
<% end %>
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -200,7 +200,7 @@ zh:
|
|||
label_subject_empty: 主题不能为空
|
||||
|
||||
label_no_data: 没有任何数据可供显示
|
||||
label_repository_no_data: 您还没有创建版本库,每个项目只允许创建一个版本库!
|
||||
label_repository_no_data: 每个项目只能创建一个版本库!
|
||||
# 项目、课程、用户公用
|
||||
label_settings: 配置
|
||||
label_information_plural: 信息
|
||||
|
|
|
@ -88,6 +88,8 @@ zh:
|
|||
project_module_files: 资源库
|
||||
project_module_repository: 版本库
|
||||
project_module_create_repository: 创建版本库
|
||||
project_gitlab_create_repository: 新版本库
|
||||
|
||||
|
||||
label_project_more: 更多
|
||||
project_module_news: 新闻
|
||||
|
@ -112,6 +114,7 @@ zh:
|
|||
label_project_overview: "项目简介"
|
||||
label_expend_information: 展开更多信息
|
||||
label_project_create: "新建了项目"
|
||||
lable_project_rep_create: 创建
|
||||
|
||||
#
|
||||
# 项目托管平台
|
||||
|
|
|
@ -553,6 +553,7 @@ a:hover.member_btn{ background:#329cbd;}
|
|||
.pro_table tr td{ height:30px;}
|
||||
.pro_table_tit{ text-align:center; font-weight:bold;}
|
||||
.pro_table_on{ background:#f0fbff; }
|
||||
.pro_table_on_forge{ background: #EAEAEA; }
|
||||
.pro_st_edit_issues{ display:none; margin-top:20px;}
|
||||
.pro_st_edit_issues ul li{ margin-bottom:10px;}
|
||||
.pro_st_edit_ban{ display:none; margin-top:20px;}
|
||||
|
|
|
@ -71,6 +71,7 @@ h4{ font-size:14px; color:#3b3b3b;}
|
|||
.ml45{ margin-left:45px;}
|
||||
.ml55{ margin-left:55px;}
|
||||
.ml30{ margin-left:30px;}
|
||||
.ml38{ margin-left:38px;}
|
||||
.ml60{ margin-left:60px;}
|
||||
.ml80{ margin-left:80px;}
|
||||
.ml90{ margin-left:90px;}
|
||||
|
|
|
@ -277,10 +277,10 @@ li.commit .commit-row-info .committed_ago {
|
|||
display: inline-block;
|
||||
}
|
||||
.rep_history_title{
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
font-size: 13px;
|
||||
color: #7F7F7F;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
.rep_history_grey{
|
||||
color: #7F7F7F;
|
||||
|
|
Loading…
Reference in New Issue