Commit 0e9e30c9 authored by 神楽坂玲奈's avatar 神楽坂玲奈

父版块 子版块支持,+lotus

git-svn-id: http://glupx.googlecode.com/svn/trunk/Reliz@73 189f022a-1064-8ae2-3e6f-c4a67275c50b
parent 9bbaf7c0
......@@ -5,8 +5,8 @@ class BoardsController < ApplicationController
# GET /boards
# GET /boards.xml
def index
@board = Board.root
@boards = @board.subboards
@root = Board.root
@boards = @root.subboards
@actions = []
respond_to do |format|
format.html # index.html.erb
......
......@@ -9,12 +9,12 @@ class Board < ActiveRecord::Base
def to_s
"<a href=\"/boards/#{id}\">#{name}</a>".html_safe
end
#def logo_url
# read_attribute(:logo)
#end
#def logo
# "<a href=\"/boards/#{id}\"><img src=\"#{logo_url}\"/></a>".html_safe
#end
def logo_url
read_attribute(:logo)
end
def logo
"<a href=\"/boards/#{id}\"><img src=\"#{logo_url}\"/></a>".html_safe
end
def self.root
Board.find_by_superboard_id 0
end
......
<% superboard = board %>
<div class="ui-dialog-titlebar ui-widget-header ui-corner-all">
<table width="100%" height="27px"border="0" cellspacing="0" cellpadding="0" >
<tr>
<td width="590px"style="padding-left:5px"><%= superboard %></td>
<td width="590px" style="padding-right:5px" align="right">-</td>
</tr>
</table>
</div>
<% superboard.subboards.each do |board| %>
<div id=b<%= superboard.id %>_<%= board.id %>>
<table width="100%" height="93px" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="171px">
<div id=b2_2_d1>
<div id=b2_2_d1_avatar><%= board.logo %></div>
</div>
</td>
<td width="686px">
<div id=b2_2_d2>
<div id=b2_2_d2_inf1><div style="float:left;"><%= board %></div><div style="float:right;"><%= image_tag 'topic/new.png' %> </div></div>
<div id=b2_2_d2_inf2><%= board.introduction %>
<% unless board.subboards.empty? %>
<p><%=t 'board.subboard' %>:
<% board.subboards.each do |subboard| %>
<%= subboard %>
<% end %>
</p>
<% end %>
</div>
<div id=b2_2_d2_inf3><div style="float:left; margin-top:5px;"> <%=t 'board.topic' %>: <%= board.topics.count %> <%=t 'board.post' %><%= board.posts.count %></div> <div style="margin-left:10px; float:left; margin-top:2px;"><%= image_tag 'topic/post.png' %></div></div>
</div>
</td>
<td width="283px">
<div width="283px"style=" margin-bottom:10px; height:90px;border-left-style:solid; border-color:#CCCCCC; border-width:1px;" >
<div id=b2_2_d3_1></div>
<div id=b2_2_d3_2></div>
</div>
</td>
</tr>
</table>
</div>
<% end %>
\ No newline at end of file
<div style="height:30px;"></div>
<div class=" box ui-widget-content ui-corner-all ui-helper-clearfix">
<div id="fuzhu"></div>
<div class="ui-dialog-titlebar ui-widget-header ui-corner-all">
<table width="100%" height="27px"border="0" cellspacing="0" cellpadding="0" >
<tr>
<td width="590px"style="padding-left:5px">幻想乡综合讨论区</td>
<td width="590px" style="padding-right:5px" align="right">-</td>
</tr>
</table>
</div>
<% @boards.each do |board| %>
<div id=b2_2>
<table width="100%" height="93px" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="171px">
<div id=b2_2_d1>
<div id=b2_2_d1_avatar><%= board.logo %></div>
</div>
</td>
<td width:"686px">
<div id=b2_2_d2>
<div id=b2_2_d2_inf1><div style="float:left;"><%= board %></div><div style="float:right;"><%= image_tag 'topic/new.png' %> </div></div>
<div id=b2_2_d2_inf2><%= board.introduction %></div>
<div id=b2_2_d2_inf3><div style="float:left; margin-top:5px;"> <%=t 'board.topic' %>: <%= board.topics.count %> <%=t 'board.post' %><%= board.posts.count %></div> <div style="margin-left:10px; float:left; margin-top:2px;"><%= image_tag 'topic/post.png' %></div></div>
</div>
</td>
<td width="283px">
<div width="283px"style=" margin-bottom:10px; height:90px;border-left-style:solid; border-color:#CCCCCC; border-width:1px;" >
<div id=b2_2_d3_1></div>
<div id=b2_2_d3_2></div>
</div>
</td>
</tr>
</table>
</div>
<% end %>
<div id="fuzhu"></div>
<%= render @boards %>
</div>
<div class="box ui-widget-content ui-corner-all ui-helper-clearfix">
<div id="fuzhu"></div>
<div class="ui-dialog-titlebar ui-widget-header ui-corner-all" >
<table width="100%" height="27px"border="0" cellspacing="0" cellpadding="0" >
<tr>
<td width="590px"style="padding-left:5px">友情链</td>
<td width="590px" style="padding-right:5px" align="right">-</td>
</tr>
</table></div>
<div id=footer2>
<div id=ft_1>
<table id="ft_1_t" width="100%" border="0" cellspacing="0" cellpadding="0">
<div id="fuzhu"></div>
<div class="ui-dialog-titlebar ui-widget-header ui-corner-all" >
<table width="100%" height="27px" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td width="590px"style="padding-left:5px">友情鏈</td>
<td width="590px" style="padding-right:5px" align="right">-</td>
</tr>
</table></div>
<div id=footer2>
<div id=ft_1>
<table id="ft_1_t" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="590px">
<div id="ft_1_t_d1">
<div id="ft_1_t_d2"> </div>
</div>
</td>
<div id="ft_1_t_d1">
<div id="ft_1_t_d2"> </div>
</div>
</td>
<td width="590px"></td>
</tr>
</table>
</div>
<div id=ft_2>
</div>
<div id=ft_3></div>
</div>
<div></div>
</div>
<div id=ft_2>
</div>
<div id=ft_3></div>
</div>
<div></div>
</div>
<div class="ui-dialog-titlebar ui-widget-header ui-corner-all">
<table width="100%" height="27px"border="0" cellspacing="0" cellpadding="0" >
<tr>
<td width="590px"style="padding-left:5px"><%= render 'layouts/onlineuserbar' %></td>
<td width="590px" style="padding-right:5px" align="right">-</td>
</tr>
</table></div>
<table width="100%" height="27px"border="0" cellspacing="0" cellpadding="0" >
<tr>
<td width="590px"style="padding-left:5px"><%= render 'layouts/onlineuserbar' %> </td>
<td width="590px" style="padding-right:5px" align="right">-</td>
</tr>
</table></div>
</div>
\ No newline at end of file
<div id="f_fz">
</div>
<div id="footer" class="box ui-widget-content ui-corner-all ui-helper-clearfix">
<div id="f_fz"></div>
<div id ="footer" class="box ui-widget-content ui-corner-all ui-helper-clearfix">
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="f_t">
<tr>
<td height="25px" width="590px" style="padding-left:5px">
Powered by 東方幻想鄉0.1
</td>
<td width="590px" height="25px" align="right" style="padding-right:5px">
東方幻想鄉(黑ICP備09028990)| 聯繫我們 | 網站統計| 無圖版| wap
</td>
<td height="25px" width="590px" style="padding-left:5px">Powered by 東方幻想鄉0.1</td>
<td width="590px" height="25px" align="right"style="padding-right:5px">東方幻想鄉(黑ICP備09028990)| 聯繫我們 | 網站統計| 無圖版| wap</td>
</tr>
<tr>
<td height="25px" style="padding-left:5px">
2011-2012 rz Inc.
</td>
<td height="25px" align="right" style="padding-right:5px">
GMT+8,2012-2-17 15:14
</td>
<td height="25px" style="padding-left:5px">2011-2012 rz Inc.</td>
<td height="25px" align="right" style="padding-right:5px">GMT+8,2012-2-17 15:14</td>
</tr>
</table>
</div>
\ No newline at end of file
</div>
......@@ -10,7 +10,7 @@
LOGO
</div>
<div class="toggler" >
<div id="effect"<%= image_tag 'common/banner2.jpg' %> </div>
<div id="effect"><%= image_tag 'common/banner2.jpg' %> </div>
</div>
</div>
<div class=" box ui-widget-content ui-corner-all ui-helper-clearfix" >
......
<% superboard = board %> <!--这里的变量命名很纠结..待修正-->
<div class="mainbox list">
<span class="headactions">
<%= image_tag 'common/collapsed_no.gif', :id => 'category_3_img', :title => 'sq/zk '%>
</span>
<h3><%= superboard %></h3>
<table id="category_<%= superboard.id %> " summary="category<%= superboard.id %>" cellspacing="0" cellpadding="0" style="">
<% superboard.subboards.each do |board| %>
<tbody id="board<%= board.id %>">
<tr>
<th>
<%= image_tag board.logo_url, :style => "float:left; margin-right: 10px" %> <!--TODO-->
<div class="left">
<h2><%= board %></h2>
<p><%= board.introduction %></p>
<% unless board.subboards.empty? %>
<p><%=t 'board.subboard' %>:
<% board.subboards.each do |subboard| %>
<%= subboard %>
<% end %>
</p>
<% end %>
</div>
</th>
<td class="boardnums">
<em><%= board.topics.size %></em> / <%= board.posts.size %></td>
<td class="boardlast">
<% if board.topics.last %>
<p><%= board.topics.last %></p>
<cite><%= board.posts.last.user %> - <span title="<%= board.posts.last.updated_at %>"><%=l board.posts.last.updated_at, :format => :short %></span></cite>
<% else %>
<%=t 'board.none' %>
<% end %>
</td>
</tr>
</tbody>
<% end %>
</table>
</div>
......@@ -6,49 +6,7 @@
<%=t 'stat.total' %>: <em><%= Post.count %></em>
</p>
</div>
<% @boards.each do |superboard| %>
<div class="mainbox list">
<span class="headactions">
<%= image_tag 'common/collapsed_no.gif', :id => 'category_3_img', :title => 'sq/zk '%>
</span>
<h3><%= superboard %></h3>
<table id="category_<%= superboard.id %> " summary="category<%= superboard.id %>" cellspacing="0" cellpadding="0" style="">
<% superboard.subboards.each do |board| %>
<tbody id="board<%= board.id %>">
<tr>
<th>
<%= image_tag board.logo, :style => "float:left; margin-right: 10px" %>
<div class="left">
<h2><%= board %></h2>
<p><%= board.introduction %></p>
<% unless board.subboards.empty? %>
<p><%=t 'board.subboard' %>:
<% board.subboards.each do |subboard| %>
<%= subboard %>
<% end %>
</p>
<% end %>
</div>
</th>
<td class="boardnums">
<em><%= board.topics.size %></em> / <%= board.posts.size %></td>
<td class="boardlast">
<% if board.topics.last %>
<p><%= board.topics.last %></p>
<cite><%= board.posts.last.user %> - <span title="<%= board.posts.last.updated_at %>"><%=l board.posts.last.updated_at, :format => :short %></span></cite>
<% else %>
<%=t 'board.none' %>
<% end %>
</td>
</tr>
</tbody>
<% end %>
</table>
</div>
<% end %>
<%= render @boards %>
<div id="ad_intercat_16"></div>
<div class="mainbox list">
<span class="headactions">
......
This source diff could not be displayed because it is too large. You can view the blob instead.
1108
\ No newline at end of file
6920
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment