diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb index 0475c3566..779c2a835 100644 --- a/app/views/repositories/show.html.erb +++ b/app/views/repositories/show.html.erb @@ -1,102 +1,100 @@ <%#= call_hook(:view_repositories_show_contextual, {:repository => @repository, :project => @project}) %> -
-

<%= render :partial => 'breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %>

- <% unless @entries.nil? %> - ZIP下载 - <% if User.current.member_of?(@project) && @project.is_public? %> - <% if quality_analysis(User.current.try(:login), @repository.id).nil? %> - <%= link_to "质量分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch, :type => "1"), :remote => true, :class => "btn_zipdown fr" %> - <% else %> - <%= link_to "重新分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch, :type => "2"), :remote => true, :class => "btn_zipdown fr" %> +
+
+

<%= render :partial => 'breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %>

+ <% unless @entries.nil? %> + ZIP下载 + <% if User.current.member_of?(@project) && @project.is_public? %> + <% if quality_analysis(User.current.try(:login), @repository.id).nil? %> + <%= link_to "质量分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch, :type => "1"), :remote => true, :class => "btn_zipdown fr" %> + <% else %> + <%= link_to "重新分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch, :type => "2"), :remote => true, :class => "btn_zipdown fr" %> + <% end %> <% end %> <% end %> - <% end %> - - <% unless QualityAnalysis.where(:project_id => @project.id).first.nil? %> - <%= link_to "代码分析结果", project_quality_analysis_path(:project_id => @project.id), :class => "btn_zipdown fr" %> - <% end %> -
-
- <% if @entries.nil? %> - <%# 未提交代码提示 %> -
- <% if @entries.nil? && authorize_for('repositories', 'browse') %> -
- 该版本库还没有上传代码! -
- <% end %> - <% if @repository.type.to_s == "Repository::Gitlab" %> - 版本库地址:<%= @repos_url %> - <% else %> - 版本库地址:<%= h @repository.url %> - <% end %> -
-
- <% else %> - <%= render :partial => 'navigation' %> -
克隆网址:
- - -
- <%=link_to "代码统计", stats_repository_project_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :creator => @creator, :default_branch => @g_default_branch ), :class => "fl vl_zip" %> -
+ + <% unless QualityAnalysis.where(:project_id => @project.id).first.nil? %> + <%= link_to "代码分析结果", project_quality_analysis_path(:project_id => @project.id), :class => "btn_zipdown fr" %> + <% end %> +
+
+ <% if @entries.nil? %> + <%# 未提交代码提示 %> +
+ <% if @entries.nil? && authorize_for('repositories', 'browse') %> +
+ 该版本库还没有上传代码! +
+ <% end %> + <% if @repository.type.to_s == "Repository::Gitlab" %> + 版本库地址:<%= @repos_url %> + <% else %> + 版本库地址:<%= h @repository.url %> + <% end %> +
+
+ <% else %> + <%= render :partial => 'navigation' %> +
克隆网址:
+ + +
+ <%=link_to "代码统计", stats_repository_project_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :creator => @creator, :default_branch => @g_default_branch ), :class => "fl vl_zip" %> +
- <% if User.current.id != @project.user_id %> -
<%= link_to "".html_safe+"Fork", {:controller => 'repositories', :action => 'forked'}, :class=>"vl_btn", :target => "_blank", :confirm=>"平台将为您创建一个新的同名项目和版本库,请问是否继续?" %> - <%= @project.forked_count.to_i %> + <% if User.current.id != @project.user_id %> +
<%= link_to "".html_safe+"Fork", {:controller => 'repositories', :action => 'forked'}, :class=>"vl_btn", :target => "_blank", :confirm=>"平台将为您创建一个新的同名项目和版本库,请问是否继续?" %> + <%= @project.forked_count.to_i %> +
+ <% end %> +
+ +
+ <% 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") %> + +
提交于<%= time_tag(@changesets_latest_coimmit.created_at) %>:
+
<%= @changesets_latest_coimmit.message %>
+
+ <% else %> + +
提交于<%= time_tag(@changesets_latest_coimmit.created_at) %>:
+
<%= @changesets_latest_coimmit.message %>
+
+ <%end%> + <% end %> + + <%= @repository.branches.count %> 个分支 + + + + <%=link_to @changesets_all_count, {:action => 'changes', :path => to_path_param(@path), :id => @project, :repository_id => @repository.identifier_param, :rev => @rev,:page=>1 ,:commit_count =>"#{@changesets_all_count}"} %> 提交 +
<% end %> -
-
- <% 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") %> - -
提交于<%= time_tag(@changesets_latest_coimmit.created_at) %>:
-
<%= @changesets_latest_coimmit.message %>
-
- <% else %> - -
提交于<%= time_tag(@changesets_latest_coimmit.created_at) %>:
-
<%= @changesets_latest_coimmit.message %>
-
- <%end%> - <% end %> - - <%= @repository.branches.count %> 个分支 - + <% if !@entries.nil? && authorize_for('repositories', 'browse') %> + <%= render :partial => 'dir_list' %> + <% end %> - - <%=link_to @changesets_all_count, {:action => 'changes', :path => to_path_param(@path), :id => @project, :repository_id => @repository.identifier_param, :rev => @rev,:page=>1 ,:commit_count =>"#{@changesets_all_count}"} %> 提交 - -
- <% end %> + <% memo = Memo.where(:id => 1232).first %> + <% unless memo.nil? %> + <%=Setting.host_name %>/forums/1/memos/1232" >如何提交代码 + <% end %> -<% if !@entries.nil? && authorize_for('repositories', 'browse') %> - <%= render :partial => 'dir_list' %> -<% end %> +
+ 导出统计结果: + <%= link_to "最近一周", {:controller => 'repositories', :action => 'export_rep_static', :format => 'xls', :rev => @rev, :cycle => "week" } %> | + <%= link_to "最近一月", {:controller => 'repositories', :action => 'export_rep_static', :format => 'xls', :rev => @rev, :cycle => "month" } %> +
-<% memo = Memo.where(:id => 1232).first %> -<% unless memo.nil? %> -<%=Setting.host_name %>/forums/1/memos/1232" >如何提交代码 -<% end %> - -
- 导出统计结果: - <%= link_to "最近一周", {:controller => 'repositories', :action => 'export_rep_static', :format => 'xls', :rev => @rev, :cycle => "week" } %> | - <%= link_to "最近一月", {:controller => 'repositories', :action => 'export_rep_static', :format => 'xls', :rev => @rev, :cycle => "month" } %> -
- - <%#= link_to "导出excel", {:controller => 'repositories', :action => 'export_rep_static', :rev => @rev}, :format => 'xls' %> - + <%#= link_to "导出excel", {:controller => 'repositories', :action => 'export_rep_static', :rev => @rev}, :format => 'xls' %> + +
<%# content_for :header_tags do %> <%#= stylesheet_link_tag "scm" %> <%# end %> <% html_title(l(:label_repository)) -%> - - diff --git a/public/stylesheets/css/public.css b/public/stylesheets/css/public.css index 18d1e42ce..b8538ab90 100644 --- a/public/stylesheets/css/public.css +++ b/public/stylesheets/css/public.css @@ -8,6 +8,7 @@ #LSide{ width:240px;} #RSide{ width:670px; background:#fff; padding:10px; margin-left: 10px; margin-bottom:10px;} .courseRSide{ width:730px; background:#fff; padding:10px; margin-left: 10px; margin-bottom:10px;} +.wrap-big {background:#fff; padding:10px; margin-bottom:10px;} /*资源库*/ .resources {width:718px; background-color:#ffffff; padding:15px; border:1px solid #dddddd;float: right} .resourcesBanner {width:730px; height:40px; background-color:#eaeaea; margin-bottom:10px;} diff --git a/public/stylesheets/css/structure.css b/public/stylesheets/css/structure.css index 47ac92fb6..dffa0f97b 100644 --- a/public/stylesheets/css/structure.css +++ b/public/stylesheets/css/structure.css @@ -143,7 +143,7 @@ a:hover.messages-title{ color:#269ac9;} .green-cir-btn{ background:#28be6c; padding:1px 5px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;} /*右侧内容--动态*/ -.project_r_h{ width:670px; height:40px; background:#eaeaea; margin-bottom:10px;} +.project_r_h{ width:100%; height:40px; background:#eaeaea; margin-bottom:10px;} .project_r_h02{ width:920px; height:40px; background:#eaeaea; margin-bottom:10px;} .project_h2{ background:#64bdd9; color:#fff; height:33px; width:90px; text-align:center; font-weight:normal; padding-top:7px; font-size:16px;} .project_h2_repository{ background:#64bdd9; color:#fff; height:33px; width:auto; text-align:center; font-weight:normal; padding-top:7px; font-size:16px;} diff --git a/public/stylesheets/repository.css b/public/stylesheets/repository.css index 89dc34d7a..c16f251a4 100644 --- a/public/stylesheets/repository.css +++ b/public/stylesheets/repository.css @@ -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;} .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;} +.recordBanner {width:100%; 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/graph.png) 0px 2px no-repeat; padding-left:22px;} @@ -220,7 +220,7 @@ .vl_branch {background:url(../images/vlicon/branch_icon.png) 0px -2px no-repeat; padding-left:22px} .mt1 {margin-top:1px;} .mt2 {margin-top:2px;} -.commit_content_dec{width: 200px;overflow: hidden; white-space: nowrap;text-overflow: ellipsis;} +.commit_content_dec{width: 400px;overflow: hidden; white-space: nowrap;text-overflow: ellipsis;} /*提交信息列表*/ .col-md-10 {