From 85a95262fed4d7bb10618398c6e90219b9f83d0c Mon Sep 17 00:00:00 2001 From: z9hang Date: Thu, 21 Aug 2014 16:01:24 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=BE=97=E5=88=86?= =?UTF-8?q?=E7=BB=86=E8=8A=82=E4=B8=AD=E6=96=87=E6=A1=A3=E5=BE=97=E5=88=86?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E6=97=A0=E5=8F=8D=E5=BA=94=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/projects/_file_score_index.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/projects/_file_score_index.html.erb b/app/views/projects/_file_score_index.html.erb index ce80ddbd2..bfc87097e 100644 --- a/app/views/projects/_file_score_index.html.erb +++ b/app/views/projects/_file_score_index.html.erb @@ -1,4 +1,4 @@ -
<%= l(:label_file_number) %> * 4 = <%= document_num(@project) %> * 4 = <%= format("%.2f" , document_score(@project)).to_i %>
-
<%= l(:label_file_score) %> = <%= format("%.2f" , document_score(@project)).to_i %>
+
<%= l(:label_file_number) %> * 4 = <%= documents_num(@project) %> * 4 = <%= format("%.2f" , documents_score(@project)).to_i %>
+
<%= l(:label_file_score) %> = <%= format("%.2f" , documents_score(@project)).to_i %>
\ No newline at end of file From 9d23e6a8be9dc6c53b6a6ab68d3a1a1841c1bb82 Mon Sep 17 00:00:00 2001 From: z9hang Date: Thu, 21 Aug 2014 17:09:35 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=AB=9E=E8=B5=9B?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E6=A0=87=E9=A2=98=E9=95=BF=E5=BA=A6=E9=99=90?= =?UTF-8?q?=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/admin_controller.rb | 2 +- app/models/contest_notification.rb | 1 + app/views/welcome/contest.html.erb | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index aac107cfb..c75b9f9bf 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -241,7 +241,7 @@ class AdminController < ApplicationController end else respond_to do |format| - flash.now[:error] = "#{l :label_first_page_create_fail}: #{@first_page.errors.full_messages[0]}\n\t#{@contest_page.errors.full_messages[0]}" + flash.now[:error] = "#{l :label_first_page_create_fail}: #{@first_page.errors.full_messages[0]}\n\t#{@contest_page.errors.full_messages[0]}\n\t#{@notification.errors.full_messages[0]}" format.html { render :action => 'contest_page_made' } diff --git a/app/models/contest_notification.rb b/app/models/contest_notification.rb index c1f2fde6f..d525b4b3a 100644 --- a/app/models/contest_notification.rb +++ b/app/models/contest_notification.rb @@ -1,3 +1,4 @@ class ContestNotification < ActiveRecord::Base attr_accessible :content, :title + validates_length_of :title, maximum: 30 end diff --git a/app/views/welcome/contest.html.erb b/app/views/welcome/contest.html.erb index 8df19a280..30395aa6f 100644 --- a/app/views/welcome/contest.html.erb +++ b/app/views/welcome/contest.html.erb @@ -197,7 +197,7 @@ <%#= link_to l(:label_more_information), forums_path %>
-
<%= @contestNotification.title %>
+
<%= @contestNotification.title %>
From e900e6d6fd9832ffa72a66e0b069f72d5248228b Mon Sep 17 00:00:00 2001 From: linhk <304431313@.com> Date: Fri, 22 Aug 2014 11:04:32 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=9F=A5=E7=9C=8B?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E9=A1=B5=E9=9D=A2=E5=86=85=E5=AE=B9=E6=9C=AA?= =?UTF-8?q?=E6=8D=A2=E8=A1=8CBug=20=E4=BF=AE=E6=94=B9=E6=96=87=E6=9C=AC?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E8=A1=8C=E5=8F=B7=E6=A0=B7=E5=BC=8F=E5=B1=85?= =?UTF-8?q?=E4=B8=8A=20=E4=BF=AE=E6=94=B9=E6=96=B0=E5=A2=9E=E8=AF=84?= =?UTF-8?q?=E5=AE=A1=E5=9C=A8=E6=B2=A1=E6=9C=89=E7=9A=84=E6=97=B6=E5=80=99?= =?UTF-8?q?=E5=BC=95=E5=8F=91=E7=9A=84Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/attachments/file.html.erb | 8 +++++--- app/views/common/_file.html.erb | 8 ++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/app/views/attachments/file.html.erb b/app/views/attachments/file.html.erb index c85cbe32a..37db6f2bc 100644 --- a/app/views/attachments/file.html.erb +++ b/app/views/attachments/file.html.erb @@ -4,14 +4,16 @@

<%= h("#{@attachment.description} - ") unless @attachment.description.blank? %> <%= link_to_user(@attachment.author) %>, <%= format_time(@attachment.created_on) %>

<%= link_to_attachment @attachment, :text => l(:button_download), :download => true -%> - (<%= number_to_human_size @attachment.filesize %>)    - <%= link = link_to(l(:button_add), {:controller => 'code_review', + (<%= number_to_human_size @attachment.filesize %>)    + + <% if @attachment!=nil&&@attachment.container_type == 'Document' %> + <%= link = link_to(l(:button_add), {:controller => 'code_review', :action => 'assign', :action_type => 'attachment', :id=>@attachment.project, :change_id => '', :attachment_id => @attachment.id, }, :class => 'icon icon-add') %> + <% end %>

-
  <%= render :partial => 'common/file', :locals => {:content => @content, :filename => @attachment.filename} %> diff --git a/app/views/common/_file.html.erb b/app/views/common/_file.html.erb index 22126b949..d4c0875c2 100644 --- a/app/views/common/_file.html.erb +++ b/app/views/common/_file.html.erb @@ -1,14 +1,14 @@
- +
<% line_num = 1 %> <% syntax_highlight_lines(filename, Redmine::CodesetUtil.to_utf8_by_setting(content)).each do |line| %> - <% line_num += 1 %> From 27e15e6a9a107dce24f8cae70d891db420af3693 Mon Sep 17 00:00:00 2001 From: z9hang Date: Fri, 22 Aug 2014 11:27:01 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E9=83=A8=E5=88=86=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=AC=A1=E6=95=B0=E6=98=BE=E7=A4=BA=E4=B8=8D?= =?UTF-8?q?=E6=AD=A3=E7=A1=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/projects/_project.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/projects/_project.html.erb b/app/views/projects/_project.html.erb index 3d7cdfb6c..92e20f9e4 100644 --- a/app/views/projects/_project.html.erb +++ b/app/views/projects/_project.html.erb @@ -45,8 +45,8 @@
- <%= line_num %> + + <%= line_num %> -
<%= line.html_safe %>
+
<%= line.html_safe %>
- <% #find_project_repository @project %> - <%= content_tag('span', "#{@project.repository.nil? || @project.project_status.nil? ? '0' : @project.project_status.changesets_count }", :class => "info") %> + + <%= content_tag('span', "#{changesets_num(@project)}", :class => "info") %> <%= content_tag('span', l(:label_commit_on)) %>