diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb index 4efa5a85d..c80ce6d69 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -44,11 +44,11 @@ class FilesController < ApplicationController if params[:sort] if params[:sort].include?":" - @orderBy = params[:sort].split(":")[0]; - @orderType = params[:sort].split(":")[1].split(",")[0]; + @orderBy = params[:sort].split(":")[0] + @orderType = params[:sort].split(":")[1].split(",")[0] else - @orderBy = params[:sort].split(",")[0]; - @orderType = "asc"; + @orderBy = params[:sort].split(",")[0] + @orderType = "asc" end end diff --git a/app/controllers/notificationcomments_controller.rb b/app/controllers/notificationcomments_controller.rb index 80500ab10..43cad6cbb 100644 --- a/app/controllers/notificationcomments_controller.rb +++ b/app/controllers/notificationcomments_controller.rb @@ -1,4 +1,7 @@ class NotificationcommentsController < ApplicationController + def show + + end # default_search_scope :contestnotifications # model_object Contestnotifications # before_filter :authorize @@ -20,8 +23,14 @@ class NotificationcommentsController < ApplicationController end def destroy - @contestnotifications.notificaioncomments.find(params[:notificaioncomment_id]).destroy - redirect_to contest_contestnotification_path(@contestnotifications) + @contest = Contest.find(params[:contest_id]) + @contestnotification = Contestnotification.find(params[:contestnotification_id]) + notificaioncomments = Notificationcomment.find(params[:id]) + notificaioncomments.destroy if notificaioncomments + #@contestnotifications = notificaioncomments.Contestnotification + #@contest = @contestnotifications.contest + #@contestnotifications.notificaioncomments.find(params[:notificaioncomment_id]).destroy + redirect_to contest_contestnotification_path(@contest,@contestnotification) end end diff --git a/app/controllers/softapplications_controller.rb b/app/controllers/softapplications_controller.rb index f2b0a0c83..067465b40 100644 --- a/app/controllers/softapplications_controller.rb +++ b/app/controllers/softapplications_controller.rb @@ -156,8 +156,8 @@ class SoftapplicationsController < ApplicationController format.html { redirect_to show_attendingcontest_contest_path(:id => params[:contest_id]), notice: l(:notice_attendingcontest_work_successfully_created) } # format.json { render json: @softapplication, status: :created, location: @softapplication } else - format.js { render status: 406 } - format.html { render action: "new" } + #format.js { render status: 406 } + format.html { render action: "contests/show_attendingcontest" } # format.json { render json: @softapplication.errors, status: :unprocessable_entity } end end diff --git a/app/helpers/members_helper.rb b/app/helpers/members_helper.rb index 134b7c007..ecfb097e9 100644 --- a/app/helpers/members_helper.rb +++ b/app/helpers/members_helper.rb @@ -53,10 +53,13 @@ module MembersHelper # 当前申请加入的成员名单 def render_principals_for_applied_members(project) - scope = Principal.active.sorted.applied_members(project).like(params[:q]) + scope = project.applied_projects.map(&:user) principal_count = scope.count principal_pages = Redmine::Pagination::Paginator.new principal_count, 10, params['page'] - principals = scope.offset(principal_pages.offset).limit(principal_pages.per_page).all + offset ||= principal_pages.offset + principals = scope[offset, 10] + #principals = scope.offset(principal_pages.offset).limit(principal_pages.per_page).all + #principals = ApplicationController.new.paginateHelper scope,10 s = content_tag('div', principals_check_box_tags_ex('membership[user_ids][]', principals), :id => 'principals') diff --git a/app/models/notificationcomment.rb b/app/models/notificationcomment.rb index 9cc658f22..ce4227a00 100644 --- a/app/models/notificationcomment.rb +++ b/app/models/notificationcomment.rb @@ -4,6 +4,7 @@ class Notificationcomment < ActiveRecord::Base include Redmine::SafeAttributes belongs_to :notificationcommented, :polymorphic => true#, :counter_cache => true belongs_to :author, :class_name => 'User', :foreign_key => 'author_id' + belongs_to :Contestnotification validates_presence_of :notificationcommented, :author, :notificationcomments diff --git a/app/models/softapplication.rb b/app/models/softapplication.rb index a572a22ba..0234bc118 100644 --- a/app/models/softapplication.rb +++ b/app/models/softapplication.rb @@ -11,7 +11,7 @@ class Softapplication < ActiveRecord::Base belongs_to :project has_many :contests, :through => :contesting_softapplications - validates_length_of :name, :maximum => 125 + validates_length_of :name, :maximum => 25 validates_length_of :application_developers, :maximum => 125 validates_length_of :android_min_version_available, :maximum => 125 diff --git a/app/views/bids/_homework_list.html.erb b/app/views/bids/_homework_list.html.erb index 9e8aceaff..6797bc9eb 100644 --- a/app/views/bids/_homework_list.html.erb +++ b/app/views/bids/_homework_list.html.erb @@ -8,7 +8,7 @@ + + +
<%= l(:label_task_plural)%>(<%= @homework_list.count%>) - <%= link_to "作业打包下载", zipdown_assort_path(obj_class: @bid.class, obj_id: @bid), remote: false, class: "button_submit button_submit_font_white", style: "margin: 5px 10px;line-height: 20px;height: 20px;display: inline-block;" if(is_teacher && @bid.homeworks.count > 0) %> + <%= link_to "作业打包下载", zipdown_assort_path(obj_class: @bid.class, obj_id: @bid), class: "button_submit button_submit_font_white", style: "margin: 5px 10px;line-height: 20px;height: 20px;display: inline-block;" if(is_teacher && @bid.homeworks.count > 0) %> 提交文件:  <% if is_evaluation || is_teacher%> - <%= link_to "打包下载", :controller => "zipdown", :action => "download_user_homework",:homework => homework, :remote => true%> + <%= link_to "打包下载", :controller => "zipdown", :action => "download_user_homework",:homework => homework%> <% else %> 未开启互评功能作业不允许下载 <% end %> diff --git a/app/views/contestnotifications/show.html.erb b/app/views/contestnotifications/show.html.erb index eea4cc204..b6ac88008 100644 --- a/app/views/contestnotifications/show.html.erb +++ b/app/views/contestnotifications/show.html.erb @@ -69,7 +69,21 @@ - + + diff --git a/app/views/files/_show_all_attachment.html.erb b/app/views/files/_show_all_attachment.html.erb index 8c624d176..838153c78 100644 --- a/app/views/files/_show_all_attachment.html.erb +++ b/app/views/files/_show_all_attachment.html.erb @@ -21,7 +21,7 @@ <%= sort_header_tag('field_file_dense', :caption => l(:field_file_dense), :default_order => 'desc', :scope => "col", :id => "vzebra-field_file_dense") %> <%= sort_header_tag('downloads', :caption => l(:field_downloads), :default_order => 'desc', :scope => "col", :id => "vzebra-action") %> <%= sort_header_tag('operation', :caption => "", :scope => "col", :id => "vzebra-children") %> - + diff --git a/app/views/messages/_course_show.html.erb b/app/views/messages/_course_show.html.erb index 243406a3c..4db903b88 100644 --- a/app/views/messages/_course_show.html.erb +++ b/app/views/messages/_course_show.html.erb @@ -104,6 +104,8 @@
<%= textilizable(@topic, :content) %> <%= link_to_attachments @topic, :author => false %> + <%# options = {:author => true, :deletable => @topic.author.eql?(User.current)} %> + <%#= render :partial => 'attachments/app_link', :locals => {:attachments => @topi.attachments, :options => options} %>
<%= authoring @topic.created_on, @topic.author %>
diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb index 3ed947cbf..6a937b376 100644 --- a/app/views/my/account.html.erb +++ b/app/views/my/account.html.erb @@ -82,7 +82,7 @@ diff --git a/app/views/softapplications/_form.html.erb b/app/views/softapplications/_form.html.erb index 17cb20598..4e38981f8 100644 --- a/app/views/softapplications/_form.html.erb +++ b/app/views/softapplications/_form.html.erb @@ -113,7 +113,7 @@ <%= render :partial => 'attachments/form' %>

