diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 6a251a80c..da2855582 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -162,7 +162,7 @@ class IssuesController < ApplicationController respond_to do |format| format.html { render_attachment_warning_if_needed(@issue) - flash[:notice] = l(:notice_issue_successful_create, :id => view_context.link_to("#{@issue.source_from}", issue_path(@issue), :title => @issue.subject)) + flash[:notice] = l(:notice_issue_successful_create, :id => view_context.link_to("#{@issue.subject}", issue_path(@issue), :title => @issue.subject)) #flash[:notice] = l(:notice_issue_successful_create, :id => view_context.link_to("##{@issue.id}", issue_path(@issue), :title => @issue.subject)) if params[:continue] attrs = {:tracker_id => @issue.tracker, :parent_issue_id => @issue.parent_issue_id}.reject {|k,v| v.nil?} diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb index db547061f..bd017757a 100644 --- a/app/helpers/courses_helper.rb +++ b/app/helpers/courses_helper.rb @@ -355,7 +355,7 @@ module CoursesHelper # 课程time+term简写(2014.春/2014.秋)国际化输出 def get_course_term course strterm = course.try(:term).to_s - if !(User.current.language == 'zh') + if !(User.current.language == 'zh'||User.current.language == '') strterm == '春季学期' ? strterm = 'spring term' : strterm = 'autumn term' str = ( course.try(:time).to_s << '.' << strterm ) str[0..-6] @@ -369,7 +369,7 @@ module CoursesHelper # 课程term(春季学期/秋季学期)国际化输出 def get_course_term_locales course str = course.try(:term).to_s - if !(User.current.language == 'zh') + if !(User.current.language == 'zh'||User.current.language == '') str == '春季学期' ? str = ' ' + 'spring term' : str = ' ' + 'autumn term' end return str diff --git a/app/views/attachments/_form.html.erb b/app/views/attachments/_form.html.erb index 0949899dd..22dc447f2 100644 --- a/app/views/attachments/_form.html.erb +++ b/app/views/attachments/_form.html.erb @@ -1,5 +1,22 @@ <% if defined?(container) && container && container.saved_attachments %> + <% container.attachments.each_with_index do |attachment, i| %> + + <%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly=>'readonly')%> + <%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") %> + <%= l(:field_is_public)%>: + <%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false,:class => 'is_public')%> + <%= if attachment.id.nil? + #待补充代码 + else + link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') + end + %> + <%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %> + + <%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %> + + <% end %> <% container.saved_attachments.each_with_index do |attachment, i| %> <%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly=>'readonly')%> @@ -17,6 +34,7 @@ <%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %> <% end %> + <% end %>