diff --git a/lib/tasks/migrate.rake b/lib/tasks/migrate.rake index b8858ad82..485db8c86 100644 --- a/lib/tasks/migrate.rake +++ b/lib/tasks/migrate.rake @@ -78,6 +78,69 @@ namespace :migrate do end p 'End UnitListForAnc' + p '=====================================================' + p '=====================================================' + + p 'Start NewsBulletin' + news_bulletins = NewsBulletin.admin_manager_all + i = 1 + news_bulletins.each do |news_bulletin| + p "#{i}/#{news_bulletins.size} - #{news_bulletin.id}" + title = I18nVariable.first(:conditions => {:key => 'title', :language_value_id => news_bulletin.id, :language_value_type => news_bulletin.class}) + news_bulletin.title_translations = {'en' => title['en'], 'zh_tw' => title['zh_tw']} if title + subtitle = I18nVariable.first(:conditions => {:key => 'subtitle', :language_value_id => news_bulletin.id, :language_value_type => news_bulletin.class}) + news_bulletin.subtitle_translations = {'en' => subtitle['en'], 'zh_tw' => subtitle['zh_tw']} if subtitle + text = I18nVariable.first(:conditions => {:key => 'text', :language_value_id => news_bulletin.id, :language_value_type => news_bulletin.class}) + news_bulletin.text_translations = {'en' => text['en'], 'zh_tw' => text['zh_tw']} if text + news_bulletin.save(:validate => false) + i += 1 + end + p 'End NewsBulletin' + + p '=====================================================' + + p 'Start NewsBulletinCategory' + categories = NewsBulletinCategory.admin_manager_all + i = 1 + categories.each do |category| + p "#{i}/#{categories.size} - #{category.id}" + title = I18nVariable.first(:conditions => {:language_value_id => category.id, :language_value_type => category.class}) + category.title_translations = {'en' => title['en'], 'zh_tw' => title['zh_tw']} if title + category.save(:validate => false) + i += 1 + end + p 'End NewsBulletinCategory' + + p '=====================================================' + + p 'Start NewsBulletinFile' + files = NewsBulletinFile.all + i = 1 + files.each do |file| + p "#{i}/#{files.size} - #{file.id}" + description = I18nVariable.first(:conditions => {:language_value_id => file.id, :language_value_type => file.class}) + file.description_translations = {'en' => description['en'], 'zh_tw' => description['zh_tw']} if description + title = I18nVariable.first(:conditions => {:language_value_id => file.id, :language_value_type => file.class}) + file.title_translations = {'en' => title['en'], 'zh_tw' => title['zh_tw']} if title + file.save(:validate => false) + i += 1 + end + p 'End NewsBulletinFile' + + p '=====================================================' + + p 'Start NewsBulletinLink' + links = NewsBulletinLink.all + i = 1 + links.each do |link| + p "#{i}/#{links.size} - #{link.id}" + title = I18nVariable.first(:conditions => {:language_value_id => link.id, :language_value_type => link.class}) + link.title_translations = {'en' => title['en'], 'zh_tw' => title['zh_tw']} if title + link.save(:validate => false) + i += 1 + end + p 'End NewsBulletinLink' + end end diff --git a/vendor/built_in_modules/news/app/controllers/panel/news/back_end/news_approvals_controller.rb b/vendor/built_in_modules/news/app/controllers/panel/news/back_end/news_approvals_controller.rb index cc45309a5..0c946ca30 100644 --- a/vendor/built_in_modules/news/app/controllers/panel/news/back_end/news_approvals_controller.rb +++ b/vendor/built_in_modules/news/app/controllers/panel/news/back_end/news_approvals_controller.rb @@ -26,7 +26,7 @@ class Panel::News::BackEnd::NewsApprovalsController < OrbitBackendController def setting @sys_users = User.all(conditions: {admin: false}).includes(:avatar) @news_bulletin_categorys = NewsBulletinCategory.all - @options_from_collection_for_select_news_bulletin_categorys = @news_bulletin_categorys.collect{|bc| [bc.i18n_variable[I18n.locale],bc.id] } + @options_from_collection_for_select_news_bulletin_categorys = @news_bulletin_categorys.collect{|bc| [bc.title,bc.id] } if params.has_key? :news_category @news_bulletin_categorys = NewsBulletinCategory.find params[:news_category][:id] else diff --git a/vendor/built_in_modules/news/app/helpers/panel/news/back_end/news_bulletins_helper.rb b/vendor/built_in_modules/news/app/helpers/panel/news/back_end/news_bulletins_helper.rb index d8342f74c..bb64dbc79 100644 --- a/vendor/built_in_modules/news/app/helpers/panel/news/back_end/news_bulletins_helper.rb +++ b/vendor/built_in_modules/news/app/helpers/panel/news/back_end/news_bulletins_helper.rb @@ -14,9 +14,9 @@ module Panel::News::BackEnd::NewsBulletinsHelper def show_news_bulletin_title_at_index (news_bulletin) if news_bulletin.is_checked? - link_to news_bulletin.title[I18n.locale], panel_news_front_end_news_bulletin_path(news_bulletin, :category_id => news_bulletin.news_bulletin_category.id) rescue '' + link_to news_bulletin.title, panel_news_front_end_news_bulletin_path(news_bulletin, :category_id => news_bulletin.news_bulletin_category.id) rescue '' else - news_bulletin.title[I18n.locale] + news_bulletin.title end end diff --git a/vendor/built_in_modules/news/app/models/news_bulletin.rb b/vendor/built_in_modules/news/app/models/news_bulletin.rb index dbcd215c0..a724ba0e5 100644 --- a/vendor/built_in_modules/news/app/models/news_bulletin.rb +++ b/vendor/built_in_modules/news/app/models/news_bulletin.rb @@ -18,9 +18,9 @@ class NewsBulletin is_impressionable :counter_cache => { :column_name => :view_count } - has_one :title, :class_name => "I18nVariable", :as => :language_value, :autosave => true, :dependent => :destroy - has_one :subtitle, :class_name => "I18nVariable", :as => :language_value, :autosave => true, :dependent => :destroy - has_one :text, :class_name => "I18nVariable", :as => :language_value, :autosave => true, :dependent => :destroy + field :title, localize: true + field :subtitle, localize: true + field :text, localize: true has_and_belongs_to_many :tags, :class_name => "NewsTag" field :postdate , :type => DateTime @@ -59,7 +59,7 @@ class NewsBulletin validates_presence_of :title - before_save :set_key, :update_status + before_save :update_status after_save :save_news_bulletin_links after_save :save_news_bulletin_files @@ -182,19 +182,6 @@ class NewsBulletin end end end - - - def title - @title ||= I18nVariable.first(:conditions => {:key => 'title', :language_value_id => self.id, :language_value_type => self.class}) rescue nil - end - - def subtitle - @subtitle ||= I18nVariable.first(:conditions => {:key => 'subtitle', :language_value_id => self.id, :language_value_type => self.class}) rescue nil - end - - def text - @text ||= I18nVariable.first(:conditions => {:key => 'text', :language_value_id => self.id, :language_value_type => self.class}) rescue nil - end def self.filter(news_bulletins) news_bulletins.each do |news_bulletin| @@ -208,18 +195,6 @@ class NewsBulletin end protected - - def set_key - if title && title.new_record? - title.key = 'title' - end - if subtitle && subtitle.new_record? - subtitle.key = 'subtitle' - end - if text && text.new_record? - text.key = 'text' - end - end def update_status if !self.is_pending diff --git a/vendor/built_in_modules/news/app/models/news_bulletin_category.rb b/vendor/built_in_modules/news/app/models/news_bulletin_category.rb index 79443f825..8d433d965 100644 --- a/vendor/built_in_modules/news/app/models/news_bulletin_category.rb +++ b/vendor/built_in_modules/news/app/models/news_bulletin_category.rb @@ -16,11 +16,11 @@ class NewsBulletinCategory field :key field :display - has_one :i18n_variable, :as => :language_value, :autosave => true, :dependent => :destroy + field :title, localize: true has_many :news_bulletins def pp_object - i18n_variable[I18n.locale] + title end def self.from_id(id) diff --git a/vendor/built_in_modules/news/app/models/news_bulletin_file.rb b/vendor/built_in_modules/news/app/models/news_bulletin_file.rb index 40495cb47..882d96cb9 100644 --- a/vendor/built_in_modules/news/app/models/news_bulletin_file.rb +++ b/vendor/built_in_modules/news/app/models/news_bulletin_file.rb @@ -5,36 +5,13 @@ class NewsBulletinFile mount_uploader :file, AssetUploader - # field :filetitle - # field :description - has_one :filetitle, :class_name => "I18nVariable", :as => :language_value, :autosave => true, :dependent => :destroy - has_one :description, :class_name => "I18nVariable", :as => :language_value, :autosave => true, :dependent => :destroy + field :title, localize: true + field :description, localize: true # field :to_save, :type => Boolean field :should_destroy, :type => Boolean belongs_to :news_bulletin # embedded_in :news_bulletin - - before_save :set_key - - def filetitle - @filetitle ||= I18nVariable.first(:conditions => {:key => 'filetitle', :language_value_id => self.id, :language_value_type => self.class}) rescue nil - end - - def description - @description ||= I18nVariable.first(:conditions => {:key => 'description', :language_value_id => self.id, :language_value_type => self.class}) rescue nil - end - - protected - - def set_key - if filetitle && filetitle.new_record? - filetitle.key = 'filetitle' - end - if description && description.new_record? - description.key = 'description' - end - end end diff --git a/vendor/built_in_modules/news/app/models/news_bulletin_link.rb b/vendor/built_in_modules/news/app/models/news_bulletin_link.rb index 2e56c23c2..0a793d275 100644 --- a/vendor/built_in_modules/news/app/models/news_bulletin_link.rb +++ b/vendor/built_in_modules/news/app/models/news_bulletin_link.rb @@ -4,12 +4,9 @@ class NewsBulletinLink include Mongoid::Timestamps field :url - # field :name - - has_one :i18n_variable, :as => :language_value, :autosave => true, :dependent => :destroy + field :title, localize: true field :should_destroy, :type => Boolean - # embedded_in :news_bulletin belongs_to :news_bulletin end diff --git a/vendor/built_in_modules/news/app/models/news_tag.rb b/vendor/built_in_modules/news/app/models/news_tag.rb index 5005f6179..005bd438a 100644 --- a/vendor/built_in_modules/news/app/models/news_tag.rb +++ b/vendor/built_in_modules/news/app/models/news_tag.rb @@ -3,7 +3,7 @@ class NewsTag < Tag has_and_belongs_to_many :news_bulletins - def get_visible_news_bulletins(sort = :name) + def get_visible_news_bulletins(sort = :title) date_now = Time.now self.news_bulletins.where(:is_hidden => false).any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc(:is_top, sort) end diff --git a/vendor/built_in_modules/news/app/views/panel/news/back_end/fact_checks/setting.html.erb b/vendor/built_in_modules/news/app/views/panel/news/back_end/fact_checks/setting.html.erb index aa7949f9e..53320355a 100644 --- a/vendor/built_in_modules/news/app/views/panel/news/back_end/fact_checks/setting.html.erb +++ b/vendor/built_in_modules/news/app/views/panel/news/back_end/fact_checks/setting.html.erb @@ -2,14 +2,9 @@ <%= stylesheet_link_tag "inc/permission-checkbox" %> <% end %> <% content_for :page_specific_javascript do %> -<<<<<<< HEAD <%= javascript_include_tag "bootstrap" %> - <%#= javascript_include_tag "inc/permission-checkbox" %> - <%#= javascript_include_tag "inc/search" %> -======= <%= javascript_include_tag "inc/permission-checkbox" %> <%= javascript_include_tag "inc/search" %> ->>>>>>> 291d5e3a03ba7da62ceb5e3b18012f0c9198dfba <% end %> <%#= label_tag :fact_check_setting, t("news.news_bulletin.fact_check_setting") %> <%= form_tag('', :remote => true) %> diff --git a/vendor/built_in_modules/news/app/views/panel/news/back_end/news_approvals/_list_table.html.erb.can_del b/vendor/built_in_modules/news/app/views/panel/news/back_end/news_approvals/_list_table.html.erb.can_del deleted file mode 100644 index 0149988fb..000000000 --- a/vendor/built_in_modules/news/app/views/panel/news/back_end/news_approvals/_list_table.html.erb.can_del +++ /dev/null @@ -1,15 +0,0 @@ -

