版本库详情页面添加目录回退功能,部分功能及界面调整
This commit is contained in:
parent
83f2270edc
commit
b5f035d286
|
@ -479,6 +479,9 @@ update
|
||||||
def entry
|
def entry
|
||||||
entry_and_raw(false)
|
entry_and_raw(false)
|
||||||
@content = @repository.cat(@path, @rev)
|
@content = @repository.cat(@path, @rev)
|
||||||
|
@changesets_latest_coimmit = @g.commit(@project.gpid, @entry.try(:lastrev))
|
||||||
|
# 总的提交数
|
||||||
|
@changesets_all_count = @g.user_static(@project.gpid, :rev => @rev).count
|
||||||
if is_entry_text_data?(@content, @path)
|
if is_entry_text_data?(@content, @path)
|
||||||
render :layout => 'base_projects'
|
render :layout => 'base_projects'
|
||||||
end
|
end
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
<div class="recordBanner mt3">
|
||||||
|
<% if @changesets_latest_coimmit %>
|
||||||
|
<% if !user_commit_rep(@changesets_latest_coimmit.author_email).nil? %>
|
||||||
|
<%= image_tag(url_to_avatar(user_commit_rep(@changesets_latest_coimmit.author_email)), :width => "25", :height => "25", :class => "fl portraitRadius mt2 ml4 mr5") %>
|
||||||
|
<span class="fl"><div class="fb fontGrey3 mr5 fl hidden maxwidth150 ml5"><%=link_to get_user_by_mail(@changesets_latest_coimmit.author_email).show_name, user_path(user_commit_rep(@changesets_latest_coimmit.author_email)) %></div>
|
||||||
|
<div class="fl">提交于 <%= time_tag(@changesets_latest_coimmit.created_at) %> 前:</div>
|
||||||
|
<div class="commit_content_dec fl" title="<%= @changesets_latest_coimmit.comments %>"><%= @changesets_latest_coimmit.message %></div>
|
||||||
|
</span>
|
||||||
|
<% else %>
|
||||||
|
<span class="fl"><div class="fb fontGrey3 mr5 fl hidden maxwidth150 ml5"><%= @changesets_latest_coimmit.author_email %></div>
|
||||||
|
<div class="fl">提交于<%= time_tag(@changesets_latest_coimmit.created_at) %>:</div>
|
||||||
|
<div class="commit_content_dec fl" title="<%= @changesets_latest_coimmit.comments %>"><%= @changesets_latest_coimmit.message %></div>
|
||||||
|
</span>
|
||||||
|
<%end%>
|
||||||
|
<% end %>
|
||||||
|
<% if @entry && @entry.kind == 'file' %>
|
||||||
|
<%= render :partial => 'link_to_functions' %>
|
||||||
|
<% else %>
|
||||||
|
<span class="fr mr5 "><font class="fb ml2 mr2 vl_branch mt2"><%= @repository.branches.count %></font> 个分支</span>
|
||||||
|
<% end %>
|
||||||
|
<span class="fr mr5"><font class="fb ml2 mr2 vl_commit">
|
||||||
|
<%=link_to "#{choise_commit_count(@changesets_all_count, @g_project.commit_count.to_i)} 提交", {:action => 'changes', :path => to_path_param(@path), :id => @project, :repository_id => @repository.identifier_param, :rev => @rev, :page => 1 ,:commit_count =>"#{@changesets_all_count}"} %></font>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
</div>
|
|
@ -1,10 +1,8 @@
|
||||||
<% if @entry && @entry.kind == 'file' %>
|
<% if @entry && @entry.kind == 'file' %>
|
||||||
|
<%= link_to_if action_name != 'changes', l(:label_history), {:action => 'changes', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev }, :class =>"fr mr5"%>
|
||||||
<p class="mt5 mb5">
|
<%# if @repository.supports_cat? %>
|
||||||
<%= link_to_if action_name != 'changes', l(:label_history), {:action => 'changes', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev } %> |
|
<%#= link_to_if action_name != 'entry', l(:button_view), {:action => 'entry', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev }, :class =>"fr" %>
|
||||||
<% if @repository.supports_cat? %>
|
<%# end %>
|
||||||
<%= link_to_if action_name != 'entry', l(:button_view), {:action => 'entry', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev } %> |
|
|
||||||
<% end %>
|
|
||||||
<%# if @repository.supports_annotate? %>
|
<%# if @repository.supports_annotate? %>
|
||||||
<%#= link_to_if action_name != 'annotate', l(:button_annotate), {:action => 'annotate', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev } %>
|
<%#= link_to_if action_name != 'annotate', l(:button_annotate), {:action => 'annotate', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev } %>
|
||||||
<%# end %>
|
<%# end %>
|
||||||
|
@ -12,8 +10,6 @@
|
||||||
{:action => 'raw', :id => @project,
|
{:action => 'raw', :id => @project,
|
||||||
:repository_id => @repository.identifier_param,
|
:repository_id => @repository.identifier_param,
|
||||||
:path => to_path_param(@path),
|
:path => to_path_param(@path),
|
||||||
:rev => @rev}) if @repository.supports_cat? %>
|
:rev => @rev}, :class => "fr mr5") if @repository.supports_cat? %>
|
||||||
<%= "(#{number_to_human_size(@entry.size)})" if @entry.size %>
|
<%= "(#{number_to_human_size(@entry.size)})" if @entry.size %>
|
||||||
</p>
|
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
<%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
|
<%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
|
||||||
<div class="wrap-big">
|
<div class="wrap-big">
|
||||||
<div style="padding-left: 8px;">
|
<div style="padding-left: 8px;">
|
||||||
<div class="contextual">
|
<div class="contextual mt-5 mb5">
|
||||||
<%= render :partial => 'navigation' %>
|
<%= render :partial => 'navigation' %>
|
||||||
</div>
|
</div>
|
||||||
|
<!--目录跳转-->
|
||||||
<h3><%= l(:label_revision_path) %> :<%= @path %></h3>
|
<div class="fl mt3">
|
||||||
|
<%= render :partial => 'breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %>
|
||||||
<%= render :partial => 'link_to_functions' %>
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<%= render :partial => 'latest_commit' %>
|
||||||
<%= render :partial => 'common/file', :locals => {:filename => @path, :content => @content} %>
|
<%= render :partial => 'common/file', :locals => {:filename => @path, :content => @content} %>
|
||||||
|
|
||||||
<% content_for :header_tags do %>
|
<% content_for :header_tags do %>
|
||||||
|
|
|
@ -52,29 +52,7 @@
|
||||||
<%= render :partial => 'breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %>
|
<%= render :partial => 'breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<div class="recordBanner mt3">
|
<%= render :partial => 'latest_commit' %>
|
||||||
<% if @changesets_latest_coimmit %>
|
|
||||||
<% if !user_commit_rep(@changesets_latest_coimmit.author_email).nil? %>
|
|
||||||
<%= image_tag(url_to_avatar(user_commit_rep(@changesets_latest_coimmit.author_email)), :width => "25", :height => "25", :class => "fl portraitRadius mt2 ml4 mr5") %>
|
|
||||||
<span class="fl"><div class="fb fontGrey3 mr5 fl hidden maxwidth150"><%=link_to get_user_by_mail(@changesets_latest_coimmit.author_email).show_name, user_path(user_commit_rep(@changesets_latest_coimmit.author_email)) %></div>
|
|
||||||
<div class="fl">提交于 <%= time_tag(@changesets_latest_coimmit.created_at) %> 前:</div>
|
|
||||||
<div class="commit_content_dec fl" title="<%= @changesets_latest_coimmit.comments %>"><%= @changesets_latest_coimmit.message %></div>
|
|
||||||
</span>
|
|
||||||
<% else %>
|
|
||||||
<span class="fl"><div class="fb fontGrey3 mr5 fl hidden maxwidth150"><%= @changesets_latest_coimmit.author_email %></div>
|
|
||||||
<div class="fl">提交于<%= time_tag(@changesets_latest_coimmit.created_at) %>:</div>
|
|
||||||
<div class="commit_content_dec fl" title="<%= @changesets_latest_coimmit.comments %>"><%= @changesets_latest_coimmit.message %></div>
|
|
||||||
</span>
|
|
||||||
<%end%>
|
|
||||||
<% end %>
|
|
||||||
<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 "#{choise_commit_count(@changesets_all_count, @g_project.commit_count.to_i)} 提交", {:action => 'changes', :path => to_path_param(@path), :id => @project, :repository_id => @repository.identifier_param, :rev => @rev, :page => 1 ,:commit_count =>"#{@changesets_all_count}"} %></font>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|
|
@ -183,6 +183,7 @@ h4{ font-size:14px;}/*color:#3b3b3b;*/
|
||||||
.mt-20 {margin-top:-20px;}
|
.mt-20 {margin-top:-20px;}
|
||||||
.mt-10 {margin-top:-10px;}
|
.mt-10 {margin-top:-10px;}
|
||||||
.mt-4 {margin-top:-4px;}
|
.mt-4 {margin-top:-4px;}
|
||||||
|
.mt-5 {margin-top:-5px;}
|
||||||
.mt-2 {margin-top:-2px;}
|
.mt-2 {margin-top:-2px;}
|
||||||
.mt0 {margin-top: 0px !important;}
|
.mt0 {margin-top: 0px !important;}
|
||||||
.mt1{margin-top: 1px;}
|
.mt1{margin-top: 1px;}
|
||||||
|
|
|
@ -216,9 +216,6 @@ p.percent {
|
||||||
float: right;
|
float: right;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
line-height: 1.4em;
|
line-height: 1.4em;
|
||||||
padding-left: 10px;
|
|
||||||
padding-right: 10px;
|
|
||||||
padding-top: 5px;
|
|
||||||
font-size: 0.9em;
|
font-size: 0.9em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -211,7 +211,7 @@
|
||||||
.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;}
|
.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 {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;}
|
.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:100%; height:30px; background-color:#f1f1f1; color:#666666; line-height:30px; vertical-align:middle;}
|
.recordBanner {width:99%; 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_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_copy2 {background:url(../images/vlicon/clone_url.png) 0px 0px no-repeat; padding-left:22px;}
|
||||||
.vl_zip {background:url(../images/vlicon/graph.png) 0px 2px no-repeat; padding-left:22px;}
|
.vl_zip {background:url(../images/vlicon/graph.png) 0px 2px no-repeat; padding-left:22px;}
|
||||||
|
|
|
@ -34,7 +34,7 @@ li.change .copied-from:before { content: " - "}
|
||||||
#changes-legend { float: right; font-size: 0.8em; margin:0; margin-right: 10px; }/*by young*/
|
#changes-legend { float: right; font-size: 0.8em; margin:0; margin-right: 10px; }/*by young*/
|
||||||
#changes-legend li { float: left; background-position: 5px 0; }
|
#changes-legend li { float: left; background-position: 5px 0; }
|
||||||
|
|
||||||
table.filecontent { border: 1px solid #e2e2e2; border-collapse: collapse; width:98%; background-color: #fafafa; }
|
table.filecontent { border: 1px solid #e2e2e2; border-collapse: collapse; width:99%; background-color: #fafafa; }
|
||||||
table.filecontent tbody {font-family:"Liberation Mono", Courier, monospace; font-size:12px;}
|
table.filecontent tbody {font-family:"Liberation Mono", Courier, monospace; font-size:12px;}
|
||||||
table.filecontent th { border: 1px solid #e2e2e2; background-color: #eee; }
|
table.filecontent th { border: 1px solid #e2e2e2; background-color: #eee; }
|
||||||
table.filecontent th.filename { background-color: #e4e4d4; text-align: left; padding:5px;}
|
table.filecontent th.filename { background-color: #e4e4d4; text-align: left; padding:5px;}
|
||||||
|
|
Loading…
Reference in New Issue