Merge branch 'master' of github.com:Rulingcom/NCCU
This commit is contained in:
commit
b2f28eabaf
16 files changed
+32
-16
No files matched your search
@@ -58,7 +58,7 @@ class Bulletin
|
||||
accepts_nested_attributes_for :bulletin_files, :allow_destroy => true
|
||||
accepts_nested_attributes_for :bulletin_links, :allow_destroy => true
|
||||
|
||||
validates :title, :presence => true
|
||||
validates :title, :at_least_one => true
|
||||
|
||||
before_save :check_deadline,:update_status,:update_avliable_language
|
||||
|
||||
|
||||
Vendored
+2
-2
@@ -17,11 +17,11 @@
|
||||
</li>
|
||||
<li>
|
||||
<b><%= t('announcement.subtitle') %></b>
|
||||
<%= @bulletin.subtitle.html_safe %>
|
||||
<%= @bulletin.subtitle.html_safe rescue '' %>
|
||||
</li>
|
||||
<li>
|
||||
<b><%= t('announcement.text') %></b>
|
||||
<%= @bulletin.text.html_safe %>
|
||||
<%= @bulletin.text.html_safe rescue '' %>
|
||||
</li>
|
||||
<li>
|
||||
<li>
|
||||
|
||||
Vendored
+1
-1
@@ -12,7 +12,7 @@
|
||||
<%= 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 %>
|
||||
<%= @bulletin.text.html_safe rescue '' %>
|
||||
</div>
|
||||
<div class="linkAndFile">
|
||||
<% if @bulletin.bulletin_links.size > 0 %>
|
||||
|
||||
@@ -59,7 +59,7 @@ class NewsBulletin
|
||||
accepts_nested_attributes_for :news_bulletin_files, :allow_destroy => true
|
||||
accepts_nested_attributes_for :news_bulletin_links, :allow_destroy => true
|
||||
|
||||
validates_presence_of :title
|
||||
validates :title, :at_least_one => true
|
||||
|
||||
before_save :update_status,:update_avliable_language
|
||||
|
||||
|
||||
+2
-2
@@ -17,11 +17,11 @@
|
||||
</li>
|
||||
<li>
|
||||
<b><%= t('news.subtitle') %></b>
|
||||
<%= @news_bulletin.subtitle.html_safe %>
|
||||
<%= @news_bulletin.subtitle.html_safe rescue '' %>
|
||||
</li>
|
||||
<li>
|
||||
<b><%= t('news.text') %></b>
|
||||
<%= @news_bulletin.text.html_safe %>
|
||||
<%= @news_bulletin.text.html_safe rescue '' %>
|
||||
</li>
|
||||
<li>
|
||||
<li>
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@
|
||||
<td><%= image_tag post.image rescue nil %></td>
|
||||
<td>
|
||||
<%= link_to post.title, panel_news_front_end_news_bulletin_path(post), :class => 'news_title' %>
|
||||
<%= post.subtitle.html_safe %>
|
||||
<%= post.subtitle.html_safe rescue '' %>
|
||||
</td>
|
||||
<td><%= display_date(post.postdate) %></td>
|
||||
</tr>
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
<%= 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 %>
|
||||
</div>
|
||||
<div class="news_paragraph">
|
||||
<%= @news_bulletin.text.html_safe %>
|
||||
<%= @news_bulletin.text.html_safe rescue '' %>
|
||||
</div>
|
||||
<div class="linkAndFile">
|
||||
<% if @news_bulletin.news_bulletin_links.size > 0 %>
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@
|
||||
<td><%= image_tag post.image %></td>
|
||||
<td>
|
||||
<%= link_to post.title, panel_news_front_end_news_bulletin_path(post), :class => 'news_title' %>
|
||||
<%= post.subtitle.html_safe %>
|
||||
<%= post.subtitle.html_safe rescue '' %>
|
||||
</td>
|
||||
<td><%= display_date(post.postdate) %></td>
|
||||
</tr>
|
||||
|
||||
Vendored
+1
-1
@@ -21,7 +21,7 @@
|
||||
<li>
|
||||
<div class="news_img"><%= image_tag(post.image.url, :size => "290x130") if post.image.file %></div>
|
||||
<h3 class="h3 news_title"><%= link_to post.title, panel_news_front_end_news_bulletin_path(post, :category_id => post.news_bulletin_category_id) %></h3>
|
||||
<p class="news_wrap"><%= post.subtitle.html_safe %></p>
|
||||
<p class="news_wrap"><%= post.subtitle.html_safe rescue '' %></p>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
</li>
|
||||
<li>
|
||||
<b><%= t('page_content.context') %></b>
|
||||
<%= @page_context.context.html_safe %>
|
||||
<%= @page_context.context.html_safe rescue '' %>
|
||||
</li>
|
||||
<li>
|
||||
<b><%= t('page_content.張貼者') %></b>
|
||||
|
||||
+2
-2
@@ -4,8 +4,8 @@
|
||||
<p id="notice"><%= flash_messages %></p>
|
||||
|
||||
<div class="view_count pull-right"><%= dislpay_view_count(@page_context) %></div>
|
||||
<h1 class="h1"><%= @page_context.page.title rescue nil %></h1>
|
||||
<h1 class="h1"><%= @page_context.page.title rescue '' %></h1>
|
||||
|
||||
<div class="page_content"><%= @page_context.context.html_safe rescue nil %></div>
|
||||
<div class="page_content"><%= @page_context.context.html_safe rescue '' %></div>
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ class WebLink
|
||||
|
||||
belongs_to :web_link_category
|
||||
|
||||
validates_presence_of :title
|
||||
validates :title, :at_least_one => true
|
||||
|
||||
def self.search( category_id = nil )
|
||||
|
||||
|
||||
Reference in new issue
Block a user