修改forum的show界面
This commit is contained in:
parent
a4d4dd5d97
commit
17cb97828d
|
@ -18,7 +18,9 @@ class ForumsController < ApplicationController
|
|||
@memos = @forum.topics
|
||||
|
||||
respond_to do |format|
|
||||
format.html # show.html.erb
|
||||
format.html {
|
||||
render :layout => 'base_forums'
|
||||
}# show.html.erb
|
||||
format.json { render json: @forum }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -11,17 +11,5 @@
|
|||
<%= link_to 'Edit', edit_forum_path(@forum) %> |
|
||||
<%= link_to 'Back', forums_path %>
|
||||
<%= link_to 'new_topic', new_forum_memo_path(@forum) %>
|
||||
<table>
|
||||
<tr>
|
||||
<th>subject</th>
|
||||
<th>content</th>
|
||||
<th>author</th>
|
||||
</tr>
|
||||
<% @memos.each do |memo| %>
|
||||
<tr>
|
||||
<td><%= link_to memo.subject, forum_memo_path(memo) %></td>
|
||||
<td><%= memo.content %></td>
|
||||
<td><%= memo.author %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<%= render :partial => 'forums/show_topics', :locals => {:memos => @memos} %>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<h1>New memo</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
<%= render :partial => 'form' %>
|
||||
|
||||
<%= link_to 'Back', forums_path(@forum) %>
|
Loading…
Reference in New Issue