fix style error for show page and add setting for default field
This commit is contained in:
parent
c39be9a84a
commit
f2215be917
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
@ -455,6 +455,22 @@ class Admin::EventNewsController < OrbitAdminController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def custom_fields_title
|
||||||
|
@event_news_custom_titles = EventNewsCustomTitle.get_map
|
||||||
|
end
|
||||||
|
|
||||||
|
def update_custom_title
|
||||||
|
event_news_custom_title_params = params.require(:event_news_custom_title).permit!
|
||||||
|
event_news_custom_title_params.each do |k,event_news_custom_title_param|
|
||||||
|
EventNewsCustomTitle.find(event_news_custom_title_param['id']).update_attributes(event_news_custom_title_param)
|
||||||
|
end
|
||||||
|
Thread.new do
|
||||||
|
content = "UNICORN_PID=\"`fuser tmp/pids/unicorn.sock tmp/sockets/unicorn.sock tmp/unicorn.sock` `cat tmp/pids/unicorn.pid `\" && kill -s USR2 $UNICORN_PID ; n=20; while (kill -0 $UNICORN_PID > /dev/null 2>&1) && test $n -ge 0; do printf '.' && sleep 1 && n=$(( $n - 1 )); done ; if test $n -lt 0; then kill -s TERM $UNICORN_PID; sleep 3; bundle exec unicorn_rails -c config/unicorn.rb -D -E #{Rails.env}; else kill -s QUIT $UNICORN_PID; fi"
|
||||||
|
system(content)
|
||||||
|
end
|
||||||
|
redirect_to action: :index
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def load_settings
|
def load_settings
|
||||||
|
|
|
@ -68,11 +68,11 @@ class EventNewsController < ApplicationController
|
||||||
"extras" => {
|
"extras" => {
|
||||||
"widget-title" =>t('event_news.event_news'),
|
"widget-title" =>t('event_news.event_news'),
|
||||||
"title-head" => t('event_news.table.title'),
|
"title-head" => t('event_news.table.title'),
|
||||||
"speaker-head" => t('event_news.speaker'),
|
"speaker-head" => EventNewsCustomTitle.get_trans('speaker'),
|
||||||
"place-head" => t('event_news.place'),
|
"place-head" => EventNewsCustomTitle.get_trans('place'),
|
||||||
"host-head" => t('event_news.host'),
|
"host-head" => EventNewsCustomTitle.get_trans('host'),
|
||||||
"notes-head" => t('event_news.notes'),
|
"notes-head" => t('event_news.notes'),
|
||||||
"event_date-head" => t('date_'),
|
"event_date-head" => EventNewsCustomTitle.get_trans('event_date'),
|
||||||
"date-head" => t('event_news.table.date'),
|
"date-head" => t('event_news.table.date'),
|
||||||
"status-head" => t('event_news.table.status'),
|
"status-head" => t('event_news.table.status'),
|
||||||
"author-head" => t('event_news.table.author'),
|
"author-head" => t('event_news.table.author'),
|
||||||
|
@ -415,11 +415,11 @@ class EventNewsController < ApplicationController
|
||||||
"main_picture" => mp,
|
"main_picture" => mp,
|
||||||
"main_picture_description" => mpd,
|
"main_picture_description" => mpd,
|
||||||
"title-head" => t('event_news.table.title'),
|
"title-head" => t('event_news.table.title'),
|
||||||
"speaker-head" => t('event_news.speaker'),
|
"speaker-head" => EventNewsCustomTitle.get_trans('speaker'),
|
||||||
"place-head" => t('event_news.place'),
|
"place-head" => EventNewsCustomTitle.get_trans('place'),
|
||||||
"host-head" => t('event_news.host'),
|
"host-head" => EventNewsCustomTitle.get_trans('host'),
|
||||||
"notes-head" => t('event_news.notes'),
|
"notes-head" => t('event_news.notes'),
|
||||||
"event_date-head" => t('date_'),
|
"event_date-head" => EventNewsCustomTitle.get_trans('event_date'),
|
||||||
"date-head" => t('event_news.table.date'),
|
"date-head" => t('event_news.table.date'),
|
||||||
"author-head" => t('event_news.table.author'),
|
"author-head" => t('event_news.table.author'),
|
||||||
"status-head" => t('event_news.table.status'),
|
"status-head" => t('event_news.table.status'),
|
||||||
|
@ -561,10 +561,11 @@ class EventNewsController < ApplicationController
|
||||||
"event_news_links" => links,
|
"event_news_links" => links,
|
||||||
"event_carousel_images" => event_carousel_images,
|
"event_carousel_images" => event_carousel_images,
|
||||||
"data" => {
|
"data" => {
|
||||||
"speaker-head" => t('event_news.speaker'),
|
"speaker-head" => EventNewsCustomTitle.get_trans('speaker'),
|
||||||
"host-head" => t('event_news.host'),
|
"host-head" => EventNewsCustomTitle.get_trans('host'),
|
||||||
"notes-head" => t('event_news.notes'),
|
"notes-head" => t('event_news.notes'),
|
||||||
"speaker" => event_news.speaker,
|
"speaker" => event_news.speaker,
|
||||||
|
"speaker-css" => (event_news.speaker.blank? ? "display: none;" : "display: inline-block;"),
|
||||||
"host" => event_news.host,
|
"host" => event_news.host,
|
||||||
"notes" => event_news.notes,
|
"notes" => event_news.notes,
|
||||||
"title" => event_news.title,
|
"title" => event_news.title,
|
||||||
|
@ -583,7 +584,7 @@ class EventNewsController < ApplicationController
|
||||||
"next_btn_title" => next_btn_title,
|
"next_btn_title" => next_btn_title,
|
||||||
"carousel_display_style" => (event_carousel_images.count == 0 ? 'display: none' : "width: #{event_news.carousel_image_width};margin: auto;"),
|
"carousel_display_style" => (event_carousel_images.count == 0 ? 'display: none' : "width: #{event_news.carousel_image_width};margin: auto;"),
|
||||||
"carousel_count" => event_carousel_images.count,
|
"carousel_count" => event_carousel_images.count,
|
||||||
"place_text" => (event_news.place.present? rescue false) ? "#{I18n.t("event_news.place")}: #{event_news.place}" : ""
|
"place_text" => (event_news.place.present? rescue false) ? "#{EventNewsCustomTitle.get_trans("place")}: #{event_news.place}" : ""
|
||||||
},
|
},
|
||||||
"impressionist" => (event_news.is_preview ? nil : event_news),
|
"impressionist" => (event_news.is_preview ? nil : event_news),
|
||||||
"url_to_edit"=>url_to_edit
|
"url_to_edit"=>url_to_edit
|
||||||
|
@ -658,10 +659,10 @@ class EventNewsController < ApplicationController
|
||||||
"update_user" => update_user,
|
"update_user" => update_user,
|
||||||
"updated_at" => event_time,
|
"updated_at" => event_time,
|
||||||
"body" => event_news["text_translations"][locale],
|
"body" => event_news["text_translations"][locale],
|
||||||
"speaker-head" => t('event_news.speaker'),
|
"speaker-head" => EventNewsCustomTitle.get_trans('speaker'),
|
||||||
"host-head" => t('event_news.host'),
|
"host-head" => EventNewsCustomTitle.get_trans('host'),
|
||||||
"notes-head" => t('event_news.notes'),
|
"notes-head" => t('event_news.notes'),
|
||||||
"event_date-head" => t('date_'),
|
"event_date-head" => EventNewsCustomTitle.get_trans('event_date'),
|
||||||
"speaker" => (event_news["speaker_translations"][locale].to_s rescue ""),
|
"speaker" => (event_news["speaker_translations"][locale].to_s rescue ""),
|
||||||
"host" => (event_news["host_translations"][locale].to_s rescue ""),
|
"host" => (event_news["host_translations"][locale].to_s rescue ""),
|
||||||
"notes" => (event_news["notes_translations"][locale].to_s rescue ""),
|
"notes" => (event_news["notes_translations"][locale].to_s rescue ""),
|
||||||
|
@ -777,10 +778,10 @@ class EventNewsController < ApplicationController
|
||||||
"extras" => {
|
"extras" => {
|
||||||
"widget-title" =>t('event_news.event_news'),
|
"widget-title" =>t('event_news.event_news'),
|
||||||
"title-head" => t('event_news.table.title'),
|
"title-head" => t('event_news.table.title'),
|
||||||
"speaker-head" => t('event_news.speaker'),
|
"speaker-head" => EventNewsCustomTitle.get_trans('speaker'),
|
||||||
"host-head" => t('event_news.host'),
|
"host-head" => EventNewsCustomTitle.get_trans('host'),
|
||||||
"notes-head" => t('event_news.notes'),
|
"notes-head" => t('event_news.notes'),
|
||||||
"event_date-head" => t('date_'),
|
"event_date-head" => EventNewsCustomTitle.get_trans('event_date'),
|
||||||
"date-head" => t('event_news.table.date'),
|
"date-head" => t('event_news.table.date'),
|
||||||
"status-head" => t('event_news.table.status'),
|
"status-head" => t('event_news.table.status'),
|
||||||
"author-head" => t('event_news.table.author'),
|
"author-head" => t('event_news.table.author'),
|
||||||
|
|
|
@ -3,6 +3,84 @@ require "uri"
|
||||||
require 'json'
|
require 'json'
|
||||||
|
|
||||||
module Admin::EventNewsHelper
|
module Admin::EventNewsHelper
|
||||||
|
module FormHelper
|
||||||
|
extend self
|
||||||
|
extend ActionView::Helpers::FormTagHelper
|
||||||
|
extend ActionView::Helpers::FormOptionsHelper
|
||||||
|
extend ActionView::Helpers::DateHelper
|
||||||
|
extend ActionView::Helpers::TagHelper
|
||||||
|
extend ActionView::Helpers::RenderingHelper
|
||||||
|
extend ActionView::Context
|
||||||
|
extend OrbitBasis::RenderAnywhere
|
||||||
|
extend ActionView::Helpers::UrlHelper
|
||||||
|
extend OrbitFormHelper
|
||||||
|
extend Ckeditor::Helpers::FormHelper
|
||||||
|
def available_locales
|
||||||
|
@available_locales = @available_locales || Site.first.in_use_locales || I18n.available_locales
|
||||||
|
end
|
||||||
|
def set_input_name(input_name)
|
||||||
|
@input_name = input_name
|
||||||
|
end
|
||||||
|
|
||||||
|
def get_input_name
|
||||||
|
@input_name.to_s
|
||||||
|
end
|
||||||
|
def create_lang_panel(field)
|
||||||
|
tmp2 = content_tag(:div,:class => 'btn-group', :data=>{:toggle=>"buttons-radio"}) do
|
||||||
|
available_locales.collect do |key|
|
||||||
|
link_entry_ary = ["##{field}","_#{key}"]
|
||||||
|
link_entry = link_entry_ary.join
|
||||||
|
link_to(I18n.t(key),link_entry,:data=>{:toggle=>"tab"},:class=>"btn #{(key == I18n.locale ? "active" : nil)}",:for=>key)
|
||||||
|
end.join.html_safe
|
||||||
|
end
|
||||||
|
end
|
||||||
|
def multiple_lang_tag(index1,type_of_tag,field,value=nil,custom_options={},combine_element='',exteral_options={},sortable=false)
|
||||||
|
if !index1.nil?
|
||||||
|
all_field = (get_input_name + "[#{index1}][#{field}][parant]").gsub(/\[/,'_').gsub(/\]/,'')
|
||||||
|
else
|
||||||
|
all_field = (get_input_name + "[#{field}][parant]").gsub(/\[/,'_').gsub(/\]/,'')
|
||||||
|
end
|
||||||
|
tmp = (available_locales.collect do |locale|
|
||||||
|
active_flag = ((locale == I18n.locale) ? ' in active' : '')
|
||||||
|
content_tag(:div,:class => "tab-content fade#{active_flag}",:id=>"#{all_field}_#{locale}") do
|
||||||
|
value_locale = value[locale.to_s] rescue nil
|
||||||
|
if !index1.nil?
|
||||||
|
self.__send__("#{type_of_tag}_tag","#{get_input_name}[#{index1}][#{field}][#{locale}]",value_locale,custom_options)
|
||||||
|
else
|
||||||
|
self.__send__("#{type_of_tag}_tag","#{get_input_name}[#{field}][#{locale}]",value_locale,custom_options)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end.join + create_lang_panel(all_field)).html_safe + combine_element
|
||||||
|
|
||||||
|
if sortable
|
||||||
|
if exteral_options['style'].nil?
|
||||||
|
exteral_options['style'] = 'display: flex;align-items: center;flex-wrap: nowrap;'
|
||||||
|
else
|
||||||
|
exteral_options['style'] = exteral_options['style'] + 'display: flex;align-items: center;flex-wrap: nowrap;'
|
||||||
|
end
|
||||||
|
content_tag(:div,{:class => "tab-panel border"}.merge(exteral_options)) do
|
||||||
|
("<i class=\"icons-list-2\" style=\"cursor: grab;font-size: x-large;\"></i>" +content_tag(:div) do
|
||||||
|
tmp
|
||||||
|
end).html_safe
|
||||||
|
end
|
||||||
|
else
|
||||||
|
content_tag(:div,{:class => "tab-panel"}.merge(exteral_options)) do
|
||||||
|
tmp
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.thead(field,center=false,enable_sort=true)
|
||||||
|
sort = field.to_s.include?('.') ? field.to_s.split('.')[1] : field.to_s
|
||||||
|
active = OrbitHelper.params[:sort].eql? sort
|
||||||
|
order = active ? (["asc", "desc"]-[OrbitHelper.params[:order]]).first : "asc"
|
||||||
|
arrow = (order.eql? "desc") ? "<b class='icons-arrow-up-3'></b>" : "<b class='icons-arrow-down-4'></b>"
|
||||||
|
klass = field.eql?(:title) ? "span5" : "span2"
|
||||||
|
th_data = (sort=="preview" || !enable_sort) ? EventNewsCustomTitle.get_trans(field) : "<a href='?sort=#{sort}&order=#{order}'>#{EventNewsCustomTitle.get_trans(field)} #{active ? arrow : ""}</a>"
|
||||||
|
"<th class='#{klass} #{active ? "active" : ""}' style='#{center ? "text-align:center" : ""}'>#{th_data}</th>".html_safe
|
||||||
|
end
|
||||||
|
|
||||||
def page_for_event_news(event_news)
|
def page_for_event_news(event_news)
|
||||||
ann_page = nil
|
ann_page = nil
|
||||||
pages = Page.where(:module=>'event_news')
|
pages = Page.where(:module=>'event_news')
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
class EventNewsCustomTitle
|
||||||
|
include Mongoid::Document
|
||||||
|
include Mongoid::Timestamps
|
||||||
|
field :key
|
||||||
|
field :title, type: String, localize: true
|
||||||
|
KEYS = ['event_date','speaker','place','host']
|
||||||
|
def self.get_map
|
||||||
|
KEYS.map{|k| self.where(key: k).first || self.create(key: k,title_translations: I18n.available_locales.map{|l| [l,I18n.with_locale(l){I18n.t("event_news.#{k}")}]}.to_h)}
|
||||||
|
end
|
||||||
|
def default_title
|
||||||
|
I18n.t("event_news.#{self.key}")
|
||||||
|
end
|
||||||
|
def self.get_trans(key)
|
||||||
|
TitleMap[key][I18n.locale] rescue I18n.t("event_news.#{key}")
|
||||||
|
end
|
||||||
|
TitleMap = self.get_map.map{|v| [v.key,v.title_translations]}.to_h
|
||||||
|
end
|
|
@ -65,7 +65,7 @@
|
||||||
|
|
||||||
<!-- Date Time Picker -->
|
<!-- Date Time Picker -->
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label muted"><%= t("event_news.event_date") %></label>
|
<label class="control-label muted"><%= EventNewsCustomTitle.get_trans('event_date') %></label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<%= f.datetime_picker :event_date, :no_label => true, :new_record => @event_news.new_record?, :data=>{"picker-type" => "range", "range" => "start"} %>
|
<%= f.datetime_picker :event_date, :no_label => true, :new_record => @event_news.new_record?, :data=>{"picker-type" => "range", "range" => "start"} %>
|
||||||
</div>
|
</div>
|
||||||
|
@ -382,7 +382,7 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- Speaker-->
|
<!-- Speaker-->
|
||||||
<div class="control-group input-speaker">
|
<div class="control-group input-speaker">
|
||||||
<label class="control-label muted"><%= t("event_news.speaker") %></label>
|
<label class="control-label muted"><%= EventNewsCustomTitle.get_trans('speaker') %></label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<%= f.fields_for :speaker_translations do |f| %>
|
<%= f.fields_for :speaker_translations do |f| %>
|
||||||
<%= f.text_field locale, class: "input-block-level", placeholder: t("event_news.speaker"), value: (@event_news.speaker_translations[locale] rescue nil) %>
|
<%= f.text_field locale, class: "input-block-level", placeholder: t("event_news.speaker"), value: (@event_news.speaker_translations[locale] rescue nil) %>
|
||||||
|
@ -391,7 +391,7 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- Place-->
|
<!-- Place-->
|
||||||
<div class="control-group input-speaker">
|
<div class="control-group input-speaker">
|
||||||
<label class="control-label muted"><%= t("event_news.place") %></label>
|
<label class="control-label muted"><%= EventNewsCustomTitle.get_trans('place') %></label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<%= f.fields_for :place_translations do |f| %>
|
<%= f.fields_for :place_translations do |f| %>
|
||||||
<%= f.text_field locale, class: "input-block-level", placeholder: t("event_news.place"), value: (@event_news.place_translations[locale] rescue nil) %>
|
<%= f.text_field locale, class: "input-block-level", placeholder: t("event_news.place"), value: (@event_news.place_translations[locale] rescue nil) %>
|
||||||
|
@ -400,7 +400,7 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- Host-->
|
<!-- Host-->
|
||||||
<div class="control-group input-host">
|
<div class="control-group input-host">
|
||||||
<label class="control-label muted"><%= t("event_news.host") %></label>
|
<label class="control-label muted"><%= EventNewsCustomTitle.get_trans('host') %></label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<%= f.fields_for :host_translations do |f| %>
|
<%= f.fields_for :host_translations do |f| %>
|
||||||
<%= f.text_field locale, class: "input-block-level", placeholder: t("event_news.host"), value: (@event_news.host_translations[locale] rescue nil) %>
|
<%= f.text_field locale, class: "input-block-level", placeholder: t("event_news.host"), value: (@event_news.host_translations[locale] rescue nil) %>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="sort-header">
|
<tr class="sort-header">
|
||||||
<% @table_fields.each do |f| %>
|
<% @table_fields.each do |f| %>
|
||||||
<%= thead(f) %>
|
<%= tmp = f.to_s.split('.')[-1]; EventNewsCustomTitle::KEYS.include?(tmp) ? Admin::EventNewsHelper.thead(tmp): thead(f) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
<style type="text/css">
|
||||||
|
.tab-panel .tab-content{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.tab-panel .tab-content.active{
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.tab-panel .tab-content,.tab-panel .btn-group{
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<%= form_tag({action: 'update_custom_title',method: 'post'}, {class: "form-horizontal main-forms previewable"}) do %>
|
||||||
|
<% Admin::EventNewsHelper::FormHelper.set_input_name("event_news_custom_title") %>
|
||||||
|
<% @event_news_custom_titles.each_with_index do |v,i| %>
|
||||||
|
<div class="control-group">
|
||||||
|
<%= label_tag :title , v.default_title, :class=>"control-label muted" %>
|
||||||
|
<div class="controls">
|
||||||
|
<%= hidden_field_tag "event_news_custom_title[#{i}][id]", v.id %>
|
||||||
|
<%= Admin::EventNewsHelper::FormHelper.multiple_lang_tag(i,'text_field','title_translations',v.title_translations,{placeholder: v.default_title}) %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<div class="form-actions">
|
||||||
|
<%= submit_tag t(:submit),class: 'btn btn-primary' %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
|
@ -2,6 +2,7 @@ en:
|
||||||
module_name:
|
module_name:
|
||||||
event_news: Event News
|
event_news: Event News
|
||||||
event_news:
|
event_news:
|
||||||
|
custom_fields_title: Custom Fields Title
|
||||||
custom_carousel_image_width_hint: "If blank, width will be default value."
|
custom_carousel_image_width_hint: "If blank, width will be default value."
|
||||||
carousel_image_width: Carousel Image Width
|
carousel_image_width: Carousel Image Width
|
||||||
default_carousel_image_width: Default Carousel Image Width
|
default_carousel_image_width: Default Carousel Image Width
|
||||||
|
|
|
@ -2,6 +2,7 @@ zh_tw:
|
||||||
module_name:
|
module_name:
|
||||||
event_news: 活動公告
|
event_news: 活動公告
|
||||||
event_news:
|
event_news:
|
||||||
|
custom_fields_title: 欄位名稱設定
|
||||||
custom_carousel_image_width_hint: "未填寫,則使用預設寬度"
|
custom_carousel_image_width_hint: "未填寫,則使用預設寬度"
|
||||||
carousel_image_width: 輪播圖片寬度
|
carousel_image_width: 輪播圖片寬度
|
||||||
default_carousel_image_width: 預設輪播圖片寬度
|
default_carousel_image_width: 預設輪播圖片寬度
|
||||||
|
|
|
@ -22,7 +22,12 @@ Rails.application.routes.draw do
|
||||||
patch 'event_news/updatesettings', to: 'event_news#updatesettings'
|
patch 'event_news/updatesettings', to: 'event_news#updatesettings'
|
||||||
post 'event_news/import_from_wp', to: 'event_news#import_from_wp'
|
post 'event_news/import_from_wp', to: 'event_news#import_from_wp'
|
||||||
post 'event_news/generate_iframe_url' => 'event_news#generate_iframe_url'
|
post 'event_news/generate_iframe_url' => 'event_news#generate_iframe_url'
|
||||||
resources :event_news
|
resources :event_news do
|
||||||
|
collection do
|
||||||
|
get 'custom_fields_title'
|
||||||
|
post 'update_custom_title'
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
resources :event_news do
|
resources :event_news do
|
||||||
|
|
|
@ -14,6 +14,7 @@ if bundle_update_flag
|
||||||
if !folder.include?('mobile')
|
if !folder.include?('mobile')
|
||||||
info_json_file = "#{folder}modules/event_news/info.json"
|
info_json_file = "#{folder}modules/event_news/info.json"
|
||||||
if File.exist?(info_json_file)
|
if File.exist?(info_json_file)
|
||||||
|
Bundler.with_clean_env{system ('cp -f '+ app_path + '/modules/event_news/show.html.erb ' + "#{folder}modules/event_news/.")}
|
||||||
begin
|
begin
|
||||||
file_text = File.read(info_json_file) rescue ""
|
file_text = File.read(info_json_file) rescue ""
|
||||||
encode_file_text = file_text.encode("UTF-8", "UTF-8", invalid: :replace, replace: "???")
|
encode_file_text = file_text.encode("UTF-8", "UTF-8", invalid: :replace, replace: "???")
|
||||||
|
|
|
@ -75,6 +75,10 @@ module EventNewsMod
|
||||||
if defined? EventNewsCache
|
if defined? EventNewsCache
|
||||||
EventNewsCache.destroy_all
|
EventNewsCache.destroy_all
|
||||||
end
|
end
|
||||||
|
require File.expand_path('../../../app/models/event_news_custom_title', __FILE__)
|
||||||
|
if defined? EventNewsCustomTitle
|
||||||
|
EventNewsCustomTitle.get_map
|
||||||
|
end
|
||||||
rescue => e
|
rescue => e
|
||||||
puts ['error in event_news',e]
|
puts ['error in event_news',e]
|
||||||
end
|
end
|
||||||
|
@ -125,19 +129,25 @@ module EventNewsMod
|
||||||
:active_for_action=>{'admin/event_news'=>'tags'},
|
:active_for_action=>{'admin/event_news'=>'tags'},
|
||||||
:active_for_tag => 'EventNewsModule',
|
:active_for_tag => 'EventNewsModule',
|
||||||
:available_for => 'managers'
|
:available_for => 'managers'
|
||||||
|
context_link 'event_news.custom_fields_title',
|
||||||
|
:link_path=>"custom_fields_title_admin_event_news_index_path" ,
|
||||||
|
:priority=>5,
|
||||||
|
:active_for_action=>{'admin/event_news'=>'custom_fields_title'},
|
||||||
|
:available_for => 'managers'
|
||||||
|
|
||||||
context_link 'event_news.feed_list',
|
context_link 'event_news.feed_list',
|
||||||
:link_path=>"admin_event_news_feed_path" ,
|
:link_path=>"admin_event_news_feed_path" ,
|
||||||
:priority=>5,
|
:priority=>6,
|
||||||
:active_for_action=>{'admin/event_news'=>'feed'},
|
:active_for_action=>{'admin/event_news'=>'feed'},
|
||||||
:available_for => 'managers'
|
:available_for => 'managers'
|
||||||
context_link 'event_news.import',
|
context_link 'event_news.import',
|
||||||
:link_path=>"admin_event_news_import_path" ,
|
:link_path=>"admin_event_news_import_path" ,
|
||||||
:priority=>6,
|
:priority=>7,
|
||||||
:active_for_action=>{'admin/event_news'=>'import'},
|
:active_for_action=>{'admin/event_news'=>'import'},
|
||||||
:available_for => 'managers'
|
:available_for => 'managers'
|
||||||
context_link 'event_news.settings',
|
context_link 'event_news.settings',
|
||||||
:link_path=>"admin_event_news_settings_path" ,
|
:link_path=>"admin_event_news_settings_path" ,
|
||||||
:priority=>6,
|
:priority=>8,
|
||||||
:active_for_action=>{'admin/event_news'=>'settings'},
|
:active_for_action=>{'admin/event_news'=>'settings'},
|
||||||
:available_for => 'managers'
|
:available_for => 'managers'
|
||||||
end
|
end
|
||||||
|
|
|
@ -157,7 +157,7 @@
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="s-annc__extra_info-wrap s-annc__meta--item ">
|
<li class="s-annc__extra_info-wrap s-annc__meta--item ">
|
||||||
<span style="display: inline-block;">
|
<span style="{{speaker-css}}">
|
||||||
<span>{{speaker-head}}:</span>
|
<span>{{speaker-head}}:</span>
|
||||||
<span>{{speaker}}</span>
|
<span>{{speaker}}</span>
|
||||||
</span>
|
</span>
|
||||||
|
|
Loading…
Reference in New Issue