1、<%=l(:label_upload_softapplication_packets_mustpacketed)%>
2、<%=l(:label_upload_softapplication_photo_condition)%>

-

<%=l(:label_updated_caution)%>

+
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index c4e0ef98d..20f64dc3f 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -43,289 +43,295 @@ <% (Rails.logger.error "[Error] =========================================================> NameError: uninitialized constant " + e.act_type.to_s; next;) if e.act_type.safe_constantize.nil? %> <% act = e.act %> <% unless act.nil? %> -
<%= link_to_user(notificationcomment.author) if notificationcomment.respond_to?(:author) %> <%= l(:label_project_newadd) %><%= l(:label_comment_plural) %> + + <%= link_to_user(notificationcomment.author) if notificationcomment.respond_to?(:author) %> + + + <%= l(:label_project_newadd) %> + + <%= l(:label_comment_plural) %> + + <% if notificationcomment.author==User.current|| User.current.admin? %> + <%= link_to(l(:label_bid_respond_delete), contest_contestnotification_notificationcomment_path(@contest, @contestnotification,notificationcomment), + :method => :delete,:confirm => l(:text_are_you_sure), :title => l(:button_delete)) %> + <% end %> +
diff --git a/app/views/files/_course_show_all_attachment.html.erb b/app/views/files/_course_show_all_attachment.html.erb index abece1ae1..76112bc78 100644 --- a/app/views/files/_course_show_all_attachment.html.erb +++ b/app/views/files/_course_show_all_attachment.html.erb @@ -21,7 +21,7 @@ <%= sort_header_tag('field_file_dense', :caption => l(:field_file_dense), :default_order => 'desc', :scope => "col", :id => "vzebra-field_file_dense") %> <%= sort_header_tag('downloads', :caption => l(:field_downloads), :default_order => 'desc', :scope => "col", :id => "vzebra-action") %> <%= sort_header_tag('operation', :caption => "", :scope => "col", :id => "vzebra-children") %> - +
- - - + <% when 'Changeset' %> + + <% if e.user == User.current %> + + <% else %> + + <% end %> + + + + + + + + <% when 'Message' %> + + <% if e.user == User.current %> + + <% else %> + + <% end %> + + + + + + + + <% when 'Principal' %> + + <% if e.user == User.current %> + + <% else %> + + <% end %> + + + + + + + + <% when 'News' %> + + <% if e.user == User.current %> + + <% else %> + + <% end %> + + + + + + + + <% when 'Issue' %> + + <% if e.user == User.current %> + + <% else %> + + <% end %> + + + + + + + + <% when 'Contest' %> + + <% if e.user == User.current && @show_contest == 1%> + + <% else %> + + <% end %> + + + + + + + <% else %> + <%# f=1 %> + <% end %> +
<%= image_tag(url_to_avatar(e.user), :class => "avatar") %> - - <% case e.act_type %> - <% when 'JournalsForMessage' %> - <% if User.current.login == e.user.try(:login) %> - <%# if e.user_id == act.jour.id %> + <% if e.act_type == 'JournalsForMessage' || e.act_type == 'Bid' || e.act_type == 'Journal'|| e.act_type == 'Changeset' || e.act_type == 'Message' || e.act_type == 'Principal' || e.act_type == 'News' || e.act_type == 'Issue' || e.act_type == 'Contest'%> +
- - - <%# else %> - - <%# end %> - <% else %> - - - - <% end %> - - + - -
- <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> <%= l(:label_have_feedback) %> - <%= link_to("#{e.act.user.name}", user_path(e.act.user.id)) %><%= l(:label_of_feedback) + l(:label_layouts_feedback) %> -
- <%= link_to("#{e.user.name}", user_path(e.user_id)) %> <%= l(:label_have_feedback) %><%= - link_to("#{e.act.user.name}", user_path(e.act.user.id)) %><%= l(:label_of_feedback) + l(:label_layouts_feedback) %> -
-

