问吧帖子编辑

This commit is contained in:
huang 2016-12-30 14:53:02 +08:00
parent a8d16a15de
commit 58162dab95
3 changed files with 13 additions and 5 deletions

View File

@ -148,7 +148,7 @@ class MemosController < ApplicationController
@my_replies_count = Memo.where("forum_id = #{@memo.forum_id} and author_id = #{User.current.id} and parent_id is not null").count
@replying = false
respond_to do |format|
format.html {render :layout=>'base_forums'}
format.html {render :layout => 'base_new_forum'}
end
end

View File

@ -39,10 +39,12 @@
}
}
</script>
<div class="homepageRightBanner mt15">
<div class="NewsBannerName">编辑帖子</div>
<div class="banner-big f16 fontGrey3 mb10">
<%= link_to "问吧", forums_path, :class => "c_blue" %> > <%= link_to @forum.name, forum_path(@forum), :class => "c_blue" %> >
<%= @memo.subject %>
</div>
<div class="postRightContainer" style="margin-top: 15px">
<div class="postRightContainer mr10">
<%= labelled_form_for(@memo, :url => forum_memo_path(@memo.forum_id, @memo),:html=>{:id=>'edit_memo'}) do |f| %>
<div id="error" style="color:red ;display: none">
@ -66,6 +68,11 @@
</div>
<% end %>
</div>
<div class="fl">
<%= render :partial => "memos/my_count_message" %>
</div>
<script>
$(function(){
limitStrsize('memo_subject',50);

View File

@ -4,7 +4,8 @@
<% end %>
<div class="banner-big f16 fontGrey3 mb10">
<%= link_to "问吧", forums_path, :class => "c_blue" %> > <%= link_to @forum.name, forum_path(@forum), :class => "c_blue" %> > <%=h @memo.subject %></div>
<%= link_to "问吧", forums_path, :class => "c_blue" %> > <%= link_to @forum.name, forum_path(@forum), :class => "c_blue" %> > <%=h @memo.subject %>
</div>
<script>
$(function() {