Merge branch 'design_team' of github.com:Rulingcom/orbit into design_team
This commit is contained in:
commit
d2e07f537a
19 files changed
+104
-135
No files matched your search
+3
-1
@@ -14,7 +14,9 @@ class Panel::Announcement::FrontEnd::BulletinsController < OrbitWidgetController
|
||||
if !params[:category_id].blank?
|
||||
@bulletins = Bulletin.can_display.where(:bulletin_category_id => params[:category_id]).any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page]).per(10)
|
||||
elsif !params[:tag_id].blank?
|
||||
@bulletins = AnnouncementTag.find(params[:tag_id]).bulletins.can_display.any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page]).per(10)
|
||||
tmp = NewsTag.find(params[:tag_id]) rescue nil
|
||||
tmp = NewsTag.where(key: params[:tag_id])[0] unless tmp
|
||||
@bulletins = tmp.bulletins.can_display.any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page]).per(10) rescue nil
|
||||
else
|
||||
@bulletins = Bulletin.can_display.any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page]).per(10)
|
||||
end
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ class Panel::Announcement::Widget::BulletinsController < OrbitWidgetController
|
||||
end
|
||||
|
||||
def bulletins_and_web_links
|
||||
@tags = AnnouncementTag.all
|
||||
@tags = AnnouncementTag.any_in(key: ['students', 'alumni', 'employee', 'guest'])
|
||||
@selected_tag = AnnouncementTag.find(params[:id]) rescue @tags[0]
|
||||
@bulletins = @selected_tag.get_visible_bulletins.can_display.page(params[:page]).per(5) rescue nil
|
||||
@web_links = WebResourceTag.first(:conditions => {:en => @selected_tag[:en]}).get_visible_links.page(params[:page]).per(5) rescue nil
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
<% sys_user.sub_roles.each do |sr| %>
|
||||
<div class="for_unit" style="display:none;"> <%= sr.key %></div>
|
||||
<% end %>
|
||||
<%= content_tag :div,:data=>{'original-title'=>t('announcement.bulletin.approval_setting_window_title'),:content => "#{sys_user.sub_roles.collect{|sr| sr.key}.join(',')}"},:class=>"checkbox clear" do %>
|
||||
<%= content_tag :div,:data=>{'original-title'=>t('announcement.bulletin.approval_setting_window_title'),:content => "#{sys_user.sub_roles.collect{|sr| sr.i18n_variable[I18n.locale]}.join(',')}"},:class=>"checkbox clear" do %>
|
||||
<div class="check-icon">
|
||||
</div>
|
||||
<div class='member-avatar'>
|
||||
|
||||
Vendored
+15
-52
@@ -14,58 +14,21 @@
|
||||
<div class="news_paragraph">
|
||||
<%= @bulletin.text[I18n.locale].html_safe %>
|
||||
</div>
|
||||
|
||||
<% if @bulletin.bulletin_links.size > 0 %>
|
||||
<b><%= t('announcement.link') %></b>
|
||||
<% @bulletin.bulletin_links.each do | blink | %>
|
||||
<%= link_to blink.i18n_variable[I18n.locale], blink.url, :target => '_blank' %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if @bulletin.bulletin_files.size > 0 %>
|
||||
<b><%= t('announcement.file') %></b>
|
||||
<% @bulletin.bulletin_files.each do | bfile | %>
|
||||
<%= link_to bfile.filetitle[I18n.locale], bfile.file.url, {:target => '_blank', :title => bfile.description} if bfile.file.file %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<div class="fb">
|
||||
<iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.nccu.edu.tw&send=false&layout=standard&width=450&show_faces=false&action=like&colorscheme=light&font&height=35&appId=263319013700607" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true"></iframe>
|
||||
</div>
|
||||
<!--
|
||||
<p id="notice"><%= flash_messages %></p>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<b><%= t('announcement.category') %></b>
|
||||
<%= @bulletin.bulletin_category.i18n_variable[I18n.locale] %>
|
||||
</li>
|
||||
<li>
|
||||
<b><%= t('announcement.postdate') %></b>
|
||||
<%= @bulletin.postdate %>
|
||||
</li>
|
||||
<li>
|
||||
<b><%= t('announcement.title') %></b>
|
||||
<%= @bulletin.title[I18n.locale] %>
|
||||
</li>
|
||||
<li>
|
||||
<%#= 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 %>
|
||||
</li>
|
||||
<li>
|
||||
<b><%= t('announcement.subtitle') %></b>
|
||||
<%= @bulletin.subtitle[I18n.locale].html_safe %>
|
||||
</li>
|
||||
<li>
|
||||
<b><%= t('announcement.text') %></b>
|
||||
<%= @bulletin.text[I18n.locale].html_safe %>
|
||||
</li>
|
||||
<li>
|
||||
<li>
|
||||
<b><%= t('announcement.link') %></b>
|
||||
<% @bulletin.bulletin_links.each do | blink | %>
|
||||
<%= link_to blink.name, blink.url, :target => '_blank' %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
<b><%= t('announcement.file') %></b>
|
||||
<% @bulletin.bulletin_files.each do | bfile | %>
|
||||
<%= link_to bfile.filetitle, bfile.file.url, {:target => '_blank', :title => bfile.description} if bfile.file.file %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
<b><%= t('announcement.張貼者') %></b>
|
||||
<%= User.find(@bulletin.create_user_id).name %>
|
||||
</li>
|
||||
<li>
|
||||
<b><%= t('announcement.最後修改時間') %></b>
|
||||
<%= @bulletin.updated_at.strftime("%Y-%m-%d %H:%I:%S") %>
|
||||
</li>
|
||||
-->
|
||||
|
||||
<%#= link_back %>
|
||||
Vendored
+3
-1
@@ -13,7 +13,9 @@ class Panel::News::FrontEnd::NewsBulletinsController < OrbitWidgetController
|
||||
if !params[:category_id].blank?
|
||||
@news_bulletins = NewsBulletin.can_display.where(:news_bulletin_category_id => params[:category_id]).any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page]).per(10)
|
||||
elsif !params[:tag_id].blank?
|
||||
@news_bulletins = NewsTag.find(params[:tag_id]).news_bulletins.can_display.any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page]).per(10)
|
||||
tmp = NewsTag.find(params[:tag_id]) rescue nil
|
||||
tmp = NewsTag.where(key: params[:tag_id])[0] unless tmp
|
||||
@news_bulletins = tmp.news_bulletins.can_display.any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page]).per(10) rescue nil
|
||||
else
|
||||
@news_bulletins = NewsBulletin.can_display.any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page]).per(10)
|
||||
end
|
||||
|
||||
+17
-18
@@ -8,25 +8,24 @@
|
||||
<h1 class="h1"><%= t('news.list_news') %></h1>
|
||||
<% end %>
|
||||
|
||||
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th><%= t('news.news_bulletin.category') %></th>
|
||||
<th><%= t('news.news_bulletin.title') %></th>
|
||||
<th><%= t('news.news_bulletin.postdate') %></th>
|
||||
</tr>
|
||||
|
||||
<% @news_bulletins.each do |post| %>
|
||||
<tr>
|
||||
<td><%= post.news_bulletin_category.i18n_variable[I18n.locale] %></td>
|
||||
<td><%= link_to post.title[I18n.locale], panel_news_front_end_news_bulletin_path(post) %>
|
||||
<%#= link_to post.title, panel_news_back_end_news_bulletin_path(post) %>
|
||||
</td>
|
||||
<td><%= post.postdate %></td>
|
||||
</tr>
|
||||
|
||||
<% end %>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><%= t('news.news_bulletin.image') %></th>
|
||||
<th><%= t('news.news_bulletin.title') %></th>
|
||||
<th><%= t('news.news_bulletin.postdate') %></th>
|
||||
</tr>
|
||||
<% @news_bulletins.each do |post| %>
|
||||
<tr>
|
||||
<td><%= image_tag post.image %></td>
|
||||
<td>
|
||||
<%= link_to post.title[I18n.locale], panel_news_front_end_news_bulletin_path(post) %>
|
||||
<%= post.subtitle[I18n.locale].html_safe %>
|
||||
</td>
|
||||
<td><%= post.postdate %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<%= paginate @news_bulletins, :params => {:inner => 'false'} %>
|
||||
|
||||
+15
-52
@@ -14,58 +14,21 @@
|
||||
<div class="news_paragraph">
|
||||
<%= @news_bulletin.text[I18n.locale].html_safe %>
|
||||
</div>
|
||||
|
||||
<% if @news_bulletin.news_bulletin_links.size > 0 %>
|
||||
<b><%= t('announcement.link') %></b>
|
||||
<% @news_bulletin.news_bulletin_links.each do | blink | %>
|
||||
<%= link_to blink.i18n_variable[I18n.locale], blink.url, :target => '_blank' %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if @news_bulletin.news_bulletin_files.size > 0 %>
|
||||
<b><%= t('announcement.file') %></b>
|
||||
<% @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 %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<div class="fb">
|
||||
<iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.nccu.edu.tw&send=false&layout=standard&width=450&show_faces=false&action=like&colorscheme=light&font&height=35&appId=263319013700607" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true"></iframe>
|
||||
</div>
|
||||
<!--
|
||||
<p id="notice"><%= flash_messages %></p>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<b><%= t('news.category') %></b>
|
||||
<%= @news_bulletin.news_bulletin_category.i18n_variable[I18n.locale] %>
|
||||
</li>
|
||||
<li>
|
||||
<b><%= t('news.postdate') %></b>
|
||||
<%= @news_bulletin.postdate %>
|
||||
</li>
|
||||
<li>
|
||||
<b><%= t('news.title') %></b>
|
||||
<%= @news_bulletin.title[I18n.locale] %>
|
||||
</li>
|
||||
<li>
|
||||
<%#= image_tag(@news_bulletin.image.url, :size => "320x240") if @news_bulletin.image.file %>
|
||||
<%= link_to image_tag(@news_bulletin.image.url, :size => "320x240"), @news_bulletin.image.url, {:target => '_blank', :title => @news_bulletin.image_identifier} if @news_bulletin.image.file %>
|
||||
</li>
|
||||
<li>
|
||||
<b><%= t('news.subtitle') %></b>
|
||||
<%= @news_bulletin.subtitle[I18n.locale].html_safe %>
|
||||
</li>
|
||||
<li>
|
||||
<b><%= t('news.text') %></b>
|
||||
<%= @news_bulletin.text[I18n.locale].html_safe %>
|
||||
</li>
|
||||
<li>
|
||||
<li>
|
||||
<b><%= t('news.link') %></b>
|
||||
<% @news_bulletin.news_bulletin_links.each do | blink | %>
|
||||
<%= link_to blink.name, blink.url, :target => '_blank' %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
<b><%= t('news.file') %></b>
|
||||
<% @news_bulletin.news_bulletin_files.each do | bfile | %>
|
||||
<%= link_to bfile.filetitle, bfile.file.url, {:target => '_blank', :title => bfile.description} if bfile.file.file %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
<b><%= t('news.張貼者') %></b>
|
||||
<%= User.find(@news_bulletin.create_user_id).name %>
|
||||
</li>
|
||||
<li>
|
||||
<b><%= t('news.最後修改時間') %></b>
|
||||
<%= @news_bulletin.updated_at.strftime("%Y-%m-%d %H:%I:%S") %>
|
||||
</li>
|
||||
-->
|
||||
|
||||
<%#= link_back %>
|
||||
Reference in new issue
Block a user