Merge branch 'dev_raining' of https://git.trustie.net/jacknudt/trustieforge into dev_raining
This commit is contained in:
commit
705f94428e
|
@ -310,6 +310,11 @@ class UsersController < ApplicationController
|
|||
@user_activity_id = params[:user_activity_id]
|
||||
@activity_id = params[:activity_id]
|
||||
@type = 'Issue'
|
||||
when 'Training_task'
|
||||
@reply = Journal.find params[:reply_id]
|
||||
@user_activity_id = params[:user_activity_id]
|
||||
@activity_id = params[:activity_id]
|
||||
@type = 'Training_task'
|
||||
when 'Syllabus'
|
||||
@reply = JournalsForMessage.find params[:reply_id]
|
||||
@type = 'Syllabus'
|
||||
|
|
|
@ -34,23 +34,32 @@
|
|||
</span>
|
||||
|
||||
<span style="position: relative" class="fr mr20">
|
||||
<%= 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)) %>
|
||||
<%= link_to(l(:button_reply),
|
||||
{:controller => 'users',
|
||||
:action => 'reply_to',
|
||||
:reply_id => comment.id,
|
||||
:type => 'Training_task',
|
||||
:user_activity_id => user_activity_id,
|
||||
:activity_id => activity.id,
|
||||
:is_project => true},
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:button_reply)) %>
|
||||
<span id="reply_iconup_<%= comment.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
||||
</span>
|
||||
<%= 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)
|
||||
<%= link_to(l(:button_delete),
|
||||
{:controller => 'training_tasks',
|
||||
: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 %>
|
||||
|
||||
</span>
|
||||
|
@ -70,11 +79,11 @@
|
|||
<div class="reply-content mb10">
|
||||
<% if User.current.logged? %>
|
||||
<div nhname='new_message_<%= user_activity_id %>' style="display:none;">
|
||||
<%= form_for('new_form',:url => 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%>">
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||
<%= 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| %>
|
||||
<input type="hidden" name="user_activity_id" value="<%= user_activity_id %>">
|
||||
<div nhname='toolbar_container_<%= user_activity_id %>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="notes"></textarea>
|
||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
||||
<a id="new_message_submit_btn_<%= user_activity_id %>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送111</a>
|
||||
<div class="cl"></div>
|
||||
<p nhname='contentmsg_<%= user_activity_id%>'></p>
|
||||
<% end%>
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
<div class="container-big-grey">
|
||||
<%= render :partial => 'projects/project_reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id, :expand_more =>no_children_comments[:three_more]} %>
|
||||
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||
<%= render :partial => "projects/project_issue_expand_show", :locals => {:comments => no_children_comments[:no_children_comments], :activity => activity, :user_activity_id => user_activity_id} %>
|
||||
<%= render :partial => "projects/project_issue_expand_show", :locals => { :comments => no_children_comments[:no_children_comments], :activity => activity, :user_activity_id => user_activity_id} %>
|
||||
</div>
|
||||
</div>
|
|
@ -3,7 +3,7 @@
|
|||
<span>回复</span>
|
||||
<span class="reply_iconup" > ︿</span>
|
||||
<span class="mr15"><%= count>0 ? "(#{count})" : "" %></span><span style="color: #cecece;">▪</span>
|
||||
<span id="praise_count_<%=user_activity_id %>">
|
||||
<span id="praise_count_<%= user_activity_id %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -11,15 +11,15 @@
|
|||
<% if expand_more %>
|
||||
<div class="homepagePostReplyBannerMore">
|
||||
<% if activity.class.to_s == 'Issue' %>
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply_homework('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'is_project_issue',<%=user_activity_id %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
<a id="reply_btn_<%= user_activity_id %>" onclick="expand_reply_homework('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'is_project_issue',<%=user_activity_id %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
展开更多
|
||||
</a>
|
||||
<% elsif activity.class.to_s == 'Message' %>
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply_homework('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'is_project_message',<%=user_activity_id %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
<a id="reply_btn_<%= user_activity_id %>" onclick="expand_reply_homework('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'is_project_message',<%=user_activity_id %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
展开更多
|
||||
</a>
|
||||
<% else %>
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply_homework('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'<%=activity.class %>',<%=user_activity_id %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
<a id="reply_btn_<%= user_activity_id %>" onclick="expand_reply_homework('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'<%=activity.class %>',<%=user_activity_id %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
展开更多
|
||||
</a>
|
||||
<% end %>
|
||||
|
|
|
@ -26,6 +26,16 @@
|
|||
<div class="cl"></div>
|
||||
<p nhname='contentmsg_<%= reply.id%>' class="fl"></p>
|
||||
<% end %>
|
||||
<% elsif @type == 'Training_task' %>
|
||||
<%= form_for('new_form', :url => add_reply_training_task_path(reply.training_task.id, :is_project => true),:method => "post", :remote => true) do |f|%>
|
||||
<%= hidden_field_tag 'journal_id',params[:journal_id],:value =>reply.id %>
|
||||
<%= hidden_field_tag 'user_activity_id',params[:user_activity_id],:value =>@user_activity_id %>
|
||||
<div nhname='toolbar_container_<%= reply.id %>' ></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= reply.id%>' name="content"></textarea>
|
||||
<a id="new_message_submit_btn_<%= reply.id %>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
||||
<div class="cl"></div>
|
||||
<p nhname='contentmsg_<%= reply.id%>' class="fl"></p>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<!--<li><%#= link_to "作业动态", {:controller => "courses", :action => "show", :type => "homework"}, :class => "homepagePostTypeAssignment postTypeGrey" %></li>-->
|
||||
<li><%= link_to "资源库动态", {:controller => "projects", :action => "show", :type => "attachment"}, :class => "homepagePostTypeResource resourcesGrey" %></li>
|
||||
<li><%= link_to "讨论区动态", {:controller => "projects", :action => "show", :type => "message"}, :class => "homepagePostTypeForum postTypeGrey" %></li>
|
||||
<li><%= link_to "讨论区动态", {:controller => "projects", :action => "show", :type => "training_task"}, :class => "homepagePostTypeForum postTypeGrey" %></li>
|
||||
<li><%= link_to "实训任务动态", {:controller => "projects", :action => "show", :type => "training_task"}, :class => "homepagePostTypeForum postTypeGrey" %></li>
|
||||
<!--<li><%#= link_to "问卷动态", {:controller => "courses", :action => "show", :type => "poll"}, :class => "homepagePostTypeQuiz postTypeGrey" %></li>-->
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
<div class="homepagePostTitle break_word">
|
||||
<div class="homepagePostTitle break_word task-title ">
|
||||
<% if activity.status == 1 %>
|
||||
<div class="issues_ciricons fl"><span class="issues_ciricons_02 "></span></div>
|
||||
<% else %>
|
||||
<div class="issues_ciricons fl mt2"><i class="icon-flag fb " style="color:#49a547; font-size:15px;"></i></div>
|
||||
<div class="issues_ciricons fl mt2 "><i class="icon-flag fb " style="color:#49a547; font-size:15px;"></i></div>
|
||||
<% end %>
|
||||
<span class="task-step mr5 fl">step<%= activity.position %></span>
|
||||
<span class="task-step mr5 ml5">step<%= activity.position %></span>
|
||||
|
||||
<%= link_to activity.subject.to_s, training_task_url(activity), :class => "postGrey ml5 fl", :target => "_blank", :style => "width:600px;" %>
|
||||
<%= link_to activity.subject.to_s, training_task_url(activity), :class => "postGrey ml5 ", :target => "_blank", :style => "" %>
|
||||
<div class="cl"></div>
|
||||
<!--<%# if activity.status == 1 %>-->
|
||||
<!--<span class="task-linebtn-green fl ml5 mt3">已解决</span>-->
|
||||
<!--<%# else %>-->
|
||||
|
|
|
@ -1 +1,6 @@
|
|||
|
||||
<% if params[:is_project] %>
|
||||
$("#div_user_issue_reply_<%= @user_activity_id %>").html("<%= escape_javascript(render :partial => 'projects/project_issue_reply', :locals => {:activity => @training_task, :user_activity_id => @user_activity_id}) %>");
|
||||
<% else %>
|
||||
$("#div_user_issue_reply_<%= @user_activity_id %>").html("<%= escape_javascript(render :partial => 'users/project_issue_reply', :locals => {:activity => @training_task, :user_activity_id => @user_activity_id}) %>");
|
||||
<% end %>
|
||||
sd_create_editor_from_data(<%= @user_activity_id %>, null, "100%", "UserActivity");
|
|
@ -0,0 +1,13 @@
|
|||
<% if @user_activity_id %>
|
||||
<%# 动态中 %>
|
||||
<% if params[:is_project] %>
|
||||
$("#div_user_issue_reply_<%= @user_activity_id %>").html("<%= escape_javascript(render :partial => 'projects/project_issue_reply', :locals => {:activity => @training_task, :user_activity_id => @user_activity_id}) %>");
|
||||
<% else %>
|
||||
$("#div_user_issue_reply_<%= @user_activity_id %>").html("<%= escape_javascript(render :partial => 'users/project_issue_reply', :locals => {:activity => @training_task, :user_activity_id => @user_activity_id}) %>");
|
||||
<% end %>
|
||||
|
||||
sd_create_editor_from_data(<%= @user_activity_id %>, null, "100%","<%= @training_task.class.name %>");
|
||||
<% else %>
|
||||
<%# issue详情 %>
|
||||
<%= render "jounal_refresh" %>
|
||||
<% end %>
|
|
@ -0,0 +1,14 @@
|
|||
<% if @user_activity_id %>
|
||||
<% if @is_project %>
|
||||
$("#div_user_issue_reply_<%= @user_activity_id %>").html("<%= escape_javascript(render :partial => 'projects/project_issue_reply',
|
||||
:locals => {:activity => @training_task,
|
||||
:user_activity_id => @user_activity_id}) %>");
|
||||
<% else %>
|
||||
$("#div_user_issue_reply_<%= @user_activity_id %>").html("<%= escape_javascript(render :partial => 'users/project_issue_reply',
|
||||
:locals => {:activity => @training_task,
|
||||
:user_activity_id => @user_activity_id}) %>");
|
||||
<% end %>
|
||||
sd_create_editor_from_data(<%= @user_activity_id %>, null, "100%","<%= @training_task.class.name %>");
|
||||
<% else %>
|
||||
<%= render "jounal_refresh" %>
|
||||
<% end %>
|
|
@ -1,3 +1,6 @@
|
|||
<% if params[:is_project]%>
|
||||
$("#reply_message_<%= @jour.id %>").
|
||||
<% else %>
|
||||
if($("#reply_message_<%= @jour.id %>").length > 0) {
|
||||
$("#reply_message_<%= @jour.id %>").replaceWith("<%= escape_javascript(render :partial => 'training_tasks/training_tasks_reply_ke_form') %>");
|
||||
$(function(){
|
||||
|
@ -5,4 +8,5 @@ if($("#reply_message_<%= @jour.id %>").length > 0) {
|
|||
});
|
||||
}else if($("#reply_to_message_<%= @jour.id %>").length >0) {
|
||||
$("#reply_to_message_<%= @jour.id %>").replaceWith("<p id='reply_message_<%= @jour.id %>'></p>");
|
||||
}
|
||||
}
|
||||
<% end %>
|
|
@ -6,7 +6,7 @@ issue_desc_editor = KindEditor.create('#issue_description',
|
|||
{"width":"85%",
|
||||
"resizeType":0,
|
||||
"no_label":true,
|
||||
"at_id":<%= @training_task.project_id%>,
|
||||
"at_id":<%= @training_task.project_id %>,
|
||||
"at_type":"Project",
|
||||
"autoHeightMode":true,
|
||||
"afterCreate":"eval(function(){ if(typeof enablePasteImg ==='function'){enablePasteImg(self);};if(typeof enableAt ==='function'){enableAt(self, \"<%= @training_task.project_id %>\", 'Project');}; this.loadPlugin('autoheight')})",
|
||||
|
|
|
@ -674,3 +674,4 @@ span.task-linebtn-green{color:#59af48; border: 1px solid #59af48;font-size: 12px
|
|||
span.task-step{ color:#ee4a20;font-style: italic; font-weight:bold; font-size:14px;}
|
||||
.task-display-span,a.task-display-span{ display:inline-block; border-radius:3px; width: 100%; text-align: center; color: #fff; padding: 5px 0; }
|
||||
.task-bgrey{background:#ccc;}
|
||||
.task-title{ width: 830px;}
|
||||
|
|
Loading…
Reference in New Issue