<%= textilizable act.notes %>

+
<%= image_tag(url_to_avatar(e.user), :class => "avatar") %> + + <% case e.act_type %> + <% when 'JournalsForMessage' %> + <% if User.current.login == e.user.try(:login) %> + <%# if e.user_id == act.jour.id %> + + + + <%# else %> + + <%# end %> + <% else %> + + + + <% end %> + + - +
<%= link_to(l(:label_goto), user_newfeedback_user_path(e.user_id)) %> +
+ + - - - - <% when 'Bid' %> - - <% if act.reward_type == 3 && @show_course == 1%> - <% if e.user == User.current %> - + - <% else %> - + <% when 'Bid' %> + + <% if act.reward_type == 3 && @show_course == 1%> + <% if e.user == User.current %> + + <% else %> + + <% end %> + <% else %> + <% if e.user == User.current %> + + <% else %> + + <% end %> + <% end %> + + + + + + - <% end %> - <% else %> - <% if e.user == User.current %> - + <% when 'Journal' %> + + <% if e.user == User.current %> + + <% else %> + + <% end %> + + + <% if act.notes.nil? %> + <% desStr = '' %> + <% else %> + <% desStr=act.notes.html_safe %> + <% end %> + - <% else %> - + + - <% end %> - <% end %> - - - - - - - - <% when 'Journal' %> - - <% if e.user == User.current %> - - <% else %> - - <% end %> - - - <% if act.notes.nil? %> - <% desStr = '' %> - <% else %> - <% desStr=act.notes.html_safe %> - <% end %> - - - - - - <% when 'Changeset' %> - - <% if e.user == User.current %> - - <% else %> - - <% end %> - - - - - - - - <% when 'Message' %> - - <% if e.user == User.current %> - - <% else %> - - <% end %> - - - - - - - - <% when 'Principal' %> - - <% if e.user == User.current %> - - <% else %> - - <% end %> - - - - - - - - <% when 'News' %> - - <% if e.user == User.current %> - - <% else %> - - <% end %> - - - - - - - - <% when 'Issue' %> - - <% if e.user == User.current %> - - <% else %> - - <% end %> - - - - - - - - <% when 'Contest' %> - - <% if e.user == User.current && @show_contest == 1%> - - <% else %> - - <% end %> - - - - - - - <% else %> - <% f=1 %> - <% end %> -
+ <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> <%= l(:label_have_feedback) %> + <%= link_to("#{e.act.user.name}", user_path(e.act.user.id)) %><%= l(:label_of_feedback) + l(:label_layouts_feedback) %> +
+ <%= link_to("#{e.user.name}", user_path(e.user_id)) %> <%= l(:label_have_feedback) %><%= + link_to("#{e.act.user.name}", user_path(e.act.user.id)) %><%= l(:label_of_feedback) + l(:label_layouts_feedback) %> +
+

