orbit-announcement/app/views/panel/announcement/front_end/bulletins/show.html.erb

55 lines
2.0 KiB
Plaintext
Raw Normal View History

2014-01-14 11:54:35 +00:00
<% # encoding: utf-8 %>
<h1 class="h1"><%= @bulletin.title %></h1>
<div class="info">
<div class="info1">
<span class="pull-right"><%= dislpay_view_count(@bulletin) %></span>
<span class="date"><%= display_date_time(@bulletin.postdate) %></span>
<% unit = @bulletin.cache_dept[I18n.locale.to_s] rescue nil %>
<span><%= link_to unit,panel_announcement_front_end_index_bulletins_by_unit_path(:name=>unit) unless unit.blank? %></span>
</div>
</div>
<div class="news_image">
<%#= image_tag(@bulletin.image.url, :size => "320x240") if @bulletin.image.file %>
<%= link_to image_tag(@bulletin.image.url, :size => "320x240"), @bulletin.image.url, {:target => '_blank', :title => @bulletin.image_identifier} if @bulletin.image.file %>
</div>
<div class="news_paragraph">
<%= @bulletin.text.html_safe rescue '' %>
</div>
<div class="linkAndFile">
<% if @bulletin.bulletin_links.size > 0 %>
<div>
<i class="icons-link"></i>
<div class="showLink">
<% @bulletin.bulletin_links.each do | blink | %>
<%= link_to blink.title, blink.url, :target => '_blank' %>
<% end %>
</div>
</div>
<% end %>
<% if @bulletin.bulletin_files.size > 0 %>
<div>
<i class="icons-paperclip"></i>
<div class="showFile">
<% @bulletin.bulletin_files.each do | bfile | %>
<%= link_to bfile.title, bfile.file.url, {:target => '_blank', :title => bfile.description} if bfile.file.file %>
<% end %>
</div>
</div>
<% end %>
</div>
<%= share_links(@bulletin, 'announcement') %>
2014-02-21 10:21:07 +00:00
<a href="" target="_blank" class="fb-share-button">
2014-02-21 09:04:24 +00:00
<%= image_tag("announcement/fbn.png",:width=>30, :height=>30) %>
</a>
<script type="text/javascript">
(function(){
2014-02-21 09:16:36 +00:00
$(".fb-share-button").click(function(){
2014-02-21 10:21:07 +00:00
var url = "https://www.facebook.com/sharer/sharer.php?u=" + encodeURIComponent("<%= request.url %>") + "t=" +encodeURIComponent("<%= @bulletin.title %>");
2014-02-21 09:16:36 +00:00
newwindow = window.open(url,'name','height=500,width=1024');
if (window.focus) {newwindow.focus()}
return false;
})
2014-02-21 09:04:24 +00:00
})();
</script>