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