修改了新闻子页面的现实

文档页面及子页面排版
This commit is contained in:
huangjingquan 2013-08-06 15:53:08 +08:00
parent d7ba950851
commit 03fed7b36d
5 changed files with 54 additions and 11 deletions

View File

@ -1,6 +1,21 @@
<h4><%= link_to h(document.title), document_path(document) %></h4>
<!-- <h4><%= link_to h(document.title), document_path(document) %></h4>
<p><em><%= format_time(document.updated_on) %></em></p>
<div class="wiki">
<%= textilizable(truncate_lines(document.description), :object => document) %>
</div>
</div> -->
<!--add by huang-->
<table width="660px" align="center">
<tr><td class="font_title_document"><%= link_to h(document.title), document_path(document) %></td></tr>
<tr><td colspan="2">
<div class="font_description">
<%= textilizable(truncate_lines(document.description), :object => document) %>
</div>
</td></tr>
<tr><td align="right"><p class="font_lighter"><%= format_time(document.updated_on) %></p></td></tr>
<tr><td class="line_under"></td></tr>
</table>

View File

@ -19,7 +19,7 @@
<% if @grouped.empty? %><p class="nodata"><%= l(:label_no_data) %></p><% end %>
<% @grouped.keys.sort.each do |group| %>
<h3><%= group %></h3>
<!-- <h3><%= group %></h3> -->
<%= render :partial => 'documents/document', :collection => @grouped[group] %>
<% end %>

View File

@ -7,13 +7,25 @@
<% end %>
</div>
<h3><%=h @document.title %></h3>
<!-- <h3><%=h @document.title %></h3>
<p><em><%=h @document.category.name %><br />
<%= format_date @document.created_on %></em></p>
<div class="wiki">
<%= textilizable @document.description, :attachments => @document.attachments %>
</div>
</div> -->
<!--add by huang-->
<table width="660px" align="center">
<tr><td><h3><strong><%=h @document.title %></strong></h3></td></tr>
<tr><td>
<div class="font_description">
<%= textilizable @document.description, :attachments => @document.attachments %>
</div>
</td></tr>
<tr><td align="right"><p class="font_lighter"><%= format_date @document.created_on %></p></td></tr>
<tr><td class="line_under"></td></tr>
</table>
<h3><%= l(:label_attachment_plural) %></h3>
<%= link_to_attachments @document %>

View File

@ -8,8 +8,7 @@
<%= delete_link news_path(@news) if User.current.allowed_to?(:manage_news, @project) %>
</div>
<h3><%= link_to image_tag(url_to_avatar(@user), :class => 'avatar2'), :class => "avatar" %><%=h @news.title %></h3>
<h3><%=h @news.title %></h3>
<% if authorize_for('news', 'edit') %>
<div id="edit-news" style="display:none;">
<%= labelled_form_for :news, @news, :url => news_path(@news),
@ -35,8 +34,19 @@
<% end if @comments.any? %>
</div> -->
<!--add by huang-->
<% if @news.commentable? %>
<div id="comments" style="margin-bottom:16px;">
<h3 class="comments"><%= l(:label_comment_plural) %></h3>
<h3 class="comments"><%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comments" %></h3>
<%= form_tag({:controller => 'comments', :action => 'create', :id => @news}, :id => "add_comment_form", :style => "display:none;") do %>
<div class="box">
<%= text_area 'comment', 'comments', :cols => 80, :rows => 15, :class => 'wiki-edit' %>
<%= wikitoolbar_for 'comment_comments' %>
</div>
<p><%= submit_tag l(:button_add) %></p>
<% end %>
<% end %>
</div>
<h3><%= l(:label_comment_plural) %></h3>
<% @comments.each do |comment| %>
<% next if comment.new_record? %>
<table width="660px" border="0" align="center">
@ -44,7 +54,7 @@
<td colspan="2" valign="top" width="50" ><%= image_tag(url_to_avatar(comment.author), :class => "avatar")%></td>
<td><table width="580px" border="0">
<tr>
<td colspan="2" valign="top"><strong><%=link_to_user(comment.author) if comment.respond_to?(:author) %></strong> <a class="font_lighter">添加了</a><%= l(:label_comment_plural) %></td>
<td colspan="2" valign="top"><strong><%=link_to_user(comment.author) if comment.respond_to?(:author) %></strong> <span class="font_lighter">发表了<%= l(:label_comment_plural) %></span></td>
</tr>
<tr>
<td colspan="2" width="580px" ><p class="font_description"> <%= textilizable(comment.comments) %></p></td>
@ -61,7 +71,7 @@
</div>
<% if @news.commentable? %>
<!-- <% if @news.commentable? %>
<p><%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comments" %></p>
<%= form_tag({:controller => 'comments', :action => 'create', :id => @news}, :id => "add_comment_form", :style => "display:none;") do %>
<div class="box">
@ -70,7 +80,7 @@
</div>
<p><%= submit_tag l(:button_add) %></p>
<% end %>
<% end %>
<% end %> -->
<% html_title @news.title -%>

View File

@ -64,6 +64,12 @@ ul.tool li{list-style-type:none;
height:auto;
background-color: #d0d9e0;
}
.font_title_document{
font-size: 13px;
font-weight: bold;
}
.font_title_left{
font-family:微软雅黑;
font-weight:bold;