Changes for dat and time format
Impression bug when some i18n missing in impressionable object JS bug in ad_banner edit title
This commit is contained in:
1 parent
e1bd5d8c8d
commit
4d33c7a56d
24 files changed
+57
-46
No files matched your search
@@ -160,13 +160,13 @@ class Bulletin
|
||||
protected
|
||||
|
||||
def set_key
|
||||
if title.new_record?
|
||||
if title && title.new_record?
|
||||
title.key = 'title'
|
||||
end
|
||||
if subtitle.new_record?
|
||||
if subtitle && subtitle.new_record?
|
||||
subtitle.key = 'subtitle'
|
||||
end
|
||||
if text.new_record?
|
||||
if text && text.new_record?
|
||||
text.key = 'text'
|
||||
end
|
||||
end
|
||||
|
||||
@@ -29,10 +29,10 @@ class BulletinFile
|
||||
protected
|
||||
|
||||
def set_key
|
||||
if filetitle.new_record?
|
||||
if filetitle && filetitle.new_record?
|
||||
filetitle.key = 'filetitle'
|
||||
end
|
||||
if description.new_record?
|
||||
if description && description.new_record?
|
||||
description.key = 'description'
|
||||
end
|
||||
end
|
||||
|
||||
+2
-2
@@ -60,8 +60,8 @@
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td><%= bulletin.postdate %></td>
|
||||
<td><%= (bulletin.deadline) ? bulletin.deadline : t('bulletin.no_deadline') %></td>
|
||||
<td><%= display_date_time(bulletin.postdate) %></td>
|
||||
<td><%= (bulletin.deadline) ? display_date_time(bulletin.deadline ): t('bulletin.no_deadline') %></td>
|
||||
<td>
|
||||
<div class="label-group">
|
||||
<div class="label-td">
|
||||
|
||||
Vendored
+2
-2
@@ -5,7 +5,7 @@
|
||||
</li>
|
||||
<li>
|
||||
<b><%= t('announcement.postdate') %></b>
|
||||
<%= @bulletin.postdate %>
|
||||
<%= display_date_time(@bulletin.postdate) %>
|
||||
</li>
|
||||
<li>
|
||||
<b><%= t('announcement.title') %></b>
|
||||
@@ -42,7 +42,7 @@
|
||||
</li>
|
||||
<li>
|
||||
<b><%= t('announcement.最後修改時間') %></b>
|
||||
<%= @bulletin.updated_at %>
|
||||
<%= display_date(@bulletin.updated_at) %>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
vendor/built_in_modules/announcement/app/views/panel/announcement/front_end/bulletins/index.html.erb
Vendored
+1
-1
@@ -22,7 +22,7 @@
|
||||
<td><%= link_to post.title[I18n.locale], panel_announcement_front_end_bulletin_path(post, :category_id => post.bulletin_category_id) %>
|
||||
<%#= link_to post.title, panel_announcement_back_end_bulletin_path(post) %>
|
||||
</td>
|
||||
<td><%= post.postdate %></td>
|
||||
<td><%= display_date_time(post.postdate) %></td>
|
||||
</tr>
|
||||
|
||||
<% end %>
|
||||
|
||||
Vendored
+5
-4
@@ -2,10 +2,11 @@
|
||||
<h1 class="h1"><%= @bulletin.title[I18n.locale] %></h1>
|
||||
<div class="info">
|
||||
<div class="info1">
|
||||
<span class="date"><%= @bulletin.postdate %></span>
|
||||
|
|
||||
<a href="" class="unit"><%= User.find(@bulletin.create_user_id).sub_roles.collect{|t| t.key}.join(" ") rescue '' %></a>
|
||||
<span><%= dislpay_view_count(@bulletin) %></span>
|
||||
<span class="pull-right"><%= dislpay_view_count(@bulletin) %></span>
|
||||
<span class="date"><%= display_date_time(@bulletin.postdate) %></span>
|
||||
<% unit = User.find(@bulletin.create_user_id).sub_roles.collect{|t| t.key}.join(" ") rescue nil %>
|
||||
<%= " | " if unit %>
|
||||
<a href="" class="unit"><%= unit %></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="news_image">
|
||||
|
||||
Vendored
+1
-1
@@ -15,7 +15,7 @@
|
||||
<td><%= post.bulletin_category.i18n_variable[I18n.locale] rescue nil %></td>
|
||||
<td><%= link_to post.title[I18n.locale], panel_announcement_front_end_bulletin_path(post, :category_id => post.bulletin_category_id) %>
|
||||
</td>
|
||||
<td><%= post.postdate %></td>
|
||||
<td><%= display_date_time(post.postdate) %></td>
|
||||
</tr>
|
||||
|
||||
<% end %>
|
||||
|
||||
@@ -160,13 +160,13 @@ class NewsBulletin
|
||||
protected
|
||||
|
||||
def set_key
|
||||
if title.new_record?
|
||||
if title && title.new_record?
|
||||
title.key = 'title'
|
||||
end
|
||||
if subtitle.new_record?
|
||||
if subtitle && subtitle.new_record?
|
||||
subtitle.key = 'subtitle'
|
||||
end
|
||||
if text.new_record?
|
||||
if text && text.new_record?
|
||||
text.key = 'text'
|
||||
end
|
||||
end
|
||||
|
||||
@@ -29,10 +29,10 @@ class NewsBulletinFile
|
||||
protected
|
||||
|
||||
def set_key
|
||||
if filetitle.new_record?
|
||||
if filetitle && filetitle.new_record?
|
||||
filetitle.key = 'filetitle'
|
||||
end
|
||||
if description.new_record?
|
||||
if description && description.new_record?
|
||||
description.key = 'description'
|
||||
end
|
||||
end
|
||||
|
||||
Vendored
+2
-2
@@ -61,8 +61,8 @@
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td><%= news_bulletin.postdate %></td>
|
||||
<td><%= (news_bulletin.deadline) ? news_bulletin.deadline : t('news_bulletin.no_deadline') %></td>
|
||||
<td><%= display_date(news_bulletin.postdate) %></td>
|
||||
<td><%= (news_bulletin.deadline) ? display_date(news_bulletin.deadline) : t('news_bulletin.no_deadline') %></td>
|
||||
<td>
|
||||
<div class="label-group">
|
||||
<div class="label-td">
|
||||
|
||||
+2
-2
@@ -5,7 +5,7 @@
|
||||
</li>
|
||||
<li>
|
||||
<b><%= t('news.postdate') %></b>
|
||||
<%= @news_bulletin.postdate %>
|
||||
<%= display_date(@news_bulletin.postdate) %>
|
||||
</li>
|
||||
<li>
|
||||
<b><%= t('news.title') %></b>
|
||||
@@ -42,7 +42,7 @@
|
||||
</li>
|
||||
<li>
|
||||
<b><%= t('news.最後修改時間') %></b>
|
||||
<%= @news_bulletin.updated_at %>
|
||||
<%= display_date(@news_bulletin.updated_at) %>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
<%= link_to post.title[I18n.locale], panel_news_front_end_news_bulletin_path(post), :class => 'news_title' %>
|
||||
<%= post.subtitle[I18n.locale].html_safe %>
|
||||
</td>
|
||||
<td><%= post.postdate %></td>
|
||||
<td><%= display_date(post.postdate) %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
|
||||
+4
-3
@@ -3,9 +3,10 @@
|
||||
<div class="info">
|
||||
<div class="info1">
|
||||
<span class="pull-right"><%= dislpay_view_count(@news_bulletin) %></span>
|
||||
<span class="date"><%= @news_bulletin.postdate %></span>
|
||||
|
|
||||
<a href="" class="unit"><%= @news_bulletin.unit_list_for_anc.title[I18n.locale] rescue '' %></a>
|
||||
<span class="date"><%= display_date(@news_bulletin.postdate) %></span>
|
||||
<% unit = @news_bulletin.unit_list_for_anc.title[I18n.locale] rescue nil %>
|
||||
<%= " | " if unit %>
|
||||
<a href="" class="unit"><%= unit %></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="news_image">
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@
|
||||
<%= link_to post.title[I18n.locale], panel_news_front_end_news_bulletin_path(post), :class => 'news_title' %>
|
||||
<%= post.subtitle[I18n.locale].html_safe %>
|
||||
</td>
|
||||
<td><%= post.postdate %></td>
|
||||
<td><%= display_date(post.postdate) %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
|
||||
+1
-1
@@ -18,6 +18,6 @@
|
||||
<%= link_to page_context.version, panel_page_content_back_end_view_path(page_context.page_id) %>
|
||||
<%end -%>
|
||||
</td>
|
||||
<td><%= page_context.updated_at.strftime("%Y-%m-%d %H:%I:%S") %></td>
|
||||
<td><%= display_date_time(page_context) %></td>
|
||||
<td><%= User.find(page_context.create_user_id).name %></td>
|
||||
</tr>
|
||||
+1
-1
@@ -10,6 +10,6 @@
|
||||
</div>
|
||||
</td>
|
||||
<td><%= view_page_context.version %></td>
|
||||
<td><%= view_page_context.updated_at.strftime("%Y-%m-%d %H:%I:%S") %></td>
|
||||
<td><%= display_date(view_page_context.updated_at) %></td>
|
||||
<td><%= User.find(view_page_context.create_user_id).name %></td>
|
||||
</tr>
|
||||
+1
-1
@@ -21,7 +21,7 @@
|
||||
</li>
|
||||
<li>
|
||||
<b><%= t('page_content.最後修改時間') %></b>
|
||||
<%= @page_context.updated_at.strftime("%Y-%m-%d %H:%I:%S") %>
|
||||
<%= display_date(@page_context.updated_at) %>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
@@ -69,10 +69,10 @@ class WebLink
|
||||
protected
|
||||
|
||||
def set_key
|
||||
if name.new_record?
|
||||
if name && name.new_record?
|
||||
name.key = 'name'
|
||||
end
|
||||
if context.new_record?
|
||||
if context && context.new_record?
|
||||
context.key = 'context'
|
||||
end
|
||||
end
|
||||
|
||||
Vendored
+2
-2
@@ -13,7 +13,7 @@
|
||||
</li>
|
||||
<li>
|
||||
<b><%= t('announcement.postdate') %></b>
|
||||
<%= @bulletin.postdate %>
|
||||
<%= display_date(@bulletin.postdate) %>
|
||||
</li>
|
||||
<li>
|
||||
<b><%= t('announcement.title') %></b>
|
||||
@@ -50,7 +50,7 @@
|
||||
</li>
|
||||
<li>
|
||||
<b><%= t('announcement.最後修改時間') %></b>
|
||||
<%= @bulletin.updated_at %>
|
||||
<%= display_date(@bulletin.updated_at) %>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
Vendored
+2
-2
@@ -13,7 +13,7 @@
|
||||
</li>
|
||||
<li>
|
||||
<b><%= t('announcement.postdate') %></b>
|
||||
<%= @bulletin.postdate %>
|
||||
<%= display_date(@bulletin.postdate) %>
|
||||
</li>
|
||||
<li>
|
||||
<b><%= t('announcement.title') %></b>
|
||||
@@ -50,7 +50,7 @@
|
||||
</li>
|
||||
<li>
|
||||
<b><%= t('announcement.最後修改時間') %></b>
|
||||
<%= @bulletin.updated_at.strftime("%Y-%m-%d %H:%I:%S") %>
|
||||
<%= display_date_time(@bulletin.updated_at) %>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
@@ -38,10 +38,11 @@ module Impressionist
|
||||
end
|
||||
|
||||
def update_impressionist_counter_cache
|
||||
cache_options = self.class.impressionist_counter_cache_options
|
||||
column_name = cache_options[:column_name].to_sym
|
||||
count = cache_options[:unique] ? impressionist_count(:filter => :ip_address) : impressionist_count
|
||||
update_attribute(column_name, count)
|
||||
# cache_options = self.class.impressionist_counter_cache_options
|
||||
# column_name = cache_options[:column_name].to_sym
|
||||
# count = cache_options[:unique] ? impressionist_count(:filter => :ip_address) : impressionist_count
|
||||
# update_attribute(column_name, count)
|
||||
update_attribute(column_name, self.send(cache_options[:column_name]) + 1)
|
||||
end
|
||||
|
||||
# OLD METHODS - DEPRECATE IN V0.5
|
||||
|
||||
Reference in new issue
Block a user