From ca9da99f7ec4a1e0345009964504886536c2dd69 Mon Sep 17 00:00:00 2001 From: nieguanghui Date: Wed, 18 Dec 2013 20:24:01 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=09=E5=AE=9E=E8=B7=B5=E8=AF=BE?= =?UTF-8?q?=E7=A8=8B->=E8=AF=BE=E7=A8=8B=E5=8A=A8=E6=80=81=20=E5=88=97?= =?UTF-8?q?=E8=A1=A8=20=20=E5=8A=A8=E6=80=81=E6=98=BE=E7=A4=BA=EF=BC=88?= =?UTF-8?q?=E6=9C=89=E4=BA=86=E6=9C=80=E6=96=B0=E5=8A=A8=E6=80=81=E5=90=8E?= =?UTF-8?q?=EF=BC=89=E5=BA=94=E8=AF=A5=E4=B8=BA=EF=BC=9A=E5=A6=82=E6=9E=9C?= =?UTF-8?q?=E6=98=AF=E9=A1=B9=E7=9B=AE=E5=88=99=E6=98=BE=E7=A4=BA=E6=96=B0?= =?UTF-8?q?=E9=97=BB=EF=BC=8C=E8=AF=BE=E7=A8=8B=E5=88=99=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E3=80=90=E5=85=89=E8=BE=89=20=E5=91=A8?= =?UTF-8?q?=E4=B8=89=E3=80=91=202=E3=80=81=09=E7=B3=BB=E7=BB=9F=E4=B8=AD?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E5=8A=A0=E7=A9=BA=E6=A0=BC=E5=9C=B0=E6=96=B9?= =?UTF-8?q?=EF=BC=9A=E7=95=99=E8=A8=80=E6=97=B6=E9=97=B4=E5=90=8E=E5=8A=A0?= =?UTF-8?q?=E7=A9=BA=E6=A0=BC=EF=BC=9B=E4=BD=9C=E4=B8=9A=E6=88=AA=E6=AD=A2?= =?UTF-8?q?=E6=97=A5=E6=9C=9F=E5=89=8D=E5=8A=A0=E7=A9=BA=E6=A0=BC=EF=BC=9B?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE-=E7=BC=BA=E9=99=B7=EF=BC=9A=E6=8C=87?= =?UTF-8?q?=E6=B4=BE=E7=BB=99**=E5=8A=A0=E7=A9=BA=E6=A0=BC=EF=BC=9B?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=8A=A8=E6=80=81-=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E5=8A=A0=E7=A9=BA=E6=A0=BC=EF=BC=8C=E8=80=8C?= =?UTF-8?q?=E4=B8=94=E5=8E=BB=E6=8E=89a=E6=A0=87=E7=AD=BE=EF=BC=9B?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE-=E6=96=B0=E9=97=BB=EF=BC=88=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E6=97=B6=E9=97=B4=E5=90=8E=E7=BC=BA=E7=A9=BA=E6=A0=BC?= =?UTF-8?q?=EF=BC=89=E3=80=90=E5=85=89=E8=BE=89=20=E5=91=A8=E4=B8=89?= =?UTF-8?q?=E3=80=91=203=E3=80=81=09=E7=AB=9E=E8=B5=9B=E2=80=94=E5=B7=A6?= =?UTF-8?q?=E4=B8=8B=E8=A7=92=20=E5=8F=82=E4=B8=8E=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=90=8E=E9=9D=A2=E7=9A=84=E2=80=9C=E6=9B=B4=E5=A4=9A=E2=80=9C?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE=E5=BA=94=E8=AF=A5=E8=B0=83=E6=95=B4=E3=80=90?= =?UTF-8?q?=E5=85=89=E8=BE=89=20=E5=91=A8=E4=B8=89=E3=80=91=204=E3=80=81?= =?UTF-8?q?=09=E7=9C=8B=E5=88=AB=E4=BA=BA=E7=9A=84=E4=B8=BB=E9=A1=B5?= =?UTF-8?q?=E6=97=B6=E6=B2=A1=E6=9C=89=E6=A0=87=E7=AD=BE=E3=80=90=E5=85=89?= =?UTF-8?q?=E8=BE=89=20=E5=91=A8=E4=B8=89=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/projects_helper.rb | 17 ++++++++++++++++- app/views/bids/_bid_homework_show.html.erb | 2 +- app/views/bids/_homework_list.html.erb | 2 -- app/views/issues/_list.html.erb | 4 ++-- app/views/layouts/base_contest.html.erb | 2 +- app/views/layouts/base_users.html.erb | 12 ------------ app/views/news/index.html.erb | 19 +------------------ app/views/projects/show.html.erb | 5 +++-- app/views/words/_message.html.erb | 2 +- config/locales/zh.yml | 3 ++- 10 files changed, 27 insertions(+), 41 deletions(-) diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 5921fb377..63d5fea2a 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -237,7 +237,22 @@ module ProjectsHelper when "attachment" l :label_attachment when "news" - l :label_news + l :label_news + else + "" + end + end + + def eventToLanguageCourse event_type, project + case event_type + when "issue-note" + l :label_issue + when "issue" + l :label_issue + when "attachment" + l :label_attachment + when "news" + project.project_type == 1 ? (l :label_notification) : (l :label_news) else "" end diff --git a/app/views/bids/_bid_homework_show.html.erb b/app/views/bids/_bid_homework_show.html.erb index d3c4d65d2..2c347fa64 100644 --- a/app/views/bids/_bid_homework_show.html.erb +++ b/app/views/bids/_bid_homework_show.html.erb @@ -56,7 +56,7 @@ <%= bid.description %> - <%= l(:label_create_time) %> : <%=format_time bid.created_on %> <%= l(:field_deadline) %> : <%=bid.deadline %> + <%= l(:label_create_time) %> :  <%=format_time bid.created_on %> <%= l(:field_deadline) %> :  <%=bid.deadline %> diff --git a/app/views/bids/_homework_list.html.erb b/app/views/bids/_homework_list.html.erb index 0bbdc1348..83f4cb45a 100644 --- a/app/views/bids/_homework_list.html.erb +++ b/app/views/bids/_homework_list.html.erb @@ -18,7 +18,6 @@ <% if homework.attachments.any?%> - diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb index b4360f50c..3436d62be 100644 --- a/app/views/projects/show.html.erb +++ b/app/views/projects/show.html.erb @@ -20,7 +20,8 @@ <%= link_to_user(e.event_author) if e.respond_to?(:event_author) %> <%= l(:label_new_activity) %> - <%= link_to "#{eventToLanguage(e.event_type)}: "<< format_activity_title(e.event_title), e.event_type.eql?("attachment") ? project_files_path(e.container) : e.event_url %> + + <%= link_to "#{eventToLanguageCourse(e.event_type, @project)}: "<< format_activity_title(e.event_title), e.event_type.eql?("attachment") ? project_files_path(e.container) : e.event_url %> @@ -30,7 +31,7 @@

