This commit is contained in:
cxt 2015-11-06 14:58:06 +08:00
commit 44f35f1d57
5 changed files with 11 additions and 5 deletions

View File

@ -72,10 +72,13 @@
<%= repository.identifier %></span></td>
<td class="w150"><span class="rep_history_grey"><%=h repository.scm_name %></span></td>
<%if repository.scm_name=="Git"%>
<% rep_url = "http://" + repository.login.to_s + '_'+ repository.identifier.to_s + "@" + ip.to_s + h( repository.url.slice(project_path_cut, repository.url.length)) %>
<td class="w362 pl5" style="white-space:nowrap;overflow:hidden;text-overflow:ellipsis; text-align: left" 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) %>
<textarea id="copy_rep_content2_<%= repository.id %>" class="cloneUrl2 fl" type="input" ><%= rep_url %></textarea>
<a href="javascript:void(0);" onclick="jsCopy2(<%= repository.id %>)"><span class="vl_copy2" title="点击复制版本库地址"></span></a>
<%#= rep_url %>
</span>
</td><!--Modified by tanxianbo-->
<%else %>

View File

@ -21,7 +21,7 @@
{:action => (entry.is_dir? ? 'show' : 'entry'), :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(ent_path), :rev => @rev},
:class => (entry.is_dir? ? 'icon icon-folder' : "icon icon-file #{Redmine::MimeType.css_class_of(ent_name)}")%>
</td>
<td class="size"><%= (entry.size ? number_to_human_size(entry.size) : "?") unless entry.is_dir? %></td>
<!--<td class="size"><%#= (entry.size ? number_to_human_size(entry.size) : "?") unless entry.is_dir? %></td>-->
<!--<td class="size"><%#= (entry.size ? number_to_human_size(entry.size) : "?") unless entry.is_dir? %></td>-->
<% if @repository.report_last_commit %>
<td class="revision"><%= link_to_revision(entry.changeset, @repository) if entry.changeset %></td>

View File

@ -4,7 +4,7 @@ namespace :rep_fault do
desc "set ossean's type value"
task :rep_update => :environment do
rep = Repository.find(400)
rep.type = "Repository::Gitlab"
rep.type = "Repository::Git"
rep.save
end

View File

@ -517,8 +517,9 @@ function jsCopy(){
e.select();
document.execCommand("Copy");
}
function jsCopy2(){
var e=document.getElementById("copy_rep_content2");
function jsCopy2(id){
//alert("copy_rep_content2_" + id);
var e=document.getElementById("copy_rep_content2_" + id);
e.select();
document.execCommand("Copy");
}

View File

@ -207,11 +207,13 @@
}
.cloneUrl {width:235px; height:21px; border:1px solid #dddddd; outline:none; overflow:hidden; line-height:21px; resize:none;white-space:nowrap;}
.cloneUrl2 {width:328px; height:21px; border:1px solid #dddddd; outline:none; overflow:hidden; line-height:21px; resize:none;white-space:nowrap;}
.clone_btn {width:30px; height:21px; border-top:1px solid #dddddd; border-bottom:1px solid #dddddd; border-right:1px solid #dddddd; outline:none; float:left; background-image:linear-gradient(#FCFCFC, #EEE); text-align:center;}
.vl_btn {height:21px; padding:0px 5px; vertical-align:middle; border:1px solid #dddddd; float:left; line-height:21px; background-image:linear-gradient(#FCFCFC, #EEE);}
.vl_btn_2 {height:21px; padding:0px 5px; vertical-align:middle; border-top:1px solid #dddddd; border-bottom:1px solid #dddddd; border-right:1px solid #dddddd; float:left; line-height:21px;}
.recordBanner {width:670px; height:30px; background-color:#f1f1f1; color:#666666; line-height:30px; vertical-align:middle;}
.vl_copy {background:url(../images/vlicon/clone_url.png) 0px 0px no-repeat; padding-left:22px;}
.vl_copy2 {background:url(../images/vlicon/clone_url.png) 0px 0px no-repeat; padding-left:22px;}
.vl_zip {background:url(../images/vlicon/download_icon.png) 0px 0px no-repeat; padding-left:22px;}
.vl_fork {background:url(../images/vlicon/fork_icon.png) 0px -2px no-repeat; padding-left:22px;}
.vl_commit {background:url(../images/vlicon/commit_icon.png) 0px -2px no-repeat; padding-left:22px;weight:20px;height: 24px;}