Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
2f1b6386f6
|
@ -240,11 +240,14 @@ class Issue < ActiveRecord::Base
|
||||||
self.custom_field_values = issue.custom_field_values.inject({}) {|h,v| h[v.custom_field_id] = v.value; h}
|
self.custom_field_values = issue.custom_field_values.inject({}) {|h,v| h[v.custom_field_id] = v.value; h}
|
||||||
self.status = issue.status
|
self.status = issue.status
|
||||||
self.author = User.current
|
self.author = User.current
|
||||||
unless options[:attachments] == false
|
#赞不提供附件复制功能
|
||||||
self.attachments = issue.attachments.map do |attachement|
|
#unless options[:attachments] == false
|
||||||
attachement.copy(:container => self)
|
#self.attachments = issue.attachments.map do |attachement|
|
||||||
end
|
# a = attachement.copy(:container => self)
|
||||||
end
|
# #a.save
|
||||||
|
# a
|
||||||
|
#end
|
||||||
|
#end
|
||||||
@copied_from = issue
|
@copied_from = issue
|
||||||
@copy_options = options
|
@copy_options = options
|
||||||
self
|
self
|
||||||
|
|
|
@ -4,7 +4,11 @@
|
||||||
<span id="attachments_p<%= i %>" class="attachment">
|
<span id="attachments_p<%= i %>" class="attachment">
|
||||||
<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly=>'readonly')%>
|
<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly=>'readonly')%>
|
||||||
<%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 255, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") +
|
<%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 255, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") +
|
||||||
link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') %>
|
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"} %>
|
<%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %>
|
||||||
<%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public, :class => 'is_public')%>
|
<%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public, :class => 'is_public')%>
|
||||||
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
|
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
|
||||||
|
|
|
@ -11,8 +11,9 @@
|
||||||
|
|
||||||
<% if @copy_from && @copy_from.attachments.any? %>
|
<% if @copy_from && @copy_from.attachments.any? %>
|
||||||
<p>
|
<p>
|
||||||
<label for="copy_attachments"><%= l(:label_copy_attachments) %></label>
|
<!-- 去除附件复制功能 -->
|
||||||
<%= check_box_tag 'copy_attachments', '1', @copy_attachments %>
|
<!-- <label for="copy_attachments"><#%= l(:label_copy_attachments) %></label>
|
||||||
|
<#%= check_box_tag 'copy_attachments', '1', @copy_attachments %> -->
|
||||||
</p>
|
</p>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if @copy_from && !@copy_from.leaf? %>
|
<% if @copy_from && !@copy_from.leaf? %>
|
||||||
|
|
Loading…
Reference in New Issue