修改了主页、论坛显示
This commit is contained in:
parent
f0b17a1a10
commit
6dc692bb6a
|
@ -1092,8 +1092,13 @@ class Project < ActiveRecord::Base
|
||||||
# 创建项目后在项目下同步创建一个讨论区
|
# 创建项目后在项目下同步创建一个讨论区
|
||||||
def create_board_sync
|
def create_board_sync
|
||||||
@board = self.boards.build
|
@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.name = self.name
|
||||||
@board.description = self.name.to_s << " #{l(:label_board) }"
|
@board.description = self.name.to_s
|
||||||
if @board.save
|
if @board.save
|
||||||
logger.debug "[Project Model] ===> #{@board.to_json}"
|
logger.debug "[Project Model] ===> #{@board.to_json}"
|
||||||
else
|
else
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
<!-- <%= board_breadcrumb(@board) %> -->
|
<!-- <%= board_breadcrumb(@board) %> -->
|
||||||
|
|
||||||
<!--new and follow-->
|
<!--new and follow-->
|
||||||
<div class="content-title-top">
|
<!-- <div class="content-title-top">
|
||||||
<%= link_to l(:label_message_new),
|
<%= link_to l(:label_message_new),
|
||||||
new_board_message_path(@board),
|
new_board_message_path(@board),
|
||||||
:class => 'icon icon-add',
|
: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) %> -->
|
<!-- <%= watcher_link(@board, User.current) %> -->
|
||||||
</div>
|
<!-- </div> -->
|
||||||
|
|
||||||
<div id="add-message" style="display:none;">
|
<div id="add-message" style="display:none;">
|
||||||
<% if User.current.logged? %>
|
<% if User.current.logged? %>
|
||||||
|
@ -25,7 +25,15 @@
|
||||||
<!--display the board-->
|
<!--display the board-->
|
||||||
<div class="borad-title"><%=h @board.name %></div>
|
<div class="borad-title"><%=h @board.name %></div>
|
||||||
<!-- <div class="borad-description"><%=h @board.description %></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">
|
<div style="padding-top: 10px">
|
||||||
<% if @topics.any? %>
|
<% if @topics.any? %>
|
||||||
<!-- <table class="list messages">
|
<!-- <table class="list messages">
|
||||||
|
@ -48,7 +56,7 @@
|
||||||
<tr><td align="center">回答</td></tr>
|
<tr><td align="center">回答</td></tr>
|
||||||
</table></td>
|
</table></td>
|
||||||
</tr>
|
</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>
|
<tr><td align="left" colspan="2" ><span class="font_lighter"><%= authoring topic.created_on, topic.author %><br /></span></td></tr>
|
||||||
</table></td>
|
</table></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -1,18 +1,16 @@
|
||||||
<!--add by huang-->
|
<!--add by huang-->
|
||||||
<div style="height:280px; padding-top: 10px">
|
<div style="height:280px; padding-top: 10px">
|
||||||
<div class="welcone_left">
|
<div class="welcome_left">
|
||||||
<table width="388px">
|
<span class="font_welcome_trustie"><%= l(:label_welcome_trustie) %> </span>
|
||||||
<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>
|
<span class="font_welcome_tdescription">, <%= l(:label_welcome_trustie_description) %></span>
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
<table>
|
<div class="welcome_right">
|
||||||
<tr>
|
<%= call_hook :view_account_login_top %>
|
||||||
<td> <%= call_hook :view_account_login_top %>
|
|
||||||
<div id="login-form_new">
|
<div id="login-form_new">
|
||||||
<%= form_tag(signin_path) do %>
|
<%= form_tag(signin_path) do %>
|
||||||
<%= back_url_hidden_field_tag if is_logout? %>
|
<%= back_url_hidden_field_tag if is_logout? %>
|
||||||
<% unless User.current.logged? %> <!--modified by young-->
|
<% unless User.current.logged? %> <!--modified by young-->
|
||||||
<table>
|
<table >
|
||||||
<tr>
|
<tr>
|
||||||
<td align="right"><label for="username"><%= l(:label_username) %></label></td>
|
<td align="right"><label for="username"><%= l(:label_username) %></label></td>
|
||||||
<td align="left"><%= text_field_tag 'username', params[:username], :tabindex => '1' %></td>
|
<td align="left"><%= text_field_tag 'username', params[:username], :tabindex => '1' %></td>
|
||||||
|
@ -45,8 +43,7 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<% else %>
|
<% else %>
|
||||||
<div>
|
|
||||||
<!--info: modified by huang-->
|
<!--info: modified by huang-->
|
||||||
<table width="200" border="0">
|
<table width="200" border="0">
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -64,8 +61,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
@ -75,9 +71,8 @@
|
||||||
<%= javascript_tag "$('#password').focus();" %>
|
<%= javascript_tag "$('#password').focus();" %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= javascript_tag "$('#username').focus();" %>
|
<%= javascript_tag "$('#username').focus();" %>
|
||||||
<% end %> </td>
|
<% end %>
|
||||||
</tr>
|
</div>
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
<!--model-->
|
<!--model-->
|
||||||
|
|
||||||
|
|
|
@ -1732,3 +1732,5 @@ zh:
|
||||||
label_memo_create: 发布
|
label_memo_create: 发布
|
||||||
label_memo_new: 新建主题
|
label_memo_new: 新建主题
|
||||||
label_memo_edit: 修改主题
|
label_memo_edit: 修改主题
|
||||||
|
label_borad_project: 项目讨论区
|
||||||
|
label_borad_course: 课程讨论区
|
||||||
|
|
|
@ -135,17 +135,23 @@ span.forums-avatar-right{
|
||||||
}
|
}
|
||||||
|
|
||||||
.borad-title{
|
.borad-title{
|
||||||
font-size: 16px;
|
font-size: 15px;
|
||||||
color: #ed8924;
|
color: #ed8924;
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
padding-top: -5px;
|
padding-top: -5px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.borad-setitle{
|
||||||
|
padding-bottom: 5px;
|
||||||
|
padding-top: 10px;
|
||||||
|
border-bottom: 1px dashed rgb(204, 204, 204);
|
||||||
|
}
|
||||||
|
|
||||||
.borad-topic-count{
|
.borad-topic-count{
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
border-bottom: 1px dashed rgb(204, 204, 204);
|
padding-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.borad-topic-count-message{
|
.borad-topic-count-message{
|
||||||
|
@ -577,15 +583,14 @@ ul.tool li{list-style-type:none;
|
||||||
|
|
||||||
.spaceright{float:left; width:620px;}
|
.spaceright{float:left; width:620px;}
|
||||||
|
|
||||||
.welcone_left{
|
.welcome_left{
|
||||||
margin-top: 70px;
|
margin-top: 70px;
|
||||||
margin-left: 80px;
|
margin-left: -20px;
|
||||||
float:left;
|
float:left;
|
||||||
width: 49%;
|
width: 30%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.welcome_right{
|
.welcome_right{
|
||||||
margin-right:200px;
|
|
||||||
float:right;
|
float:right;
|
||||||
width: 49%;
|
width: 49%;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue