From f01d164295ea186cf827a4e551baed20b9b0ed61 Mon Sep 17 00:00:00 2001 From: alan <547533434@qq.com> Date: Wed, 21 Jan 2015 12:01:02 +0800 Subject: [PATCH 01/28] Signed-off-by: alan <547533434@qq.com> --- app/helpers/courses_helper.rb | 2 +- app/models/mailer.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb index 95b049dc2..22eb9bfae 100644 --- a/app/helpers/courses_helper.rb +++ b/app/helpers/courses_helper.rb @@ -112,7 +112,7 @@ module CoursesHelper # end #获取课程所有成员 - def course_member course + def course_all_member course course.members end # 学生人数计算 diff --git a/app/models/mailer.rb b/app/models/mailer.rb index a2e742ee3..2cd069175 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -62,7 +62,7 @@ class Mailer < ActionMailer::Base course = journals_for_message.jour @author = journals_for_message.user #课程的教师 - @members = course_member journals_for_message.jour + @members = course_all_member journals_for_message.jour #收件人邮箱 @recipients ||= [] @members.each do |teacher| From 3279928bef0cb9256d4d651f97841dce515f941a Mon Sep 17 00:00:00 2001 From: whimlex Date: Wed, 21 Jan 2015 18:12:04 +0800 Subject: [PATCH 02/28] =?UTF-8?q?=E9=82=AE=E4=BB=B6=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E8=B0=83=E6=95=B4=EF=BC=8C=E5=9B=BD=E9=99=85=E5=8C=96=EF=BC=9B?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E8=B5=84=E6=96=99=E9=A1=B5=E9=9D=A2=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/mailer.html.erb | 4 +-- app/views/mailer/_issue.html.erb | 14 +++++------ app/views/mailer/_issue.text.erb | 14 +++++------ app/views/mailer/issue_add.html.erb | 2 +- app/views/mailer/issue_add.text.erb | 2 +- app/views/mailer/issue_edit.html.erb | 22 ++++++++++------- app/views/mailer/issue_edit.text.erb | 4 +-- app/views/my/account.html.erb | 26 ++++++++++---------- app/views/users/_mail_notifications.html.erb | 2 +- config/locales/en.yml | 16 +++++++++++- config/locales/zh.yml | 15 +++++++++++ 11 files changed, 77 insertions(+), 44 deletions(-) diff --git a/app/views/layouts/mailer.html.erb b/app/views/layouts/mailer.html.erb index b80206728..a05eacbd1 100644 --- a/app/views/layouts/mailer.html.erb +++ b/app/views/layouts/mailer.html.erb @@ -11,7 +11,7 @@ div,html,img,ul,li,p,body,h1,h2,h3,h4,p,a,table,tr,td,fieldset,input,span,ol{ ma div,img,tr,td,table{ border:0;} table,tr,td{border:0;cellspacing:0; cellpadding:0;} ol,ul,li{ list-style-type:none} -.cl{ clear:both; overflow:hidden; } +.cl{ clear:both; overflow:hidden; margin-top: 30px;} a{ text-decoration:none; } a:hover{ text-decoration:underline; } .mail_box,ul,li{ list-style-type:none} @@ -35,7 +35,7 @@ a:hover.mail_reply{ background:#06a9bc; text-decoration:none;}
-

亲爱的Trustie用户,您好!

+

<%= l(:mail_issue_greetings)%>

<%= yield %>
diff --git a/app/views/mailer/_issue.html.erb b/app/views/mailer/_issue.html.erb index 5979877a3..c97c82426 100644 --- a/app/views/mailer/_issue.html.erb +++ b/app/views/mailer/_issue.html.erb @@ -2,19 +2,19 @@

<%= link_to(h("#{@issue.author}(#{@issue.author.show_name})"), @issue_author_url) %> - 在 - <%= link_to(h("#{@issue.project.name}"),@project_url) %>中有了一个与您相关的最新活动,请您关注!

