二级目录未登录时回复提示

hjq_beidou
huang 9 years ago
parent 89288c7861
commit d3c6c0ca99

@ -1,7 +1,7 @@
class SubDocumentCommentsController < ApplicationController class SubDocumentCommentsController < ApplicationController
before_filter :find_subdomain_and_subfield, :only => [:new, :create, :show, :index, :destroy, :edit] before_filter :find_subdomain_and_subfield, :only => [:new, :create, :show, :index, :destroy, :edit]
before_filter :find_subfield_content, :only => [:show, :index] before_filter :find_subfield_content, :only => [:show, :index]
before_filter :authorize_allowed, :only => [:create] before_filter :authorize_allowed, :only => [:create, :add_reply]
helper :attachments,:organizations helper :attachments,:organizations
layout 'base_sub_domain' layout 'base_sub_domain'

@ -123,17 +123,20 @@
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33", :alt => "用户头像"), user_url_in_org(User.current.id) %> <%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33", :alt => "用户头像"), user_url_in_org(User.current.id) %>
</div> </div>
<div class="homepagePostReplyInputContainer"> <div class="homepagePostReplyInputContainer">
<div nhname='new_message_<%= act.id %>' style="display:none;"> <% if User.current.logged? %>
<%= form_for('new_form', :url => add_reply_org_subfield_sub_domain_sub_document_comment_path(:id => document.id, :act_id => act.id, :flag => flag), :method => "post", :remote => true) do |f| %> <div nhname='new_message_<%= act.id %>' style="display:none;">
<input type="hidden" name="org_activity_id" value="<%= act.id %>"/> <%= form_for('new_form', :url => add_reply_org_subfield_sub_domain_sub_document_comment_path(:id => document.id, :act_id => act.id, :flag => flag), :method => "post", :remote => true) do |f| %>
<div nhname='toolbar_container_<%= act.id %>'></div> <input type="hidden" name="org_activity_id" value="<%= act.id %>"/>
<textarea placeholder="有问题或建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= act.id %>' name="sub_content"></textarea> <div nhname='toolbar_container_<%= act.id %>'></div>
<a id="new_message_submit_btn_<%= act.id %>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;line-height:18px;">发送</a> <textarea placeholder="有问题或建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= act.id %>' name="sub_content"></textarea>
<a id="new_message_submit_btn_<%= act.id %>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;line-height:18px;">发送</a>
<div class="cl"></div> <div class="cl"></div>
<p nhname='contentmsg_<%= act.id %>'></p> <p nhname='contentmsg_<%= act.id %>'></p>
<% end %> <% end %>
</div> </div>
<% else %>
<%= render :partial => "users/show_unlogged" %>
<% end %>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>

Loading…
Cancel
Save