修改了forums主页显示,限制了讨论区用户图片显示大小

This commit is contained in:
huangjingquan 2013-11-28 17:15:42 +08:00
parent 47a7bcaa31
commit 2ba8bb8fd0
4 changed files with 81 additions and 87 deletions

View File

@ -2,47 +2,17 @@
<div style="padding-top: 10px">
<% if forums.any? %>
<% forums.each do |forum| %>
<table class="content-text-list">
<tr>
<td colspan="2" valign="top" width="50" ><%= link_to image_tag(url_to_avatar(forum.creator), :class => "avatar"), user_path(forum.creator) %></td>
<td>
<table width="860px" border="0">
<tr>
<td valign="top" width="500px"><%= link_to h(forum.name), forum_path(forum) %></td>
<td align="right" rowspan="3">
<table class="borad-count">
<tr>
<td align="center" class="borad-count-digit"><%= link_to (forum.topic_count), forum_path(forum) %></td>
<td align="center" class="borad-count-digit"><%= link_to (forum.memo_count), forum_path(forum) %></td>
</tr>
<tr>
<td align="center">帖子</td>
<td align="center">回答</td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2" ><span class="font_description"><%= forum.description%></span></td>
</tr>
<tr>
<td colspan="2" ><span class="font_description">
<div class="tags">
<div id="tags">
<%= image_tag( "/images/sidebar/tags.png") %>
<%= render :partial => 'tags/tag_name', :locals => {:obj => forum,:object_flag => "5",:non_list_all => true }%>
</div>
</div></span>
</td>
</tr>
<tr>
<td align="left" colspan="2" ><span class="font_lighter"><%= authoring forum.created_at, forum.creator %>
<br />
</span></td>
</tr>
</table></td>
</tr>
</table>
<% end %>
<div class="forums-index">
<div class="forums-inex-avatar"><%= link_to image_tag(url_to_avatar(forum.creator), :class => "avatar"), user_path(forum.creator) %></div>
<div class="forums-index-content">
<p ><%= link_to h(forum.name), forum_path(forum) %></p>
<p ><%= forum.description%></p>
<p ><%= authoring forum.created_at, forum.creator %></p></div>
<div class="forums-index-count">
<table class="forums-count-color"><tr class="forums-count-color" align="center"><td><%= link_to (forum.memo_count), forum_path(forum) %></td><td><%= link_to (forum.topic_count), forum_path(forum) %></td></tr>
<tr align="center"><td>回答</td><td>帖子</td></tr></table></div>
</div>
<% end %>
<div class="pagination"><%= pagination_links_full @forums_pages, @forums_count %></div>
<% else %>
<% end %>

View File

@ -55,7 +55,7 @@
<div class="formus-first-title" >创建人信息</div>
<div class="forums-info">
<div style="padding-top: 20px" >
<span class="forums-avatar-left"><%= image_tag(url_to_avatar(@forum.creator), :class => 'avatar2') %></span>
<span class="forums-avatar-left"><%= image_tag(url_to_avatar(@forum.creator), :class =>'vatar-size') %></span>
<span class="forums-avatar-right"><%=link_to @forum.creator.show_name, user_path(@forum.creator) %>
<div>
<%= link_to l(:label_user_watcher)+"("+User.watched_by(@forum.creator.id).count.to_s+")" ,:controller=>"users", :action=>"user_watchlist", :id => @forum.creator.id %>

View File

@ -57,7 +57,7 @@
<div class="formus-first-title" >创建人信息</div>
<div class="forums-info">
<div style="padding-top: 20px" >
<span class="forums-avatar-left"><%= image_tag(url_to_avatar(@forum.creator), :class => 'avatar2') %></span>
<span class="forums-avatar-left"><%= image_tag(url_to_avatar(@forum.creator), :class => 'vatar-size') %></span>
<span class="forums-avatar-right"><%=link_to @forum.creator.show_name, user_path(@forum.creator) %>
<div>
<%= link_to l(:label_user_watcher)+"("+User.watched_by(@forum.creator.id).count.to_s+")" ,:controller=>"users", :action=>"user_watchlist", :id => @forum.creator.id %>

View File

@ -7,46 +7,70 @@ h2, .wiki h1 {font-size: 20px;}
h3, .wiki h2 {font-size: 15px;}
h4, .wiki h3 {font-size: 13px;}
h4 {border-bottom: 1px dotted #bbb;}
/*new by huang*/
/**/
/*new code reconstruction*/
/*div.forums-welcome{
width: 30%;
}
.forums-welcome-title{
font-weight: bold;
margin-bottom:10px;
border-bottom: solid 1px rgb(204, 204, 204);
}
span.forums-welcome-massage{
display: block;
height: 30px;
border: 1px solid #15bccf;
border-bottom: 1px solid #15bccf;
border-right: 1px solid #15bccf;
background: white;
position: relative;
/*huang*/
/*current position*/
div.positon-f{
float: left;
width: 80%;
}
span.forums-welcome-massage-right{
display: block;
height: 30px;
border: 1px solid #15bccf;
border-bottom: 1px solid #15bccf;
border-right: 1px solid #15bccf;
background: white;
position: relative;
float: right;
width: 18.5%;
background-color: #15bccf;
height: 30px;
}*/
div.position-s{
}
div.position-t{
}
/*end current position*/
/*forums-index*/
div.forums-index{
padding-left: 10px;
padding-top: 10px;
float: left;
width: 100%;
border-bottom: 1px dashed rgb(204, 204, 204);
}
div.forums-inex-avatar{
padding-left: 15px;
float: left;
width: 7%;
}
div.forums-index-content{
float: left;
width: 72%;
line-height: 1em;
}
div.forums-index-count{
padding-top: 10px;
float: right;
padding-right: 40px;
}
table.forums-count-color{
width: 80px;
height: 60px;
background-color: #e5e2e2;
}
table.forums-count-color tr{
font-weight: bold;
font-size: 14px;
background-color: #e5e2e2;
vertical-align: middle;
alignment-adjust: middle;
}
/*forums-index end*/
.vatar-size{
height: 70px;
width: 70px;
}
div.position-title{
line-height: 0.5em;
}
div.sidebar-forums{
padding-left: 8px;
@ -86,12 +110,12 @@ div.forums-description{
span.forums-avatar-left{
float:left;
width: 23%;
width: 27%;
}
span.forums-avatar-right{
float: right;
width: 70%;
width: 65%;
}
.formus-first-title{
@ -584,16 +608,15 @@ ul.tool li{list-style-type:none;
.spaceright{float:left; width:620px;}
.welcome_left{
margin-top: 70px;
margin-left: -20px;
margin-top: 70px;
float:left;
width: 30%;
width: 49%;
}
.welcome_right{
float:right;
float:left;
width: 49%;
padding-left: 30px;
}
.inf_user_motto{
@ -1060,6 +1083,7 @@ html>body #content { min-height: 600px; }
#main.nosidebar #sidebar{ display: none; }
#main.nosidebar #content{ width: auto; border-right: 0; }
#footer {clear: both; border-top: 1px solid #bbb; font-size: 0.9em; color: #aaa; padding: 5px; text-align:center; background:#fff;}
#login-form table {margin-top:5em; padding:1em; margin-left: auto; margin-right: auto; border: 2px solid #FDBF3B; background-color:#FFEBC1; }