+ <%= l(:mail_issue_title_userin)%> + <%= link_to(h("#{@issue.project.name}"),@project_url) %><%= l(:mail_issue_title_active)%>

    -
  • 标题:<%= link_to(issue.subject, issue_url) %>
  • -
  • 来源:<%= issue.project.name %>项目<%= issue.tracker.name%>
  • -
  • 内容: +
  • <%= l(:mail_issue_subject)%><%= link_to(issue.subject, issue_url) %>
  • +
  • <%= l(:mail_issue_sent_from)%><%= issue.project.name %><%= l(:mail_issue_from_project)%>
  • +
  • <%= l(:mail_issue_content)%> <%= issue.description %>
  • <% unless @issue.attachments.nil? %> - 附件: + <%= l(:mail_issue_attachments)%> <% @issue.attachments.each do |attach| %>

    <%= link_to_attachment(attach, :download => true, :token => @token.value, :only_path => false) %>

    @@ -25,7 +25,7 @@
- +
diff --git a/app/views/poll/_poll_form.html.erb b/app/views/poll/_poll_form.html.erb index df4859613..1d0dee837 100644 --- a/app/views/poll/_poll_form.html.erb +++ b/app/views/poll/_poll_form.html.erb @@ -25,6 +25,10 @@ } //问卷头 function pollsCancel(){$("#polls_head_edit").hide();$("#polls_head_show").show();} + function pollsSubmit(doc){ + var title = $.trim($("#polls_title").val()); + if(title.length == 0){alert("问卷标题不能为空");}else{doc.parent().parent().parent().submit();} + } function pollsEdit(){$("#polls_head_edit").show();$("#polls_head_show").hide();} // function pollQuestionCancel(question_id){ @@ -57,15 +61,22 @@ function poll_submit() { - $('#ajax-modal').html('<%= escape_javascript(render :partial => 'poll_submit', locals: { :poll => @poll,:is_remote => false}) %>'); - showModal('ajax-modal', '310px'); - $('#ajax-modal').css('height','115px'); - $('#ajax-modal').siblings().remove(); - $('#ajax-modal').before("" + - ""); - $('#ajax-modal').parent().removeClass("alert_praise"); - $('#ajax-modal').parent().css("top","").css("left",""); - $('#ajax-modal').parent().addClass("popbox_polls"); + var title = $.trim($("#polls_name_h").html()); + if(title.length == 0) + { + alert("问卷标题不能为空"); + } + else{ + $('#ajax-modal').html('<%= escape_javascript(render :partial => 'poll_submit', locals: { :poll => @poll,:is_remote => false}) %>'); + showModal('ajax-modal', '310px'); + $('#ajax-modal').css('height','115px'); + $('#ajax-modal').siblings().remove(); + $('#ajax-modal').before("" + + ""); + $('#ajax-modal').parent().removeClass("alert_praise"); + $('#ajax-modal').parent().css("top","").css("left",""); + $('#ajax-modal').parent().addClass("popbox_polls"); + } } diff --git a/app/views/poll/_show_head.html.erb b/app/views/poll/_show_head.html.erb index 7ab16b24d..ce74dc10a 100644 --- a/app/views/poll/_show_head.html.erb +++ b/app/views/poll/_show_head.html.erb @@ -1,7 +1,7 @@

- <%= poll.polls_name.empty? ? l(:label_poll_new) : poll.polls_name%> + <%= poll.polls_name%>

