From 19c474e422f2bbe115f8ab1b00607bb1f32c6d36 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 26 Jun 2015 15:13:53 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=B6=85=E7=BA=A7=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=91=98=E5=8F=AF=E4=BB=A5=E6=9F=A5=E7=9C=8B=E5=AD=A6=E7=94=9F?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E3=80=81=E6=95=99=E5=B8=88=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/courses_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb index 13012a70c..a0bd18582 100644 --- a/app/helpers/courses_helper.rb +++ b/app/helpers/courses_helper.rb @@ -35,7 +35,7 @@ module CoursesHelper #生成课程老师成员链接 def course_teacher_link teacher_num - if User.current.member_of_course?(@course) + if User.current.member_of_course?(@course) || User.current.admin? link_to "#{teacher_num}", course_member_path(@course, :role => 1), :class => 'info_foot_num c_blue' else content_tag 'span',teacher_num, :class => 'info_foot_num c_blue' @@ -44,7 +44,7 @@ module CoursesHelper #生成课程学生列表连接 def course_student_link student_num - if (User.current.logged? && @course.open_student == 1) || (User.current.member_of_course?(@course)) + if (User.current.logged? && @course.open_student == 1) || (User.current.member_of_course?(@course)) || User.current.admin? link_to "#{student_num}", course_member_path(@course, :role => 2), :class => 'info_foot_num c_blue' else content_tag 'span',student_num, :class => 'info_foot_num c_blue' From bb9c46a63248c24577d549b8718b77a32325fd5f Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 26 Jun 2015 16:27:55 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E7=95=99=E8=A8=80?= =?UTF-8?q?=E5=9B=9E=E5=A4=8D=EF=BC=8C=E5=9B=9E=E5=A4=8D=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E5=92=8C=E6=97=B6=E9=97=B4=E5=9C=A8=E5=90=8C=E4=B8=80=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/_history.html.erb | 1 + app/views/words/_journal_reply_items.html.erb | 1 + 2 files changed, 2 insertions(+) diff --git a/app/views/courses/_history.html.erb b/app/views/courses/_history.html.erb index e5f5fc0ec..df2737337 100644 --- a/app/views/courses/_history.html.erb +++ b/app/views/courses/_history.html.erb @@ -18,6 +18,7 @@

<%= journal.notes.html_safe %>

+
<% ids = 'project_respond_form_'+ journal.id.to_s%> diff --git a/app/views/words/_journal_reply_items.html.erb b/app/views/words/_journal_reply_items.html.erb index 7c8dd7f64..d299c9123 100644 --- a/app/views/words/_journal_reply_items.html.erb +++ b/app/views/words/_journal_reply_items.html.erb @@ -24,6 +24,7 @@

<%= reply.notes.html_safe %>

