修改了一个bug(新闻子页面底框乱飞)

This commit is contained in:
huangjingquan 2013-08-06 16:32:37 +08:00
parent 06a859eb5e
commit 7b3c201469
2 changed files with 7 additions and 20 deletions

View File

@ -6,9 +6,6 @@
</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">

View File

@ -8,7 +8,8 @@
<%= delete_link news_path(@news) if User.current.allowed_to?(:manage_news, @project) %>
</div>
<h3><%=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),
@ -34,19 +35,8 @@
<% end if @comments.any? %>
</div> -->
<!--add by huang-->
<% if @news.commentable? %>
<div id="comments" style="margin-bottom:16px;">
<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>
<h3 class="comments"><%= l(:label_comment_plural) %></h3>
<% @comments.each do |comment| %>
<% next if comment.new_record? %>
<table width="660px" border="0" align="center">
@ -54,7 +44,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> <span class="font_lighter">发表了<%= l(:label_comment_plural) %></span></td>
<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>
</tr>
<tr>
<td colspan="2" width="580px" ><p class="font_description"> <%= textilizable(comment.comments) %></p></td>
@ -71,7 +61,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">
@ -80,10 +70,10 @@
</div>
<p><%= submit_tag l(:button_add) %></p>
<% end %>
<% end %> -->
<% end %>
<% html_title @news.title -%>
<% content_for :header_tags do %>
<%= stylesheet_link_tag 'scm' %>
<% end %>
<% end %>