fix wrong html structure for announcement frontend

This commit is contained in:
Fu Matthew 2013-01-09 12:13:55 +08:00
parent 1d80b39dcb
commit 614b6fde71
1 changed files with 3 additions and 4 deletions

View File

@ -5,7 +5,6 @@
<h1 class="h1"><%= @page.title rescue nil %></h1>
<% if !@item.frontend_field.blank? %>
<% if @frontend_style == '1' %>
<div class="news news1">
@ -18,8 +17,8 @@
</tr>
</thead>
<% @bulletins.each do |post| %>
<% @item.frontend_field.each do |ff| %>
<tr class="<%= cycle('odd', '')%>">
<% @item.frontend_field.each do |ff| %>
<td>
<span class="<%= ff[1] %>">
<% if ff[1] == 'title' %>
@ -27,7 +26,7 @@
<% elsif ff[1] == 'date' %>
<%= display_date(post.send(ff[0])) %>
<% elsif ff[1] == 'category' %>
<%= post.send("#{post.class.to_s.underscore}_#{ff[0]}").title rescue nil %>
<%= post.send(ff[0]).title rescue nil %>
<% elsif ff[1] == 'img' %>
<div class="img app-pic"><%= image_tag(post.send(wf[0]).url) %></div>
<% elsif ff[1] == 'text' %>
@ -50,8 +49,8 @@
<% end %>
</span>
</td>
</tr>
<% end %>
</tr>
<% end %>
</table>
</div>