- + <% if e.event_type == "issue" %> <% end %> diff --git a/app/views/words/_message.html.erb b/app/views/words/_message.html.erb index 519f0062a..f76ffc94c 100644 --- a/app/views/words/_message.html.erb +++ b/app/views/words/_message.html.erb @@ -23,7 +23,7 @@

- +
<%= image_tag(url_to_avatar(homework.user), :class => "avatar")%> @@ -28,7 +27,6 @@ - - +
<%= l(:label_bidding_user_studentcode) %> :<%= homework.user.user_extensions.student_id%>
<% if (User.current == homework.user) || (!Member.where('user_id = ? and project_id = ?', User.current.id, @bid.courses.first.id).first.nil? && (Member.where('user_id = ? and project_id = ?', User.current.id, @bid.courses.first.id).first.roles&Role.where('id = ? or id = ? or id =?',3,7, 9)).size >0) %> diff --git a/app/views/issues/_list.html.erb b/app/views/issues/_list.html.erb index 8a82741cc..2019a7b45 100644 --- a/app/views/issues/_list.html.erb +++ b/app/views/issues/_list.html.erb @@ -38,12 +38,12 @@ <% end -%>
    - <%= l(:field_description)%>:<%= issue.description %> + <%= l(:field_description)%>: <%= issue.description %>
    <% unless issue.assigned_to_id.nil? %> - <%= l(:field_assigned_to)%><%= raw column_content[5] %> + <%= l(:field_assigned_to)%> <%= raw column_content[5] %>  <% end %> <%= l(:label_updated_time_on, format_date(issue.updated_on)).html_safe %>
    diff --git a/app/views/layouts/base_contest.html.erb b/app/views/layouts/base_contest.html.erb index 5736f0821..44245fc9c 100644 --- a/app/views/layouts/base_contest.html.erb +++ b/app/views/layouts/base_contest.html.erb @@ -181,7 +181,7 @@
    <%= l(:label_bidding_project) %> - <%= link_to "更多>>", :controller => 'bids', :action => 'show_project'%> + <%= link_to "更多>>", :controller => 'bids', :action => 'show_project'%>
    diff --git a/app/views/layouts/base_users.html.erb b/app/views/layouts/base_users.html.erb index 597ccd6a6..33b296bfb 100644 --- a/app/views/layouts/base_users.html.erb +++ b/app/views/layouts/base_users.html.erb @@ -162,24 +162,12 @@
    - - <% if User.current.logged? %> - <% if User.current.admin?||User.current.login==@user.login%>
    - - -
    <%= render :partial => 'tags/tag', :locals => {:obj => @user,:object_flag => "1"}%>
    - <% end %> - <% end %> - - - -
    diff --git a/app/views/news/index.html.erb b/app/views/news/index.html.erb index 0e67766db..a43565cfc 100644 --- a/app/views/news/index.html.erb +++ b/app/views/news/index.html.erb @@ -28,23 +28,6 @@ <% end if @project %>
    - - -
    <% if @newss.empty? %> @@ -73,7 +56,7 @@
<%= textilizable(news, :description) %>
<%= l :label_update_time %>: <%= format_time(news.created_on) %> <%= l :label_update_time %>: <%= format_time(news.created_on) %> <%= link_to l(:label_project_newother),news_path(news)%><%= "(#{l(:label_x_comments, :count => news.comments_count)})" if news.comments_count >= 0 %>
<%= l :label_activity_time %>: <%= format_activity_day(day) %> <%= format_time(e.event_datetime, false) %> <%= l :label_activity_time %>:  <%= format_activity_day(day) %> <%= format_time(e.event_datetime, false) %> <%= link_to l(:label_find_all_comments), issue_path(e) %> <%= l(:label_comments_count, :count => e.journals.count)%>
<%= l :label_comment_time %>: <%= format_time journal.created_on %> <%= l :label_comment_time %>:  <%= format_time journal.created_on %> <% if @user == User.current %> <%= link_to(l(:label_newfeedback_quote), {:controller => 'words', :action => 'new', :id => user, :journal_id => journal}, :remote => true, diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 15c957e42..3d83fbd2a 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -1750,4 +1750,5 @@ zh: label_downloads_list: 进入附件列表 label_join_contest: 参与了竞赛 label_contest_user: 参赛人: - label_contest_reason: 参赛宣言: \ No newline at end of file + label_contest_reason: 参赛宣言: + label_notification: 通知 \ No newline at end of file