diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 7efa02503..caf29ba90 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -494,7 +494,7 @@ module ApplicationHelper def principals_check_box_tags_ex(name, principals) s = '' principals.each do |principal| - s << "\n" + s << "\n" end s.html_safe end diff --git a/app/models/mailer.rb b/app/models/mailer.rb index 1760d9004..f42c20acc 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -36,7 +36,7 @@ class Mailer < ActionMailer::Base @author = forum.creator recipients = forum.creator.mail # cc = wiki_content.page.wiki.watcher_recipients - recipients - + @issue_author_url = url_for(user_activities_url(@author)) @forum_url = url_for(:controller => 'forums', :action => 'show', :id => forum.id) mail :to => recipients,:subject => "[ #{l(:label_forum)} : #{forum.name} #{l(:notice_successful_create)}]" @@ -47,6 +47,8 @@ class Mailer < ActionMailer::Base redmine_headers 'Memo' => memo.id @forum = memo.forum @author = memo.author + @forum_url = url_for(:controller => 'forums', :action => 'show', :id => @forum.id) + @issue_author_url = url_for(user_activities_url(@author)) recipients ||= [] mems = memo.self_and_siblings mems.each do |mem| @@ -69,7 +71,7 @@ class Mailer < ActionMailer::Base @mail = journals_for_message.at_user if journals_for_message.at_user @message = journals_for_message.notes @title = "#@user #{t(:label_leave_your_message, :locale => 'zh')}" - + @issue_author_url = url_for(user_activities_url(@user)) @url = case journals_for_message.jour.class.to_s.to_sym # 判断留言的对象所属类型 when :Bid course_for_bid_url(journals_for_message.jour, anchor: "word_li_#{journals_for_message.id}") @@ -289,6 +291,7 @@ class Mailer < ActionMailer::Base redmine_headers 'Project' => document.project.identifier @author = User.current @document = document + @issue_author_url = url_for(user_activities_url(@author)) @document_url = url_for(:controller => 'documents', :action => 'show', :id => document) mail :to => document.recipients, :subject => "[#{document.project.name}] #{l(:label_document_new)}: #{document.title}" @@ -304,6 +307,7 @@ class Mailer < ActionMailer::Base added_to = '' added_to_url = '' @author = attachments.first.author + @issue_author_url = url_for(user_activities_url(@author)) case container.class.name when 'Project' added_to_url = url_for(:controller => 'files', :action => 'index', :project_id => container) @@ -356,6 +360,7 @@ class Mailer < ActionMailer::Base if news.project redmine_headers 'Project' => news.project.identifier @author = news.author + @issue_author_url = url_for(user_activities_url(@author)) message_id news @news = news @news_url = url_for(:controller => 'news', :action => 'show', :id => news) @@ -364,6 +369,7 @@ class Mailer < ActionMailer::Base elsif news.course redmine_headers 'Course' => news.course.id @author = news.author + @issue_author_url = url_for(user_activities_url(@author)) message_id news @news = news recipients = news.course.notified_users.select { |user| user.allowed_to?(:view_files, news.course) }.collect { |u| u.mail } @@ -383,6 +389,7 @@ class Mailer < ActionMailer::Base if news.project redmine_headers 'Project' => news.project.identifier @author = comment.author + @issue_author_url = url_for(user_activities_url(@author)) message_id comment @news = news @comment = comment @@ -393,6 +400,7 @@ class Mailer < ActionMailer::Base elsif news.course redmine_headers 'Course' => news.course.id @author = comment.author + @issue_author_url = url_for(user_activities_url(@author)) message_id comment @news = news @comment = comment @@ -414,6 +422,7 @@ class Mailer < ActionMailer::Base redmine_headers 'Project' => message.project.identifier, 'Topic-Id' => (message.parent_id || message.id) @author = message.author + @issue_author_url = url_for(user_activities_url(@author)) message_id message references message.parent unless message.parent.nil? recipients = message.recipients @@ -427,6 +436,7 @@ class Mailer < ActionMailer::Base redmine_headers 'Course' => message.course.id, 'Topic-Id' => (message.parent_id || message.id) @author = message.author + @issue_author_url = url_for(user_activities_url(@author)) message_id message references message.parent unless message.parent.nil? recipients = message.course.notified_users.select { |user| user.allowed_to?(:view_files, message.course) }.collect { |u| u.mail } diff --git a/app/views/courses/_course_form.html.erb b/app/views/courses/_course_form.html.erb index d293f9ed1..d54741295 100644 --- a/app/views/courses/_course_form.html.erb +++ b/app/views/courses/_course_form.html.erb @@ -29,7 +29,7 @@ <%= l(:label_tags_course_name) %> *   - +

