Add nccu icon

Change news list in front-end
Hide links and files in news and announcement front-end show when nothing
This commit is contained in:
Christophe Vilayphiou 2012-05-08 15:27:43 +08:00
parent ba4385e3fd
commit caba8ce7a4
6 changed files with 41 additions and 34 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -3,6 +3,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title><%= @title || APP_CONFIG['orbit'] %></title> <title><%= @title || APP_CONFIG['orbit'] %></title>
<link rel="shortcut icon" href="<%= asset_path "ncculogo.ico" %>">
<!--[if lt IE 9]> <!--[if lt IE 9]>
<%= javascript_include_tag "html5" %> <%= javascript_include_tag "html5" %>
<![endif]--> <![endif]-->

View File

@ -3,6 +3,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<%= page_title(@item).html_safe %> <%= page_title(@item).html_safe %>
<link rel="shortcut icon" href="<%= asset_path "ncculogo.ico" %>">
<%= page_metas(@item).html_safe %> <%= page_metas(@item).html_safe %>
<!--[if lt IE 9]> <!--[if lt IE 9]>
<%= javascript_include_tag "html5" %> <%= javascript_include_tag "html5" %>

View File

@ -15,16 +15,19 @@
<%= @bulletin.text[I18n.locale].html_safe %> <%= @bulletin.text[I18n.locale].html_safe %>
</div> </div>
<% if @bulletin.bulletin_links.size > 0 %>
<b><%= t('announcement.link') %></b> <b><%= t('announcement.link') %></b>
<% @bulletin.bulletin_links.each do | blink | %> <% @bulletin.bulletin_links.each do | blink | %>
<%= link_to blink.i18n_variable[I18n.locale], blink.url, :target => '_blank' %> <%= link_to blink.i18n_variable[I18n.locale], blink.url, :target => '_blank' %>
<% end %> <% end %>
</li> <% end %>
<li>
<% if @bulletin.bulletin_files.size > 0 %>
<b><%= t('announcement.file') %></b> <b><%= t('announcement.file') %></b>
<% @bulletin.bulletin_files.each do | bfile | %> <% @bulletin.bulletin_files.each do | bfile | %>
<%= link_to bfile.filetitle[I18n.locale], bfile.file.url, {:target => '_blank', :title => bfile.description} if bfile.file.file %> <%= link_to bfile.filetitle[I18n.locale], bfile.file.url, {:target => '_blank', :title => bfile.description} if bfile.file.file %>
<% end %> <% end %>
<% end %>
<div class="fb"> <div class="fb">
<iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.nccu.edu.tw&amp;send=false&amp;layout=standard&amp;width=450&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=35&amp;appId=263319013700607" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true"></iframe> <iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.nccu.edu.tw&amp;send=false&amp;layout=standard&amp;width=450&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=35&amp;appId=263319013700607" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true"></iframe>

View File

@ -8,25 +8,24 @@
<h1 class="h1"><%= t('news.list_news') %></h1> <h1 class="h1"><%= t('news.list_news') %></h1>
<% end %> <% end %>
<table class="table table-bordered"> <table class="table table-bordered">
<tbody>
<tr> <tr>
<th><%= t('news.news_bulletin.category') %></th> <th><%= t('news.news_bulletin.image') %></th>
<th><%= t('news.news_bulletin.title') %></th> <th><%= t('news.news_bulletin.title') %></th>
<th><%= t('news.news_bulletin.postdate') %></th> <th><%= t('news.news_bulletin.postdate') %></th>
</tr> </tr>
<% @news_bulletins.each do |post| %> <% @news_bulletins.each do |post| %>
<tr> <tr>
<td><%= post.news_bulletin_category.i18n_variable[I18n.locale] %></td> <td><%= image_tag post.image %></td>
<td><%= link_to post.title[I18n.locale], panel_news_front_end_news_bulletin_path(post) %> <td>
<%#= link_to post.title, panel_news_back_end_news_bulletin_path(post) %> <%= link_to post.title[I18n.locale], panel_news_front_end_news_bulletin_path(post) %>
<%= post.subtitle[I18n.locale].html_safe %>
</td> </td>
<td><%= post.postdate %></td> <td><%= post.postdate %></td>
</tr> </tr>
<% end %> <% end %>
</tbody>
</table> </table>
<%= paginate @news_bulletins, :params => {:inner => 'false'} %> <%= paginate @news_bulletins, :params => {:inner => 'false'} %>

View File

@ -15,16 +15,19 @@
<%= @news_bulletin.text[I18n.locale].html_safe %> <%= @news_bulletin.text[I18n.locale].html_safe %>
</div> </div>
<% if @news_bulletin.news_bulletin_links.size > 0 %>
<b><%= t('announcement.link') %></b> <b><%= t('announcement.link') %></b>
<% @news_bulletin.bulletin_links.each do | blink | %> <% @news_bulletin.news_bulletin_links.each do | blink | %>
<%= link_to blink.i18n_variable[I18n.locale], blink.url, :target => '_blank' %> <%= link_to blink.i18n_variable[I18n.locale], blink.url, :target => '_blank' %>
<% end %> <% end %>
</li> <% end %>
<li>
<% if @news_bulletin.news_bulletin_files.size > 0 %>
<b><%= t('announcement.file') %></b> <b><%= t('announcement.file') %></b>
<% @news_bulletin.bulletin_files.each do | bfile | %> <% @news_bulletin.news_bulletin_files.each do | bfile | %>
<%= link_to bfile.filetitle[I18n.locale], bfile.file.url, {:target => '_blank', :title => bfile.description} if bfile.file.file %> <%= link_to bfile.filetitle[I18n.locale], bfile.file.url, {:target => '_blank', :title => bfile.description} if bfile.file.file %>
<% end %> <% end %>
<% end %>
<div class="fb"> <div class="fb">
<iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.nccu.edu.tw&amp;send=false&amp;layout=standard&amp;width=450&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=35&amp;appId=263319013700607" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true"></iframe> <iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.nccu.edu.tw&amp;send=false&amp;layout=standard&amp;width=450&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=35&amp;appId=263319013700607" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true"></iframe>