<%= textilizable act.notes %>

-
<%= link_to(l(:label_goto), user_newfeedback_user_path(e.user_id)) %> -
-
-
- <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %> -
-
-
- <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %><%= l(:label_i_new_activity) %> <%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), respond_path(e.act_id) %> +
+
+ <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %> +
+
- <%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_activity) %>  <%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), respond_path(e.act_id) %> +
+ <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %><%= l(:label_i_new_activity) %> <%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), respond_path(e.act_id) %> + + <%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_activity) %>  <%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), respond_path(e.act_id) %> + + <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %><%= l(:label_i_new_activity) %> <%= link_to format_activity_title("#{l(:label_active_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %> + + <%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_activity) %>  <%= link_to format_activity_title("#{l(:label_active_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %> +
+

<%= act.description.html_safe %>

+
+ <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %> +
+
+ <%= link_to l(:label_find_all_comments), respond_path(e.act_id) %><%= l(:label_comments_count, :count => e.act.commit) %> +
- <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %><%= l(:label_i_new_activity) %> <%= link_to format_activity_title("#{l(:label_active_call)}##{act.id}:#{act.name}"), respond_path(e.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.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(h(e.user), user_path(e.user_id)) %> <%= l(:label_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}"} %> +

<%= desStr %>

- <%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_activity) %>  <%= link_to format_activity_title("#{l(:label_active_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %> +
+
+ <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %> +
+
-

<%= act.description.html_safe %>

-
- <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %> -
-
- <%= link_to l(:label_find_all_comments), respond_path(e.act_id) %><%= l(:label_comments_count, :count => e.act.commit) %> -
-
- <%= 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(h(e.user), user_path(e.user_id)) %> <%= l(:label_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}"} %> -

<%= desStr %>

-
-
- <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %> -
-
-
- <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> <%= l(:label_i_new_activity) %> <%= link_to format_activity_title(act.title), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, :rev => act.identifier} %> - - <%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_activity) %> <%= link_to format_activity_title(act.title), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, :rev => act.identifier} %> -
-

<%= act.long_comments.html_safe %>

-
- <%= format_time(e.act.committed_on) %> -
-
- <%= link_to l(:label_find_all_comments), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, :rev => act.identifier} %><%= l(:label_comments_count, :count => e.act.count) %> -
-
- <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> <%= l(:label_i_new_activity) %> <%= link_to format_activity_title("#{act.board.name}: #{act.subject}"), {:controller => 'messages', :action => 'show', :board_id => act.board_id}.merge(act.parent_id.nil? ? {:id => act.id} : {:id => act.parent_id, :r => act.id, :anchor => "message-#{act.id}"}) %> - - <%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_activity) %> <%= link_to format_activity_title("#{act.board.name}: #{act.subject}"), {:controller => 'messages', :action => 'show', :board_id => act.board_id}.merge(act.parent_id.nil? ? {:id => act.id} : {:id => act.parent_id, :r => act.id, :anchor => "message-#{act.id}"}) %> -
-

<%= h act.content.truncate(240, omission: '...') %>

-
-
- <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %> -
-
-
- <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> <%= l(:label_new_user) %> - - <%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_user) %> -

