update for frontend
This commit is contained in:
parent
aa468024a8
commit
00c2e3d909
|
|
@ -103,7 +103,8 @@ class EventNewsModsController < ApplicationController
|
|||
"img_src" => image_url || DefaultImgSrc,
|
||||
"img_description" => desc,
|
||||
"more" => t("event_news.more"),
|
||||
"view_count" => a.view_count
|
||||
"view_count" => a.view_count,
|
||||
"orbithashtags" => a.hashtags_for_frontend
|
||||
}
|
||||
else
|
||||
a
|
||||
|
|
@ -516,6 +517,9 @@ class EventNewsModsController < ApplicationController
|
|||
if tags.blank?
|
||||
tags = ["all"]
|
||||
end
|
||||
if OrbitHelper.params["hash"].present?
|
||||
hashtag = OrbitHelper.params["hash"]
|
||||
end
|
||||
subpart = OrbitHelper.get_current_widget
|
||||
widget_data_count = OrbitHelper.widget_data_count
|
||||
event_news_cache = EventNewsCache.where(parent_id: subpart.id.to_s + cats.to_s + tags.to_s + widget_data_count.to_s,locale: I18n.locale.to_s)
|
||||
|
|
@ -739,6 +743,7 @@ class EventNewsModsController < ApplicationController
|
|||
"place_text" => (event_news.place.blank? ? "" : "#{EventNewsCustomTitle.get_trans("place")}: #{event_news.place}"),
|
||||
"place-css" => (event_news.place.blank? ? "display: none;" : ""),
|
||||
"carousel_html" => carousel_html,
|
||||
"orbithashtags" => event_news.hashtags_for_frontend
|
||||
},
|
||||
"impressionist" => (event_news.is_preview ? nil : event_news),
|
||||
"url_to_edit"=>url_to_edit
|
||||
|
|
|
|||
|
|
@ -199,10 +199,15 @@ module EventNewsHelper
|
|||
event_news = @show_today_data_first ?
|
||||
EventNews.can_display_and_sorted_according_today :
|
||||
EventNews.can_display_and_sorted
|
||||
|
||||
if params["orbithashtag"].present?
|
||||
event_news = event_news
|
||||
.filter_by_categories(categories, false).filter_by_hashtag(OrbitHelper.page_hashtag_id)
|
||||
.where(:title.nin => ["",nil])
|
||||
else
|
||||
event_news = event_news
|
||||
.filter_by_categories(categories, false).filter_by_tags(tags)
|
||||
.where(:title.nin => ["",nil])
|
||||
end
|
||||
if @type == "show_widget"
|
||||
if !params[:uids].blank?
|
||||
member_profile = MemberProfile.any_in(:uid=>params[:uids])
|
||||
|
|
@ -500,6 +505,58 @@ module EventNewsHelper
|
|||
end
|
||||
layout_types
|
||||
end
|
||||
def render_ad_banner(event_carousel_images,data)
|
||||
("<div class=\"carousel_images\">
|
||||
<div class=\"w-ba-banner ba-banner-widget-1\">
|
||||
<div class=\"w-ba-banner__wrap cycle-slideshow\"
|
||||
data-list=\"event_carousel_images\"
|
||||
data-level=\"0\"
|
||||
data-cycle-slides=\".event_carousel_slide\"
|
||||
data-cycle-log=\"false\"
|
||||
data-cycle-auto-height=\"0\"
|
||||
data-cycle-speed=\"300\"
|
||||
data-cycle-timeout=\"5000\"
|
||||
data-cycle-fx=\"fade\"
|
||||
data-pager-active-class=\"active-slide\"
|
||||
data-cycle-swipe=true
|
||||
data-cycle-swipe-fx=\"scrollHorz\"
|
||||
>" +
|
||||
event_carousel_images.collect do |e|
|
||||
"<div class=\"w-ba-banner__slide event_carousel_slide\"
|
||||
data-cycle-title=\"#{e['description_text']}\"
|
||||
>
|
||||
<img class=\"w-ba-banner__image banner-responsive\" src=\"#{e['src']}\" alt=\"#{e['description_text']}\">
|
||||
<div class=\"ad-overlay w-ad-banner__overlay event_carousel__overlay\">
|
||||
<p><strong class=\"carousel__description\">#{e['description']}</strong></p>
|
||||
</div>
|
||||
<div class=\"transitionfade\"></div>
|
||||
</div>"
|
||||
end.join+
|
||||
"</div>
|
||||
<ul class=\"controlplay\"><a class=\"resume-slide\" title = \"#{data['resume_btn_title']}\"><i></i></a><a class=\"pause-slide\" title = \"#{data['pause_btn_title']}\"><i></i></a></ul>
|
||||
<ul class=\"button-mid\">
|
||||
<i class=\"fa fa-angle-left prev-button\" aria-hidden=\"true\" title = \"#{data['prev_btn_title']}\"></i>
|
||||
<i class=\"fa fa-angle-right next-button\" aria-hidden=\"true\" title = \"#{data['next_btn_title']}\"></i>
|
||||
</ul>
|
||||
</div>
|
||||
<div style=\"position: relative;\">
|
||||
<h4><span class=\"active_slide\">1</span>/#{data['carousel_count']}</h4>
|
||||
<ul class=\"carousel_images_slide w-annc__list row list-unstyled\" data-level=\"0\" data-list=\"event_carousel_images\">" +
|
||||
event_carousel_images.collect do |e|
|
||||
"<li class=\"carousel_img_item col-sm-3\">
|
||||
<div class=\"carousel_img-wrap\">
|
||||
<img class=\"carousel_img\" src=\"#{e['src']}\" alt=\"#{e['description_text']}\">
|
||||
</div>
|
||||
</li>"
|
||||
end.join +
|
||||
"</ul>
|
||||
<ul class=\"button-mid\">
|
||||
<i class=\"fa fa-angle-left prev-button prev_img\" aria-hidden=\"true\" title = \"#{data['prev_btn_title']}\"></i>
|
||||
<i class=\"fa fa-angle-right next-button next_img\" aria-hidden=\"true\" title = \"#{data['next_btn_title']}\"></i>
|
||||
</ul>
|
||||
</div>
|
||||
</div>").html_safe
|
||||
end
|
||||
|
||||
def complementaryColor(my_hex)
|
||||
if my_hex[0] == '#'
|
||||
|
|
|
|||
Loading…
Reference in New Issue