修改了主页、论坛显示

This commit is contained in:
huangjingquan 2013-11-27 16:40:47 +08:00
parent f0b17a1a10
commit 6dc692bb6a
5 changed files with 43 additions and 28 deletions

View File

@ -1092,8 +1092,13 @@ class Project < ActiveRecord::Base
# 创建项目后在项目下同步创建一个讨论区
def create_board_sync
@board = self.boards.build
if project_type == 1
self.name=" #{l(:label_borad_course) }"
else
self.name =" #{l(:label_borad_project) }"
end
@board.name = self.name
@board.description = self.name.to_s << " #{l(:label_board) }"
@board.description = self.name.to_s
if @board.save
logger.debug "[Project Model] ===> #{@board.to_json}"
else

View File

@ -1,13 +1,13 @@
<!-- <%= board_breadcrumb(@board) %> -->
<!--new and follow-->
<div class="content-title-top">
<!-- <div class="content-title-top">
<%= link_to l(:label_message_new),
new_board_message_path(@board),
:class => 'icon icon-add',
:onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.logged? %>
:onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.logged? %> -->
<!-- <%= watcher_link(@board, User.current) %> -->
</div>
<!-- </div> -->
<div id="add-message" style="display:none;">
<% if User.current.logged? %>
@ -25,7 +25,15 @@
<!--display the board-->
<div class="borad-title"><%=h @board.name %></div>
<!-- <div class="borad-description"><%=h @board.description %></div> -->
<div class="borad-topic-count">共有 <%=link_to @topics.count %> 个贴子</div>
<div class="borad-setitle">
<span class="borad-topic-count">共有 <%=link_to @topics.count %> 个贴子</span>
<span>
<%= link_to l(:label_message_new),
new_board_message_path(@board),
:class => 'icon icon-add',
:onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.logged? %>
</span>
</div>
<div style="padding-top: 10px">
<% if @topics.any? %>
<!-- <table class="list messages">
@ -48,7 +56,7 @@
<tr><td align="center">回答</td></tr>
</table></td>
</tr>
<tr><td colspan="2" ><span class="font_description">标签</span></td></tr>
<!-- <tr><td colspan="2" ><span class="font_description">标签</span></td></tr> -->
<tr><td align="left" colspan="2" ><span class="font_lighter"><%= authoring topic.created_on, topic.author %><br /></span></td></tr>
</table></td>
</tr>

View File

@ -1,18 +1,16 @@
<!--add by huang-->
<div style="height:280px; padding-top: 10px">
<div class="welcone_left">
<table width="388px">
<tr><td><span class="font_welcome_trustie"><%= l(:label_welcome_trustie) %> </span><span class="font_welcome_tdescription">, <%= l(:label_welcome_trustie_description) %></span></td></tr>
</table>
<div class="welcome_left">
<span class="font_welcome_trustie"><%= l(:label_welcome_trustie) %> </span>
<span class="font_welcome_tdescription">, <%= l(:label_welcome_trustie_description) %></span>
</div>
<table>
<tr>
<td> <%= call_hook :view_account_login_top %>
<div class="welcome_right">
<%= call_hook :view_account_login_top %>
<div id="login-form_new">
<%= form_tag(signin_path) do %>
<%= back_url_hidden_field_tag if is_logout? %>
<% unless User.current.logged? %> <!--modified by young-->
<table>
<table >
<tr>
<td align="right"><label for="username"><%= l(:label_username) %></label></td>
<td align="left"><%= text_field_tag 'username', params[:username], :tabindex => '1' %></td>
@ -45,8 +43,7 @@
</td>
</tr>
</table>
<% else %>
<div>
<% else %>
<!--info: modified by huang-->
<table width="200" border="0">
<tr>
@ -64,8 +61,7 @@
<% end %>
</td>
</tr>
</table>
</div>
</table>
<% end %>
<% end %>
</div>
@ -75,9 +71,8 @@
<%= javascript_tag "$('#password').focus();" %>
<% else %>
<%= javascript_tag "$('#username').focus();" %>
<% end %> </td>
</tr>
</table>
<% end %>
</div>
</div>
<!--model-->

View File

@ -1732,3 +1732,5 @@ zh:
label_memo_create: 发布
label_memo_new: 新建主题
label_memo_edit: 修改主题
label_borad_project: 项目讨论区
label_borad_course: 课程讨论区

View File

@ -135,17 +135,23 @@ span.forums-avatar-right{
}
.borad-title{
font-size: 16px;
font-size: 15px;
color: #ed8924;
padding-left: 5px;
padding-top: -5px;
font-weight: bold;
}
.borad-setitle{
padding-bottom: 5px;
padding-top: 10px;
border-bottom: 1px dashed rgb(204, 204, 204);
}
.borad-topic-count{
padding-top: 10px;
padding-left: 5px;
border-bottom: 1px dashed rgb(204, 204, 204);
padding-right: 5px;
}
.borad-topic-count-message{
@ -577,15 +583,14 @@ ul.tool li{list-style-type:none;
.spaceright{float:left; width:620px;}
.welcone_left{
.welcome_left{
margin-top: 70px;
margin-left: 80px;
margin-left: -20px;
float:left;
width: 49%;
width: 30%;
}
.welcome_right{
margin-right:200px;
.welcome_right{
float:right;
width: 49%;
}