+
<%= simple_format_without_paragraph @diff.to_html %>
From 3919d0fd481870655b32c5e5ad20f4840f33b089 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Thu, 28 Aug 2014 17:51:41 +0800
Subject: [PATCH 05/12] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=BA=E9=99=B7?=
=?UTF-8?q?=E6=9F=A5=E8=AF=A2=E4=B8=8D=E5=8F=AF=E7=94=A8=E7=9A=84BUG?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/issues/index.html.erb | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb
index 2446c4e3d..f5018fc94 100644
--- a/app/views/issues/index.html.erb
+++ b/app/views/issues/index.html.erb
@@ -37,21 +37,21 @@
- <% unless user.memberships.empty? %>
- <% cond = Project.visible_condition(User.current) + " AND projects.project_type <> 1" %>
- <% memberships = user.memberships.all(:conditions => cond) %>
- <%= l(:label_x_contribute_to, :count => memberships.count) %>
- <% for member in memberships %>
- <%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : ',' %>
- <% end %>
- <% else %>
- <%= l(:label_x_contribute_to, :count => 0) %>
+ <% cond = Project.visible_condition(User.current) + " AND projects.project_type <> 1" %>
+ <% memberships = user.memberships.all(:conditions => cond) %>
+ <%= l(:label_x_contribute_to, :count => memberships.count) %>
+ <% for member in memberships %>
+ <%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : ',' %>
<% end %>
- <% unless user.memberships.empty? %>
- <% cond = Project.visible_condition(User.current) + " AND projects.project_type = 1" %>
- <% memberships = user.memberships.all(:conditions => cond) %>
- <%= l(:label_x_course_contribute_to, :count => memberships.count) %>
- <% for member in memberships %>
- <%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : ',' %>
- <% end %>
- <% else %>
- <%= l(:label_x_course_contribute_to, :count => 0) %>
+ <% user_courses = user_courses_list(user) %>
+ <%= l(:label_x_course_contribute_to, :count => user_courses.count) %>
+ <% for course in user_courses %>
+ <%= link_to course.name,{:controller => 'courses',:action => 'show',id:course.id, host: Setting.course_domain} %><%= (user_courses.last == course) ? '' : ',' %>
<% end %>
|
diff --git a/app/views/users/user_watchlist.html.erb b/app/views/users/user_watchlist.html.erb
index bc4a655d8..e58e35d27 100644
--- a/app/views/users/user_watchlist.html.erb
+++ b/app/views/users/user_watchlist.html.erb
@@ -7,31 +7,32 @@
<%= link_to image_tag(url_to_avatar(user), :class => "avatar"), user_path(user), :title => "#{user.name}" %> |
- <%= content_tag "div", link_to(user.name,user_path(user)), :class => "project_avatar_name" %>
+ <%= content_tag "div", link_to(user.name,user_path(user)), :class => "project_avatar_name" %>
|
|
- <% unless user.memberships.empty? %>
+ <%# unless user.memberships.empty? %>
<% cond = Project.visible_condition(User.current) + " AND projects.project_type <> 1" %>
<% memberships = user.memberships.all(:conditions => cond) %>
<%= l(:label_x_contribute_to, :count => memberships.count) %>
<% for member in memberships %>
<%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : ',' %>
<% end %>
- <% end %>
+ <%# end %>
- <% unless user.memberships.empty? %>
- <% cond = Project.visible_condition(User.current) + " AND projects.project_type = 1" %>
- <% memberships = user.memberships.all(:conditions => cond) %>
- <%= l(:label_x_course_contribute_to, :count => memberships.count) %>
- <% for member in memberships %>
- <%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : ',' %>
- <% end %>
- <% end %>
+ <%# unless user.memberships.empty? %>
+ <% user_courses = user_courses_list(user) %>
+ <%= l(:label_x_course_contribute_to, :count => user_courses.count) %>
+ <% for course in user_courses %>
+ <%# if course.name != nil %>
+ <%= link_to course.name,{:controller => 'courses',:action => 'show',id:course.id, host: Setting.course_domain} %><%= (user_courses.last == course) ? '' : ',' %>
+ <%# end %>
+ <% end %>
+ <%# end %>
- |
+
From b50dac6a3621c5aec10c33e66c487f24da29a85c Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Fri, 29 Aug 2014 10:17:31 +0800
Subject: [PATCH 07/12] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=A1=B9=E7=9B=AE?=
=?UTF-8?q?=E8=B5=84=E6=BA=90=E6=8E=92=E5=BA=8F=E6=97=A0=E6=95=88=E7=9A=84?=
=?UTF-8?q?BUG?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/files_controller.rb | 39 ++++++++++++++++++++++++++---
1 file changed, 36 insertions(+), 3 deletions(-)
diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb
index 031f78277..ef6e20644 100644
--- a/app/controllers/files_controller.rb
+++ b/app/controllers/files_controller.rb
@@ -45,11 +45,45 @@ class FilesController < ApplicationController
'filename' => "#{Attachment.table_name}.filename",
'size' => "#{Attachment.table_name}.filesize",
'downloads' => "#{Attachment.table_name}.downloads"
+ sort = ""
if params[:project_id]
@isproject = true
- @containers = [ Project.includes(:attachments).reorder("#{Attachment.table_name}.created_on DESC").find(@project.id)]
- @containers += @project.versions.includes(:attachments).reorder("#{Attachment.table_name}.created_on DESC").all.sort
+
+ if params[:sort]
+ params[:sort].split(",").each do |sort_type|
+ order_by = sort_type.split(":")
+
+ case order_by[0]
+ when "filename"
+ attribute = "filename"
+ when "size"
+ attribute = "filesize"
+ when "attach_type"
+ attribute = "attachtype"
+ when "content_type"
+ attribute = "created_on"
+ when "field_file_dense"
+ attribute = "is_public"
+ when "downloads"
+ attribute = "downloads"
+ when "created_on"
+ attribute = "created_on"
+ end
+
+ if order_by.count == 1
+ sort += "#{Attachment.table_name}.#{attribute} desc "
+ elsif order_by.count == 2
+ sort += "#{Attachment.table_name}.#{attribute} #{order_by[1]} "
+ end
+ if sort_type != params[:sort].split(",").last
+ sort += ","
+ end
+ end
+ end
+
+ @containers = [ Project.includes(:attachments).reorder(sort).find(@project.id)]
+ @containers += @project.versions.includes(:attachments).reorder(sort).all.sort
show_attachments @containers
@@ -57,7 +91,6 @@ class FilesController < ApplicationController
elsif params[:course_id]
@isproject = false
- sort = ""
if params[:sort]
params[:sort].split(",").each do |sort_type|
order_by = sort_type.split(":")
From e3a7d365ea6e4c6d8d6c969219ce7784ef4046b8 Mon Sep 17 00:00:00 2001
From: z9hang
Date: Fri, 29 Aug 2014 11:21:45 +0800
Subject: [PATCH 08/12] =?UTF-8?q?=E8=AF=84=E5=AE=A1=E4=BB=BB=E5=8A=A1?=
=?UTF-8?q?=E7=A7=BB=E5=8A=A8=E5=88=B0=E6=98=BE=E7=9C=BC=E4=BD=8D=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/attachments/file.html.erb | 5 +++--
config/locales/en.yml | 3 ++-
config/locales/zh.yml | 1 +
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/app/views/attachments/file.html.erb b/app/views/attachments/file.html.erb
index 186b85c69..6c23c638f 100644
--- a/app/views/attachments/file.html.erb
+++ b/app/views/attachments/file.html.erb
@@ -6,8 +6,9 @@
<%= link_to_attachment @attachment, :text => l(:button_download), :download => true -%>
(<%= number_to_human_size @attachment.filesize %>)   
- <% if @attachment!=nil&&@attachment.container_type == 'Document'&&User.current.allowed_to?({:controller => 'code_review', :action => 'update_diff_view'}, @attachment.project) %>
- <%= link = link_to(l(:button_add), {:controller => 'code_review',
+
+ <% if @attachment!=nil&&User.current.allowed_to?({:controller => 'code_review', :action => 'update_diff_view'}, @attachment.project) %>
+ <%= l(:review_assignments)+":" %><%= link = link_to(l(:button_add), {:controller => 'code_review',
:action => 'assign', :action_type => 'attachment',
:id=>@attachment.project,
:change_id => '', :attachment_id => @attachment.id,
diff --git a/config/locales/en.yml b/config/locales/en.yml
index ddae72799..89898409e 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -1808,4 +1808,5 @@ en:
label_company_name: Company Name
notice_account_invalid_creditentials_new: You have not to the mailbox activation
lable_unknow_type: Unknow type
- lable_score_less_than_zero: Score less than 0, revised to 0
\ No newline at end of file
+ lable_score_less_than_zero: Score less than 0, revised to 0
+ review_assignments: review assignments
\ No newline at end of file
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index 2fb7ef2bf..224190060 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -2116,4 +2116,5 @@ zh:
lable_forums_max_length: 贴吧描述最大长度为65535个字符
lable_unknow_type: 未知类型
lable_score_less_than_zero: 得分小于0,修正为0
+ review_assignments: 评审任务
\ No newline at end of file
From d8e04ae9741d92895cf5d57673c5cf1763607fd4 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Fri, 29 Aug 2014 11:40:00 +0800
Subject: [PATCH 09/12] =?UTF-8?q?1.=E9=A1=B9=E7=9B=AE=E6=B7=BB=E5=8A=A0?=
=?UTF-8?q?=E3=80=81=E4=BF=AE=E6=94=B9=E6=96=B0=E9=97=BB=E5=A2=9E=E5=8A=A0?=
=?UTF-8?q?js=E9=AA=8C=E8=AF=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/news/_form.html.erb | 6 ++-
app/views/news/_project_news.html.erb | 57 +++++++++++++++++++++++++-
app/views/news/_project_show.html.erb | 59 +++++++++++++++++++++++++--
3 files changed, 116 insertions(+), 6 deletions(-)
diff --git a/app/views/news/_form.html.erb b/app/views/news/_form.html.erb
index f92559903..35d8da952 100644
--- a/app/views/news/_form.html.erb
+++ b/app/views/news/_form.html.erb
@@ -3,9 +3,11 @@
<%= @project ? l(:label_news_new) : l(:bale_news_notice) %>
- <%= f.text_field :title, :required => true, :size => 60, :style => "width:488px;" %>
+ <%= f.text_field :title, :required => true, :size => 60, :style => "width:488px;", :onblur => "regexTitle();" %>
+ (60个字符以内)
- <%= f.text_area :description, :required => true, :cols => 60, :rows => 11, :class => 'wiki-edit', :style => "width:490px;" %>
+ <%= f.text_area :description, :required => true, :cols => 60, :rows => 11, :class => 'wiki-edit', :style => "width:490px;", :onblur => "regexDescription();" %>
+
<%= render :partial => 'attachments/form', :locals => {:container => @news} %>
diff --git a/app/views/news/_project_news.html.erb b/app/views/news/_project_news.html.erb
index cdef33e34..e9a912c5c 100644
--- a/app/views/news/_project_news.html.erb
+++ b/app/views/news/_project_news.html.erb
@@ -1,3 +1,56 @@
+
+
<%
if @project.project_type == Project::ProjectType_course
btn_tips = l(:label_news_notice)
@@ -22,7 +75,9 @@
<%= labelled_form_for @news, :url => project_news_index_path(@project),
:html => {:id => 'news-form', :multipart => true} do |f| %>
<%= render :partial => 'news/form', :locals => {:f => f} %>
- <%= submit_tag l(:button_create), :class => 'whiteButton m3p10 h30', :name => nil %> |
+ <%#= submit_tag l(:button_create), :class => 'whiteButton m3p10 h30', :name => nil %>
+ <%= link_to l(:button_create), "#", :onclick => 'submitNews();', :class => 'whiteButton m3p10' %>
+ |
<%= preview_link preview_news_path(:project_id => @project), 'news-form', target='preview', {:class => 'whiteButton m3p10'} %>
|
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-news").hide()', :class => 'whiteButton m3p10' %>
diff --git a/app/views/news/_project_show.html.erb b/app/views/news/_project_show.html.erb
index c8a8c5767..ecae672b6 100644
--- a/app/views/news/_project_show.html.erb
+++ b/app/views/news/_project_show.html.erb
@@ -1,3 +1,55 @@
+
<%= watcher_link(@news, User.current) %>
<%= link_to(l(:button_edit),
@@ -15,9 +67,10 @@
<%= labelled_form_for :news, @news, :url => news_path(@news),
:html => { :id => 'news-form', :multipart => true, :method => :put } do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
- <%= submit_tag l(:button_save) %>
- <%= preview_link preview_news_path(:project_id => @project, :id => @news), 'news-form',target='preview',{:class => ''} %> |
- <%= link_to l(:button_cancel), "#", :onclick => '$("#edit-news").hide(); return false;' %>
+ <%#= submit_tag l(:button_save) %>
+ <%= link_to l(:button_save), "#", :onclick => 'submitNews();',:class => 'whiteButton m3p10' %>
+ <%= preview_link preview_news_path(:project_id => @project, :id => @news), 'news-form',target='preview',{:class => 'whiteButton m3p10'} %> |
+ <%= link_to l(:button_cancel), "#", :onclick => '$("#edit-news").hide(); return false;',:class => 'whiteButton m3p10' %>
<% end %>
From 59fadeacf651a68345f76db78820ba0cdedf79ac Mon Sep 17 00:00:00 2001
From: z9hang
Date: Fri, 29 Aug 2014 11:45:37 +0800
Subject: [PATCH 10/12] =?UTF-8?q?wiki=3D=E3=80=8B=E5=8E=86=E5=8F=B2=3D?=
=?UTF-8?q?=E3=80=8B=E8=BF=BD=E6=BA=AF=E4=B8=8D=E6=8D=A2=E8=A1=8C=E9=97=AE?=
=?UTF-8?q?=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/stylesheets/scm.css | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/public/stylesheets/scm.css b/public/stylesheets/scm.css
index 29c90a673..403e4184f 100644
--- a/public/stylesheets/scm.css
+++ b/public/stylesheets/scm.css
@@ -97,7 +97,7 @@ table.annotate td.author {
background: inherit;
}
-table.annotate td.line-code { background-color: #fafafa; }
+table.annotate td.line-code { background-color: #fafafa; word-break: break-all;}
div.action_M { background: #fd8 }
div.action_D { background: #f88 }
From 8fc9e65e665befd99b68f357c66405abb845b60a Mon Sep 17 00:00:00 2001
From: z9hang
Date: Fri, 29 Aug 2014 14:54:29 +0800
Subject: [PATCH 11/12] =?UTF-8?q?wiki=E7=BC=96=E8=BE=91=E6=8E=A7=E4=BB=B6?=
=?UTF-8?q?=E7=B2=98=E8=B4=B4=E8=BF=9B=E5=8E=BB=E7=9A=84=E6=88=AA=E5=9B=BE?=
=?UTF-8?q?=E4=B8=8D=E8=83=BD=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/helpers/application_helper.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index f70e27de6..807d851be 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -737,7 +737,7 @@ module ApplicationHelper
text = text.dup
macros = catch_macros(text)
- text = Redmine::WikiFormatting.to_html("CKEditor", text, :object => obj, :attribute => attr)
+ #text = Redmine::WikiFormatting.to_html("CKEditor", text, :object => obj, :attribute => attr)
@parsed_headings = []
@heading_anchors = {}
From c743f5810443a915c82d01ac099e76be17912148 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Fri, 29 Aug 2014 15:07:08 +0800
Subject: [PATCH 12/12] =?UTF-8?q?=E2=80=9C=E6=88=91=E7=9A=84=E8=AF=BE?=
=?UTF-8?q?=E7=A8=8B=E2=80=9D=20=E8=AE=A8=E8=AE=BA=E5=8C=BA=E4=B8=AD=20?=
=?UTF-8?q?=E8=AE=A8=E8=AE=BA=E5=86=85=E5=AE=B9=E6=A1=86=E6=B2=A1=E6=9C=89?=
=?UTF-8?q?=E5=90=8D=E5=AD=97=EF=BC=8C=E4=B8=94=E6=98=AF=E5=90=A6=E4=B8=BA?=
=?UTF-8?q?=E5=BF=85=E9=A1=BB=E6=B2=A1=E6=9C=89=E6=8F=90=E7=A4=BA=20#1524?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/messages/_form.html.erb | 11 ++++++-----
config/locales/zh.yml | 1 +
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/app/views/messages/_form.html.erb b/app/views/messages/_form.html.erb
index 55aa829c8..047f7d660 100644
--- a/app/views/messages/_form.html.erb
+++ b/app/views/messages/_form.html.erb
@@ -27,14 +27,15 @@
<%# modify by nwb%>
<% if @message.project %>
- <%= f.select :board_id, boards_options_for_select(@message.project.boards) %>
+ <%= f.select :board_id, boards_options_for_select(@message.project.boards) %>
<% elsif @message.course %>
- <%= f.select :board_id, boards_options_for_select(@message.course.boards) %>
+ <%= f.select :board_id, boards_options_for_select(@message.course.boards) %>
<% end %>
+
<% end %>
-
-
- <%= text_area :quote,:quote,:style => 'display:none' %>
+
+ <%= text_area :quote,:quote,:style => 'display:none' %>
+
<%= label_tag "message_content", l(:description_message_content), :class => "hidden-for-sighted" %>
<%= f.text_area :content, :cols => 80, :rows => 13, :class => 'wiki-edit', :id => 'message_content' %>
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index 224190060..54585e314 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -276,6 +276,7 @@ zh:
field_is_default: 默认值
field_tracker: 跟踪
field_subject: 主题
+ field_quote: 描述
field_due_date: 计划完成日期
field_assigned_to: 指派给
field_priority: 优先级
|