edit announcement widget

This commit is contained in:
unknown 2012-02-13 16:57:56 +08:00
parent e638c1c7c3
commit dea9783b93
1 changed files with 16 additions and 35 deletions

View File

@ -1,42 +1,23 @@
<% # encoding: utf-8 %>
<% if @bulletin and !@bulletin.nil? %>
<div id="col1" class="col">
<h1 class="h1 ini_heading col_title"><%= @bulletin.title %></h1>
<p class="ini_txt"><%= @bulletin.subtitle %></p>
<%= link_to "read more >",panel_announcement_front_end_bulletin_path(@bulletin.id) %>
<a class="btn" href="">read more &gt;</a>
</div>
<% end %>
<% if @bulletins and !@bulletins.nil? %> <% if @bulletins and !@bulletins.nil? %>
<div id="col2" class="col"> <div class="topic_news">
<h1 class="h1 ini_heading col_title">news</h1> <div class="topic_news2">
<ul class="ini_list"> <h2 class="topic_title"><%= t('焦點新聞')%></h2>
<% @bulletins.each do |post| %> <%= link_to "more+",panel_announcement_front_end_bulletins_path(), :class => "topic_note" %>
<li><span class="time"><%= post.postdate.to_s.gsub("-", "") %></span><%= link_to post.title,panel_announcement_front_end_bulletin_path(post) %></li> <ul>
<% end %>
</ul>
<%= link_to "read more >",panel_announcement_front_end_bulletins_path(), :class => "btn" %>
<a class="btn" href="announcement">read more &gt;</a>
</div>
<div id="col2" class="col">
<h1 class="h1 ini_heading col_title">news</h1>
<ul class="ini_list">
<% @bulletins.each do |post| %> <% @bulletins.each do |post| %>
<li> <li>
<%= image_tag(post.image.url, :size => "160x140") if post.image.file %> <div class="news_img"><%= image_tag(post.image.url, :size => "290x130") if post.image.file %></div>
<h4><%= post.title %></h4> <h3 class="h3 news_title"><%= post.title %></h3>
<%= post.subtitle %> <p class="news_wrap"><%= post.subtitle %></p>
</li> </li>
<% end %> <% end %>
</ul> </ul>
<%= link_to "read more >",panel_announcement_front_end_bulletins_path(), :class => "btn" %> </div>
<a class="btn" href="announcement">read more &gt;</a>
</div> </div>
<% end %> <% end %>