+
<%= format_time reply.created_on %> From 90c4a38cfc7b85537c5a0c76f0eb9015de323d4f Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 26 Jun 2015 17:00:33 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=85=AC=E5=85=B1=E8=B4=B4=E5=90=A7?= =?UTF-8?q?=E5=A4=B4=E5=83=8F=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/views/forums/_show_topics.html.erb | 64 ++++++++++--------- .../stylesheets/application.css | 1 + 2 files changed, 35 insertions(+), 30 deletions(-) diff --git a/app/views/forums/_show_topics.html.erb b/app/views/forums/_show_topics.html.erb index 9af8538ed..f46600a6c 100644 --- a/app/views/forums/_show_topics.html.erb +++ b/app/views/forums/_show_topics.html.erb @@ -4,36 +4,40 @@ <% if memos.any? %> <% memos.each do |topic| %> - - + + +
<%= link_to image_tag(url_to_avatar(topic.author), :class => "avatar"), user_path(topic.author) if topic.author%> - - - - - - - - - - - -
<%= link_to h(topic.subject), forum_memo_path(topic.forum, topic) %> - - - - - - - -
<%= link_to (topic.replies_count), forum_memo_path(topic.forum, topic) %>
回答
<%= authoring topic.created_at, topic.author %> - - <% author = topic.last_reply.try(:author)%> - <% if author%> - 最后回复:<%=link_to_user author %> - <% end%> - -
-
+ <%= link_to image_tag(url_to_avatar(topic.author), :class => "avatar"), user_path(topic.author) if topic.author%> + + + + + + + + + + + + +
<%= link_to h(topic.subject), forum_memo_path(topic.forum, topic) %> + + + + + + + +
<%= link_to (topic.replies_count), forum_memo_path(topic.forum, topic) %>
回答
<%= authoring topic.created_at, topic.author %> + + <% author = topic.last_reply.try(:author)%> + <% if author%> + 最后回复:<%=link_to_user author %> + <% end%> + +
+
+
<% end %> diff --git a/public/themes/redpenny-master/stylesheets/application.css b/public/themes/redpenny-master/stylesheets/application.css index 95092aa1d..02626f440 100644 --- a/public/themes/redpenny-master/stylesheets/application.css +++ b/public/themes/redpenny-master/stylesheets/application.css @@ -1635,6 +1635,7 @@ img.avatar { display: block; width: 38px; height: 38px; + max-width: none; } From 65ee86bb4581aa39954c58f2a0669d37f3dfe583 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 26 Jun 2015 17:07:31 +0800 Subject: [PATCH 4/4] =?UTF-8?q?1=EF=BC=8C=E8=A7=A3=E5=86=B3git=E4=B8=AD?= =?UTF-8?q?=E8=8B=B1=E6=96=87500=E9=94=99=E8=AF=AF=202.=E8=A7=A3=E5=86=B3?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=99=A8=E8=BE=93=E5=85=A5=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E9=82=AE=E4=BB=B6=E6=98=BE=E7=A4=BA=E5=BC=82=E5=B8=B8=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/git_usage_controller.rb | 2 +- app/views/mailer/send_for_user_activities.html.erb | 4 ++-- config/locales/zh.yml | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/controllers/git_usage_controller.rb b/app/controllers/git_usage_controller.rb index 0b97fd523..56aaa56f1 100644 --- a/app/controllers/git_usage_controller.rb +++ b/app/controllers/git_usage_controller.rb @@ -1,6 +1,6 @@ #added by baiyu class GitUsageController < ApplicationController - layout "base_projects" + layout "new_base" def ch_usage end diff --git a/app/views/mailer/send_for_user_activities.html.erb b/app/views/mailer/send_for_user_activities.html.erb index a8c9336f8..22eb23bf7 100644 --- a/app/views/mailer/send_for_user_activities.html.erb +++ b/app/views/mailer/send_for_user_activities.html.erb @@ -49,7 +49,7 @@ :style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%> <%= l(:label_project_notice_reply) %> - <%= link_to truncate(course_news_comment.comments.html_safe,length: 30,omission: '...'), news_url(course_news_comment.commented,:token => @token.value), + <%= link_to truncate(l(:label_course_notice_point),length: 30,omission: '...'), news_url(course_news_comment.commented,:token => @token.value), :class => 'wmail_info', :style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> @@ -342,7 +342,7 @@ :style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%> <%= l(:lable_project_mail_notice_reply) %> - <%= link_to truncate(project_news_comment.comments.html_safe,length: 30,omission: '...'), news_url(project_news_comment.commented,:token => @token.value), + <%= link_to truncate(l(:lable_project_notice_point),length: 30,omission: '...'), news_url(project_news_comment.commented,:token => @token.value), :class => 'wmail_info', :style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> <%= format_time(project_news_comment.created_on) %> diff --git a/config/locales/zh.yml b/config/locales/zh.yml index a37c3882a..568690638 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -784,6 +784,8 @@ zh: label_project_newshare: "分享了" label_project_notice: "发布了通知:" label_project_notice_reply: "回复了通知:" + label_course_notice_point: "通知有了新的回复!" + lable_project_notice_point: "新闻有了新的回复!" label_project_mail_notice: "发布了新闻:" lable_project_mail_notice_reply: "回复了新闻:" label_project_issue: "发布了问题:"