<%= f.fields_for @course do |m| %> @@ -38,7 +38,7 @@
- + <%= l(:label_class_period) %> *   @@ -118,7 +118,7 @@

- + <%= l(:text_command) %> <% end %> diff --git a/app/views/courses/new.html.erb b/app/views/courses/new.html.erb index 77f041322..b9422ba64 100644 --- a/app/views/courses/new.html.erb +++ b/app/views/courses/new.html.erb @@ -6,7 +6,7 @@ <%= labelled_form_for @course do |f| %>
<%= render :partial => 'course_form', :locals => { :f => f } %> - + <%= submit_tag l(:button_create), :class => "enterprise"%> diff --git a/app/views/files/_attachement_list.html.erb b/app/views/files/_attachement_list.html.erb index f65ba8d41..85739f7c3 100644 --- a/app/views/files/_attachement_list.html.erb +++ b/app/views/files/_attachement_list.html.erb @@ -22,7 +22,7 @@
- + <%= file_field_tag 'attachments[dummy][file]', :id => '_file', :class => 'file_selector', diff --git a/app/views/files/_upload_show.html.erb b/app/views/files/_upload_show.html.erb index 13bcd043e..65a662f10 100644 --- a/app/views/files/_upload_show.html.erb +++ b/app/views/files/_upload_show.html.erb @@ -1,15 +1,15 @@
-

上传资源

+

<%= l(:label_upload_files)%>

<%= error_messages_for 'attachment' %> - + <%= form_tag(course_files_path(course), :multipart => true,:remote => true,:method => :post,:name=>"upload_form") do %> - + <%= render :partial => 'attachement_list',:locals => {:course => course} %>
- 确  认 - 取  消 + <%= l(:button_confirm)%> + <%= l(:button_cancel)%> <% end %>
diff --git a/app/views/mailer/forum_add.html.erb b/app/views/mailer/forum_add.html.erb index 8da8b7891..7e26fd0df 100644 --- a/app/views/mailer/forum_add.html.erb +++ b/app/views/mailer/forum_add.html.erb @@ -1,4 +1,29 @@ -

<%= link_to(h(@forum.name), @forum_url) %>

-<%=h @forum.creator.name %> -<%= @forum.description.html_safe %> \ No newline at end of file +

