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">
|
||||
|
||||
<a href="javascript:void(0);" class="AnnexBtn fl" style= "<%= ie8? ? 'display:none' : ''%>" :onclick=>"$('#_file').click();">上传附件</a>
|
||||
<% id ="file#{container.id}"%>
|
||||
<a href="javascript:void(0);" class="AnnexBtn fl" style= "<%= ie8? ? 'display:none' : ''%>" onclick="$('#'+'<%= id %>').click();">上传附件</a>
|
||||
<%= file_field_tag 'attachments[dummy][file]',
|
||||
:id => "_file",
|
||||
:id => "file#{container.id}",
|
||||
:class => 'file_selector',
|
||||
:multiple => true,
|
||||
:onchange => "addInputFiles_board(this, '#{container.id}');",
|
||||
|
@ -20,10 +28,9 @@
|
|||
:delete_all_files => l(:text_are_you_sure_all),
|
||||
:lebel_file_uploding => l(:lebel_file_uploding)} %>
|
||||
<% 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 %>
|
||||
</span>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= javascript_include_tag 'attachments' %>
|
||||
<% end %>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<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" %>
|
||||
</div>
|
||||
<div class="talk_txt fl">
|
||||
</div>
|
||||
<div class="talk_txt fl">
|
||||
<p class="pro_page_tit" style="word-break:break-all;">
|
||||
<% case @issue.tracker_id %>
|
||||
<% when 1%>
|
||||
|
@ -21,31 +21,26 @@
|
|||
<br>
|
||||
<div class="cl"></div>
|
||||
由<a href="javascript:void(0)" class="problem_name"><%= @issue.author %></a>添加于 <%= format_time(@issue.created_on).html_safe %>
|
||||
</div>
|
||||
</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? -%>
|
||||
<!--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 %>
|
||||
</div>
|
||||
<% end -%>
|
||||
<% 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 %>
|
||||
<% end -%>
|
||||
|
||||
<!--属性-->
|
||||
<%= render :partial => 'issues/attributes_show' %>
|
||||
<div class="cl"></div>
|
||||
<%# 附件局部刷新 %>
|
||||
<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 %>
|
||||
<P><%= reply.notes.html_safe %></P>
|
||||
</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">
|
||||
<%= format_time(reply.created_on) %>
|
||||
<div class="fr" id="reply_edit_menu_<%= reply.id%>" style="display: none">
|
||||
<%= link_to(
|
||||
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,
|
||||
:method => 'get',
|
||||
:class => 'fr newsBlue',
|
||||
|
@ -75,7 +71,7 @@
|
|||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @issue.id %>' name="notes"></textarea>
|
||||
<div class="cl"></div>
|
||||
<div class="mt10 fl">
|
||||
<%= render :partial => 'attachments/form_course', :locals => {:container => @issue} %>
|
||||
<%= render :partial => 'attachments/issue_reply', :locals => {:container => @issue} %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<span nhname='contentmsg_<%= @issue.id %>' class="fl"></span>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<% 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}) %>");
|
||||
$("#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 %>)')
|
||||
sd_create_editor_from_data(<%= @issue.id %>, null, "100%");
|
||||
<%else%>
|
||||
|
|
Loading…
Reference in New Issue