issue回复添加附件
This commit is contained in:
parent
9e87e63b82
commit
b79a50ce2f
|
@ -1,9 +1,17 @@
|
||||||
|
<span id="attachments_fields<%= container.id %>" class="attachments_fields" xmlns="http://www.w3.org/1999/html">
|
||||||
|
<% if defined?(container) && container && container.saved_attachments %>
|
||||||
|
<% container.attachments.each_with_index do |attachment, i| %>
|
||||||
|
<span id="attachments_p<%= i %>" class="attachment">
|
||||||
|
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
|
||||||
|
</span>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
</span>
|
||||||
<span class="add_attachment">
|
<span class="add_attachment">
|
||||||
|
<% id ="file#{container.id}"%>
|
||||||
<a href="javascript:void(0);" class="AnnexBtn fl" style= "<%= ie8? ? 'display:none' : ''%>" :onclick=>"$('#_file').click();">上传附件</a>
|
<a href="javascript:void(0);" class="AnnexBtn fl" style= "<%= ie8? ? 'display:none' : ''%>" onclick="$('#'+'<%= id %>').click();">上传附件</a>
|
||||||
<%= file_field_tag 'attachments[dummy][file]',
|
<%= file_field_tag 'attachments[dummy][file]',
|
||||||
:id => "_file",
|
:id => "file#{container.id}",
|
||||||
:class => 'file_selector',
|
:class => 'file_selector',
|
||||||
:multiple => true,
|
:multiple => true,
|
||||||
:onchange => "addInputFiles_board(this, '#{container.id}');",
|
:onchange => "addInputFiles_board(this, '#{container.id}');",
|
||||||
|
@ -20,10 +28,9 @@
|
||||||
:delete_all_files => l(:text_are_you_sure_all),
|
:delete_all_files => l(:text_are_you_sure_all),
|
||||||
:lebel_file_uploding => l(:lebel_file_uploding)} %>
|
:lebel_file_uploding => l(:lebel_file_uploding)} %>
|
||||||
<% if container.nil? %>
|
<% if container.nil? %>
|
||||||
<span id="upload_file_count" :class="c_grey"><%= l(:label_no_file_uploaded) %></span>
|
<span id="upload_file_count" :class="c_grey"><%= l(:label_no_file_uploaded)%></span>
|
||||||
<% end %>
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<% content_for :header_tags do %>
|
<% content_for :header_tags do %>
|
||||||
<%= javascript_include_tag 'attachments' %>
|
<%= javascript_include_tag 'attachments' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -1,51 +1,46 @@
|
||||||
<div id="issue_detail" style="display: block">
|
<div id="issue_detail" style="display: block">
|
||||||
<div class="ping_dispic">
|
<div class="ping_dispic">
|
||||||
<%= link_to image_tag(url_to_avatar(@issue.author), :width => 46, :height => 46), user_path(@issue.author), :class => "ping_dispic" %>
|
<%= link_to image_tag(url_to_avatar(@issue.author), :width => 46, :height => 46), user_path(@issue.author), :class => "ping_dispic" %>
|
||||||
</div>
|
</div>
|
||||||
<div class="talk_txt fl">
|
<div class="talk_txt fl">
|
||||||
<p class="pro_page_tit" style="word-break:break-all;">
|
<p class="pro_page_tit" style="word-break:break-all;">
|
||||||
<% case @issue.tracker_id %>
|
<% case @issue.tracker_id %>
|
||||||
<% when 1%>
|
<% when 1%>
|
||||||
<span class="issues fl" title="缺陷"></span>
|
<span class="issues fl" title="缺陷"></span>
|
||||||
<% when 2%>
|
<% when 2%>
|
||||||
<span class="function fl" title="功能"></span>
|
<span class="function fl" title="功能"></span>
|
||||||
<% when 3%>
|
<% when 3%>
|
||||||
<span class="support fl" title="支持"></span>
|
<span class="support fl" title="支持"></span>
|
||||||
<% when 4%>
|
<% when 4%>
|
||||||
<span class="duty fl" title="任务"></span>
|
<span class="duty fl" title="任务"></span>
|
||||||
<% when 5%>
|
<% when 5%>
|
||||||
<span class="weekly fl" title="周报"></span>
|
<span class="weekly fl" title="周报"></span>
|
||||||
<% end %>
|
|
||||||
</span> <span style="padding-left: 5px;"><%= @issue.subject %></span>
|
|
||||||
<span class='<%= "#{get_issue_priority(@issue.priority_id)[0]} " %>'><%= get_issue_priority(@issue.priority_id)[1] %></span></p>
|
|
||||||
<br>
|
|
||||||
<div class="cl"></div>
|
|
||||||
由<a href="javascript:void(0)" class="problem_name"><%= @issue.author %></a>添加于 <%= format_time(@issue.created_on).html_safe %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!--talk_txt end-->
|
|
||||||
<a href="javascript:void(0)" class="talk_edit fr"> </a>
|
|
||||||
<%= render :partial => 'action_menu' %>
|
|
||||||
<div class="cl"></div>
|
|
||||||
<% if @issue.description? || @issue.attachments.any? -%>
|
|
||||||
<div class="talk_info mb10 issue_desc" style="word-break:break-all;">
|
|
||||||
<% if @issue.description? %>
|
|
||||||
<%#= link_to l(:button_quote), quoted_issue_path(@issue.id), :remote => true, :method => 'post', :class => 'icon icon-comment' if authorize_for('issues', 'edit') %>
|
|
||||||
<%= textAreailizable @issue, :description, :attachments => @issue.attachments %>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</span> <span style="padding-left: 5px;"><%= @issue.subject %></span>
|
||||||
<% end -%>
|
<span class='<%= "#{get_issue_priority(@issue.priority_id)[0]} " %>'><%= get_issue_priority(@issue.priority_id)[1] %></span></p>
|
||||||
<% if @issue.attachments.any? %>
|
<br>
|
||||||
<div class="pro_pic_box mb10">
|
|
||||||
<a href="javascript:void(0)" class="link_img fl">
|
|
||||||
<!--显示附件、图片-->
|
|
||||||
<%= link_to_attachment_project @issue, :thumbnails => true %></a><br/>
|
|
||||||
<%= call_hook(:view_issues_show_description_bottom, :issue => @issue) %>
|
|
||||||
</div><!--pro_pic_box end-->
|
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<% end %>
|
由<a href="javascript:void(0)" class="problem_name"><%= @issue.author %></a>添加于 <%= format_time(@issue.created_on).html_safe %>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!--属性-->
|
<!--talk_txt end-->
|
||||||
<%= render :partial => 'issues/attributes_show' %>
|
<a href="javascript:void(0)" class="talk_edit fr"> </a>
|
||||||
<div class="cl"></div>
|
<%= render :partial => 'action_menu' %>
|
||||||
</div>
|
<div class="cl"></div>
|
||||||
|
<% if @issue.description? || @issue.attachments.any? -%>
|
||||||
|
<div class="talk_info mb10 issue_desc" style="word-break:break-all;">
|
||||||
|
<% if @issue.description? %>
|
||||||
|
<%#= link_to l(:button_quote), quoted_issue_path(@issue.id), :remote => true, :method => 'post', :class => 'icon icon-comment' if authorize_for('issues', 'edit') %>
|
||||||
|
<%= textAreailizable @issue, :description, :attachments => @issue.attachments %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<% end -%>
|
||||||
|
|
||||||
|
<%# 附件局部刷新 %>
|
||||||
|
<div id = "div_issue_attachment_<%=@issue.id %>">
|
||||||
|
<%= render :partial => 'issue_attachments',:locals => {:issue => @issue} %>
|
||||||
|
</div>
|
||||||
|
<!--属性-->
|
||||||
|
<%= render :partial => 'issues/attributes_show' %>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
|
@ -0,0 +1,10 @@
|
||||||
|
<% if issue.attachments.any? %>
|
||||||
|
<div class="pro_pic_box mb10">
|
||||||
|
<a href="javascript:void(0)" class="link_img fl">
|
||||||
|
<!--显示附件、图片-->
|
||||||
|
<%= link_to_attachment_project issue, :thumbnails => true %>
|
||||||
|
</a><br/>
|
||||||
|
<%= call_hook(:view_issues_show_description_bottom, :issue => issue) %>
|
||||||
|
</div><!--pro_pic_box end-->
|
||||||
|
<div class="cl"></div>
|
||||||
|
<% end %>
|
|
@ -27,16 +27,12 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<P><%= reply.notes.html_safe %></P>
|
<P><%= reply.notes.html_safe %></P>
|
||||||
</div>
|
</div>
|
||||||
<% if reply.attachments.any? %>
|
|
||||||
<a href="javascript:void(0)" class="link_img fl"><%= link_to_attachment_project reply, :thumbnails => true %></a><br/>
|
|
||||||
<div class="cl"></div>
|
|
||||||
<% end %>
|
|
||||||
<div style="margin-top: 7px">
|
<div style="margin-top: 7px">
|
||||||
<%= format_time(reply.created_on) %>
|
<%= format_time(reply.created_on) %>
|
||||||
<div class="fr" id="reply_edit_menu_<%= reply.id%>" style="display: none">
|
<div class="fr" id="reply_edit_menu_<%= reply.id%>" style="display: none">
|
||||||
<%= link_to(
|
<%= link_to(
|
||||||
l(:button_reply),
|
l(:button_reply),
|
||||||
{:controller => 'issues',:action => 'reply',:user_id=>reply.user_id, :id => issue.id,:journal_id=>reply.id},
|
{:controller => 'issues', :action => 'reply', :user_id => reply.user_id, :id => issue.id, :journal_id => reply.id},
|
||||||
:remote => true,
|
:remote => true,
|
||||||
:method => 'get',
|
:method => 'get',
|
||||||
:class => 'fr newsBlue',
|
:class => 'fr newsBlue',
|
||||||
|
@ -75,7 +71,7 @@
|
||||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @issue.id %>' name="notes"></textarea>
|
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @issue.id %>' name="notes"></textarea>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<div class="mt10 fl">
|
<div class="mt10 fl">
|
||||||
<%= render :partial => 'attachments/form_course', :locals => {:container => @issue} %>
|
<%= render :partial => 'attachments/issue_reply', :locals => {:container => @issue} %>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<span nhname='contentmsg_<%= @issue.id %>' class="fl"></span>
|
<span nhname='contentmsg_<%= @issue.id %>' class="fl"></span>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<% if @issue_id %> //issue详情中回复
|
<% if @issue_id %> //issue详情中回复
|
||||||
$("#reply_div_<%= @issue_id %>").html("<%= escape_javascript(render :partial => 'issues/issue_replies', :locals => {:issue => Issue.find( @issue_id),:replies_all_i=>0}) %>");
|
$("#reply_div_<%= @issue_id %>").html("<%= escape_javascript(render :partial => 'issues/issue_replies', :locals => {:issue => Issue.find( @issue_id),:replies_all_i=>0}) %>");
|
||||||
|
$("#div_issue_attachment_<%=@issue.id %>").html("<%= escape_javascript(render :partial => 'issues/issue_attachments', :locals => {:issue => Issue.find( @issue_id)}) %>");
|
||||||
$(".homepagePostReplyBannerCount").html('回复(<%= Issue.find( @issue_id).journals.count %>)')
|
$(".homepagePostReplyBannerCount").html('回复(<%= Issue.find( @issue_id).journals.count %>)')
|
||||||
sd_create_editor_from_data(<%= @issue.id %>, null, "100%");
|
sd_create_editor_from_data(<%= @issue.id %>, null, "100%");
|
||||||
<%else%>
|
<%else%>
|
||||||
|
|
Loading…
Reference in New Issue