socialforge/app/views/projects/_reply_to.html.erb

38 lines
3.0 KiB
Plaintext

<div class="<%= User.current.logged? ? 'orig_reply_box' : 'orig_reply_box2' %> borderBottomNone" id="reply_to_message_<%= reply.id%>">
<% if User.current.logged? %>
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= reply.id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %></div>
<div class="orig_textarea mb10 fl">
<div nhname='new_message_<%= reply.id%>'>
<% if @type == 'Message' %>
<%= form_for('new_form',:url => {:controller => 'messages', :action => 'reply', :id => reply.id, :board_id => reply.board.id, :is_project => true}, :method => "post", :remote => true) do |f|%>
<%= hidden_field_tag 'is_course', params[:is_course], :value => @is_course %>
<%= hidden_field_tag 'is_board', params[:is_board], :value => @is_board %>
<%= hidden_field_tag 'parent_id', params[:parent_id], :value => reply.id %>
<%= hidden_field_tag 'activity_id',params[:activity_id],:value =>@activity_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%>'></p>
<% end%>
<% elsif @type == 'Issue' %>
<%= form_for('new_form',:url => add_reply_issue_path(reply.issue.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>
<div class="cl"></div>
</div>
<% else %>
<%= render :partial => "users/show_unlogged_reply" %>
<% end %>
<div class="cl"></div>
</div>