项目问题动态回复功能修复
This commit is contained in:
parent
9e7ce0fd6a
commit
c76db2cb24
|
@ -32,8 +32,8 @@
|
||||||
<span class="reply_praise_count_<%= comment.id %>">
|
<span class="reply_praise_count_<%= comment.id %>">
|
||||||
<%= render :partial => "praise_tread/praise", :locals => {:activity => comment, :user_activity_id => comment.id, :type => "reply"} %>
|
<%= render :partial => "praise_tread/praise", :locals => {:activity => comment, :user_activity_id => comment.id, :type => "reply"} %>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span style="position: relative" class="fr mr20">
|
<span style="position: relative" class="fr mr20">
|
||||||
|
<% if activity.class.to_s == 'TrainingTask' %>
|
||||||
<%= link_to(l(:button_reply),
|
<%= link_to(l(:button_reply),
|
||||||
{:controller => 'users',
|
{:controller => 'users',
|
||||||
:action => 'reply_to',
|
:action => 'reply_to',
|
||||||
|
@ -45,23 +45,51 @@
|
||||||
:remote => true,
|
:remote => true,
|
||||||
:method => 'get',
|
:method => 'get',
|
||||||
:title => l(:button_reply)) %>
|
:title => l(:button_reply)) %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to(l(:button_reply),
|
||||||
|
{:controller => 'users',
|
||||||
|
:action => 'reply_to',
|
||||||
|
:reply_id => comment.id,
|
||||||
|
:type => 'Issue',
|
||||||
|
:user_activity_id => user_activity_id,
|
||||||
|
:activity_id => activity.id, :is_project => true},
|
||||||
|
:remote => true,
|
||||||
|
:method => 'get',
|
||||||
|
:title => l(:button_reply)) %>
|
||||||
|
|
||||||
|
<% end %>
|
||||||
<span id="reply_iconup_<%= comment.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
<span id="reply_iconup_<%= comment.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
||||||
</span>
|
</span>
|
||||||
<%= link_to(l(:button_delete),
|
<% if activity.class.to_s == 'TrainingTask' %>
|
||||||
{:controller => 'training_tasks',
|
<%= link_to(l(:button_delete),
|
||||||
:action => 'delete_journal',
|
{:controller => 'training_tasks',
|
||||||
:id => activity.id,
|
:action => 'delete_journal',
|
||||||
:journal_id=>comment.id,
|
:id => activity.id,
|
||||||
:user_activity_id => user_activity_id,
|
:journal_id=>comment.id,
|
||||||
:is_project => true},
|
:user_activity_id => user_activity_id,
|
||||||
:method => 'get',
|
:is_project => true},
|
||||||
:confirm => l(:text_are_you_sure),
|
:method => 'get',
|
||||||
:remote=>true,
|
:confirm => l(:text_are_you_sure),
|
||||||
:id => "delete_reply_#{activity.id}_#{comment.id}",
|
:remote=>true,
|
||||||
:class => 'fr mr20 undis',
|
:id => "delete_reply_#{activity.id}_#{comment.id}",
|
||||||
:title => l(:button_delete)
|
:class => 'fr mr20 undis',
|
||||||
) if comment.user_id == User.current.id %>
|
:title => l(:button_delete)) if comment.user_id == User.current.id %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to(
|
||||||
|
l(:button_delete),
|
||||||
|
{:controller => 'issues',
|
||||||
|
:action => 'delete_journal',
|
||||||
|
:id => activity.id,
|
||||||
|
:journal_id=>comment.id,
|
||||||
|
:user_activity_id => user_activity_id,
|
||||||
|
:is_project => true},
|
||||||
|
:method => 'get',
|
||||||
|
:confirm => l(:text_are_you_sure),
|
||||||
|
:remote=>true,
|
||||||
|
:id => "delete_reply_#{activity.id}_#{comment.id}",
|
||||||
|
:class => 'fr mr20 undis',
|
||||||
|
:title => l(:button_delete)) if comment.user_id == User.current.id %>
|
||||||
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -79,7 +107,7 @@
|
||||||
<div class="reply-content mb10">
|
<div class="reply-content mb10">
|
||||||
<% if User.current.logged? %>
|
<% if User.current.logged? %>
|
||||||
<div nhname='new_message_<%= user_activity_id %>' style="display:none;">
|
<div nhname='new_message_<%= user_activity_id %>' style="display:none;">
|
||||||
<%= form_for('new_form', :url => add_journal_training_task_path(activity.id, :user_activity_id => user_activity_id, :is_project => true), :method => "post", :remote => true) do |f| %>
|
<%= form_for('new_form', :url => (activity.class.to_s == 'TrainingTask' ? add_journal_training_task_path(activity.id, :user_activity_id => user_activity_id, :is_project => true) : add_journal_issue_path(activity.id, :user_activity_id => user_activity_id, :is_project => true) ), :method => "post", :remote => true) do |f| %>
|
||||||
<input type="hidden" name="user_activity_id" value="<%= user_activity_id %>">
|
<input type="hidden" name="user_activity_id" value="<%= user_activity_id %>">
|
||||||
<div nhname='toolbar_container_<%= user_activity_id %>'></div>
|
<div nhname='toolbar_container_<%= user_activity_id %>'></div>
|
||||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id %>' name="notes"></textarea>
|
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id %>' name="notes"></textarea>
|
||||||
|
|
Loading…
Reference in New Issue