-
- <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %> -
-
-
- <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> <%= l(:label_i_new_activity) %> <%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %> - - <%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_activity) %> <%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %> -
-

<%= act.description.html_safe %>

-
- <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %> -
-
- <%= link_to l(:label_find_all_comments), {:controller => 'news', :action => 'show', :id => act.id} %><%= l(:label_comments_count, :count => e.act.comments_count) %> -
-
- - <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> -   - - <%= l(:label_i_new_activity) %> -   - <%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %> - - - <%= link_to(h(e.user), user_path(e.user_id)) %> -   - - <%= l(:label_new_activity) %> -   - <%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %> -
-
-
- <%= textilizable act, :description %> -
-
- -
-
- <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %> -
-
- <%= link_to l(:label_find_all_comments), {:controller => 'issues', :action => 'show', :id => act.id} %><%= l(:label_comments_count, :count => e.act.journals.count) %> -
-
- <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> <%= l(:label_i_new_activity) %> <%= link_to format_activity_title("#{l(:label_contest)}: #{act.name}"), {:controller => 'contests', :action => 'show_contest', :id => act.id} %> - - <%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_activity) %> <%= link_to format_activity_title("#{l(:label_contest)}: #{act.name}"), {:controller => 'contests', :action => 'show_contest', :id => act.id} %> -

<%= h act.description %>

-
-
- <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %> -
-
-
+
+ <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> <%= l(:label_i_new_activity) %> <%= link_to format_activity_title(act.title), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, :rev => act.identifier} %> + + <%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_activity) %> <%= link_to format_activity_title(act.title), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, :rev => act.identifier} %> +
+

<%= act.long_comments.html_safe %>

+
+ <%= format_time(e.act.committed_on) %> +
+
+ <%= link_to l(:label_find_all_comments), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, :rev => act.identifier} %><%= l(:label_comments_count, :count => e.act.count) %> +
+
+ <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> <%= l(:label_i_new_activity) %> <%= link_to format_activity_title("#{act.board.name}: #{act.subject}"), {:controller => 'messages', :action => 'show', :board_id => act.board_id}.merge(act.parent_id.nil? ? {:id => act.id} : {:id => act.parent_id, :r => act.id, :anchor => "message-#{act.id}"}) %> + + <%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_activity) %> <%= link_to format_activity_title("#{act.board.name}: #{act.subject}"), {:controller => 'messages', :action => 'show', :board_id => act.board_id}.merge(act.parent_id.nil? ? {:id => act.id} : {:id => act.parent_id, :r => act.id, :anchor => "message-#{act.id}"}) %> +
+

<%= h act.content.truncate(240, omission: '...') %>

+
+
+ <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %> +
+
+
+ <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> <%= l(:label_new_user) %> + + <%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_user) %> +

+
+ <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %> +
+
+
+ <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> <%= l(:label_i_new_activity) %> <%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %> + + <%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_activity) %> <%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %> +
+

<%= act.description.html_safe %>

+
+ <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %> +
+
+ <%= link_to l(:label_find_all_comments), {:controller => 'news', :action => 'show', :id => act.id} %><%= l(:label_comments_count, :count => e.act.comments_count) %> +
+
+ + <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> +   + + <%= l(:label_i_new_activity) %> +   + <%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %> + + + <%= link_to(h(e.user), user_path(e.user_id)) %> +   + + <%= l(:label_new_activity) %> +   + <%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %> +
+ + <%= textilizable act, :description %> + +
+
+ <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %> +
+
+ <%= link_to l(:label_find_all_comments), {:controller => 'issues', :action => 'show', :id => act.id} %><%= l(:label_comments_count, :count => e.act.journals.count) %> +
+
+ <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> <%= l(:label_i_new_activity) %> <%= link_to format_activity_title("#{l(:label_contest)}: #{act.name}"), {:controller => 'contests', :action => 'show_contest', :id => act.id} %> + + <%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_activity) %> <%= link_to format_activity_title("#{l(:label_contest)}: #{act.name}"), {:controller => 'contests', :action => 'show_contest', :id => act.id} %> +

<%= h act.description %>

+
+
+ <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %> +
+
+
+ <% end %> <% end %> <% end %> diff --git a/app/views/welcome/course.html.erb b/app/views/welcome/course.html.erb index 63fdfc078..9d5037107 100644 --- a/app/views/welcome/course.html.erb +++ b/app/views/welcome/course.html.erb @@ -169,13 +169,15 @@ (<%= link_to "#{files_count}份", course_files_path(course) %>资料) -