<%= news_bulletin_category.key %>

- - - - - - - - - - -<% news_bulletin_category.news_bulletins.each do |post| %> - <%= render :partial => 'panel/news/back_end/news_bulletins/news_bulletins', :locals => {:post => post,:approval_allow=>true} %> -<% end %> -
<%= t('news_bulletin.status') %><%= t('news_bulletin.category') %><%= t('news_bulletin.title') %><%= t('news_bulletin.postdate') %><%= t('news_bulletin.deadline') %><%= t('news_bulletin.action') %>
\ No newline at end of file diff --git a/vendor/built_in_modules/news/app/views/panel/news/back_end/news_approvals/index.html.erb.can_del b/vendor/built_in_modules/news/app/views/panel/news/back_end/news_approvals/index.html.erb.can_del deleted file mode 100644 index f16f6c93a..000000000 --- a/vendor/built_in_modules/news/app/views/panel/news/back_end/news_approvals/index.html.erb.can_del +++ /dev/null @@ -1,50 +0,0 @@ -<%= render 'panel/news/back_end/news_bulletins/filter' %> - - <%= render 'panel/news/back_end/news_bulletins/news_bulletins' %> -
-
- <%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('admin.add'), new_panel_news_back_end_news_bulletin_path, :class => 'btn btn-primary' %> -
- - \ No newline at end of file diff --git a/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletin_categorys/_form.html.erb b/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletin_categorys/_form.html.erb index 02f071d94..c7860c0ce 100644 --- a/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletin_categorys/_form.html.erb +++ b/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletin_categorys/_form.html.erb @@ -10,12 +10,12 @@
- <%= f.fields_for :i18n_variable, (@news_bulletin_category.new_record? ? @news_bulletin_category.build_i18n_variable : @news_bulletin_category.i18n_variable) do |f| %> + <%= f.fields_for :title_translations do |f| %> <% @site_valid_locales.each do |locale| %>
<%= label_tag "name-#{locale}", "Name-#{I18nVariable.from_locale(locale)}", :class => 'control-label' %>
- <%= f.text_field locale, :class => 'input-xxlarge' %> + <%= f.text_field locale, :class => 'input-xxlarge', :value => (@news_bulletin_category.title_translations[locale] rescue nil) %>
<% end %> diff --git a/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletin_categorys/_news_bulletin_category.html.erb b/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletin_categorys/_news_bulletin_category.html.erb index 4c231c31a..15a09fd68 100644 --- a/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletin_categorys/_news_bulletin_category.html.erb +++ b/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletin_categorys/_news_bulletin_category.html.erb @@ -15,6 +15,6 @@
<% @site_valid_locales.each do |locale| %> - <%= news_bulletin_category.i18n_variable[locale] rescue nil %> + <%= news_bulletin_category.title_translations[locale] rescue nil %> <% end %> diff --git a/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletin_categorys/_quick_edit_qe.html.erb b/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletin_categorys/_quick_edit_qe.html.erb index d59e55b7c..005ae64e6 100644 --- a/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletin_categorys/_quick_edit_qe.html.erb +++ b/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletin_categorys/_quick_edit_qe.html.erb @@ -7,12 +7,12 @@ <%= f.text_field :key %>
- <%= f.fields_for :i18n_variable, news_bulletin_category.i18n_variable do |f| %> + <%= f.fields_for :title_translations do |f| %> <% @site_valid_locales.each do |locale| %>
<%= label_tag "title-#{locale}", "Title-#{I18nVariable.from_locale(locale)}", :class => 'control-label' %>
- <%= f.text_field locale, :class => 'input-xxlarge' %> + <%= f.text_field locale, :class => 'input-xxlarge', :value => (news_bulletin_category.title_translations[locale] rescue nil) %>
<% end %> diff --git a/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_file.html.erb b/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_file.html.erb index 9e0943ed0..8346402b9 100644 --- a/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_file.html.erb +++ b/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_file.html.erb @@ -11,7 +11,7 @@ <%= f.file_field :file %> <%= f.label :file_title %> - <%= f.text_field :filetitle %> + <%= f.text_field :title %> <%= f.label :file_description %> <%= f.text_field :description %> diff --git a/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_filter_categories.html.erb b/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_filter_categories.html.erb index eb301ec06..d8d49a9ee 100644 --- a/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_filter_categories.html.erb +++ b/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_filter_categories.html.erb @@ -1,6 +1,6 @@
<% @news_bulletin_categories.each do |category| -%> - <%= link_to category.i18n_variable[I18n.locale], panel_news_back_end_news_bulletins_path(:filter => @filter, :new_filter => {:type => 'categories', :id => category.id}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('categories', category.id)}" %> + <%= link_to category.title, panel_news_back_end_news_bulletins_path(:filter => @filter, :new_filter => {:type => 'categories', :id => category.id}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('categories', category.id)}" %> <% end -%>
<%= render :partial => 'clear_filters', :locals => {:type => 'categories'} %> \ No newline at end of file diff --git a/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_form.html.erb b/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_form.html.erb index f3d1753b8..52b9f662b 100644 --- a/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_form.html.erb +++ b/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_form.html.erb @@ -119,10 +119,10 @@
<%= f.label :unit_list_for_anc,t('news.news_bulletin.unit_name')%> - <%= f.select :unit_list_for_anc_id,@unit_list_for_anc.collect{|t| [ t.title[I18n.locale], t.id ]}, {:prompt => t("news.news_bulletin.ut_prompt")}, :class => "input-medium" %> + <%= f.select :unit_list_for_anc_id,@unit_list_for_anc.collect{|t| [ t.title, t.id ]}, {:prompt => t("news.news_bulletin.ut_prompt")}, :class => "input-medium" %> <%= f.label :category,t('news.news_bulletin.category') %> - <%= f.select :news_bulletin_category_id, @news_bulletin_categorys.collect{|t| [ t.i18n_variable[I18n.locale], t.id ]}, {}, :class => "input-medium" %> + <%= f.select :news_bulletin_category_id, @news_bulletin_categorys.collect{|t| [ t.title, t.id ]}, {}, :class => "input-medium" %>
- <%= f.fields_for :i18n_variable, (@news_bulletin_link.new_record? ? @news_bulletin_link.build_i18n_variable : @news_bulletin_link.i18n_variable) do |f| %> + <%= f.fields_for :title_translations do |f| %> <% @site_valid_locales.each do |locale| %>
<%= label_tag "link-#{locale}", "Name-#{I18nVariable.from_locale(locale)}", :class => 'control-label' %>
<%#= f.text_field locale, :class => 'input-xxlarge' %> - <%= f.text_field locale %> + <%= f.text_field locale, :value => (@news_bulletin_link.title_translations[locale] rescue nil) %>
<% end %> diff --git a/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_quick_edit_basic.html.erb b/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_quick_edit_basic.html.erb index 84d4eb277..9b9ca2545 100644 --- a/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_quick_edit_basic.html.erb +++ b/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_quick_edit_basic.html.erb @@ -3,18 +3,18 @@
- <%= f.select :news_bulletin_category_id, @news_bulletin_categories.collect {|t| [ t.i18n_variable[I18n.locale], t.id ]}, {}, :class => 'input-large' %> + <%= f.select :news_bulletin_category_id, @news_bulletin_categories.collect {|t| [ t.title, t.id ]}, {}, :class => 'input-large' %>
- <%= f.fields_for :title, news_bulletin.title do |f| %> + <%= f.fields_for :title_translations do |f| %> <% @site_valid_locales.each do |locale| %>
<%= label_tag "title-#{locale}", "Title-#{I18nVariable.from_locale(locale)}", :class => 'control-label' %>
- <%= f.text_field locale, :class => 'input-xxlarge' %> + <%= f.text_field locale, :class => 'input-xxlarge', :value => (news_bulletin.title_translations[locale] rescue nil) %>
<% end %> diff --git a/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/show.html.erb b/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/show.html.erb index ce64e41fa..5d2b4dcbf 100644 --- a/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/show.html.erb +++ b/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/show.html.erb @@ -1,7 +1,7 @@
diff --git a/vendor/built_in_modules/news/app/views/panel/news/widget/news_bulletins/_index.html.erb b/vendor/built_in_modules/news/app/views/panel/news/widget/news_bulletins/_index.html.erb index 4eab719a0..205c28285 100644 --- a/vendor/built_in_modules/news/app/views/panel/news/widget/news_bulletins/_index.html.erb +++ b/vendor/built_in_modules/news/app/views/panel/news/widget/news_bulletins/_index.html.erb @@ -15,8 +15,8 @@ <%= image_tag post.image %> - <%= link_to post.title[I18n.locale], panel_news_front_end_news_bulletin_path(post), :class => 'news_title' %> - <%= post.subtitle[I18n.locale].html_safe %> + <%= link_to post.title, panel_news_front_end_news_bulletin_path(post), :class => 'news_title' %> + <%= post.subtitle.html_safe %> <%= display_date(post.postdate) %> diff --git a/vendor/built_in_modules/news/app/views/panel/news/widget/news_bulletins/_news_bulletins.html.erb b/vendor/built_in_modules/news/app/views/panel/news/widget/news_bulletins/_news_bulletins.html.erb index be0c140fc..d677c6202 100644 --- a/vendor/built_in_modules/news/app/views/panel/news/widget/news_bulletins/_news_bulletins.html.erb +++ b/vendor/built_in_modules/news/app/views/panel/news/widget/news_bulletins/_news_bulletins.html.erb @@ -1,6 +1,6 @@ <% @news_bulletins.each do |news_bulletin| %>
  • - <%= link_to news_bulletin.title[I18n.locale], panel_news_front_end_news_bulletin_path(news_bulletin, :category_id => news_bulletin.news_bulletin_category_id) %> + <%= link_to news_bulletin.title, panel_news_front_end_news_bulletin_path(news_bulletin, :category_id => news_bulletin.news_bulletin_category_id) %>
  • <% end %> diff --git a/vendor/built_in_modules/news/app/views/panel/news/widget/news_bulletins/_web_links.html.erb b/vendor/built_in_modules/news/app/views/panel/news/widget/news_bulletins/_web_links.html.erb index a88334066..2a888b6e5 100644 --- a/vendor/built_in_modules/news/app/views/panel/news/widget/news_bulletins/_web_links.html.erb +++ b/vendor/built_in_modules/news/app/views/panel/news/widget/news_bulletins/_web_links.html.erb @@ -1,6 +1,6 @@ <% @web_links.each do |web_link| %>
  • - <%= link_to web_link.name[I18n.locale], web_link.url %> + <%= link_to web_link.title, web_link.url %>
  • <% end %> diff --git a/vendor/built_in_modules/news/app/views/panel/news/widget/news_bulletins/home_banner.html.erb b/vendor/built_in_modules/news/app/views/panel/news/widget/news_bulletins/home_banner.html.erb index fb6c0452e..db6fe07ea 100644 --- a/vendor/built_in_modules/news/app/views/panel/news/widget/news_bulletins/home_banner.html.erb +++ b/vendor/built_in_modules/news/app/views/panel/news/widget/news_bulletins/home_banner.html.erb @@ -9,7 +9,7 @@ @@ -20,8 +20,8 @@ <% @news_bulletins.each do |post| %>
  • <%= image_tag(post.image.url, :size => "290x130") if post.image.file %>
    -

    <%= link_to post.title[I18n.locale], panel_news_front_end_news_bulletin_path(post, :category_id => post.news_bulletin_category_id) %>

    -

    <%= post.subtitle[I18n.locale].html_safe %>

    +

    <%= link_to post.title, panel_news_front_end_news_bulletin_path(post, :category_id => post.news_bulletin_category_id) %>

    +

    <%= post.subtitle.html_safe %>

  • <% end %> diff --git a/vendor/built_in_modules/news/app/views/panel/news/widget/news_bulletins/news_bulletins_list.html.erb b/vendor/built_in_modules/news/app/views/panel/news/widget/news_bulletins/news_bulletins_list.html.erb index 9523fd9a5..588c34f08 100644 --- a/vendor/built_in_modules/news/app/views/panel/news/widget/news_bulletins/news_bulletins_list.html.erb +++ b/vendor/built_in_modules/news/app/views/panel/news/widget/news_bulletins/news_bulletins_list.html.erb @@ -17,7 +17,7 @@
    next
    diff --git a/vendor/built_in_modules/news/app/views/panel/news/widget/news_bulletins/news_bulletins_side_bar.html.erb b/vendor/built_in_modules/news/app/views/panel/news/widget/news_bulletins/news_bulletins_side_bar.html.erb index 5ea1a930c..69496365b 100644 --- a/vendor/built_in_modules/news/app/views/panel/news/widget/news_bulletins/news_bulletins_side_bar.html.erb +++ b/vendor/built_in_modules/news/app/views/panel/news/widget/news_bulletins/news_bulletins_side_bar.html.erb @@ -4,7 +4,7 @@