From 00711f11006eb79827da014157c83f44a9c732df Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 23 Dec 2015 16:12:23 +0800 Subject: [PATCH] =?UTF-8?q?issue=E7=BC=96=E8=BE=91=E3=80=81=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E9=82=AE=E4=BB=B6=E4=B8=AD=E5=8E=BB=E6=8E=89token?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/project_score_helper.rb | 6 +++--- app/models/mailer.rb | 12 ++++++------ app/views/mailer/issue_add.html.erb | 2 +- app/views/mailer/issue_add.text.erb | 2 +- app/views/mailer/issue_edit.html.erb | 2 +- app/views/mailer/issue_edit.text.erb | 2 +- config/locales/zh.yml | 1 + 7 files changed, 14 insertions(+), 13 deletions(-) diff --git a/app/helpers/project_score_helper.rb b/app/helpers/project_score_helper.rb index d73e1592e..a41b7d8ed 100644 --- a/app/helpers/project_score_helper.rb +++ b/app/helpers/project_score_helper.rb @@ -22,10 +22,10 @@ module ProjectScoreHelper #代码提交数量 def changesets_num project - g = Gitlab.client - project.gpid.nil? ? 0 : g.commits_total_count(project.gpid).count + # g = Gitlab.client + # project.gpid.nil? ? 0 : g.commits_total_count(project.gpid).count # # commits_total_count(project.gpid) - # project.changesets.count + project.changesets.count 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/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/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