Merge branch 'gitlab_guange' into szzh

This commit is contained in:
huang 2015-11-06 14:40:02 +08:00
commit ec0244ed39
6 changed files with 25 additions and 9 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

@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20151102085318) do
ActiveRecord::Schema.define(:version => 20151102090519) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@ -1038,11 +1038,21 @@ ActiveRecord::Schema.define(:version => 20151102085318) do
t.integer "project_id"
end
create_table "org_members", :force => true do |t|
t.integer "user_id"
t.integer "organization_id"
t.string "role"
end
create_table "organizations", :force => true do |t|
t.string "name"
t.string "logo_link"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.text "description"
t.integer "creator_id"
t.integer "home_id"
t.string "domain"
t.boolean "is_public"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "phone_app_versions", :force => true do |t|

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;}