From 50e1f413459afee5ee458e3a5ab17f7adcfc96b6 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Thu, 21 Aug 2014 11:16:40 +0800
Subject: [PATCH 01/18] =?UTF-8?q?#1307=E4=BF=AE=E5=A4=8D=E4=BD=9C=E4=B8=9A?=
=?UTF-8?q?=E5=88=97=E8=A1=A8=E7=9C=9F=E5=AE=9E=E5=A7=93=E5=90=8D=E5=8F=AA?=
=?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=90=8D=E4=B8=8D=E6=98=BE=E7=A4=BA=E5=A7=93?=
=?UTF-8?q?=E7=9A=84BUG?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/helpers/courses_helper.rb | 2 +-
app/views/bids/_homework_list.html.erb | 8 +++++---
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb
index aad350d22..e08e50e80 100644
--- a/app/helpers/courses_helper.rb
+++ b/app/helpers/courses_helper.rb
@@ -441,7 +441,7 @@ module CoursesHelper
def homework_user_of_homework homework,is_teacher
homework_users = ""
homework.users.each do |user|
- homework_users = homework_users + (is_teacher ? user.realname : user.name)
+ homework_users = homework_users + (is_teacher ? (user.firstname + user.lastname) : user.login)
if user != homework.users.last
homework_users = homework_users + "、"
end
diff --git a/app/views/bids/_homework_list.html.erb b/app/views/bids/_homework_list.html.erb
index 6797bc9eb..6d3a2adcc 100644
--- a/app/views/bids/_homework_list.html.erb
+++ b/app/views/bids/_homework_list.html.erb
@@ -28,13 +28,15 @@
+ <% user_name = is_teacher ? (homework.user.firstname + homework.user.lastname) : homework.user.login %>
- <%= image_tag(url_to_avatar(homework.user), :class => "avatar")%> |
+ <%= image_tag(url_to_avatar(homework.user), :class => "avatar")%> |
-
+
+ |
- <%= link_to (is_teacher ? homework.user.realname : homework.user ), user_path(homework.user),{:style => "color:#727272"} %>
+ <%= link_to user_name, user_path(homework.user),{:style => "color:#727272"} %>
|
From a690fd79cf901d4712f2a6e71fc957563ed901d0 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Thu, 21 Aug 2014 14:43:29 +0800
Subject: [PATCH 02/18] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E4=BF=AE=E6=94=B9?=
=?UTF-8?q?=E9=80=9A=E7=9F=A5=E6=97=B6=E6=A0=87=E9=A2=98=E4=B8=8D=E6=AD=A3?=
=?UTF-8?q?=E7=A1=AE=E7=9A=84=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/news/_course_form.html.erb | 2 +-
config/locales/en.yml | 3 +++
config/locales/zh.yml | 1 +
3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/app/views/news/_course_form.html.erb b/app/views/news/_course_form.html.erb
index ad2c7835c..186bab18d 100644
--- a/app/views/news/_course_form.html.erb
+++ b/app/views/news/_course_form.html.erb
@@ -1,6 +1,6 @@
<%= error_messages_for @news %>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 367624f89..602e7a659 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -1782,6 +1782,7 @@ en:
label_no_file_uploaded: No file uploaded
label_forum_new: New forum
label_memo_new_from_forum: Release memo
+ bale_edit_notice: Edit
label_user_grade: Individual score
label_active_homework: homework
@@ -1797,6 +1798,8 @@ en:
label_record: 湘ICP备09019772
label_check_comment: Check comment
label_notification: Notification
+
+
#end
# ajax异步验证
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index d17f4c3bd..a73f9db56 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -707,6 +707,7 @@ zh:
label_news: 新闻
label_news_new: 添加新闻
bale_news_notice: 添加通知 #huang
+ bale_edit_notice: 修改通知
label_news_notice: 发布课程通知
label_news_plural: 新闻
label_news_latest: 最近的新闻
From 38188804a15dfcbb26b977988d873a4e8c247322 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Thu, 21 Aug 2014 14:46:14 +0800
Subject: [PATCH 03/18] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E4=BF=AE=E6=94=B9?=
=?UTF-8?q?=E9=80=9A=E7=9F=A5=E6=97=B6=E6=A0=87=E9=A2=98=E4=B8=8D=E6=AD=A3?=
=?UTF-8?q?=E7=A1=AE=E7=9A=84=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/news/_course_form.html.erb | 3 +--
app/views/news/_course_news.html.erb | 2 +-
app/views/news/_course_show.html.erb | 2 +-
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/app/views/news/_course_form.html.erb b/app/views/news/_course_form.html.erb
index 186bab18d..91b35670c 100644
--- a/app/views/news/_course_form.html.erb
+++ b/app/views/news/_course_form.html.erb
@@ -1,7 +1,6 @@
<%= error_messages_for @news %>
<%= f.text_field :title, :required => true, :size => 60, :style => "width:488px;" %>
diff --git a/app/views/news/_course_news.html.erb b/app/views/news/_course_news.html.erb
index 5104cd851..adb2ce283 100644
--- a/app/views/news/_course_news.html.erb
+++ b/app/views/news/_course_news.html.erb
@@ -15,7 +15,7 @@
<%= labelled_form_for @news, :url => course_news_index_path(@course),
:html => {:id => 'news-form', :multipart => true} do |f| %>
- <%= render :partial => 'news/course_form', :locals => {:f => f} %>
+ <%= render :partial => 'news/course_form', :locals => {:f => f, :is_new => true} %>
<%= submit_tag l(:button_create), :class => 'whiteButton m3p10 h30', :name => nil %> |
<%= preview_link preview_news_path(:course_id => @course), 'news-form', target='preview', {:class => 'whiteButton m3p10'} %>
|
diff --git a/app/views/news/_course_show.html.erb b/app/views/news/_course_show.html.erb
index 727c9eb7a..eb4b5e8b7 100644
--- a/app/views/news/_course_show.html.erb
+++ b/app/views/news/_course_show.html.erb
@@ -14,7 +14,7 @@
<%= labelled_form_for :news, @news, :url => news_path(@news),
:html => { :id => 'news-form', :multipart => true, :method => :put } do |f| %>
- <%= render :partial => 'course_form', :locals => { :f => f } %>
+ <%= render :partial => 'course_form', :locals => { :f => f, :is_new => false } %>
<%= submit_tag l(:button_save) %>
<%= preview_link preview_news_path(:course_id => @course, :id => @news), 'news-form',target='preview',{:class => ''} %> |
<%= link_to l(:button_cancel), "#", :onclick => '$("#edit-news").hide(); return false;' %>
From 4e49da836e69fd3d267271c66edba0e62bbf5969 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Thu, 21 Aug 2014 15:40:21 +0800
Subject: [PATCH 04/18] =?UTF-8?q?1.=E8=AF=BE=E7=A8=8B=E9=80=9A=E7=9F=A5?=
=?UTF-8?q?=E6=B7=BB=E5=8A=A0=E3=80=81=E4=BF=AE=E6=94=B9=E5=A1=AB=E5=86=99?=
=?UTF-8?q?=E5=AD=97=E6=AE=B5=E6=97=B6=E5=AD=97=E6=AE=B5=E9=99=90=E5=88=B6?=
=?UTF-8?q?=E5=AE=9E=E6=97=B6=E6=8F=90=E7=A4=BA=202.=E4=BF=AE=E6=94=B9?=
=?UTF-8?q?=E9=80=9A=E7=9F=A5=E6=97=B6=E5=A1=AB=E5=86=99=E5=AD=97=E6=AE=B5?=
=?UTF-8?q?=E8=B6=85=E5=87=BA=E9=99=90=E5=88=B6=E9=95=BF=E5=BA=A6=E6=8A=A5?=
=?UTF-8?q?=E9=94=99=E7=9A=84=E4=BF=AE=E5=A4=8D=203.=E6=B3=A8=E9=87=8A?=
=?UTF-8?q?=E6=97=A0=E6=95=88=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/news_controller.rb | 3 +-
app/views/contestnotifications/_news.html.erb | 10 ++--
app/views/news/_course_form.html.erb | 6 +-
app/views/news/_course_news.html.erb | 56 ++++++++++++++++++-
app/views/news/_course_show.html.erb | 56 ++++++++++++++++++-
5 files changed, 121 insertions(+), 10 deletions(-)
diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb
index 9437889b2..e564bc940 100644
--- a/app/controllers/news_controller.rb
+++ b/app/controllers/news_controller.rb
@@ -148,7 +148,8 @@ class NewsController < ApplicationController
flash[:notice] = l(:notice_successful_update)
redirect_to news_path(@news)
else
- render :action => 'edit'
+ #flash[:error] = l(:notice_successful_update)
+ redirect_to news_path(@news)
end
end
diff --git a/app/views/contestnotifications/_news.html.erb b/app/views/contestnotifications/_news.html.erb
index 301a193d8..fbac2557f 100644
--- a/app/views/contestnotifications/_news.html.erb
+++ b/app/views/contestnotifications/_news.html.erb
@@ -1,9 +1,9 @@
-
+ <%# unless news.summary.blank? %> <%#=h news.summary %><% end %> |
+<%#= authoring news.created_on, news.author %> | -->
diff --git a/app/views/news/_course_form.html.erb b/app/views/news/_course_form.html.erb
index 91b35670c..7ce42439a 100644
--- a/app/views/news/_course_form.html.erb
+++ b/app/views/news/_course_form.html.erb
@@ -3,9 +3,11 @@
<%= is_new ? l(:bale_news_notice):l(:bale_edit_notice)%>
- <%= f.text_field :title, :required => true, :size => 60, :style => "width:488px;" %>
+ <%= f.text_field :title, :required => true, :size => 60, :style => "width:468px;", :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:470px;", :onblur => "regexDescription();" %>
+
<%= render :partial => 'attachments/form', :locals => {:container => @news} %>
diff --git a/app/views/news/_course_news.html.erb b/app/views/news/_course_news.html.erb
index adb2ce283..fdf12c06d 100644
--- a/app/views/news/_course_news.html.erb
+++ b/app/views/news/_course_news.html.erb
@@ -3,6 +3,59 @@
label_tips = l(:label_course_news)
%>
+
+
<%= label_tips %>
@@ -16,7 +69,8 @@
<%= labelled_form_for @news, :url => course_news_index_path(@course),
:html => {:id => 'news-form', :multipart => true} do |f| %>
<%= render :partial => 'news/course_form', :locals => {:f => f, :is_new => true} %>
- <%= 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(:course_id => @course), '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/_course_show.html.erb b/app/views/news/_course_show.html.erb
index eb4b5e8b7..c6661d9fe 100644
--- a/app/views/news/_course_show.html.erb
+++ b/app/views/news/_course_show.html.erb
@@ -1,3 +1,56 @@
+
+
<%= watcher_link(@news, User.current) %>
<%= link_to(l(:button_edit),
@@ -15,7 +68,8 @@
<%= labelled_form_for :news, @news, :url => news_path(@news),
:html => { :id => 'news-form', :multipart => true, :method => :put } do |f| %>
<%= render :partial => 'course_form', :locals => { :f => f, :is_new => false } %>
- <%= submit_tag l(:button_save) %>
+ <%#= submit_tag l(:button_save) %>
+ <%= link_to l(:button_save), "#", :onclick => 'submitNews();' %>
<%= preview_link preview_news_path(:course_id => @course, :id => @news), 'news-form',target='preview',{:class => ''} %> |
<%= link_to l(:button_cancel), "#", :onclick => '$("#edit-news").hide(); return false;' %>
<% end %>
From b30bfd073c9972205682cbcd48eda23f7a2ce222 Mon Sep 17 00:00:00 2001
From: linhk <304431313@.com>
Date: Thu, 21 Aug 2014 16:55:46 +0800
Subject: [PATCH 05/18] 1
---
app/controllers/projects_controller.rb | 2 +-
app/controllers/words_controller.rb | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 3fea454de..329159a05 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -407,7 +407,7 @@ class ProjectsController < ApplicationController
@page = @page.to_i
# Find the page of the requested reply
@jours = @project.journals_for_messages.where('m_parent_id IS NULL').order('created_on DESC')
- @limit = 3
+ @limit = 10
offset = @jours.count(:conditions => ["#{JournalsForMessage.table_name}.id > ?", params[:r].to_i])
page = 1 + offset / @limit
diff --git a/app/controllers/words_controller.rb b/app/controllers/words_controller.rb
index e31bb2738..2d03b2112 100644
--- a/app/controllers/words_controller.rb
+++ b/app/controllers/words_controller.rb
@@ -99,7 +99,7 @@ class WordsController < ApplicationController
@project = Project.find params[:project_id]
# Find the page of the requested reply
@jours = @project.journals_for_messages.where('m_parent_id IS NULL').order('created_on DESC')
- @limit = 3
+ @limit = 10
offset = @jours.count(:conditions => ["#{JournalsForMessage.table_name}.id > ?", params[:r].to_i])
page = 1 + offset / @limit
From 337ca5fb9339a4c11564d1923bb470d8b16e3e83 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Thu, 21 Aug 2014 17:14:30 +0800
Subject: [PATCH 06/18] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=94=A8=E6=88=B7?=
=?UTF-8?q?=E7=95=99=E8=A8=80=E5=8F=96=E6=B6=88=E6=8C=89=E9=92=AE=E6=8F=8F?=
=?UTF-8?q?=E8=BF=B0=E4=B8=8D=E6=AD=A3=E7=A1=AE=E7=9A=84=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/users/user_newfeedback.html.erb | 2 +-
app/views/words/_new.html.erb | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/views/users/user_newfeedback.html.erb b/app/views/users/user_newfeedback.html.erb
index 22ff5a280..d6337e1d0 100644
--- a/app/views/users/user_newfeedback.html.erb
+++ b/app/views/users/user_newfeedback.html.erb
@@ -2,7 +2,7 @@
<%= render :partial => 'words/new', :locals => {:user => @user, :sta => @state} %>
-
+
<%= l(:label_newfeedback_message) %>(<%= @feedback_count%>)
diff --git a/app/views/words/_new.html.erb b/app/views/words/_new.html.erb
index aa2001028..bc4d19225 100644
--- a/app/views/words/_new.html.erb
+++ b/app/views/words/_new.html.erb
@@ -72,7 +72,7 @@
<%= submit_tag l(:button_leave_meassge), :name => nil , :class => "enterprise", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -31px'"%>
- <%= submit_tag l(:button_clear), :name => nil, :class => "enterprise", :onclick => "clearMessage('new_form_user_message');", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -31px'" %> |
+ <%= submit_tag l(:button_cancel), :name => nil, :class => "enterprise", :onclick => "clearMessage('new_form_user_message');", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -31px'" %>
<% else %>
From 063593218713bf51a660bd4f324b67d1fa85c8c8 Mon Sep 17 00:00:00 2001
From: linhk <304431313@.com>
Date: Thu, 21 Aug 2014 17:31:36 +0800
Subject: [PATCH 07/18] =?UTF-8?q?=E7=94=A8=E6=88=B7=E4=B8=AA=E4=BA=BA?=
=?UTF-8?q?=E4=B8=BB=E9=A1=B5=E9=A1=B9=E7=9B=AE=E9=93=BE=E6=8E=A5=E9=94=99?=
=?UTF-8?q?=E8=AF=AF=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/users/show.html.erb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index 20f64dc3f..b70d73eb6 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -129,7 +129,7 @@
<% if e.user == User.current %>
- <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> <%= l(:label_i_new_activity) %> <%= link_to(l(:label_activity_project)+act.issue.project.name, project_path(act.issue.project.identifier)) %> <%= link_to format_activity_title("#{act.issue.tracker} ##{act.issue.id}: #{act.issue.subject}"), {:controller => 'issues', :action => 'show', :id => act.issue.id, :anchor => "change-#{act.id}"} %>
+ <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> <%= l(:label_i_new_activity) %> <%= link_to(l(:label_activity_project)+act.issue.project.name, project_path(act.issue.project.id)) %> <%= link_to format_activity_title("#{act.issue.tracker} ##{act.issue.id}: #{act.issue.subject}"), {:controller => 'issues', :action => 'show', :id => act.issue.id, :anchor => "change-#{act.id}"} %>
|
<% else %>
From c4fff8a8ac759a79bd8d498020c05f8662b4e3cf Mon Sep 17 00:00:00 2001
From: chenmin <19763783@qq.com>
Date: Fri, 22 Aug 2014 08:41:06 +0800
Subject: [PATCH 08/18] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AE=A8=E8=AE=BA?=
=?UTF-8?q?=E5=8C=BA=E5=B8=96=E5=AD=90=E4=B8=BB=E9=A2=98=E8=BF=87=E9=95=BF?=
=?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=BC=98=E5=8C=96=EF=BC=9B=20=E8=AE=A8?=
=?UTF-8?q?=E8=AE=BA=E5=8C=BA=E4=B8=BB=E9=A2=98=E4=B8=8B=E6=96=B9=E5=AD=98?=
=?UTF-8?q?=E5=9C=A8=E8=99=9A=E7=BA=BFbug=E4=BF=AE=E5=A4=8D=EF=BC=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/messages/_project_show.html.erb | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/app/views/messages/_project_show.html.erb b/app/views/messages/_project_show.html.erb
index ad91c72f8..ec06e3e86 100644
--- a/app/views/messages/_project_show.html.erb
+++ b/app/views/messages/_project_show.html.erb
@@ -95,11 +95,11 @@
-
+
<% if @project %>
- <%= label_tag l(:field_subject) %>: <%= link_to @topic.subject, project_boards_path(@topic.project) %>
+ <%= label_tag l(:field_subject) %>: <%= link_to @topic.subject.truncate(20, omission: '...'), project_boards_path(@topic.project),title: @topic.subject.to_s %>
<% elsif @course %>
- <%= label_tag l(:field_subject) %>: <%= link_to @topic.subject, course_boards_path(@topic.course) %>
+ <%= label_tag l(:field_subject) %>: <%= link_to @topic.subject.truncate(20,omission:'...'), course_boards_path(@topic.course),title: @topic.subject.to_s %>
<% end %>
@@ -179,9 +179,6 @@
<% end %>
-
-
-
<% if !@topic.locked? && authorize_for('messages', 'reply') %>
<%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
From 1498f5c20b9c0d94b526be368a4f685db8b47a4e Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Fri, 22 Aug 2014 08:57:00 +0800
Subject: [PATCH 09/18] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E8=AF=BE=E7=A8=8B?=
=?UTF-8?q?=E9=80=9A=E7=9F=A5=E6=97=B6=E6=8C=89=E9=92=AE=E7=8A=B6=E6=80=81?=
=?UTF-8?q?=202.=E6=96=B0=E5=BB=BA=E4=BD=9C=E4=B8=9A=E6=8F=8F=E8=BF=B0?=
=?UTF-8?q?=E4=B8=8D=E6=AD=A3=E7=A1=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/news/_course_show.html.erb | 6 +++---
config/locales/zh.yml | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/app/views/news/_course_show.html.erb b/app/views/news/_course_show.html.erb
index c6661d9fe..b86cea93f 100644
--- a/app/views/news/_course_show.html.erb
+++ b/app/views/news/_course_show.html.erb
@@ -69,9 +69,9 @@
:html => { :id => 'news-form', :multipart => true, :method => :put } do |f| %>
<%= render :partial => 'course_form', :locals => { :f => f, :is_new => false } %>
<%#= submit_tag l(:button_save) %>
- <%= link_to l(:button_save), "#", :onclick => 'submitNews();' %>
- <%= preview_link preview_news_path(:course_id => @course, :id => @news), 'news-form',target='preview',{:class => ''} %> |
- <%= link_to l(:button_cancel), "#", :onclick => '$("#edit-news").hide(); return false;' %>
+ <%= link_to l(:button_save), "#", :onclick => 'submitNews();',:class => 'whiteButton m3p10' %>
+ <%= preview_link preview_news_path(:course_id => @course, :id => @news), 'news-form',target='preview',{:class => 'whiteButton m3p10'} %> |
+ <%= link_to l(:button_cancel), "#", :onclick => '$("#edit-news").hide(); return false;',:class => 'whiteButton m3p10' %>
<% end %>
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index a73f9db56..4f0744d86 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -1641,7 +1641,7 @@ zh:
label_call_bonus: 奖金
label_bids_form_new_description: 企业可以在此发布一个软件开发任务或者一个技术方案需求:(1)获得价廉物美的解决方案;(2)发现对此项任务有贡献的大学生,获得可以招聘的人才。
label_bids_form_contest_new_description: 企业或者高校可以在此发布一个竞赛。
- label_homeworks_form_new_description: 发布一个作业,作业提交方式可以是附件或者项目形式,在作业类型里面设置。
+ label_homeworks_form_new_description: 发布一个作业,作业提交方式可以是附件或者项目形式。
label_fork_form_new_description: 该需求将作为某课程的作业被发布,作业提交方式可以使附件或者项目形式,在作业类型里面设置。
label_bids_new_money: 输入奖励金额,如 500,2.5等
label_bids_new_credit: 输入该作业对应课程的学分,如 3,2.5等
From d2bd1cc26167dd04fa2c4f12029149d7552701cf Mon Sep 17 00:00:00 2001
From: chenmin <19763783@qq.com>
Date: Fri, 22 Aug 2014 09:00:15 +0800
Subject: [PATCH 10/18] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=AF=BE=E7=A8=8B?=
=?UTF-8?q?=E8=AE=A8=E8=AE=BA=E5=8C=BA=E5=B8=96=E5=AD=90=E4=B8=BB=E9=A2=98?=
=?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=8C=E4=BF=AE=E5=A4=8D=E4=B8=BB=E9=A2=98?=
=?UTF-8?q?=E5=90=8E=E9=9D=A2=E7=A9=BA=E7=99=BD=E8=BF=87=E5=A4=9A=E7=9A=84?=
=?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/messages/_course_show.html.erb | 10 ++--------
app/views/messages/_project_show.html.erb | 4 ++--
2 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/app/views/messages/_course_show.html.erb b/app/views/messages/_course_show.html.erb
index 5b8b629d4..55cf9d61c 100644
--- a/app/views/messages/_course_show.html.erb
+++ b/app/views/messages/_course_show.html.erb
@@ -96,9 +96,9 @@
<% if @project %>
- <%= label_tag l(:field_subject) %>: <%= link_to @topic.subject, project_boards_path(@topic.project) %>
+ <%= label_tag l(:field_subject) %>: <%= link_to @topic.subject.truncate(24, omission: '...'), project_boards_path(@topic.project),title: @topic.subject.to_s %>
<% elsif @course %>
- <%= label_tag l(:field_subject) %>: <%= link_to @topic.subject, course_boards_path(@topic.course) %>
+ <%= label_tag l(:field_subject) %>: <%= link_to @topic.subject.truncate(24,omission:'...'), course_boards_path(@topic.course),title: @topic.subject.to_s %>
<% end %>
@@ -109,14 +109,8 @@
<%= authoring @topic.created_on, @topic.author %>
-
-
<%= toggle_link l(:button_reply), "reply", :focus => 'message_content' %>
-
-
-
-
diff --git a/app/views/messages/_project_show.html.erb b/app/views/messages/_project_show.html.erb
index ec06e3e86..7f88816f5 100644
--- a/app/views/messages/_project_show.html.erb
+++ b/app/views/messages/_project_show.html.erb
@@ -97,9 +97,9 @@
<% if @project %>
- <%= label_tag l(:field_subject) %>: <%= link_to @topic.subject.truncate(20, omission: '...'), project_boards_path(@topic.project),title: @topic.subject.to_s %>
+ <%= label_tag l(:field_subject) %>: <%= link_to @topic.subject.truncate(24, omission: '...'), project_boards_path(@topic.project),title: @topic.subject.to_s %>
<% elsif @course %>
- <%= label_tag l(:field_subject) %>: <%= link_to @topic.subject.truncate(20,omission:'...'), course_boards_path(@topic.course),title: @topic.subject.to_s %>
+ <%= label_tag l(:field_subject) %>: <%= link_to @topic.subject.truncate(24,omission:'...'), course_boards_path(@topic.course),title: @topic.subject.to_s %>
<% end %>
From 554d744929924ac37e1ca585906256ef3baad6c9 Mon Sep 17 00:00:00 2001
From: chenmin <19763783@qq.com>
Date: Fri, 22 Aug 2014 09:18:45 +0800
Subject: [PATCH 11/18] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=A1=B9=E7=9B=AE?=
=?UTF-8?q?=E5=92=8C=E8=AF=BE=E7=A8=8B=E8=AE=A8=E8=AE=BA=E5=8C=BA=E6=89=80?=
=?UTF-8?q?=E6=9C=89=E5=B8=96=E5=AD=90=E6=98=BE=E7=A4=BA=E9=A1=B5=E9=9D=A2?=
=?UTF-8?q?=E5=90=84=E5=B8=96=E5=AD=90=E5=86=85=E5=AE=B9=E6=B2=A1=E5=AF=B9?=
=?UTF-8?q?=E9=BD=90=E7=9A=84bug=EF=BC=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/boards/_course_show.html.erb | 4 +++-
app/views/boards/_project_show.html.erb | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/app/views/boards/_course_show.html.erb b/app/views/boards/_course_show.html.erb
index 25d35d407..ca33b7516 100644
--- a/app/views/boards/_course_show.html.erb
+++ b/app/views/boards/_course_show.html.erb
@@ -63,7 +63,9 @@
- <%= link_to h(topic.subject), board_message_path(@board, topic) %> |
+ <%= link_to h(topic.subject.truncate(40,ommision:'...')), board_message_path(@board, topic),title: topic.subject.to_s %>
+ |
<%=link_to (topic.replies_count), board_message_path(@board, topic) %> |
回答 |
|
diff --git a/app/views/boards/_project_show.html.erb b/app/views/boards/_project_show.html.erb
index 1327f13e9..ef1afd27e 100644
--- a/app/views/boards/_project_show.html.erb
+++ b/app/views/boards/_project_show.html.erb
@@ -71,7 +71,9 @@
- <%= link_to h(topic.subject), board_message_path(@board, topic) %> |
+ <%= link_to h(topic.subject.truncate(40,ommision:'...')), board_message_path(@board, topic),title:topic.subject.to_s %>
+ |
From 589c6d37db19d7caef7796de1d799353d11e35bb Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Fri, 22 Aug 2014 09:20:03 +0800
Subject: [PATCH 12/18] =?UTF-8?q?=E5=8F=96=E6=B6=88=E6=97=A5=E6=9C=9F?=
=?UTF-8?q?=E7=BC=96=E8=BE=91=E6=A1=86=E5=8F=AF=E6=89=8B=E5=8A=A8=E8=BE=93?=
=?UTF-8?q?=E5=85=A5=E7=9A=84=E9=97=AE=E9=A2=98=20#1045?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/bids/_homework_form.html.erb | 4 ++--
app/views/courses/_homework_form.html.erb | 2 +-
app/views/memos/_form.html.erb | 14 +++++++-------
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/app/views/bids/_homework_form.html.erb b/app/views/bids/_homework_form.html.erb
index f7c753b45..463b2b621 100644
--- a/app/views/bids/_homework_form.html.erb
+++ b/app/views/bids/_homework_form.html.erb
@@ -26,9 +26,9 @@
<%= f.text_field :name, :required => true, :size => 60, :style => "width:490px;", :maxlength => Bid::NAME_LENGTH_LIMIT %>
<%= f.text_area :description, :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;", :maxlength => Bid::DESCRIPTION_LENGTH_LIMIT %>
-
<%= f.text_field :deadline, :required => true, :size => 60, :style => "width:150px;" %><%= calendar_for('bid_deadline')%>
diff --git a/app/views/courses/_homework_form.html.erb b/app/views/courses/_homework_form.html.erb
index 41c059603..bfecb5304 100644
--- a/app/views/courses/_homework_form.html.erb
+++ b/app/views/courses/_homework_form.html.erb
@@ -30,7 +30,7 @@
<%#= f.text_field :budget, :required => true, :size => 60, :style => "width:350px;", :placeholder => l(:label_bids_reward_what) %>
-->
<% time = (Time.now + 3600 * 24).strftime('%Y-%m-%d') %>
-<%= f.text_field(:deadline, :required => true, :size => 60, :style => "width:150px;",:value => "#{time}") %><%= calendar_for('bid_deadline')%>
+ <%= f.text_field(:deadline, :required => true, :size => 60, :style => "width:150px;",:value => "#{time}",:readonly => "readonly") %><%= calendar_for('bid_deadline')%>
<%= f.select :is_evaluation, is_evaluation_option %>
diff --git a/app/views/memos/_form.html.erb b/app/views/memos/_form.html.erb
index d4b517048..116f97149 100644
--- a/app/views/memos/_form.html.erb
+++ b/app/views/memos/_form.html.erb
@@ -2,12 +2,12 @@
<%= l(:label_homeworks_form_new_description) %>
+ <%# if @memo.safe_attribute? 'sticky' %>
+ <%#= f.check_box :sticky %> <%= l(:label_board_sticky) %>
+ <%# end %>
+ <%# if @memo.safe_attribute? 'locked' %>
+ <%#= f.check_box :locked %> <%#= label_tag 'memo_locked', l(:label_board_locked) %>
+ <%# end %>
+ <%# end %> -->
<%= f.text_field :content, :required => true, :size => 60, :style => "width:150px;" %>
<%= hidden_field_tag 'subject', ||=@memo.subject %>
\ No newline at end of file
From b635a6b3c5492476b35225f839872a12637b3360 Mon Sep 17 00:00:00 2001
From: zhanghaitao <562681745@qq.com>
Date: Fri, 22 Aug 2014 09:38:07 +0800
Subject: [PATCH 13/18] =?UTF-8?q?1.=E6=B7=BB=E5=8A=A0=E5=B7=A5=E4=BD=9C?=
=?UTF-8?q?=E5=8F=B0=E5=88=86=E9=A1=B5=E5=A4=84=E7=90=86=E6=93=8D=E4=BD=9C?=
=?UTF-8?q?=202.=E5=88=86=E9=A1=B5=E5=A4=84=E7=90=86=E8=B7=AF=E7=94=B1?=
=?UTF-8?q?=E5=87=BD=E6=95=B0=E6=B7=BB=E5=8A=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/issues_controller.rb | 4 +++
app/controllers/my_controller.rb | 27 ++++++++++++++++++-
app/views/my/blocks/_assiagn_issue.html.erb | 26 ++++++++++++++++++
.../my/blocks/_issuesassignedtome.html.erb | 20 +++-----------
app/views/my/page.js.erb | 1 +
app/views/my/page2.js.erb | 1 +
config/routes.rb | 2 ++
7 files changed, 63 insertions(+), 18 deletions(-)
create mode 100644 app/views/my/blocks/_assiagn_issue.html.erb
create mode 100644 app/views/my/page.js.erb
create mode 100644 app/views/my/page2.js.erb
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb
index 9d734db37..b522a09d6 100644
--- a/app/controllers/issues_controller.rb
+++ b/app/controllers/issues_controller.rb
@@ -83,6 +83,10 @@ class IssuesController < ApplicationController
:limit => @limit)
@issue_count_by_group = @query.issue_count_by_group
+
+
+
+
respond_to do |format|
format.html { render :template => 'issues/index', :layout => @project_base_tag }#by young
format.api {
diff --git a/app/controllers/my_controller.rb b/app/controllers/my_controller.rb
index 91da700a1..14814ed32 100644
--- a/app/controllers/my_controller.rb
+++ b/app/controllers/my_controller.rb
@@ -37,14 +37,39 @@ class MyController < ApplicationController
}.freeze
def index
+
page
render :action => 'page'
- end
+ end
# Show user's page
def page
@user = User.current
+ @Issues= Issue.visible.open.
+ where(:assigned_to_id => ([User.current.id] + User.current.group_ids))
+ @limit = 10
+ @feedback_count = @Issues.count
+ @feedback_pages = Paginator.new @feedback_count, @limit, params['page']
+ @offset ||= @feedback_pages.offset
+ @curse_attachments = @Issues[@offset, @limit]
+
+ @blocks = @user.pref[:my_page_layout] || DEFAULT_LAYOUT
+ end
+
+ def page2
+ @limit = 10
+ @user = User.current
+ @Issues= Issue.visible.open.
+ where(:assigned_to_id => ([User.current.id] + User.current.group_ids))
+ @feedback_count = @Issues.count
+ @feedback_pages = Paginator.new @feedback_count, @limit, params['page']
+ @offset ||= @feedback_pages.offset
+ @curse_attachments = @Issues[@offset, @limit]
+ @state = false
@blocks = @user.pref[:my_page_layout] || DEFAULT_LAYOUT
+ respond_to do |format|
+ format.js
+ end
end
# Edit user's account
diff --git a/app/views/my/blocks/_assiagn_issue.html.erb b/app/views/my/blocks/_assiagn_issue.html.erb
new file mode 100644
index 000000000..6e7df84fd
--- /dev/null
+++ b/app/views/my/blocks/_assiagn_issue.html.erb
@@ -0,0 +1,26 @@
+<% assigned_issues = issuesassignedtome_items %>
+<%= render :partial => 'issues/list_simple', :locals => { :issues => assigned_issues } %>
+<% if assigned_issues.length > 0 %>
+
+
+ <%= link_to l(:label_issue_view_all), :controller => 'issues',
+ :action => 'index',
+ :set_filter => 1,
+ :assigned_to_id => 'me',
+ :sort => 'priority:desc,updated_on:desc' %>
+<% end %>
+<% content_for :header_tags do %>
+<%= auto_discovery_link_tag(:atom,
+ {:controller => 'issues', :action => 'index', :set_filter => 1,
+ :assigned_to_id => 'me', :format => 'atom', :key => User.current.rss_key},
+ {:title => l(:label_assigned_to_me_issues)}) %>
+
+<% end %>
\ No newline at end of file
diff --git a/app/views/my/blocks/_issuesassignedtome.html.erb b/app/views/my/blocks/_issuesassignedtome.html.erb
index 02d8c9aa6..0b20dd4e5 100644
--- a/app/views/my/blocks/_issuesassignedtome.html.erb
+++ b/app/views/my/blocks/_issuesassignedtome.html.erb
@@ -1,18 +1,4 @@
<%=l(:label_assigned_to_me_issues)%> (<%= Issue.visible.open.count(:conditions => {:assigned_to_id => ([User.current.id] + User.current.group_ids)})%>)
-
-<% assigned_issues = issuesassignedtome_items %>
-<%= render :partial => 'issues/list_simple', :locals => { :issues => assigned_issues } %>
-<% if assigned_issues.length > 0 %>
-<%= link_to l(:label_issue_view_all), :controller => 'issues',
- :action => 'index',
- :set_filter => 1,
- :assigned_to_id => 'me',
- :sort => 'priority:desc,updated_on:desc' %>
-<% end %>
-
-<% content_for :header_tags do %>
-<%= auto_discovery_link_tag(:atom,
- {:controller => 'issues', :action => 'index', :set_filter => 1,
- :assigned_to_id => 'me', :format => 'atom', :key => User.current.rss_key},
- {:title => l(:label_assigned_to_me_issues)}) %>
-<% end %>
+
+ <%= render :partial => "my/blocks/assiagn_issue" %>
+
\ No newline at end of file
diff --git a/app/views/my/page.js.erb b/app/views/my/page.js.erb
new file mode 100644
index 000000000..d3f47a8e1
--- /dev/null
+++ b/app/views/my/page.js.erb
@@ -0,0 +1 @@
+$("#asdsadwsc").html("<%= escape_javascript(render :partial => 'my/blocks/assiagn_issue') %>");
\ No newline at end of file
diff --git a/app/views/my/page2.js.erb b/app/views/my/page2.js.erb
new file mode 100644
index 000000000..d3f47a8e1
--- /dev/null
+++ b/app/views/my/page2.js.erb
@@ -0,0 +1 @@
+$("#asdsadwsc").html("<%= escape_javascript(render :partial => 'my/blocks/assiagn_issue') %>");
\ No newline at end of file
diff --git a/config/routes.rb b/config/routes.rb
index f93318c7d..ed9001ee2 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -275,6 +275,8 @@ RedmineApp::Application.routes.draw do
match 'my/remove_block', :controller => 'my', :action => 'remove_block', :via => :post
match 'my/order_blocks', :controller => 'my', :action => 'order_blocks', :via => :post
+ get 'my/page2', :to => 'my#page2', :as => "my_page2"
+
resources :users
match 'users/:id/memberships/:membership_id', :to => 'users#edit_membership', :via => :put, :as => 'user_membership'
match 'users/:id/memberships/:membership_id', :to => 'users#destroy_membership', :via => :delete
From 6253f281bc4d482c45de17f7179a4e5b81789e81 Mon Sep 17 00:00:00 2001
From: linhk <304431313@.com>
Date: Fri, 22 Aug 2014 09:56:03 +0800
Subject: [PATCH 14/18] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=AF=84=E5=AE=A1?=
=?UTF-8?q?=E4=BB=BB=E5=8A=A1=E4=BD=8D=E7=BD=AE=E6=9B=B4=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/attachments/file.html.erb | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/app/views/attachments/file.html.erb b/app/views/attachments/file.html.erb
index 57393b81e..c85cbe32a 100644
--- a/app/views/attachments/file.html.erb
+++ b/app/views/attachments/file.html.erb
@@ -4,7 +4,13 @@
<%= 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 %>)
+ (<%= number_to_human_size @attachment.filesize %>)   
+ <%= 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') %>
+
From 0d93783764f5892c5af273c1700cfe71ead20eed Mon Sep 17 00:00:00 2001
From: zhanghaitao <562681745@qq.com>
Date: Fri, 22 Aug 2014 10:20:30 +0800
Subject: [PATCH 15/18] =?UTF-8?q?#1047=20=E4=BF=AE=E5=A4=8D=E4=BD=9C?=
=?UTF-8?q?=E5=93=81=E4=B8=8B=E8=BD=BD--=E5=86=85=E5=AE=B9=E8=B6=85?=
=?UTF-8?q?=E5=87=BA=E5=8F=B3=E8=BE=B9=E6=A1=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/files/_show_all_attachment.html.erb | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/app/views/files/_show_all_attachment.html.erb b/app/views/files/_show_all_attachment.html.erb
index 043fe1183..f865235ae 100644
--- a/app/views/files/_show_all_attachment.html.erb
+++ b/app/views/files/_show_all_attachment.html.erb
@@ -3,7 +3,8 @@
<% attachmenttypes = @project.attachmenttypes %>
<% delete_allowed = User.current.allowed_to?(:manage_files, @project) %>
<% edit_allowed = User.current.allowed_to?(:manage_files, @project) %>
- | | | | |