diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index 085ee0c60..c05d1172c 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -102,7 +102,14 @@ class AccountController < ApplicationController # User self-registration def register # @root_path="/home/pdl/redmine-2.3.2-0/apache2/" -# +# + @cache_identityy = params[:identity]||"" #身份 + @cache_no = params[:no]||"" #学号 + @cache_technical_title = params[:technical_title]||"" #教师职称 + @cache_province = params[:province]||"" #省份 + @cache_city = params[:city]||"" #城市 + @cache_enterprise_name = params[:enterprise_name]||"" #企业 + (redirect_to(home_url); return) unless Setting.self_registration? || session[:auth_source_registration] if request.get? session[:auth_source_registration] = nil @@ -112,8 +119,8 @@ class AccountController < ApplicationController @user = User.new @user.safe_attributes = user_params if params[:identity] == "2" # 2 企业 - @user.firstname = params[:enterprise_name] - @user.lastname = l(:field_enterprise) + #@user.firstname = params[:enterprise_name] + #@user.lastname = l(:field_enterprise) end @user.admin = false @user.register 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/git_usage_controller.rb b/app/controllers/git_usage_controller.rb index 69b0c7f55..4f9a96d6f 100644 --- a/app/controllers/git_usage_controller.rb +++ b/app/controllers/git_usage_controller.rb @@ -1,5 +1,6 @@ #added by baiyu class GitUsageController < ApplicationController + layout "project_base" def ch_usage end diff --git a/app/controllers/memos_controller.rb b/app/controllers/memos_controller.rb index d7510c385..1e537ff75 100644 --- a/app/controllers/memos_controller.rb +++ b/app/controllers/memos_controller.rb @@ -84,7 +84,7 @@ class MemosController < ApplicationController @reply_pages = Paginator.new @reply_count, pre_count, page @replies = @memo.children. includes(:author, :attachments). - reorder("#{Memo.table_name}.created_at ASC"). + reorder("#{Memo.table_name}.created_at DESC"). limit(@reply_pages.per_page). offset(@reply_pages.offset). all 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/helpers/user_score_helper.rb b/app/helpers/user_score_helper.rb index b3f64235a..8c00a6b23 100644 --- a/app/helpers/user_score_helper.rb +++ b/app/helpers/user_score_helper.rb @@ -385,6 +385,7 @@ module UserScoreHelper def update_score(option_number) option_number.total_score = collaboration(option_number) + influence(option_number) + skill(option_number) + active(option_number) option_number.save + option_number.total_score end #协同得分 @@ -704,6 +705,19 @@ module UserScoreHelper def user_scores(user,type,project=nil) ooption_num = get_option_number(user,type,project) + update_memo_number(user,type,project) + update_messges_for_issue(user,type,project) + update_issues_status(user,type,project) + update_replay_for_message(user,type,project) + update_replay_for_memo(user,type,project) + update_tread(user,type,project) + update_praise(user,type,project) + update_changeset(user,type,project) + update_document(user,type,project) + update_attachment(user,type,project) + update_issue_done_ratio(user,type,project) + update_post_issue(user,type,project) update_score(ooption_num) + ooption_num end end 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/models/user.rb b/app/models/user.rb index b64d0efd7..78bfc75f0 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -174,6 +174,7 @@ class User < Principal validates_format_of :login, :with => /\A[a-z0-9_\-@\.]*\z/i validates_length_of :login, :maximum => LOGIN_LENGTH_LIMIT validates_length_of :firstname, :maximum => 30 + validates_length_of :lastname, :maximum => 30 validates_format_of :mail, :with => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i, :allow_blank => true validates_length_of :mail, :maximum => MAIL_LENGTH_LIMIT, :allow_nil => true validates_confirmation_of :password, :allow_nil => true diff --git a/app/views/account/register.html.erb b/app/views/account/register.html.erb index 260d53744..21c8c11b9 100644 --- a/app/views/account/register.html.erb +++ b/app/views/account/register.html.erb @@ -193,7 +193,40 @@ diff --git a/app/views/attachments/_form.html.erb b/app/views/attachments/_form.html.erb index b237c7d25..06bf45012 100644 --- a/app/views/attachments/_form.html.erb +++ b/app/views/attachments/_form.html.erb @@ -12,8 +12,16 @@ <% end %> <% end %> + -<%= button_tag "浏览", :type=>"button", :onclick=>"_file.click()" %> +<%= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %> <%= file_field_tag 'attachments[dummy][file]', :id => '_file', 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/repositories/_form_create.html.erb b/app/views/repositories/_form_create.html.erb index 669f47071..d8c30143e 100644 --- a/app/views/repositories/_form_create.html.erb +++ b/app/views/repositories/_form_create.html.erb @@ -5,7 +5,12 @@ background-color:gray; border:none } - + <%= error_messages_for 'repository' %>
@@ -22,7 +27,10 @@ border:none <% end %>

<%= f.check_box :is_default, :label => :field_repository_is_default %>

-

<%= f.text_field :identifier, :required=>true, :disabled => @repository.identifier_frozen?, :label => l(:label_repository_name)%> + +

+ +<%= f.text_field :identifier,:required=>true,:type=>"hidden", :disabled => @repository.identifier_frozen?, :label => l(:label_repository_name)%> <% unless @repository.identifier_frozen? %> <%= l(:text_length_between, :min => 1, :max => Repository::IDENTIFIER_MAX_LENGTH) %> <%= l(:text_repository_identifier_info).html_safe %> diff --git a/app/views/repositories/newrepo.html.erb b/app/views/repositories/newrepo.html.erb index 0461d5768..0c95a0335 100644 --- a/app/views/repositories/newrepo.html.erb +++ b/app/views/repositories/newrepo.html.erb @@ -2,5 +2,5 @@

<%= l(:label_repository_new_repos) %>

<%= labelled_form_for :repository, @repository, :url =>project_repositories_path(@project),:html => {:id => 'repository-form'} do |f| %> <%= render :partial => 'form_create', :locals => {:f => f} %> - + <% end %> \ No newline at end of file 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/documents/show.html.erb b/app/views/documents/show.html.erb index b7740c951..2964a06ba 100644 --- a/app/views/documents/show.html.erb +++ b/app/views/documents/show.html.erb @@ -1,5 +1,5 @@
- +
<% if User.current.allowed_to?(:edit_documents, @project) %> <%= link_to l(:button_edit), edit_document_path(@document), :class => 'icon icon-edit', :accesskey => accesskey(:edit) %> 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 %> - - - - <%# else %> - - <%# end %> - <% else %> + <% 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'%> +
- <%= 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) %> -
- - - <% end %> - - + - -
- <%= 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) %>资料) -