相政新界面

tmp
huang 10 years ago
parent 0a4fd92d8c
commit 34a8d0890c

@ -243,7 +243,7 @@ update
# :name, :path, :kind, :size, :lastrev, :changeset # :name, :path, :kind, :size, :lastrev, :changeset
@entries = @repository.entries(@path, @rev) @entries = @repository.entries(@path, @rev)
# @trees = g.trees(project, @path) # @trees = g.trees(project, @path)
@changeset = @repository.find_changeset_by_name(@rev) # @changeset = @repository.find_changeset_by_name(@rev)
#@project_path_cut = RepositoriesHelper::PROJECT_PATH_CUT #@project_path_cut = RepositoriesHelper::PROJECT_PATH_CUT
#@ip = RepositoriesHelper::REPO_IP_ADDRESS #@ip = RepositoriesHelper::REPO_IP_ADDRESS

@ -5,23 +5,21 @@
<%#= link_to l(:label_statistics), <%#= link_to l(:label_statistics),
{:action => 'stats', :id => @project, :repository_id => @repository.identifier_param}, {:action => 'stats', :id => @project, :repository_id => @repository.identifier_param},
:class => 'mt3 c_blue fl' if @repository.supports_all_revisions? %> :class => 'mt3 c_blue fl' if @repository.supports_all_revisions? %>
<div class="pt5 "> <div class="repositorytitle mr15">
<%= form_tag({:action => controller.action_name, <%= form_tag({:action => controller.action_name, :id => @project, :repository_id => @repository.identifier_param,
:id => @project,
:repository_id => @repository.identifier_param,
:path => to_path_param(@path), :path => to_path_param(@path),
:rev => nil}, :rev => nil},
{:method => :get, :id => 'revision_selector', :class => "fl c_grey02"}) do -%> {:method => :get, :id => 'revision_selector', :class => "fl c_grey02 ml5"}) do -%>
<!-- Branches Dropdown --> <!-- Branches Dropdown -->
<% if !@repository.branches.nil? && @repository.branches.length > 0 -%> <% if !@repository.branches.nil? && @repository.branches.length > 0 -%>
<%= l(:label_branch) %>: <%= l(:label_branch) %>:
<%= select_tag :branch, options_for_select([''] + @repository.branches, @rev), :id => 'branch' %> <%= select_tag :branch, options_for_select([''] + @repository.branches, @rev), :id => 'branch' %>
<% end -%> <% end -%>
<% if !@repository.tags.nil? && @repository.tags.length > 0 -%> <%# if !@repository.tags.nil? && @repository.tags.length > 0 -%>
| <%= l(:label_tag) %>: <!--| <%#= l(:label_tag) %>:-->
<%= select_tag :tag, options_for_select([''] + @repository.tags, @rev), :id => 'tag' %> <%#= select_tag :tag, options_for_select([''] + @repository.tags, @rev), :id => 'tag' %>
<% end -%> <%# end -%>
<%# if @repository.supports_all_revisions? %> <%# if @repository.supports_all_revisions? %>
<%#= l(:label_revision) %> <%#= l(:label_revision) %>
@ -29,4 +27,3 @@
<%# end %> <%# end %>
<% end -%> <% end -%>
</div> </div>

@ -3,8 +3,8 @@
<div class="fl"><h2 class="project_h2_repository"><%= render :partial => 'breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %></h2></div> <div class="fl"><h2 class="project_h2_repository"><%= render :partial => 'breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %></h2></div>
</div> </div>
<div class="repository_con" style="line-height:1.9;"> <div class="repository_con" style="line-height:1.9;">
<%= render :partial => 'navigation' %> <% if @entries.nil? %>
<div class="cl"></div> <%# 未提交代码提示 %>
<div class=" repository-url light-well"> <div class=" repository-url light-well">
<% if @entries.nil? && authorize_for('repositories', 'browse') %> <% if @entries.nil? && authorize_for('repositories', 'browse') %>
<div class="page-title"> <div class="page-title">
@ -20,11 +20,37 @@
<div class="fb"><a href="http://<%=Setting.host_name %>/forums/1/memos/1232" class=" c_blue ">点击查看如何提交代码</a></div> <div class="fb"><a href="http://<%=Setting.host_name %>/forums/1/memos/1232" class=" c_blue ">点击查看如何提交代码</a></div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<% else %>
<%= render :partial => 'navigation' %>
<div class="fl c_grey02 mt5 mr5">克隆网址:</div>
<textarea id="copy_rep_content" class="cloneUrl mt5 fl" type="input" placeholder="http://xianbo_trustie2@repository.trustie.net/xianbo/trustie2.git">
<% if @repository.type.to_s=="Repository::Gitlab" %>
<%= @repos_url %>
<% else %>
<%= h @repository.url %>
<% end %>
</textarea>
<a href="javascript:void(0);" class="clone_btn mt5" onclick="jsCopy()"><span class="vl_copy"></span></a>
<div class="fl mt5 ml15"><a href="javascript:void(0);" class="vl_btn fb"><span class="vl_zip"></span>ZIP</a> </div>
<div class="fr mt5"><a href="javascript:void(0);" class="vl_btn fb"><span class="vl_fork"></span>Fork</a> <a href="javascript:void(0);" class="vl_btn_2 fb">109</a> </div>
<div class="cl"></div>
<div class="recordBanner mt10">
<img src="images/newsPortrait.png" width="25" height="25" alt="头像" class="fl portraitRadius mt2 ml4 mr5" />
<span class="fl"><font class="fb fontGrey3 mr5"><%#= @user_chageset_recently.user %></font>提交于两天前:<%#= @user_chageset_recently.comments %></span>
<span class="fr mr5 "><font class="fb ml2 mr2 vl_branch mt2">
<%= @repository.branches.count %></font>个分支
</span>
<span class="fr mr5"><font class="fb ml2 mr2 vl_commit">
<%=link_to @changesets.count, {:action => 'changes', :path => to_path_param(@path), :id => @project, :repository_id => @repository.identifier_param, :rev => @rev} %></font>提交
</span>
</div>
<% end %>
</div> </div>
<!--contextual end-->
<% if !@entries.nil? && authorize_for('repositories', 'browse') %> <% if !@entries.nil? && authorize_for('repositories', 'browse') %>
<%# 数据统计 %> <%# 数据统计 %>
<%= render :partial => 'summary' %> <%#= render :partial => 'summary' %>
<%# end %> <%# end %>
<%= render :partial => 'dir_list' %> <%= render :partial => 'dir_list' %>
<% end %> <% end %>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -511,3 +511,9 @@ function submitProjectFeedback() {
$("#project_feedback_form").submit(); $("#project_feedback_form").submit();
} }
// 点击按钮复制功能
function jsCopy(){
var e=document.getElementById("copy_rep_content");
e.select();
document.execCommand("Copy");
}

@ -205,3 +205,16 @@
table.list {margin-top:0.5em;} table.list {margin-top:0.5em;}
table.list th, table.list td {border: 1px solid #aaa;} table.list th, table.list td {border: 1px solid #aaa;}
} }
.cloneUrl {width:235px; height:21px; border:1px solid #dddddd; outline:none; overflow:hidden; line-height:21px; resize:none;}
.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_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;}
.vl_branch {background:url(../images/vlicon/branch_icon.png) 0px -2px no-repeat; padding-left:22px}
.mt1 {margin-top:1px;}
.mt2 {margin-top:2px;}
Loading…
Cancel
Save