From 294a517251a3397193d6f57f5c649e935a338704 Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 27 Oct 2015 15:27:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E6=89=80=E6=9C=89=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E8=AE=B0=E5=BD=95=E5=85=A5=E5=8F=A3=20=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E8=87=AA=E5=8A=A8=E5=A4=8D=E5=88=B6=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=BA=93=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/repositories/show.html.erb | 47 +++++++++------------------- config/locales/projects/zh.yml | 1 + db/schema.rb | 45 ++++++++++++-------------- 3 files changed, 35 insertions(+), 58 deletions(-) diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb index 12a80a396..8eb52197b 100644 --- a/app/views/repositories/show.html.erb +++ b/app/views/repositories/show.html.erb @@ -23,25 +23,23 @@ <% else %> <%= render :partial => 'navigation' %>
克隆网址:
- +
ZIP
- <%#= image_tag(url_to_avatar(@changesets_latest_coimmit.user), :width => "25", :height => "25", :class => "fl portraitRadius mt2 ml4 mr5") %> -
<%#= @changesets_latest_coimmit.user %>
-
提交于<%#= time_tag(@changesets_latest_coimmit.committed_on) %>:
-
<%#= @changesets_latest_coimmit.comments %>
+ <% if @changesets && !@changesets.empty? %> + <%= image_tag(url_to_avatar(@changesets_latest_coimmit.user), :width => "25", :height => "25", :class => "fl portraitRadius mt2 ml4 mr5") %> +
<%=link_to @changesets_latest_coimmit.user, user_path(@changesets_latest_coimmit.user) %>
+
提交于<%= time_tag(@changesets_latest_coimmit.committed_on) %>:
+
<%= @changesets_latest_coimmit.comments %>
+
+ <% end %> <%= @repository.branches.count %> 个分支 + <%=link_to @changesets_count, {:action => 'changes', :path => to_path_param(@path), :id => @project, :repository_id => @repository.identifier_param, :rev => @rev} %> 提交 @@ -63,31 +61,14 @@ <% if authorize_for('repositories', 'revisions') %> <% if @changesets && !@changesets.empty? %> -

<%= l(:label_latest_revision_plural) %>

- <%= render :partial => 'revisions', - :locals => {:project => @project, :path => @path, - :revisions => @changesets, :entry => nil }%> - <% end %> -

<% has_branches = (!@repository.branches.nil? && @repository.branches.length > 0) sep = '' %> - <% if @repository.supports_all_revisions? && @path.blank? %> - <%= link_to l(:label_view_all_revisions), :action => 'revisions', :id => @project, - :repository_id => @repository.identifier_param %> - <% sep = '|' %> - <% end %> - <% if @repository.supports_directory_revisions? && - ( has_branches || !@path.blank? || !@rev.blank? ) %> - <%= sep %> - <%= link_to l(:label_view_revisions), - :action => 'changes', - :path => to_path_param(@path), - :id => @project, - :repository_id => @repository.identifier_param, - :rev => @rev %> - <% end %> -

+ <% if @repository.supports_all_revisions? && @path.blank? %> + <%= link_to l(:label_view_all_revisions_commits), :action => 'revisions', :id => @project, :repository_id => @repository.identifier_param %> + <% end %> | + <% end %> <% end %> +如何提交代码 <% content_for :header_tags do %> <%= stylesheet_link_tag "scm" %> diff --git a/config/locales/projects/zh.yml b/config/locales/projects/zh.yml index 7feb6f26a..bd31c4d79 100644 --- a/config/locales/projects/zh.yml +++ b/config/locales/projects/zh.yml @@ -322,6 +322,7 @@ zh: label_latest_revision_plural: 最近的修订版本 label_view_revisions: 查看修订 label_view_all_revisions: 查看所有修订 + label_view_all_revisions_commits: 查看所有提交记录 # # 项目托管平台 # diff --git a/db/schema.rb b/db/schema.rb index d3cab21bd..7dab1b3a7 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -527,23 +527,26 @@ ActiveRecord::Schema.define(:version => 20151022071804) do add_index "documents", ["created_on"], :name => "index_documents_on_created_on" add_index "documents", ["project_id"], :name => "documents_project_id" - create_table "dts", :force => true do |t| - t.string "IPLineCode" - t.string "Description" - t.string "Num" - t.string "Variable" - t.string "TraceInfo" - t.string "Method" + create_table "dts", :primary_key => "Num", :force => true do |t| + t.string "Defect", :limit => 50 + t.string "Category", :limit => 50 t.string "File" - t.string "IPLine" - t.string "Review" - t.string "Category" - t.string "Defect" - t.string "PreConditions" - t.string "StartLine" + t.string "Method" + t.string "Module", :limit => 20 + t.string "Variable", :limit => 50 + t.integer "StartLine" + t.integer "IPLine" + t.string "IPLineCode", :limit => 200 + t.string "Judge", :limit => 15 + t.integer "Review", :limit => 1 + t.string "Description" + t.text "PreConditions", :limit => 2147483647 + t.text "TraceInfo", :limit => 2147483647 + t.text "Code", :limit => 2147483647 t.integer "project_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at" + t.datetime "updated_at" + t.integer "id", :null => false end create_table "enabled_modules", :force => true do |t| @@ -812,16 +815,6 @@ ActiveRecord::Schema.define(:version => 20151022071804) do add_index "journal_details", ["journal_id"], :name => "journal_details_journal_id" - create_table "journal_details_copy", :force => true do |t| - t.integer "journal_id", :default => 0, :null => false - t.string "property", :limit => 30, :default => "", :null => false - t.string "prop_key", :limit => 30, :default => "", :null => false - t.text "old_value" - t.text "value" - end - - add_index "journal_details_copy", ["journal_id"], :name => "journal_details_journal_id" - create_table "journal_replies", :id => false, :force => true do |t| t.integer "journal_id" t.integer "user_id" @@ -1192,6 +1185,7 @@ ActiveRecord::Schema.define(:version => 20151022071804) do t.string "enterprise_name" t.integer "organization_id" t.integer "project_new_type" + t.integer "gpid" end add_index "projects", ["lft"], :name => "index_projects_on_lft" @@ -1608,6 +1602,7 @@ ActiveRecord::Schema.define(:version => 20151022071804) do t.string "identity_url" t.string "mail_notification", :default => "", :null => false t.string "salt", :limit => 64 + t.integer "gid" end add_index "users", ["auth_source_id"], :name => "index_users_on_auth_source_id"