+ + <%= link_to(h("#{@forum.creator.login}(#{@forum.creator.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %> + + <%= l(:label_forum_new)%> + <%= link_to(h(@forum.name), @forum_url,:style=>'color:#1b55a7; font-weight:bold;') %> +

+
+
    +
  • <%= l(:mail_issue_subject)%> + <%= link_to(h(@forum.name), @forum_url,:style=>'color:#1b55a7; font-weight:bold;') %>
  • + +
  • <%= l(:mail_issue_content)%> + + <%= @forum.description.html_safe %> + +
  • + +
+
+ +
+
+ + + diff --git a/app/views/mailer/forum_message_added.html.erb b/app/views/mailer/forum_message_added.html.erb index 743c06ae7..58657d46b 100644 --- a/app/views/mailer/forum_message_added.html.erb +++ b/app/views/mailer/forum_message_added.html.erb @@ -1,4 +1,32 @@ -

<%= link_to(h(@memo.subject), @memo_url) %>

-<%=h @memo.author.name %> -<%= @memo.content.html_safe %> \ No newline at end of file +

+ + <%= link_to(h("#{@author.login}(#{@author.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %> + <%= l(:mail_issue_title_userin)%> + + <%= link_to(h(@forum.name), @forum_url,:style=>'color:#1b55a7; font-weight:bold;') %> + + <%= l(:mail_issue_title_active)%>

+
+
    +
  • <%= l(:mail_issue_subject)%> + <%= link_to(h(@memo.subject), @memo_url,:style=>'color:#1b55a7; font-weight:bold;') %>
  • +
  • <%= l(:mail_issue_sent_from)%> + <%= link_to(h(@forum.name), @forum_url,:style=>'color:#1b55a7; font-weight:bold;') %> +
  • +
  • <%= l(:mail_issue_content)%> + + <%= @memo.content.html_safe %> + +
  • + +
+
+ +
+
+ + + diff --git a/app/views/mailer/journals_for_message_add.html.erb b/app/views/mailer/journals_for_message_add.html.erb index f39b49026..cfb288d9d 100644 --- a/app/views/mailer/journals_for_message_add.html.erb +++ b/app/views/mailer/journals_for_message_add.html.erb @@ -1,5 +1,25 @@ -尊敬的用户,<%= @user %>给你留言了: -
<%= @message %>
-

点击链接查看最新回复<%= link_to(@url, @url) %> -         <%= link_to(l(:lable_not_receive_mail),"http://" + Setting.host_name + "/my/account")%>

+ +

+ + + <%= link_to(h("#{@user.login}(#{@user.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %> + 给你留言了 +

+
+
    + +
  • <%= l(:mail_issue_content)%> + + <%= @message %> + +
  • + +
+
+ +
+
+ diff --git a/app/views/mailer/message_posted.html.erb b/app/views/mailer/message_posted.html.erb index 1fe28e04f..dbe41976a 100644 --- a/app/views/mailer/message_posted.html.erb +++ b/app/views/mailer/message_posted.html.erb @@ -1,7 +1,8 @@

- <%= h @message.author %>(<%= @message.author.show_name %>) + <%= link_to(h("#{@message.author.login}(#{@message.author.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %> + <%= l(:mail_issue_title_userin)%> <% if @message.project %> @@ -29,7 +30,7 @@

diff --git a/app/views/mailer/news_added.html.erb b/app/views/mailer/news_added.html.erb index 758ebccb8..ca8f3c1b0 100644 --- a/app/views/mailer/news_added.html.erb +++ b/app/views/mailer/news_added.html.erb @@ -1,4 +1,41 @@ -

<%= link_to(h(@news.title), @news_url) %>

-<%=h @news.author.name %> -<%= textilizable(@news, :description, :only_path => false) %> +

+ + + <%= link_to(h("#{@news.author.login}(#{@news.author.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %> + + <%= l(:mail_issue_title_userin)%> + + <% if @news.project %> + <%=h @news.project.name %> : <%= link_to(h(@news.title), @news_url,:style=>'color:#1b55a7; font-weight:bold;') %> + <% elsif @news.course %> + <%=h @news.course.name %> : <%= link_to(h(@news.title), @news_url,:style=>'color:#1b55a7; font-weight:bold;') %> + <% end %> + <%= l(:mail_issue_title_active)%>

+
+
    +
  • <%= l(:mail_issue_subject)%> + <%= link_to(h(@news.title), @news_url,:style=>'color:#1b55a7; font-weight:bold;') %>
  • +
  • <%= l(:mail_issue_sent_from)%> + <% if @news.project %> + <%=h @news.project.name %> + <% elsif @news.course %> + <%=h @news.course.name %> + <% end %> +
  • +
  • <%= l(:mail_issue_content)%> + + <%= @news.description %> + +
  • + +
+
+ +
+
+ + + diff --git a/app/views/mailer/news_comment_added.html.erb b/app/views/mailer/news_comment_added.html.erb index ef2be0f65..5ac95a571 100644 --- a/app/views/mailer/news_comment_added.html.erb +++ b/app/views/mailer/news_comment_added.html.erb @@ -1,5 +1,40 @@ -

<%= link_to(h(@news.title), @news_url) %>

-

<%= l(:text_user_wrote, :value => h(@comment.author)) %>

+

+ + <%= link_to(h("#{@comment.author.login}(#{@comment.author.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %> + + <%= l(:mail_issue_title_userin)%> + + <% if @news.project %> + <%=h @news.project.name %> : <%= link_to(h(@news.title), @news_url,:style=>'color:#1b55a7; font-weight:bold;') %> + <% elsif @news.course %> + <%=h @news.course.name %> : <%= link_to(h(@news.title), @news_url,:style=>'color:#1b55a7; font-weight:bold;') %> + <% end %> + <%= l(:mail_issue_title_active)%>

+
+
    +
  • <%= l(:mail_issue_subject)%> + <%= link_to(h(@news.title), @news_url,:style=>'color:#1b55a7; font-weight:bold;') %>
  • +
  • <%= l(:mail_issue_sent_from)%> + <% if @news.project %> + <%=h @news.project.name %> + <% elsif @news.course %> + <%=h @news.course.name %> + <% end %> +
  • +
  • <%= l(:mail_issue_content)%> + + <%= @news.description %> + +
  • + +
+
+ +
+
+ + -<%= textilizable @comment, :comments, :only_path => false %> diff --git a/app/views/welcome/_search_course.html.erb b/app/views/welcome/_search_course.html.erb index c3bbd46d8..895f696fb 100644 --- a/app/views/welcome/_search_course.html.erb +++ b/app/views/welcome/_search_course.html.erb @@ -47,7 +47,7 @@ form #search_type{ <%#完了把上面东西放到 .css 里%> <%= form_tag({controller: :welcome, action: :search }, method: :get) do %> -