diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb
index e939511b6..1674055ac 100644
--- a/app/controllers/repositories_controller.rb
+++ b/app/controllers/repositories_controller.rb
@@ -31,8 +31,8 @@ class RepositoriesController < ApplicationController
default_search_scope :changesets
before_filter :find_project_by_project_id, :only => [:new, :create, :newrepo]
- before_filter :find_repository, :only => [:edit, :update, :destroy, :committers, :forked]
- before_filter :find_project_repository, :except => [:new, :create, :newcreate, :edit, :update, :destroy, :committers, :newrepo,:to_gitlab]
+ before_filter :find_repository, :only => [:edit, :update, :destroy, :committers]
+ before_filter :find_project_repository, :except => [:new, :create, :newcreate, :edit, :update, :destroy, :committers, :newrepo, :to_gitlab, :forked]
before_filter :find_changeset, :only => [:revision, :add_related_issue, :remove_related_issue]
before_filter :authorize , :except => [:newrepo,:newcreate,:fork, :to_gitlab, :forked]
accept_rss_auth :revisions
@@ -64,6 +64,8 @@ class RepositoriesController < ApplicationController
end
def forked
+ @project = Project.find(params[:id])
+ @repository = Repository.where("project_id =? and type =?", @project.id, "Repository::Gitlab")
# 如果当前用户已经fork过该项目,不会新fork项目,则跳至已fork的项
unless has_forked?(@project, User.current)
project = project_from_current_project(@project.id, User.current.id)
@@ -76,7 +78,11 @@ class RepositoriesController < ApplicationController
else
g = Gitlab.client
if User.current.gid.nil?
- g.sync_user(User.current)
+ begin
+ g.sync_user(User.current)
+ ensure
+ logger.error "Synv user failed ==>#{User.current.id}"
+ end
end
gproject = g.fork(@project.gpid, User.current.gid)
if gproject
diff --git a/app/controllers/zipdown_controller.rb b/app/controllers/zipdown_controller.rb
index 1a01ac97b..2a4430935 100644
--- a/app/controllers/zipdown_controller.rb
+++ b/app/controllers/zipdown_controller.rb
@@ -1,4 +1,8 @@
-require 'zip'
+#coding=utf-8
+
+require "base64"
+require 'zip'
+
class ZipdownController < ApplicationController
#查找项目(课程)
before_filter :find_project_by_bid_id, :only => [:assort]
@@ -11,7 +15,12 @@ class ZipdownController < ApplicationController
def download
if User.current.logged?
begin
- send_file "#{OUTPUT_FOLDER}/#{params[:file]}", :filename => filename_for_content_disposition(params[:filename]), :type => detect_content_type(params[:file])
+ if params[:base64file]
+ file = Base64.decode64(params[:base64file])
+ send_file "#{OUTPUT_FOLDER}/#{file}", :filename => filename_for_content_disposition(file), :type => detect_content_type(file)
+ else
+ send_file "#{OUTPUT_FOLDER}/#{params[:file]}", :filename => filename_for_content_disposition(params[:filename]), :type => detect_content_type(params[:file])
+ end
rescue => e
render file: 'public/no_file_found.html'
end
@@ -107,7 +116,9 @@ class ZipdownController < ApplicationController
bid_homework_path, OUTPUT_FOLDER)
}
[{files:[out_file.file_path], count: 1, index: 1,
- real_file: out_file.file_path, file: File.basename(out_file.file_path),
+ real_file: out_file.file_path,
+ file: File.basename(out_file.file_path),
+ base64file: Base64.encode64(File.basename(out_file.file_path)),
size:(out_file.pack_size / 1024.0 / 1024.0).round(2)
}]
end
@@ -129,7 +140,9 @@ class ZipdownController < ApplicationController
bid_homework_path, OUTPUT_FOLDER)
}
[{files:[out_file.file_path], count: 1, index: 1,
- real_file: out_file.file_path, file: File.basename(out_file.file_path),
+ real_file: out_file.file_path,
+ file: File.basename(out_file.file_path),
+ base64file: Base64.encode64(File.basename(out_file.file_path)),
size:(out_file.pack_size / 1024.0 / 1024.0).round(2)
}]
end
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index c4bbc4ebb..4bdffb9dc 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -253,8 +253,10 @@ module ApplicationHelper
subject = truncate(subject, :length => 60)
end
end
- if issue.status_id == 5
+ if issue.status_id == 3
s = link_to text, issue_path(issue), :class => "text_line_s", :title => title
+ elsif issue.status_id == 5
+ s = link_to text, issue_path(issue), :class => "text_line_s del_line", :title => title
else
s = link_to text, issue_path(issue), :class => "c_blue", :title => title
end
diff --git a/app/models/mailer.rb b/app/models/mailer.rb
index 551ddd616..1cbe7421c 100644
--- a/app/models/mailer.rb
+++ b/app/models/mailer.rb
@@ -394,7 +394,7 @@ class Mailer < ActionMailer::Base
@issue = issue
user = User.find_by_mail(recipients)
@user = user
- @token = Token.get_token_from_user(user, 'autologin')
+ # @token = Token.get_token_from_user(user, 'autologin')
@issue_url = url_for(:controller => 'issues', :action => 'show', :id => issue.id)
# edit
@@ -436,15 +436,15 @@ class Mailer < ActionMailer::Base
user = User.find_by_mail(recipients)
@user = user
- @token = Token.get_token_from_user(user, 'autologin')
+ # @token = Token.get_token_from_user(user, 'autologin')
# edit
- @issue_author_url = url_for(:controller => 'users', :action => 'show', :id => issue.author_id, :token => @token.value)
- @project_url = url_for(:controller => 'projects', :action => 'show', :id => issue.project_id, :token => @token.value)
- @user_url = url_for(my_account_url(user,:token => @token.value))
+ @issue_author_url = url_for(:controller => 'users', :action => 'show', :id => issue.author_id)
+ @project_url = url_for(:controller => 'projects', :action => 'show', :id => issue.project_id)
+ @user_url = url_for(my_account_url(user))
- @issue_url = url_for(:controller => 'issues', :action => 'show', :id => issue.id, :anchor => "change-#{journal.id}", :token => @token.value)
+ @issue_url = url_for(:controller => 'issues', :action => 'show', :id => issue.id, :anchor => "change-#{journal.id}")
s = "[#{issue.project.name} - #{issue.tracker.name} ##{issue_id}] "
s << "(#{issue.status.name}) " if journal.new_value_for('status_id')
s << issue.subject
diff --git a/app/models/user.rb b/app/models/user.rb
index 2714117e9..aa048888c 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -344,7 +344,8 @@ class User < Principal
user_feedback_count = UserFeedbackMessage.where("user_id =? and viewed =? and created_at >?", User.current.id, 0, User.current.onclick_time.onclick_time).count
user_memo_count = MemoMessage.where("user_id =? and viewed =? and created_at >?", User.current.id, 0, User.current.onclick_time.onclick_time).count
system_messages_count = SystemMessage.where("created_at >?", User.current.onclick_time.onclick_time).count
- messages_count = course_count + forge_count + user_feedback_count + user_memo_count + system_messages_count
+ at_count = AtMessage.where("user_id =? and viewed =? and created_at >?", User.current.id, 0, User.current.onclick_time.onclick_time).count
+ messages_count = course_count + forge_count + user_feedback_count + user_memo_count + system_messages_count + at_count
end
# 查询指派给我的缺陷记录
diff --git a/app/views/blog_comments/_blog_attachments.erb b/app/views/blog_comments/_blog_attachments.erb
index dd8be659b..86298a330 100644
--- a/app/views/blog_comments/_blog_attachments.erb
+++ b/app/views/blog_comments/_blog_attachments.erb
@@ -57,7 +57,7 @@
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
- :upload_path => uploads_path(:format => 'js', :project => container),
+ :upload_path => uploads_path(:format => 'js'),
:description_placeholder => l(:label_optional_description),
:field_is_public => l(:field_is_public),
:are_you_sure => l(:text_are_you_sure),
diff --git a/app/views/forums/_file_form.html.erb b/app/views/forums/_file_form.html.erb
index 2510952f1..9bbbc9188 100644
--- a/app/views/forums/_file_form.html.erb
+++ b/app/views/forums/_file_form.html.erb
@@ -58,7 +58,7 @@
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
- :upload_path => uploads_path(:format => 'js', :project => project),
+ :upload_path => uploads_path(:format => 'js'),
:description_placeholder => l(:label_optional_description),
:field_is_public => l(:field_is_public),
:are_you_sure => l(:text_are_you_sure),
diff --git a/app/views/mailer/issue_add.html.erb b/app/views/mailer/issue_add.html.erb
index d77149831..0d8bb0007 100644
--- a/app/views/mailer/issue_add.html.erb
+++ b/app/views/mailer/issue_add.html.erb
@@ -6,7 +6,7 @@
<% if Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten][@user.mail_notification] == mail_option %>
<% else %>
- <%= link_to l(mail_option), my_change_mail_notification_url(token: @token.value,mail_notification: Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten].invert[mail_option]), :style => "margin-top:20px;color:#2775d2; margin-left:10px;" %>
+ <%= link_to l(mail_option), my_change_mail_notification_url(mail_notification: Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten].invert[mail_option]), :style => "margin-top:20px;color:#2775d2; margin-left:10px;" %>
<% end %>
<% end %>
diff --git a/app/views/mailer/issue_add.text.erb b/app/views/mailer/issue_add.text.erb
index cc2eb814f..1793fb22d 100644
--- a/app/views/mailer/issue_add.text.erb
+++ b/app/views/mailer/issue_add.text.erb
@@ -4,6 +4,6 @@
<% if Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten][@user.mail_notification] == mail_option %>
<% else %>
- <%= link_to l(mail_option), my_change_mail_notification_url(token: @token.value,mail_notification: Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten].invert[mail_option]), :style => "margin-top:20px;color:#2775d2; margin-left:10px;" %>
+ <%= link_to l(mail_option), my_change_mail_notification_url(mail_notification: Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten].invert[mail_option]), :style => "margin-top:20px;color:#2775d2; margin-left:10px;" %>
<% end %>
<% end %>
diff --git a/app/views/mailer/issue_edit.html.erb b/app/views/mailer/issue_edit.html.erb
index a02fe47f5..16e0967c2 100644
--- a/app/views/mailer/issue_edit.html.erb
+++ b/app/views/mailer/issue_edit.html.erb
@@ -9,7 +9,7 @@
<% if Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten][@user.mail_notification] == mail_option %>
<% else %>
- <%= link_to l(mail_option), my_change_mail_notification_url(token: @token.value,mail_notification: Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten].invert[mail_option]), :style => "margin-top:20px;color:#2775d2; margin-left:10px;" %>
+ <%= link_to l(mail_option), my_change_mail_notification_url(mail_notification: Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten].invert[mail_option]), :style => "margin-top:20px;color:#2775d2; margin-left:10px;" %>
<% end %>
<% end %>
diff --git a/app/views/mailer/issue_edit.text.erb b/app/views/mailer/issue_edit.text.erb
index d1d625cec..8730d8a16 100644
--- a/app/views/mailer/issue_edit.text.erb
+++ b/app/views/mailer/issue_edit.text.erb
@@ -9,6 +9,6 @@
<% if Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten][@user.mail_notification] == mail_option %>
<% else %>
- <%= link_to l(mail_option), my_change_mail_notification_url(token: @token.value,mail_notification: Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten].invert[mail_option]), :style => "margin-top:20px;color:#2775d2; margin-left:10px;" %>
+ <%= link_to l(mail_option), my_change_mail_notification_url(mail_notification: Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten].invert[mail_option]), :style => "margin-top:20px;color:#2775d2; margin-left:10px;" %>
<% end %>
<% end %>
diff --git a/app/views/mailer/send_for_user_activities.html.erb b/app/views/mailer/send_for_user_activities.html.erb
index ae5604099..7fdd737e3 100644
--- a/app/views/mailer/send_for_user_activities.html.erb
+++ b/app/views/mailer/send_for_user_activities.html.erb
@@ -16,16 +16,16 @@
▪
[
- <%= link_to truncate(course_new.course.name,length: 30,omission: '...'), course_url(course_new.course, :token => @token.value),
+ <%= link_to truncate(course_new.course.name,length: 30,omission: '...'), course_url(course_new.course),
:class=> "wmail_column",
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
]
- <%= link_to course_new.author, user_activities_url(course_new.author,:token => @token.value), :class => "wmail_name",
+ <%= link_to course_new.author, user_activities_url(course_new.author), :class => "wmail_name",
: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) %>
- <%= link_to truncate(course_new.title.html_safe,length: 30,omission: '...'), news_url(course_new,:token => @token.value),
+ <%= link_to truncate(course_new.title.html_safe,length: 30,omission: '...'), news_url(course_new),
:class => 'wmail_info',
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
%>
@@ -39,17 +39,17 @@
▪
[
<% unless course_news_comment.commented.nil? %>
- <%= link_to truncate(course_news_comment.commented.course.name,length: 30,omission: '...'), course_url(course_news_comment.commented.course, :token => @token.value),
+ <%= link_to truncate(course_news_comment.commented.course.name,length: 30,omission: '...'), course_url(course_news_comment.commented.course),
:class=> "wmail_column",
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
<% end %>
]
- <%= link_to course_news_comment.author, user_activities_url(course_news_comment.author,:token => @token.value), :class => "wmail_name",
+ <%= link_to course_news_comment.author, user_activities_url(course_news_comment.author), :class => "wmail_name",
: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(l(:label_course_notice_point),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),
:class => 'wmail_info',
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
%>
@@ -72,16 +72,16 @@
▪
[
- <%= link_to truncate(bid.course.name,length: 30,omission: '...'), course_url(bid.course, :token => @token.value),
+ <%= link_to truncate(bid.course.name,length: 30,omission: '...'), course_url(bid.course),
:class=> "wmail_column",
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
]
- <%= link_to bid.user, user_activities_url(bid.user,:token => @token.value), :class => "wmail_name",
+ <%= link_to bid.user, user_activities_url(bid.user), :class => "wmail_name",
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
<%= l(:label_course_homework) %>
- <%= link_to truncate(bid.name.html_safe,length: 30,omission: '...'), student_work_index_url(:homework => bid.id,:token => @token.value),
+ <%= link_to truncate(bid.name.html_safe,length: 30,omission: '...'), student_work_index_url(:homework => bid.id),
:class => 'wmail_info',
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
%>
@@ -105,16 +105,16 @@
▪
[
- <%= link_to truncate(course_journal_message.course.name,length: 30,omission: '...'), course_url(course_journal_message.course, :token => @token.value),
+ <%= link_to truncate(course_journal_message.course.name,length: 30,omission: '...'), course_url(course_journal_message.course),
:class=> "wmail_column",
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
]
- <%= link_to course_journal_message.user, user_activities_url(course_journal_message.user,:token => @token.value), :class => "wmail_name",
+ <%= link_to course_journal_message.user, user_activities_url(course_journal_message.user), :class => "wmail_name",
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
<%= l(:label_send_course_journals_for_messages) %>
- <%= link_to truncate(course_journal_message.notes.html_safe,length: 30,omission: '...'), course_feedback_url(course_journal_message.course,:token => @token.value),
+ <%= link_to truncate(course_journal_message.notes.html_safe,length: 30,omission: '...'), course_feedback_url(course_journal_message.course),
:class => 'wmail_info',
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
%>
@@ -135,14 +135,14 @@
▪
[
- <%= link_to truncate(course_message.course.name,length: 30,omission: '...'), course_url(course_message.course.id, :token => @token.value),
+ <%= link_to truncate(course_message.course.name,length: 30,omission: '...'), course_url(course_message.course.id),
:class=> "wmail_column",
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
]
- <%= link_to course_message.author, user_activities_url(course_message.author,:token => @token.value), :class => "wmail_name",
+ <%= link_to course_message.author, user_activities_url(course_message.author), :class => "wmail_name",
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
<%= l(:label_send_course_messages) %>
- <%= link_to truncate(course_message.subject.html_safe,length: 30,omission: '...'),board_message_url(course_message, :board_id => course_message.board_id,:token => @token.value),
+ <%= link_to truncate(course_message.subject.html_safe,length: 30,omission: '...'),board_message_url(course_message, :board_id => course_message.board_id),
: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(course_message.created_on) %>
@@ -163,16 +163,16 @@
▪
[
- <%= link_to truncate(attachment.course.name,length: 30,omission: '...'), course_url(attachment.course, :token => @token.value),
+ <%= link_to truncate(attachment.course.name,length: 30,omission: '...'), course_url(attachment.course),
:class=> "wmail_column",
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
]
- <%= link_to attachment.author, user_activities_url(attachment.author,:token => @token.value), :class => "wmail_name",
+ <%= link_to attachment.author, user_activities_url(attachment.author), :class => "wmail_name",
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
<%= l(:label_course_file_upload) %>
- <%= link_to truncate(attachment.filename,length: 30,omission: '...'),course_files_url(attachment.course,:token => @token.value),
+ <%= link_to truncate(attachment.filename,length: 30,omission: '...'),course_files_url(attachment.course),
:class => 'wmail_info',
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
%>
@@ -199,14 +199,14 @@
▪
[
- <%= link_to truncate(issue.project.name,length: 30,omission: '...'), project_url(issue.project, :token => @token.value),
+ <%= link_to truncate(issue.project.name,length: 30,omission: '...'), project_url(issue.project),
:class=> "wmail_column",
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
]
- <%= link_to issue.author, user_activities_url(issue.author,:token => @token.value), :class => "wmail_name",
+ <%= link_to issue.author, user_activities_url(issue.author), :class => "wmail_name",
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
<%= l(:label_project_issue) %>
- <%= link_to truncate(issue.subject,length: 30,omission: '...'),issue_url(issue, :token => @token.value),
+ <%= link_to truncate(issue.subject,length: 30,omission: '...'),issue_url(issue),
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
%>
<%= format_time(issue.created_on) %>
@@ -217,14 +217,14 @@
▪
[
- <%= link_to truncate(issues_journal.issue.project.name,length: 30,omission: '...'), project_url(issues_journal.issue.project, :token => @token.value),
+ <%= link_to truncate(issues_journal.issue.project.name,length: 30,omission: '...'), project_url(issues_journal.issue.project),
:class=> "wmail_column",
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
]
- <%= link_to issues_journal.user, user_activities_url(issues_journal.user,:token => @token.value), :class => "wmail_name",
+ <%= link_to issues_journal.user, user_activities_url(issues_journal.user), :class => "wmail_name",
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
<%= l(:label_project_issue_update) %>
- <%= link_to truncate(issues_journal.issue.subject, length:30,omission:'...'),issue_url(issues_journal.issue, :token => @token.value),
+ <%= link_to truncate(issues_journal.issue.subject, length:30,omission:'...'),issue_url(issues_journal.issue),
:style => "color:#2E8DD7;float:left;font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;",
:onmouseover =>"message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))"
@@ -251,16 +251,16 @@
▪
[
- <%= link_to truncate(project_message.project.name,length: 30,omission: '...'), project_url(project_message.project, :token => @token.value),
+ <%= link_to truncate(project_message.project.name,length: 30,omission: '...'), project_url(project_message.project),
:class=> "wmail_column",
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
]
- <%= link_to project_message.author, user_activities_url(project_message.author,:token => @token.value), :class => "wmail_name",
+ <%= link_to project_message.author, user_activities_url(project_message.author), :class => "wmail_name",
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
<%= l(:label_send_course_messages) %>
- <%= link_to truncate(project_message.subject,length: 30,omission: '...'),board_message_url(project_message, :board_id => project_message.board_id,:token => @token.value),
+ <%= link_to truncate(project_message.subject,length: 30,omission: '...'),board_message_url(project_message, :board_id => project_message.board_id),
:class => 'wmail_info',
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
%>
@@ -283,16 +283,16 @@
▪
[
<% unless wikicontent.page.nil? %>
- <%= link_to truncate(wikicontent.page.wiki.project.name,length: 30,omission: '...'), project_url(wikicontent.page.wiki.project, :token => @token.value),
+ <%= link_to truncate(wikicontent.page.wiki.project.name,length: 30,omission: '...'), project_url(wikicontent.page.wiki.project),
:class=> "wmail_column",
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
<% end %>
]
- <%= link_to wikicontent.author, user_activities_url(wikicontent.author,:token => @token.value), :class => "wmail_name",
+ <%= link_to wikicontent.author, user_activities_url(wikicontent.author), :class => "wmail_name",
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
<%= l(:label_wiki_mail_notification) %>
<% unless wikicontent.page.nil? %>
- <%= link_to wikicontent.text.gsub("","").gsub("
","").gsub("
","").html_safe, project_wiki_url(wikicontent.page.wiki,:token => @token.value),
+ <%= link_to wikicontent.text.gsub("","").gsub("
","").gsub("
","").html_safe, project_wiki_url(wikicontent.page.wiki),
:class => 'wmail_info',
:style => "color:#2E8DD7;float:left; max-width:400px;height:23px;font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
<% end %>
@@ -314,15 +314,15 @@
▪
[
- <%= link_to truncate(project_new.project.name,length: 30,omission: '...'), project_url(project_new.project, :token => @token.value),
+ <%= link_to truncate(project_new.project.name,length: 30,omission: '...'), project_url(project_new.project),
:class=> "wmail_column",
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
]
- <%= link_to project_new.author, user_activities_url(project_new.author,:token => @token.value), :class => "wmail_name",
+ <%= link_to project_new.author, user_activities_url(project_new.author), :class => "wmail_name",
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
<%= l(:label_project_mail_notice) %>
- <%= link_to truncate(project_new.title,length: 30,omission: '...'), news_url(project_new,:token => @token.value),
+ <%= link_to truncate(project_new.title,length: 30,omission: '...'), news_url(project_new),
: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_new.created_on) %>
@@ -336,16 +336,16 @@
▪
[
<% unless project_news_comment.commented.nil? %>
- <%= link_to truncate(project_news_comment.commented.project.name,length: 30,omission: '...'), project_url(project_news_comment.commented.project, :token => @token.value),
+ <%= link_to truncate(project_news_comment.commented.project.name,length: 30,omission: '...'), project_url(project_news_comment.commented.project),
:class=> "wmail_column",
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
<% end %>
]
- <%= link_to project_news_comment.author, user_activities_url(project_news_comment.author,:token => @token.value), :class => "wmail_name",
+ <%= link_to project_news_comment.author, user_activities_url(project_news_comment.author), :class => "wmail_name",
: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(l(:lable_project_notice_point),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),
: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) %>
@@ -366,16 +366,16 @@
▪
[
- <%= link_to truncate(project_attachment.project.name,length: 30,omission: '...'), project_url(project_attachment.project, :token => @token.value),
+ <%= link_to truncate(project_attachment.project.name,length: 30,omission: '...'), project_url(project_attachment.project),
:class=> "wmail_column",
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
]
- <%= link_to project_attachment.author, user_activities_url(project_attachment.author,:token => @token.value), :class => "wmail_name",
+ <%= link_to project_attachment.author, user_activities_url(project_attachment.author), :class => "wmail_name",
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
<%= l(:label_project_mail_upload) %>
- <%= link_to truncate(project_attachment.filename,length: 30,omission: '...'), project_files_url(project_attachment.project,:token => @token.value),
+ <%= link_to truncate(project_attachment.filename,length: 30,omission: '...'), project_files_url(project_attachment.project),
:class => 'wmail_info',
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
%>
@@ -398,16 +398,16 @@
▪
[
- <%= link_to truncate(project_journal_message.project.name,length: 30,omission: '...'), project_url(project_journal_message.project, :token => @token.value),
+ <%= link_to truncate(project_journal_message.project.name,length: 30,omission: '...'), project_url(project_journal_message.project),
:class=> "wmail_column",
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
]
- <%= link_to project_journal_message.user, user_activities_url(project_journal_message.user,:token => @token.value), :class => "wmail_name",
+ <%= link_to project_journal_message.user, user_activities_url(project_journal_message.user), :class => "wmail_name",
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
<%= l(:label_send_course_journals_for_messages) %>
- <%= link_to project_journal_message.notes.gsub("","").gsub("
","").gsub("
","").html_safe, project_feedback_url(project_journal_message.project,:token => @token.value),
+ <%= link_to project_journal_message.notes.gsub("","").gsub("
","").gsub("
","").html_safe, project_feedback_url(project_journal_message.project),
:class => 'wmail_info',
:style => "color:#2E8DD7;float:left; max-width:400px; max-height:30px;font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
%>
@@ -434,12 +434,12 @@
▪
- <%= link_to user_journal_message.user, user_activities_url(user_journal_message.user,:token => @token.value),
+ <%= link_to user_journal_message.user, user_activities_url(user_journal_message.user),
:class => "wmail_name",
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
<%= l(:label_show_your_message) %>
- <%= link_to user_journal_message.notes.gsub("","").gsub("
","").gsub("
","").html_safe,feedback_url(@user,:token => @token.value),
+ <%= link_to user_journal_message.notes.gsub("","").gsub("
","").gsub("
","").html_safe,feedback_url(@user),
:class => 'wmail_info',
:style => "color:#2E8DD7;float:left; max-width:400px; max-height:30px;font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
%>
@@ -466,12 +466,12 @@
▪
- <%= link_to forum.creator, user_activities_url(forum.creator,:token => @token.value),
+ <%= link_to forum.creator, user_activities_url(forum.creator),
:class => "wmail_name",
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
<%= l(:label_forum_new) %>
- <%= link_to truncate(forum.name,length: 30,omission: '...'),forum_url(forum,:token => @token.value),
+ <%= link_to truncate(forum.name,length: 30,omission: '...'),forum_url(forum),
:class => 'wmail_info',
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
%>
@@ -492,7 +492,7 @@
▪
- <%= link_to memo.author, user_activities_url(memo.author,:token => @token.value),
+ <%= link_to memo.author, user_activities_url(memo.author),
:class => "wmail_name",
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
<%= memo.parent_id.nil? ? l(:label_memo_new_from_forum) : l(:label_reply) %>
@@ -516,7 +516,7 @@
<% if Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten][@user.mail_notification] == mail_option %>
<% else %>
- <%= link_to l(mail_option), my_change_mail_notification_url(token: @token.value,mail_notification: Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten].invert[mail_option]), :style => "margin-top:20px;color:#2775d2; margin-left:10px;" %>
+ <%= link_to l(mail_option), my_change_mail_notification_url(mail_notification: Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten].invert[mail_option]), :style => "margin-top:20px;color:#2775d2; margin-left:10px;" %>
<% end %>
<% end %>
diff --git a/app/views/mailer/send_for_user_activities.text.erb b/app/views/mailer/send_for_user_activities.text.erb
index f86dec62d..f4c354790 100644
--- a/app/views/mailer/send_for_user_activities.text.erb
+++ b/app/views/mailer/send_for_user_activities.text.erb
@@ -6,11 +6,11 @@
<%= l(:label_course_news) %>
<% @course_news.each do |course_new|%>
- ▪[<%= link_to truncate(course_new.course.name,length: 30,omission: '...'), course_url(course_new.course, :token => @token.value)%> ]
+ ▪[<%= link_to truncate(course_new.course.name,length: 30,omission: '...'), course_url(course_new.course)%> ]
- <%= link_to course_new.author, user_activities_url(course_new.author,:token => @token.value) %>
+ <%= link_to course_new.author, user_activities_url(course_new.author) %>
<%= l(:label_project_notice) %>
- <%= link_to truncate(course_new.title,length: 30,omission: '...'), news_url(course_new,:token => @token.value) %>
+ <%= link_to truncate(course_new.title,length: 30,omission: '...'), news_url(course_new) %>
<%= format_time(course_new.created_on) %>
<% end %>
<% end %>
@@ -19,12 +19,12 @@
<%= l(:label_course_news) %>
<% @course_news_comments.each do |course_news_comment|%>
▪[ <% unless course_news_comment.commented.nil? %>
- <%= link_to truncate(course_news_comment.commented.course.name,length: 30,omission: '...'), course_url(course_news_comment.commented.course, :token => @token.value) %>
+ <%= link_to truncate(course_news_comment.commented.course.name,length: 30,omission: '...'), course_url(course_news_comment.commented.course) %>
<% end %>
]
- <%= link_to course_news_comment.author, user_activities_url(course_news_comment.author,:token => @token.value) %>
+ <%= link_to course_news_comment.author, user_activities_url(course_news_comment.author) %>
<%= l(:label_project_notice_reply) %>
- <%= link_to truncate(course_news_comment.comments,length: 30,omission: '...'), news_url(course_news_comment.commented,:token => @token.value) %>
+ <%= link_to truncate(course_news_comment.comments,length: 30,omission: '...'), news_url(course_news_comment.commented) %>
<%= format_time(course_news_comment.created_on) %>
<% end %>
<% end %>
@@ -33,10 +33,10 @@
<%= l(:label_homework_overview) %>
<% unless @bids.first.nil?%>
<% @bids.each do |bid| %>
- ▪[<%= link_to truncate(bid.course.name,length: 30,omission: '...'),course_url(bid.course, :token => @token.value) %>]
- <%= link_to bid.user, user_activities_url(bid.user,:token => @token.value) %>
+ ▪[<%= link_to truncate(bid.course.name,length: 30,omission: '...'),course_url(bid.course) %>]
+ <%= link_to bid.user, user_activities_url(bid.user) %>
<%= l(:label_course_homework) %>
- <%= link_to truncate(bid.name, length: 30,omission: '...'), student_work_index_path(:homework => bid.id,:token => @token.value) %>
+ <%= link_to truncate(bid.name, length: 30,omission: '...'), student_work_index_path(:homework => bid.id) %>
<%= format_time(bid.created_at) %>
<% end %>
<% end %>
@@ -46,10 +46,10 @@
<% unless @course_journal_messages.first.nil? %>
<%= l(:view_course_journals_for_messages) %>
<% @course_journal_messages.each do |course_journal_message|%>
- [ <%= link_to truncate(course_journal_message.course.name,length: 30,omission: '...'), course_url(course_journal_message.course, :token => @token.value) %>]
- <%= link_to course_journal_message.user, user_activities_url(course_journal_message.user,:token => @token.value) %>
+ [ <%= link_to truncate(course_journal_message.course.name,length: 30,omission: '...'), course_url(course_journal_message.course) %>]
+ <%= link_to course_journal_message.user, user_activities_url(course_journal_message.user) %>
<%= l(:label_send_course_journals_for_messages) %>
- <%= link_to truncate(course_journal_message.notes.html_safe,length: 30,omission: '...'), course_feedback_url(course_journal_message.course,:token => @token.value) %>
+ <%= link_to truncate(course_journal_message.notes.html_safe,length: 30,omission: '...'), course_feedback_url(course_journal_message.course) %>
<%= format_time(course_journal_message.created_on) %>
<% end %>
<% end %>
@@ -57,10 +57,10 @@
<% unless @course_messages.first.nil? %>
<%= l(:view_borad_course) %>
<% @course_messages.each do |course_message|%>
- ▪[<%= link_to truncate(course_message.course.name,length: 30,omission: '...'), course_url(course_message.course, :token => @token.value)%>]
- <%= link_to course_message.author, user_activities_url(course_message.author,:token => @token.value) %>
+ ▪[<%= link_to truncate(course_message.course.name,length: 30,omission: '...'), course_url(course_message.course)%>]
+ <%= link_to course_message.author, user_activities_url(course_message.author) %>
<%= l(:label_send_course_messages) %>
- <%= link_to truncate(course_message.subject,length: 30,omission: '...'),board_message_url(course_message, :board_id => course_message.board_id,:token => @token.value) %>
+ <%= link_to truncate(course_message.subject,length: 30,omission: '...'),board_message_url(course_message, :board_id => course_message.board_id) %>
<%= format_time(course_message.created_on) %>
<% end %>
<% end %>
@@ -68,10 +68,10 @@
<% unless @attachments.first.nil? %>
<%= l(:label_course_mail_files) %>
<% @attachments.each do |attachment|%>
- ▪[<%= link_to truncate(attachment.course.name,length: 30,omission: '...'), course_url(attachment.course, :token => @token.value) %>]
- <%= link_to attachment.author, user_activities_url(attachment.author,:token => @token.value) %>
+ ▪[<%= link_to truncate(attachment.course.name,length: 30,omission: '...'), course_url(attachment.course) %>]
+ <%= link_to attachment.author, user_activities_url(attachment.author) %>
<%= l(:label_course_file_upload) %>
- <%= link_to truncate(attachment.filename,length: 30,omission: '...'),course_files_url(attachment.course,:token => @token.value) %>
+ <%= link_to truncate(attachment.filename,length: 30,omission: '...'),course_files_url(attachment.course) %>
<%= format_time(attachment.created_on) %>
<% end %>
@@ -86,10 +86,10 @@
<% unless @issues.first.nil? %>
<%= l(:label_issue_tracking) %>
<% @issues.each do |issue|%>
- ▪[<%= link_to truncate(issue.project.name,length: 30,omission: '...'), project_url(issue.project, :token => @token.value) %>]
- <%= link_to issue.author, user_activities_url(issue.author,:token => @token.value) %>
+ ▪[<%= link_to truncate(issue.project.name,length: 30,omission: '...'), project_url(issue.project) %>]
+ <%= link_to issue.author, user_activities_url(issue.author) %>
<%= l(:label_project_issue) %>
- <%= link_to truncate(issue.subject,length: 30,omission: '...'),issue_url(issue, :token => @token.value) %>
+ <%= link_to truncate(issue.subject,length: 30,omission: '...'),issue_url(issue) %>
<%= format_time(issue.created_on) %>
<% end %>
@@ -99,13 +99,13 @@
<% unless @issues_journals.first.nil? %>
<%= l(:label_issue_tracking) %>
<% @issues_journals.each do |issues_journal| %>
- ▪[<%= link_to truncate(issues_journal.issue.project.name,length: 30,omission: '...'), project_url(issues_journal.issue.project, :token => @token.value) %>]
- <%= link_to issues_journal.user, user_activities_url(issues_journal.user,:token => @token.value) %>
+ ▪[<%= link_to truncate(issues_journal.issue.project.name,length: 30,omission: '...'), project_url(issues_journal.issue.project) %>]
+ <%= link_to issues_journal.user, user_activities_url(issues_journal.user) %>
<%= l(:label_project_issue_update) %>
<% if issues_journal.notes.nil? %>
- <%= link_to truncate(issues_journal.issue.subject,length: 30,omission: '...'),issue_url(issue, :token => @token.value) %>
+ <%= link_to truncate(issues_journal.issue.subject,length: 30,omission: '...'),issue_url(issue) %>
<% else %>
- <%= link_to truncate(issues_journal.notes.html_safe,length: 30,omission: '...'),issue_url(issues_journal.issue, :token => @token.value) %>
+ <%= link_to truncate(issues_journal.notes.html_safe,length: 30,omission: '...'),issue_url(issues_journal.issue) %>
<% end %>
<%= format_time(issues_journal.created_on) %>
<% end %>
@@ -115,10 +115,10 @@
<% unless @project_messages.first.nil? %>
<%= l(:project_moule_boards_show) %>
<% @project_messages.each do |project_message|%>
- ▪[<%= link_to truncate(project_message.project.name,length: 30,omission: '...'), project_url(project_message.project, :token => @token.value) %>]
- <%= link_to project_message.author, user_activities_url(project_message.author,:token => @token.value) %>
+ ▪[<%= link_to truncate(project_message.project.name,length: 30,omission: '...'), project_url(project_message.project) %>]
+ <%= link_to project_message.author, user_activities_url(project_message.author) %>
<%= l(:label_send_course_messages) %>
- <%= link_to truncate(project_message.subject,length: 30,omission: '...'),board_message_url(project_message, :board_id => project_message.board_id,:token => @token.value) %>
+ <%= link_to truncate(project_message.subject,length: 30,omission: '...'),board_message_url(project_message, :board_id => project_message.board_id) %>
<%= format_time(project_message.created_on) %>
<% end %>
@@ -129,13 +129,13 @@
<%= l(:label_wiki) %>
<% @wiki_contents.each do |wikicontent|%>
▪[<% unless wikicontent.page.nil? %>
- <%= link_to truncate(wikicontent.page.wiki.project.name,length: 30,omission: '...'), project_url(wikicontent.page.wiki.project, :token => @token.value) %>
+ <%= link_to truncate(wikicontent.page.wiki.project.name,length: 30,omission: '...'), project_url(wikicontent.page.wiki.project) %>
<% end %>
]
- <%= link_to wikicontent.author, user_activities_url(wikicontent.author,:token => @token.value) %>
+ <%= link_to wikicontent.author, user_activities_url(wikicontent.author) %>
<%= l(:label_wiki_mail_notification) %>
<% unless wikicontent.page.nil? %>
- <%= link_to truncate(wikicontent.text.html_safe, length: 30,omission: '...'), project_wiki_url(wikicontent.page.wiki,:token => @token.value) %>
+ <%= link_to truncate(wikicontent.text.html_safe, length: 30,omission: '...'), project_wiki_url(wikicontent.page.wiki) %>
<% end %>
<%= format_time(wikicontent.updated_on) %>
<% end %>
@@ -145,10 +145,10 @@
<% unless @project_news.first.nil? %>
<%= l(:label_project_news) %>
<% @project_news.each do |project_new|%>
- ▪[<%= link_to truncate(project_new.project.name,length: 30,omission: '...'), project_url(project_new.project, :token => @token.value) %> ]
- <%= link_to project_new.author, user_activities_url(project_new.author,:token => @token.value) %>
+ ▪[<%= link_to truncate(project_new.project.name,length: 30,omission: '...'), project_url(project_new.project) %> ]
+ <%= link_to project_new.author, user_activities_url(project_new.author) %>
<%= l(:label_project_mail_notice) %>
- <%= link_to truncate(project_new.title.html_safe,length: 30,omission: '...'), news_url(project_new,:token => @token.value) %>
+ <%= link_to truncate(project_new.title.html_safe,length: 30,omission: '...'), news_url(project_new) %>
<%= format_time(project_new.created_on) %>
<% end %>
<% end %>
@@ -158,11 +158,11 @@
<%= l(:label_project_news) %>
<% @project_news_comments.each do |project_news_comment|%>
▪[ <% unless project_news_comment.commented.nil? %>
- <%= link_to truncate(project_news_comment.commented.project.name,length: 30,omission: '...'), project_url(project_news_comment.commented.project, :token => @token.value) %>
+ <%= link_to truncate(project_news_comment.commented.project.name,length: 30,omission: '...'), project_url(project_news_comment.commented.project) %>
<% end %>]
- <%= link_to project_news_comment.author, user_activities_url(project_news_comment.author,:token => @token.value) %>
+ <%= link_to project_news_comment.author, user_activities_url(project_news_comment.author) %>
<%= 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(project_news_comment.comments.html_safe,length: 30,omission: '...'), news_url(project_news_comment.commented) %>
<%= format_time(project_news_comment.created_on) %>
<% end %>
@@ -172,10 +172,10 @@
<% unless @project_attachments.first.nil? %>
<%= l(:label_project_mail_attachments) %>
<% @project_attachments.each do |project_attachment|%>
- ▪[<%= link_to truncate(project_attachment.project.name,length: 30,omission: '...'), project_url(project_attachment.project, :token => @token.value) %>]
- <%= link_to project_attachment.author, user_activities_url(project_attachment.author,:token => @token.value) %>
+ ▪[<%= link_to truncate(project_attachment.project.name,length: 30,omission: '...'), project_url(project_attachment.project) %>]
+ <%= link_to project_attachment.author, user_activities_url(project_attachment.author) %>
<%= l(:label_project_mail_upload) %>
- <%= link_to truncate(project_attachment.filename,length: 30,omission: '...'),project_files_url(project_attachment.project,:token => @token.value) %>
+ <%= link_to truncate(project_attachment.filename,length: 30,omission: '...'),project_files_url(project_attachment.project) %>
<%= format_time(project_attachment.created_on) %>
<% end %>
<% end %>
@@ -184,10 +184,10 @@
<% unless @project_journal_messages.first.nil? %>
<%= l(:label_project_mail_feedback) %>
<% @project_journal_messages.each do |project_journal_message|%>
- ▪[<%= link_to truncate(project_journal_message.project.name,length: 30,omission: '...'), project_url(project_journal_message.project, :token => @token.value) %> ]
- <%= link_to project_journal_message.user, user_activities_url(project_journal_message.user,:token => @token.value) %>
+ ▪[<%= link_to truncate(project_journal_message.project.name,length: 30,omission: '...'), project_url(project_journal_message.project) %> ]
+ <%= link_to project_journal_message.user, user_activities_url(project_journal_message.user) %>
<%= l(:label_send_course_journals_for_messages) %>
- <%= link_to truncate(project_journal_message.notes.html_safe,length: 30,omission: '...'), project_feedback_url(project_journal_message.project,:token => @token.value) %>
+ <%= link_to truncate(project_journal_message.notes.html_safe,length: 30,omission: '...'), project_feedback_url(project_journal_message.project) %>
<%= format_time(project_journal_message.created_on) %>
<% end %>
@@ -202,9 +202,9 @@
<%= l(:label_user_message) %>
(<%= @user_journal_messages.count %>)
<% @user_journal_messages.each do |user_journal_message|%>
- ▪ <%= link_to user_journal_message.user, user_activities_url(user_journal_message.user,:token => @token.value)%>
+ ▪ <%= link_to user_journal_message.user, user_activities_url(user_journal_message.user)%>
<%= l(:label_show_your_message) %>
- <%= link_to truncate(user_journal_message.notes.html_safe,length: 30,omission: '...'), feedback_url(@user,:token => @token.value) %>
+ <%= link_to truncate(user_journal_message.notes.html_safe,length: 30,omission: '...'), feedback_url(@user) %>
<%= format_time(user_journal_message.created_on) %>
<% end %>
<% end %>
@@ -214,9 +214,9 @@
<% unless @forums.first.nil? %>
<%= l(:label_user_forum) %>
<% @forums.each do |forum|%>
- ▪<%= link_to forum.creator, user_activities_url(forum.creator,:token => @token.value) %>
+ ▪<%= link_to forum.creator, user_activities_url(forum.creator) %>
<%= l(:label_forum_new) %>
- <%= link_to truncate(forum.name.html_safe,length: 30,omission: '...'),forum_url(forum,:token => @token.value) %>
+ <%= link_to truncate(forum.name.html_safe,length: 30,omission: '...'),forum_url(forum) %>
<%= format_time(forum.created_at) %>
<% end %>
@@ -224,7 +224,7 @@
<% unless @memos.first.nil? %>
<%= l(:label_user_message_forum) %>
<% @memos.each do |memo|%>
- ▪<%= link_to memo.author, user_activities_url(memo.author,:token => @token.value)%>
+ ▪<%= link_to memo.author, user_activities_url(memo.author)%>
<%= memo.parent_id.nil? ? l(:label_memo_new_from_forum) : l(:label_reply) %>
<%= link_to truncate(memo.subject.html_safe,length: 30,omission: '...'),forum_memo_url(memo.forum, (memo.parent_id.nil? ? memo : memo.parent_id))%>
<%= format_time(memo.created_at) %>
@@ -238,6 +238,6 @@
<% if Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten][@user.mail_notification] == mail_option %>
<%= l(mail_option) %>
<% else %>
- <%= link_to l(mail_option), my_change_mail_notification_url(token: @token.value,mail_notification: Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten].invert[mail_option]), :style => "margin-top:20px;color:#2775d2; margin-left:10px;" %>
+ <%= link_to l(mail_option), my_change_mail_notification_url(mail_notification: Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten].invert[mail_option]), :style => "margin-top:20px;color:#2775d2; margin-left:10px;" %>
<% end %>
<% end %>
diff --git a/app/views/memos/edit.html.erb b/app/views/memos/edit.html.erb
index c8510c8cf..6806e0996 100644
--- a/app/views/memos/edit.html.erb
+++ b/app/views/memos/edit.html.erb
@@ -21,10 +21,7 @@
$.ajax({
url:' /forums/'+'<%= @memo.forum_id.to_s %>'+'/memos/<%= @memo.id.to_s%>',
type:'put',
- data:{
- 'memo[subject]':$("#memo_subject").val(),
- 'memo[content]':$("#memo_content").val()
- },
+ data:$("#edit_memo").serialize(),
success:function(data){
},
diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb
index 30072777e..56cf4b915 100644
--- a/app/views/my/account.html.erb
+++ b/app/views/my/account.html.erb
@@ -18,8 +18,8 @@
登录名 : *
邮箱 : *
身份 : *
- 姓(First Name) : *
- 名(Last Name) : *
+ 姓(Last Name) : *
+ 名(First Name) : *
组织名 : *
性别 :
工作单位 :
diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb
index e5f331d6c..afe4740eb 100644
--- a/app/views/repositories/show.html.erb
+++ b/app/views/repositories/show.html.erb
@@ -41,7 +41,7 @@
<%= @changesets_latest_coimmit.message %>
<% else %>
- <%=@changesets_latest_coimmit.author_email %>
+ <%=@changesets_latest_coimmit.author_email %>
提交于<%= time_tag(@changesets_latest_coimmit.created_at) %>:
<%= @changesets_latest_coimmit.message %>
diff --git a/app/views/words/_new_respond_course.html.erb b/app/views/words/_new_respond_course.html.erb
index 5bd2a9f3c..99c119a0c 100644
--- a/app/views/words/_new_respond_course.html.erb
+++ b/app/views/words/_new_respond_course.html.erb
@@ -1,9 +1,9 @@
-<%= form_tag(words_create_reply_path, :remote => true,:id=>"form_#{journal.id}") do %>
+<%= form_tag(words_create_reply_path, :remote => true) do %>
<%= text_area_tag 'user_notes', "", :class => 'w520 h50 mb5',
:style => "resize: none;overflow: hidden;",:rows => 4,
:placeholder => l(:label_feedback_respond_content)#,
- #:maxlength => 250
+ #:maxlength => 250
%>
<%= hidden_field_tag 'reference_id', params[:reference_id], :value => journal.id %>
@@ -13,20 +13,6 @@
<%= submit_tag l(:button_feedback_respond), :name => nil ,
- :class => "reply_btn" ,:onclick=>"form_sub_#{ journal.id}($(this),event)"%>
+ :class => "reply_btn"%>
-<% end %>
-
+<% end %>
\ No newline at end of file
diff --git a/config/configuration.yml.example b/config/configuration.yml.example
index 27eb86f68..880c613e9 100644
--- a/config/configuration.yml.example
+++ b/config/configuration.yml.example
@@ -23,7 +23,7 @@
# email_delivery:
# delivery_method: :smtp
# smtp_settings:
-# address: "localhost"
+# address: smtp.163.com
# port: 25
#
# ==== SMTP server at example.com using LOGIN authentication and checking HELO for foo.com
@@ -32,12 +32,12 @@
# email_delivery:
# delivery_method: :smtp
# smtp_settings:
-# address: "example.com"
-# port: 25
+# address: smtp.gmail.com
+# port: 587
# authentication: :login
# domain: 'foo.com'
-# user_name: 'myaccount'
-# password: 'password'
+# user_name: senluowanxiangt@gmail.com
+# password: 1913TXBja
#
# ==== SMTP server at example.com using PLAIN authentication
#
@@ -45,12 +45,12 @@
# email_delivery:
# delivery_method: :smtp
# smtp_settings:
-# address: "example.com"
-# port: 25
+# address: smtp.gmail.com
+# port: 587
# authentication: :plain
# domain: 'example.com'
-# user_name: 'myaccount'
-# password: 'password'
+# user_name: senluowanxiangt@gmail.com
+# password: 1913TXBja
#
# ==== SMTP server at using TLS (GMail)
#
@@ -62,12 +62,12 @@
# delivery_method: :smtp
# smtp_settings:
# enable_starttls_auto: true
-# address: "smtp.gmail.com"
+# address: smtp.gmail.com
# port: 587
# domain: "smtp.gmail.com" # 'your.domain.com' for GoogleApps
# authentication: :plain
-# user_name: "your_email@gmail.com"
-# password: "your_password"
+# user_name: senluowanxiangt@gmail.com
+# password: 1913TXBja
#
#
# === More configuration options
@@ -78,18 +78,17 @@
# http://wiki.rubyonrails.org/rails/pages/HowToSendEmailsWithActionMailer
-# default configuration options for all environments
+
default:
- # Outgoing emails configuration (see examples above)
email_delivery:
delivery_method: :smtp
smtp_settings:
- address: smtp.example.net
- port: 25
- domain: example.net
- authentication: :login
- user_name: "redmine@example.net"
- password: "redmine"
+ address: mail.trustie.net
+ port: 25
+ domain: mail.trustie.net
+ authentication: :login
+ user_name: "mail@trustie.net"
+ password: "loong2010"
# Absolute path to the directory where attachments are stored.
# The default is the 'files' directory in your Redmine instance.
@@ -104,7 +103,7 @@ default:
# autologin_cookie_name: the name of the cookie (default: autologin)
# autologin_cookie_path: the cookie path (default: /)
# autologin_cookie_secure: true sets the cookie secure flag (default: false)
- autologin_cookie_name:
+ autologin_cookie_name: "autologin_trustie"
autologin_cookie_path:
autologin_cookie_secure:
@@ -170,7 +169,7 @@ default:
# Absolute path (e.g. /usr/bin/convert, c:/im/convert.exe) to
# the ImageMagick's `convert` binary. Used to generate attachment thumbnails.
- #imagemagick_convert_command:
+ imagemagick_convert_command: '/home/pdl/redmine-2.3.2-0/common/bin/convert'
# Configuration of RMagcik font.
#
@@ -196,11 +195,41 @@ default:
# Maximum number of simultaneous AJAX uploads
#max_concurrent_ajax_uploads: 2
+ #pic_types: "bmp,jpeg,jpg,png,gif"
+
+ repository_root_path: '/tmp/htdocs'
+ judge_server: 'http://judge.trustie.net/'
+
+ # Git's url
+ gitlab_address: 'http://gitfast.trustie.net'
# specific configuration options for production environment
# that overrides the default ones
production:
+ # CJK support
+ rmagick_font_path: /usr/share/fonts/ipa-mincho/ipam.ttf
+ judge_server: 'http://192.168.80.21:8080/'
+ repository_root_path: '/home/pdl/redmine-2.3.2-0/apache2/htdocs'
+ cookie_domain: ".trustie.net"
+ email_delivery:
+ delivery_method: :smtp
+ smtp_settings:
+ address: mail.trustie.net
+ port: 25
+ domain: mail.trustie.net
+ authentication: :login
+ user_name: "mail@trustie.net"
+ password: "loong2010"
# specific configuration options for development environment
# that overrides the default ones
development:
+ email_delivery:
+ delivery_method: :smtp
+ smtp_settings:
+ address: mail.trustie.net
+ port: 25
+ domain: mail.trustie.net
+ authentication: :login
+ user_name: "mail@trustie.net"
+ password: "loong2010"
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index 03424bd5a..10241b4b3 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -703,6 +703,7 @@ zh:
label_search_by_login: 登录名
label_search_by_name: 名字
label_search_by_email: 邮箱
+ label_search_by_occupation: 单位
label_result_plural: 结果
label_all_words: 所有单词
label_wiki: Wiki
diff --git a/lib/tasks/hjq_test.rake b/lib/tasks/hjq_test.rake
new file mode 100644
index 000000000..f0be77fe6
--- /dev/null
+++ b/lib/tasks/hjq_test.rake
@@ -0,0 +1,18 @@
+namespace :hjq do
+ namespace :news do
+ desc "news order"
+ task :users => :environment do
+ a = []
+ # news = News.where("course_id =?", 122)
+ course.news.each do |new|
+ unless new.comments.blank?
+ latest_comment = new.comments.sort! { |a,b| a.created_on <=> b.created_on}.last
+ end
+ a << latest_comment
+ end
+ comments = a.map(&:commented_id).detect{|a.b| a.created_on <=> b.created_on}
+ # comments = a.sort!{|a.b| a.created_on <=> b.created_on}
+ news = News.where("id in (?)", comments)
+ end
+ end
+end
diff --git a/public/assets/kindeditor/at/jquery.atwho.css b/public/assets/kindeditor/at/jquery.atwho.css
index 9a4c21d9b..df3ff9d94 100644
--- a/public/assets/kindeditor/at/jquery.atwho.css
+++ b/public/assets/kindeditor/at/jquery.atwho.css
@@ -9,7 +9,7 @@
border: 1px solid #DDD;
border-radius: 3px;
box-shadow: 0 0 5px rgba(0,0,0,0.1);
- min-width: 120px;
+ min-width: 200px;
max-height: 200px;
overflow: auto;
z-index: 11110 !important;
diff --git a/public/javascripts/application.js b/public/javascripts/application.js
index 901e302d3..3d9fba942 100644
--- a/public/javascripts/application.js
+++ b/public/javascripts/application.js
@@ -870,7 +870,10 @@ function redo() {
window.location.reload()
}
-function encodeHomeworkUrl(url){
+function encodeHomeworkUrl(url, is_base64){
+ if(typeof is_base64 === 'boolean' && is_base64){
+ return '/zipdown/download?base64file='+url;
+ }
var file = encodeURI(url).replace(/\+/g, '%2B');
return '/zipdown/download?file='+file;
}
@@ -891,7 +894,10 @@ $(function(){
}
if(res.length==1){
- location.href = encodeHomeworkUrl(res[0].file);return;
+ if(res[0].base64file){
+ location.href = encodeHomeworkUrl(res[0].base64file, true);return;
+ }
+ location.href = encodeHomeworkUrl(res[0].file);return;
}
document.getElementById('light').style.display='block';
@@ -904,8 +910,12 @@ $(function(){
} else {
des = '第'+res[i].index+'个学生的作品下载';
}
- $(''+(i+1)+'. '+des+' (共'+res[i].size+'M) ').appendTo($container);
+ if(res[i].base64file){
+ $(''+(i+1)+'. '+des+' (共'+res[i].size+'M) ').appendTo($container);
+ } else {
+ $(''+(i+1)+'. '+des+' (共'+res[i].size+'M) ').appendTo($container);
+ }
}
}
});
@@ -921,7 +931,10 @@ $(function(){
else
{
if(res.length==1){
- location.href = encodeHomeworkUrl(res[0].file);return;
+ if(res[0].base64file){
+ location.href = encodeHomeworkUrl(res[0].base64file, true);return;
+ }
+ location.href = encodeHomeworkUrl(res[0].file);return;
}
document.getElementById('light').style.display='block';
$container = $('#light .upload_box_ul');
@@ -933,7 +946,12 @@ $(function(){
} else {
des = '第'+res[i].index+'个学生的作品下载';
}
+
+ if(res[i].base64file){
+ $(''+(i+1)+'. '+des+' (共'+res[i].size+'M) ').appendTo($container);
+ } else {
$(''+(i+1)+'. '+des+' (共'+res[i].size+'M) ').appendTo($container);
+ }
}
}
@@ -973,3 +991,14 @@ function showNormalImage(id) {
}
}
+
+$(function(){
+ //at 加链接
+ $("span.at").hover(function(){
+ $(this).css('cursor', 'pointer');
+ });
+ $("span.at").live('click', function(){
+ var userId = $(this).attr('data-user-id');
+ $(window.location).attr('href', '/users/'+userId);
+ });
+});
\ No newline at end of file
diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css
index d9f370c7d..7047316c6 100644
--- a/public/stylesheets/public.css
+++ b/public/stylesheets/public.css
@@ -916,4 +916,5 @@ a.resourcesTypeUser {background:url(images/homepage_icon.png) -178px -453px no-r
.list_style ul li{list-style-type: disc;margin-left: 20px;}
/* @功能 定义 */
-span.at {color:#269ac9;}
\ No newline at end of file
+span.at {color:#269ac9;}
+.del_line{text-decoration:line-through !important;}
\ No newline at end of file
diff --git a/public/stylesheets/repository.css b/public/stylesheets/repository.css
index 2e084d61c..baf57c4b1 100644
--- a/public/stylesheets/repository.css
+++ b/public/stylesheets/repository.css
@@ -286,4 +286,5 @@ li.commit .commit-row-info .committed_ago {
}
.rep_history_grey{
color: #7F7F7F;
-}
\ No newline at end of file
+}
+.rep_mail_name{max-width: 150px; overflow: hidden; text-overflow: ellipsis;}
\ No newline at end of file