<%= @poll.polls_description%> From 900cff8f8e51c9b585e7afc5327b198526dd185f Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 23 Jan 2015 14:43:40 +0800 Subject: [PATCH 23/28] =?UTF-8?q?1=E3=80=81=E9=97=AE=E5=8D=B7=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E7=95=8C=E9=9D=A2=E5=8F=91=E5=B8=83=E9=97=AE=E5=8D=B7?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E5=A2=9E=E5=8A=A0=E9=97=AE=E5=8D=B7=E6=A0=87?= =?UTF-8?q?=E9=A2=98=E4=B8=8D=E8=83=BD=E4=B8=BA=E7=A9=BA=E7=9A=84=E5=88=A4?= =?UTF-8?q?=E6=96=AD=202=E3=80=81=E5=8E=BB=E6=8E=89=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=9A=84=E6=8F=92=E4=BB=B6=E5=BC=95=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/poll/_poll.html.erb | 2 +- app/views/poll/index.html.erb | 41 ++++++++++++++++++++--------------- config/application.rb | 6 ++--- db/schema.rb | 19 ++++------------ 4 files changed, 32 insertions(+), 36 deletions(-) diff --git a/app/views/poll/_poll.html.erb b/app/views/poll/_poll.html.erb index c53f09361..1bf6b3716 100644 --- a/app/views/poll/_poll.html.erb +++ b/app/views/poll/_poll.html.erb @@ -34,7 +34,7 @@

  • <%if @is_teacher %> <% if poll.polls_status == 1 %> - 发布问卷 + 发布问卷 <% elsif poll.polls_status == 2%> 取消发布 <% end%> diff --git a/app/views/poll/index.html.erb b/app/views/poll/index.html.erb index a8aca1308..3962768da 100644 --- a/app/views/poll/index.html.erb +++ b/app/views/poll/index.html.erb @@ -26,28 +26,35 @@ function clickCanel(){hideModal("#popbox02");} - function poll_submit(poll_id) + function poll_submit(poll_id,poll_name) { - $('#ajax-modal').html("
    " + - "
    " + - "
    " + + if(poll_name == 0) + { + alert("问卷标题不能为空"); + } + else + { + $('#ajax-modal').html("
    " + + "
    " + + "
    " + "

    问卷发布后将不能对问卷进行修改,
    是否确定发布该问卷?

    " + "
    " + - "确  定" + - "取  消" + + "确  定" + + "取  消" + "
    " + "
    " + - "
    " + - "
    " + - "
    "); - showModal('ajax-modal', '310px'); - $('#ajax-modal').css('height','115px'); - $('#ajax-modal').siblings().remove(); - $('#ajax-modal').before("" + - ""); - $('#ajax-modal').parent().removeClass("alert_praise"); - $('#ajax-modal').parent().css("top","").css("left",""); - $('#ajax-modal').parent().addClass("popbox_polls"); + "
    " + + "
    " + + "
    "); + showModal('ajax-modal', '310px'); + $('#ajax-modal').css('height','115px'); + $('#ajax-modal').siblings().remove(); + $('#ajax-modal').before("" + + ""); + $('#ajax-modal').parent().removeClass("alert_praise"); + $('#ajax-modal').parent().css("top","").css("left",""); + $('#ajax-modal').parent().addClass("popbox_polls"); + } }
    diff --git a/config/application.rb b/config/application.rb index 2f1534d00..7e47cc64e 100644 --- a/config/application.rb +++ b/config/application.rb @@ -17,9 +17,9 @@ module RedmineApp # -- all .rb files in that directory are automatically loaded. # verifier if email is real - EmailVerifier.config do |config| - config.verifier_email = "lizanle521@126.com" - end + #EmailVerifier.config do |config| + # config.verifier_email = "lizanle521@126.com" + #end config.generators do |g| g.test_framework :rspec, diff --git a/db/schema.rb b/db/schema.rb index d0d755bd3..20c74ba1e 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20150121030451) do +ActiveRecord::Schema.define(:version => 20150123020615) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -23,18 +23,6 @@ ActiveRecord::Schema.define(:version => 20150121030451) do add_index "activities", ["user_id", "act_type"], :name => "index_activities_on_user_id_and_act_type" add_index "activities", ["user_id"], :name => "index_activities_on_user_id" - create_table "api_keys", :force => true do |t| - t.string "access_token" - t.datetime "expires_at" - t.integer "user_id" - t.boolean "active", :default => true - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "api_keys", ["access_token"], :name => "index_api_keys_on_access_token" - add_index "api_keys", ["user_id"], :name => "index_api_keys_on_user_id" - create_table "applied_projects", :force => true do |t| t.integer "project_id", :null => false t.integer "user_id", :null => false @@ -844,9 +832,10 @@ ActiveRecord::Schema.define(:version => 20150121030451) do t.integer "user_id" t.datetime "published_at" t.datetime "closed_at" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.text "polls_description" + t.integer "show_result", :default => 1 end create_table "praise_tread_caches", :force => true do |t| From 61634585f5c59f37510a75688c8c81d9b7aca495 Mon Sep 17 00:00:00 2001 From: alan <547533434@qq.com> Date: Fri, 23 Jan 2015 14:51:11 +0800 Subject: [PATCH 24/28] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E3=80=8Anews=EF=BC=8Cf?= =?UTF-8?q?orum=E6=A8=A1=E5=9D=97=E5=8F=91=E9=80=81=E9=82=AE=E4=BB=B6?= =?UTF-8?q?=E7=9A=84=E6=A8=A1=E6=9D=BF=E3=80=8B=20Signed-off-by:=20alan=20?= =?UTF-8?q?<547533434@qq.com>?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/mailer.rb | 14 +++++- app/views/mailer/forum_add.html.erb | 31 +++++++++++-- app/views/mailer/forum_message_added.html.erb | 34 +++++++++++++-- .../mailer/journals_for_message_add.html.erb | 28 ++++++++++-- app/views/mailer/message_posted.html.erb | 5 ++- app/views/mailer/news_added.html.erb | 43 +++++++++++++++++-- app/views/mailer/news_comment_added.html.erb | 41 ++++++++++++++++-- config/application.rb | 6 +-- 8 files changed, 179 insertions(+), 23 deletions(-) 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/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/config/application.rb b/config/application.rb index 2f1534d00..311bf457b 100644 --- a/config/application.rb +++ b/config/application.rb @@ -17,9 +17,9 @@ module RedmineApp # -- all .rb files in that directory are automatically loaded. # verifier if email is real - EmailVerifier.config do |config| - config.verifier_email = "lizanle521@126.com" - end + # EmailVerifier.config do |config| + # config.verifier_email = "lizanle521@126.com" + # end config.generators do |g| g.test_framework :rspec, From 38157e560eb1524f584e4f3b01199a7883b19551 Mon Sep 17 00:00:00 2001 From: whimlex Date: Fri, 23 Jan 2015 15:08:34 +0800 Subject: [PATCH 25/28] =?UTF-8?q?=E8=AF=BE=E7=A8=8B--=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E5=BA=93--=E4=B8=8A=E4=BC=A0=E8=B5=84=E6=BA=90=EF=BC=9A?= =?UTF-8?q?=E5=BD=93=E5=8F=98=E5=8C=96=E5=B1=8F=E5=B9=95=E5=88=86=E8=BE=A8?= =?UTF-8?q?=E7=8E=87=E6=97=B6=EF=BC=8C=E2=80=9C=E4=B8=8A=E4=BC=A0=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E2=80=9D=E5=AD=97=E6=A0=B7=E6=98=BE=E7=A4=BA=E5=BC=82?= =?UTF-8?q?=E5=B8=B8;=E6=B7=BB=E5=8A=A0=E7=94=A8=E6=88=B7=E6=88=96?= =?UTF-8?q?=E7=BB=84=E6=B2=A1=E6=9C=89=E9=93=BE=E6=8E=A5;=E6=96=B0?= =?UTF-8?q?=E5=BB=BA=E8=AF=BE=E7=A8=8B=E4=B8=AD=EF=BC=8C=E5=B9=B3=E5=8F=B0?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4=E6=88=90?= =?UTF-8?q?=E7=BB=9F=E4=B8=80=E9=A3=8E=E6=A0=BC;=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E4=B8=BB=E9=A1=B5=EF=BC=8C=E7=AB=9E=E8=B5=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 2 +- app/views/courses/_course_form.html.erb | 6 +++--- app/views/courses/new.html.erb | 2 +- app/views/files/_attachement_list.html.erb | 2 +- app/views/files/_upload_show.html.erb | 10 +++++----- app/views/welcome/_search_course.html.erb | 2 +- app/views/welcome/_search_project.html.erb | 2 +- config/locales/en.yml | 6 +++++- config/locales/zh.yml | 6 +++++- 9 files changed, 23 insertions(+), 15 deletions(-) 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/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/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 %> -