Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6e809ff2b3 |
No files matched your search
@@ -38,11 +38,9 @@ if($.support.touch) {
|
||||
$checked.each(function() {
|
||||
if(!$(this).closest('div').hasClass('togglebox')) {
|
||||
$(this).wrap('<div class="toggle-control"/>');
|
||||
if($(this).attr('type') == "hidden" && $(this).attr('value') == 'true') {
|
||||
console.log('true')
|
||||
$(this).wrap('<div class="togglebox disable" />');
|
||||
if($(this).attr('type') == "hidden" && $(this).attr('value')) {
|
||||
$(this).wrap('<div class="togglebox disabled" />');
|
||||
} else {
|
||||
console.log('false')
|
||||
$(this).wrap('<div class="togglebox" />');
|
||||
}
|
||||
$('<label><b></b></label>').insertAfter($(this));
|
||||
@@ -543,7 +541,6 @@ function changeStatusHidden() {
|
||||
|
||||
// Document Ready
|
||||
$(function() {
|
||||
console.log('true')
|
||||
showFiltersOnPageRefresh();
|
||||
|
||||
new ini();
|
||||
|
||||
@@ -189,10 +189,8 @@ function pageSetting(id, edit, ps) {
|
||||
if(_arr !== -1) {
|
||||
$pageCategory.find('input[type="checkbox"]').eq(index).prop('checked', true);
|
||||
}
|
||||
var $all = $pageCategory.siblings('.checkbox').children('.select_all'),
|
||||
$hiddenInput = $pageCategory.siblings('input[type="hidden"]');
|
||||
_selectData.module.category.length ? $hiddenInput.removeAttr('name') : $hiddenInput.attr('name', 'page[category][]');
|
||||
_selectData.module.category.length == index + 1 ? $all.prop('checked', true) : $all.prop('checked', false);
|
||||
var $all = $pageCategory.siblings('.checkbox').children('.select_all')
|
||||
_selectData.module.category.length > 1 && _selectData.module.category.length == index + 1 ? $all.prop('checked', true) : $all.prop('checked', false);
|
||||
});
|
||||
$pageCategoryGroup.show();
|
||||
}
|
||||
@@ -203,10 +201,8 @@ function pageSetting(id, edit, ps) {
|
||||
if(_arr !== -1) {
|
||||
$pageTags.find('input[type="checkbox"]').eq(index).prop('checked', true);
|
||||
}
|
||||
var $all = $pageTags.siblings('.checkbox').children('.select_all'),
|
||||
$hiddenInput = $pageTags.siblings('input[type="hidden"]');
|
||||
_selectData.module.tags.length ? $hiddenInput.removeAttr('name') : $hiddenInput.attr('name', 'page[tag][]');
|
||||
_selectData.module.tags.length == index + 1 ? $all.prop('checked', true) : $all.prop('checked', false);
|
||||
var $all = $pageTags.siblings('.checkbox').children('.select_all')
|
||||
_selectData.module.tags.length > 1 && _selectData.module.tags.length == index + 1 ? $all.prop('checked', true) : $all.prop('checked', false);
|
||||
});
|
||||
$pageTagsGroup.show();
|
||||
}
|
||||
@@ -401,7 +397,6 @@ $(function() {
|
||||
|
||||
if(event.target.id == 'page_module_app_id') {
|
||||
$pageCategory.empty();
|
||||
var $hiddenInputA = $pageCategory.siblings('input[type="hidden"]');
|
||||
if(val.category.length > 0) {
|
||||
$.each(val.category, function(index, val) {
|
||||
if(val !== 0) {
|
||||
@@ -411,17 +406,14 @@ $(function() {
|
||||
$pageCategory.find('input[type="checkbox"]').eq(index).prop('checked', true);
|
||||
}
|
||||
var $all = $pageCategory.siblings('.checkbox').children('.select_all');
|
||||
_boolean && _val == _select.main && _select.category.length ? $hiddenInputA.removeAttr('name') : $hiddenInputA.attr('name', 'page[category][]');
|
||||
_boolean && _val == _select.main && _select.category.length == index + 1 ? $all.prop('checked', true) : $all.prop('checked', false);
|
||||
_boolean && _val == _select.main && _select.category.length > 1 && _select.category.length == index + 1 ? $all.prop('checked', true) : $all.prop('checked', false);
|
||||
}
|
||||
});
|
||||
$pageCategoryGroup.slideDown(300);
|
||||
$pageCategoryGroup.show();
|
||||
} else {
|
||||
$pageCategoryGroup.slideUp(300);
|
||||
$hiddenInputA.removeAttr('name');
|
||||
$pageCategoryGroup.hide();
|
||||
}
|
||||
$pageTags.empty();
|
||||
var $hiddenInputB = $pageTags.siblings('input[type="hidden"]');
|
||||
if(val.tags.length > 0) {
|
||||
$.each(val.tags, function(index, val) {
|
||||
if(val !== 0) {
|
||||
@@ -431,14 +423,12 @@ $(function() {
|
||||
$pageTags.find('input[type="checkbox"]').eq(index).prop('checked', true);
|
||||
}
|
||||
var $all = $pageTags.siblings('.checkbox').children('.select_all');
|
||||
_boolean && _val == _select.main && _select.tags.length ? $hiddenInputB.removeAttr('name') : $hiddenInputB.attr('name', 'page[tag][]');
|
||||
_boolean && _val == _select.main && _select.tags.length == index + 1 ? $all.prop('checked', true) : $all.prop('checked', false);
|
||||
_boolean && _val == _select.main && _select.tags.length > 1 && _select.tags.length == index + 1 ? $all.prop('checked', true) : $all.prop('checked', false);
|
||||
}
|
||||
});
|
||||
$pageTagsGroup.slideDown(300);
|
||||
$pageTagsGroup.show();
|
||||
} else {
|
||||
$pageTagsGroup.slideUp(300);
|
||||
$hiddenInputB.removeAttr('name');
|
||||
$pageTagsGroup.hide();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
@@ -471,10 +461,8 @@ $(function() {
|
||||
if($checked.hasClass('select_all')) {
|
||||
if($checked.prop('checked')) {
|
||||
$checked.closest('.checkbox').siblings('.groups').find('input[type="checkbox"]').prop('checked', true);
|
||||
$checked.closest('.checkbox').siblings('input[type="hidden"]').removeAttr('name');
|
||||
} else {
|
||||
$checked.closest('.checkbox').siblings('.groups').find('input[type="checkbox"]').prop('checked', false);
|
||||
$checked.closest('.checkbox').siblings('input[type="hidden"]').attr('name', 'page['+$checked.closest('.checkbox-groups').data('for')+'][]');
|
||||
}
|
||||
} else if($checked.hasClass('lang-enable')) {
|
||||
var checkboxes = $checked.closest('.groups').find('input[type="checkbox"]');
|
||||
@@ -495,11 +483,10 @@ $(function() {
|
||||
var _l = $checked.closest('.groups').find('input[type="checkbox"]').length,
|
||||
_c = $checked.closest('.groups').find('input[type="checkbox"]:checked').length;
|
||||
if(_l == _c) {
|
||||
$checked.closest('.groups').siblings('.checkbox').find('.select_all').prop('checked', true);
|
||||
$checked.closest('.groups').siblings('.checkbox').find('.select_all').prop('checked', true)
|
||||
} else {
|
||||
$checked.closest('.groups').siblings('.checkbox').find('.select_all').prop('checked', false);
|
||||
$checked.closest('.groups').siblings('.checkbox').find('.select_all').prop('checked', false)
|
||||
};
|
||||
_c == 0 ? $checked.closest('.groups').siblings('input[type="hidden"]').attr('name', 'page['+$checked.closest('.checkbox-groups').data('for')+'][]') : $checked.closest('.groups').siblings('input[type="hidden"]').removeAttr('name');
|
||||
}
|
||||
return false;
|
||||
} else if($checked.attr('type') == 'radio' && !$(this).closest('div').hasClass('active-mune')) {
|
||||
|
||||
@@ -222,7 +222,7 @@ $(function() {
|
||||
});
|
||||
$('#user-forms').delegate('.togglebox, .delete, .trigger, .remove-input', clickEvent, function(event) {
|
||||
if($(this).hasClass('togglebox')) {
|
||||
if($(this).hasClass('disable')) {
|
||||
if($(this).hasClass('disabled')) {
|
||||
$(this).find('.toggle-check')
|
||||
.attr('value', 'false')
|
||||
.closest('.attributes')
|
||||
@@ -237,7 +237,7 @@ $(function() {
|
||||
.children('.attributes-body')
|
||||
.fadeOut(300);
|
||||
}
|
||||
$(this).toggleClass('disable');
|
||||
$(this).toggleClass('disabled');
|
||||
};
|
||||
if($(this).hasClass('remove-input')) {
|
||||
$(this).closest('.input-append').fadeOut(300, function() {
|
||||
@@ -382,7 +382,7 @@ $(function() {
|
||||
});
|
||||
$('#attributes-area').delegate('.togglebox, .delete, .trigger, .remove-input', clickEvent, function(event) {
|
||||
if($(this).hasClass('togglebox')) {
|
||||
if($(this).hasClass('disable')) {
|
||||
if($(this).hasClass('disabled')) {
|
||||
$(this).find('.toggle-check')
|
||||
.attr('value', 'false')
|
||||
.closest('.attributes')
|
||||
@@ -411,7 +411,7 @@ $(function() {
|
||||
$(this).parent('.field-type').removeClass('in');
|
||||
});
|
||||
}
|
||||
$(this).toggleClass('disable');
|
||||
$(this).toggleClass('disabled');
|
||||
};
|
||||
if($(this).hasClass('delete')) {
|
||||
$(this).closest('.attributes').fadeOut(300, function() {
|
||||
|
||||
@@ -51,7 +51,7 @@ $(function() {
|
||||
}
|
||||
if($('.set-sidebar-state').length) {
|
||||
if(window.localStorage.getItem('sidebarState') == 1) {
|
||||
$('.set-sidebar-state').prop('checked',true).parent('.togglebox').removeClass('disable');
|
||||
$('.set-sidebar-state').prop('checked',true).parent('.togglebox').removeClass('disabled');
|
||||
}
|
||||
$('.set-sidebar-state').on({
|
||||
change: function() {
|
||||
|
||||
@@ -23,9 +23,7 @@ class Admin::PagePartsController < OrbitBackendController
|
||||
@class_options = LIST[:widget_field_type].collect{|widget_field| [widget_field.humanize, widget_field]}
|
||||
@partial = 'default_widget'
|
||||
else
|
||||
|
||||
# @frontend_styles = @module_app.widgets[params[:val]]["style"] rescue nil
|
||||
@frontend_styles = @module_app.widgets[@part.widget_path]["style"] rescue nil
|
||||
@frontend_styles = @module_app.widgets[params[:val]]["style"] rescue nil
|
||||
@partial = 'custom_widget' if @frontend_styles.present?
|
||||
end
|
||||
end
|
||||
|
||||
@@ -21,16 +21,6 @@ class Admin::PagesController < Admin::ItemsController
|
||||
end
|
||||
|
||||
def update
|
||||
if params[:page][:category]
|
||||
if params[:page][:category][0] == ""
|
||||
params[:page][:category] = []
|
||||
end
|
||||
end
|
||||
if params[:page][:tag]
|
||||
if params[:page][:tag][0] == ""
|
||||
params[:page][:tag] = []
|
||||
end
|
||||
end
|
||||
@item = Page.find(params[:id])
|
||||
if @item.module_app && @item.module_app.key == 'page_content' && @item.page_contexts.blank?
|
||||
@item.page_contexts.build(:create_user_id => current_user.id, :update_user_id => current_user.id )
|
||||
|
||||
@@ -28,22 +28,20 @@
|
||||
<%= select_tag "page[app_frontend_url]", nil, class: "input-xlarge change" %>
|
||||
</div>
|
||||
|
||||
<div class="checkbox-groups hide" id="page-category-groups" data-for="category">
|
||||
<div class="checkbox-groups hide" id="page-category-groups">
|
||||
<%= f.label :categories, t(:categories) %>
|
||||
<%= content_tag :label, class: "checkbox" do %>
|
||||
<%= check_box_tag nil, nil, true, class: "select_all" %> <%= t(:all) %>
|
||||
<% end %>
|
||||
<div class="groups" id="page-category"></div>
|
||||
<input type="hidden">
|
||||
</div>
|
||||
|
||||
<div class="checkbox-groups hide" id="page-tags-groups" data-for="tag">
|
||||
<div class="checkbox-groups hide" id="page-tags-groups">
|
||||
<%= f.label :tags, t(:tags) %>
|
||||
<%= content_tag :label, class: "checkbox" do %>
|
||||
<%= check_box_tag nil, nil, true, class: "select_all" %> <%= t(:all) %>
|
||||
<% end %>
|
||||
<div class="groups" id="page-tags"></div>
|
||||
<input type="hidden">
|
||||
</div>
|
||||
|
||||
<div class="display-mode"></div>
|
||||
|
||||
@@ -16,9 +16,8 @@
|
||||
<% else %>
|
||||
<%= link_to node.title, node.url %>
|
||||
<% end %>
|
||||
|
||||
<div class="item-menu">
|
||||
<%= link_to content_tag(:i, nil, class: "icon-eye-open"), eval("admin_#{node.class.to_s.downcase}_path(node)"), class: "view-page open-slide tip", title: t(:view), data: {title: node.title} if node.class.to_s.eql?('Page') %>
|
||||
<%= link_to content_tag(:i, nil, class: "icon-eye-open"), "/#{node.path}?edit=true", class: "view-page open-slide tip", title: t(:view), data: {title: node.title} if node.class.to_s.eql?('Page') %>
|
||||
<% if node.class.to_s.downcase.eql?("page") %>
|
||||
<%= link_to content_tag(:i, nil, class: "icon-edit"), "#page", class: "open-slide tip page edit", title: t('editing.page'), data: {title: t('editing.page'), id: node.id.to_s, parent: node.parent_id.to_s, form: {name: node.name}.merge(node.title_translations)} %>
|
||||
<% elsif node.class.to_s.downcase.eql?("link") %>
|
||||
|
||||
@@ -5,7 +5,12 @@
|
||||
|
||||
<div class="attributes <%= role_disable ? 'disabled' : '' %>">
|
||||
<div class="attributes-header clearfix">
|
||||
<%= hidden_field_tag("user[disable_role][id][#{role.id}]",role_disable,:for=>@form_index,"data-deploy"=>"right",:class=>"toggle-check",:value=>role_disable)%>
|
||||
<div class="toggle-control" style="float: right;">
|
||||
<div class="togglebox <%= role_disable ? 'disabled' : '' %>">
|
||||
<%= hidden_field_tag("user[disable_role][id][#{role.id}]",role_disable,:for=>@form_index,"data-deploy"=>"right",:class=>"toggle-check",:value=>role_disable)%>
|
||||
<label><b></b></label>
|
||||
</div>
|
||||
</div>
|
||||
<h4><%= role.title %><%= t(:role_info)%></h4>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div style='position:relative'>
|
||||
<div id='slideshow-<%= @ad_banner.title.dehumanize %>' class="orbit-cycle-slideshow" data-cycle-timeout="<%= @ad_banner.timeout_millisecond %>" data-cycle-fx="<%= @ad_banner.ad_fx %>" data-cycle-pager=".banner_nav_<%= @ad_banner.title.dehumanize %>" data-cycle-pager-template="<li class='needed'><a href='#'></a></li>" data-cycle-pager-active-class="activeSlide" data-cycle-random='true' style="z-index: 0">
|
||||
<div id='slideshow-<%= @ad_banner.title.dehumanize %>' class="orbit-cycle-slideshow" data-cycle-timeout="<%= @ad_banner.timeout_millisecond %>" data-cycle-fx="<%= @ad_banner.ad_fx %>" data-cycle-pager=".banner_nav_<%= @ad_banner.title.dehumanize %>" data-cycle-pager-template="<li><a href='#'></a></li>" data-cycle-pager-active-class="activeSlide" data-cycle-random='true' style="z-index: 0">
|
||||
<% @ad_banner.ad_images.can_display.each do |ad_image| %>
|
||||
<% link = ad_image_link(ad_image) %>
|
||||
<%= image_tag ad_image.file, width: @ad_banner.width, height: @ad_banner.height, link_open: ad_image.link_open, link_url: link, style: "display:none; #{'cursor:pointer;' if link.present?}" %>
|
||||
@@ -17,12 +17,6 @@
|
||||
<% end %>
|
||||
$.preload(a, 2, function(){
|
||||
$('.orbit-cycle-slideshow').cycle();
|
||||
var lis = $("ul.banner_nav_<%= @ad_banner.title.dehumanize %> li");
|
||||
if( lis.length > a.length ){
|
||||
for( i = lis.length - 1; i > a.length - 1; i-- ){
|
||||
lis[i].remove();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
else{
|
||||
|
||||
+1
-1
@@ -24,4 +24,4 @@ production:
|
||||
# password: <%= ENV['MONGOID_PASSWORD'] %>
|
||||
# database: <%= ENV['MONGOID_DATABASE'] %>
|
||||
<<: *defaults
|
||||
database: orbit_site_new
|
||||
database: test_site
|
||||
@@ -48,7 +48,13 @@ module ParserFrontEnd
|
||||
ret = ''
|
||||
part = PagePart.find(front['part_id']) if front['part_id']
|
||||
ret << eval("\"#{front['path']}\"") rescue ''
|
||||
ret << (ret.include?("?") ? "&#{args.to_param}" : "?#{args.to_param}") if args
|
||||
args.each do |index,arg|
|
||||
if index=="tag_id" || index=="category_id"
|
||||
ret << (ret.include?("?") ? "&#{index}[]=#{arg}": "?#{index}[]=#{arg}" )
|
||||
else
|
||||
ret << (ret.include?("?") ? "&#{index}=#{arg}": "?#{index}=#{arg}" )
|
||||
end
|
||||
end if args
|
||||
fragment = Nokogiri::HTML::DocumentFragment.new(body, "<div class='dymanic_load widget' path='#{ret}'></div>")
|
||||
end
|
||||
front.swap(fragment)
|
||||
|
||||
+19
-20
@@ -9,30 +9,19 @@ class Panel::Announcement::FrontEnd::BulletinsController < OrbitWidgetController
|
||||
end
|
||||
|
||||
def search_result
|
||||
if params[:search_query] == ""
|
||||
@bulletins = get_bulletins_for_index
|
||||
|
||||
else
|
||||
@search = Bulletin.solr_search do
|
||||
fulltext params[:search_query]
|
||||
with(:frontend_search,true)
|
||||
with(:available_lang).any_of([I18n.locale.to_s])
|
||||
end
|
||||
# @bulletins = Bulletin.where(:category_id.in => params[:category_id]).and(:is_rejected=>false).and(:is_pending=>false)
|
||||
|
||||
search_result = @search.results.collect{|result| result.id}
|
||||
|
||||
@bulletins = Bulletin.all.available_for_lang(I18n.locale).can_display.any_in(_id:search_result).page( params[:page_main]).per(@page_num)
|
||||
end
|
||||
end
|
||||
|
||||
def index
|
||||
@bulletins = get_bulletins_for_index
|
||||
end
|
||||
|
||||
def get_bulletins_for_index
|
||||
|
||||
@item = Page.find(params[:page_id]) rescue nil
|
||||
|
||||
@item = Page.find(params[:page_id]) rescue nil
|
||||
if @item
|
||||
if @item.frontend_data_count
|
||||
@page_num = @item.frontend_data_count
|
||||
@@ -41,23 +30,33 @@ class Panel::Announcement::FrontEnd::BulletinsController < OrbitWidgetController
|
||||
end
|
||||
@frontend_style = @item.frontend_style
|
||||
end
|
||||
|
||||
@item = Page.find(params[:page_id]) rescue nil
|
||||
if !params[:search_query].blank?
|
||||
@search = Bulletin.solr_search do
|
||||
fulltext params[:search_query]
|
||||
with(:frontend_search,true)
|
||||
with(:available_lang).any_of([I18n.locale.to_s])
|
||||
end
|
||||
search_result = @search.results.collect{|result| result.id}
|
||||
|
||||
@bulletins = Bulletin.all.available_for_lang(I18n.locale).can_display.any_in(_id:search_result).page( params[:page_main]).per(@page_num)
|
||||
else
|
||||
date_now = Time.now
|
||||
if !params[:category_id].blank? && !params[:tag_id].blank?
|
||||
@bulletins = Bulletin.available_for_lang(I18n.locale).can_display.where(:category_id.in => params[:category_id], :tagged_ids.in => params[:tag_id]).desc( :is_top, :postdate).page( params[:page_main]).per(@page_num)
|
||||
# @bulletins = Bulletin.available_for_lang(I18n.locale).can_display.where(:category_id.in=>params[:category_id],:tagged_ids.in=>params[:tag_id])
|
||||
@bulletins = Bulletin.available_for_lang(I18n.locale).can_display.where(:category_id => params[:category_id], :tagged_ids => params[:tag_id]).desc( :is_top, :postdate).page( params[:page_main]).per(@page_num)
|
||||
@current_category = BulletinCategory.from_id(params[:category_id]) rescue nil
|
||||
elsif !params[:category_id].blank?
|
||||
@bulletins = Bulletin.all.available_for_lang(I18n.locale).can_display.where(:category_id.in => params[:category_id]).desc( :is_top, :postdate).page( params[:page_main]).per(@page_num)
|
||||
@bulletins = Bulletin.all.available_for_lang(I18n.locale).can_display.where(:category_id => params[:category_id]).desc( :is_top, :postdate).page( params[:page_main]).per(@page_num)
|
||||
@current_category = BulletinCategory.from_id(params[:category_id]) rescue nil
|
||||
elsif !params[:tag_id].blank?
|
||||
@bulletins = Bulletin.available_for_lang(I18n.locale).can_display.where(:tagged_ids.in => params[:tag_id]).desc( :is_top, :postdate).page( params[:page_main]).per(@page_num)
|
||||
@bulletins = Bulletin.available_for_lang(I18n.locale).can_display.where(:tagged_ids => params[:tag_id]).desc( :is_top, :postdate).page( params[:page_main]).per(@page_num)
|
||||
else
|
||||
@bulletins = Bulletin.all.available_for_lang(I18n.locale).can_display.desc( :is_top, :postdate).page( params[:page_main]).per(@page_num)
|
||||
end
|
||||
# delayed_impressionist(@tag) if @tag
|
||||
@bulletins
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def show
|
||||
@item = Page.find(params[:page_id]) rescue nil
|
||||
|
||||
+3
-3
@@ -39,7 +39,7 @@ class Panel::Announcement::Widget::BulletinsController < OrbitWidgetController
|
||||
@bulletins = Bulletin.available_for_lang(I18n.locale).can_display.any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page] ).per(@page_num)
|
||||
end
|
||||
|
||||
@categories = @module_app.categories.enabled
|
||||
@categories = get_categories_for_index
|
||||
|
||||
end
|
||||
|
||||
@@ -62,7 +62,7 @@ class Panel::Announcement::Widget::BulletinsController < OrbitWidgetController
|
||||
@bulletins = Bulletin.available_for_lang(I18n.locale).can_display.any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page]).per(@page_num )
|
||||
end
|
||||
|
||||
@categories = @module_app.categories.enabled
|
||||
@categories = get_categories_for_index
|
||||
|
||||
end
|
||||
|
||||
@@ -139,7 +139,7 @@ class Panel::Announcement::Widget::BulletinsController < OrbitWidgetController
|
||||
|
||||
def bulletins_side_bar
|
||||
@tags_and_class = @module_app.sorted_tags_for_cloud
|
||||
@categories = @module_app.categories.enabled
|
||||
@categories = get_categories_for_index
|
||||
end
|
||||
|
||||
def bulletins_search_block
|
||||
|
||||
vendor/built_in_modules/announcement/app/views/panel/announcement/front_end/bulletins/index.html.erb
Vendored
+1
@@ -1,6 +1,7 @@
|
||||
<% # encoding: utf-8 %>
|
||||
|
||||
<%= flash_messages %>
|
||||
|
||||
<h1 class="h1"><%= @page.title rescue nil %></h1>
|
||||
|
||||
<table class="table table-bordered">
|
||||
|
||||
+2
-1
@@ -1,6 +1,7 @@
|
||||
<% # encoding: utf-8 %>
|
||||
|
||||
<%= flash_messages %>
|
||||
|
||||
<h1 class="h1"><%= @page.title rescue nil %></h1>
|
||||
|
||||
<table class="table table-bordered">
|
||||
@@ -22,7 +23,7 @@
|
||||
<% @bulletins.each do |post| %>
|
||||
<tr>
|
||||
<td><%= post.bulletin_category.title rescue nil %></td>
|
||||
<td><%= link_to post.title, panel_announcement_front_end_bulletin_path(post, :category_id => post.category_id) %>
|
||||
<td><%= link_to post.title, 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><%= display_date_time(post.postdate) %></td>
|
||||
|
||||
Vendored
+2
-2
@@ -1,6 +1,6 @@
|
||||
<%= stylesheet_link_tag "default_widget" %>
|
||||
<script type='text/javascript' src='/assets/lib/jquery.mu.image.resize.js'></script>
|
||||
<!-- <script type='text/javascript' src='/assets/lib/jquery.mu.image.resize.degsin.js'></script> -->
|
||||
<script type='text/javascript' src='/assets/jquery.mu.image.resize.js'></script>
|
||||
<script type='text/javascript' src='/assets/jquery.mu.image.resize.degsin.js'></script>
|
||||
|
||||
<div id="bulletin_widget">
|
||||
<%= render 'index' %>
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ module Announcement
|
||||
image :image
|
||||
field :postdate
|
||||
link_field :title,{:method => 'panel_announcement_front_end_bulletin_path',:args=>:self}
|
||||
link_field :bulletin_category_with_title,{:method => 'panel_announcement_front_end_bulletins_path',:args=>{:category_id => [:category,:id]}}
|
||||
link_field :bulletin_category_with_title,{:method => 'panel_announcement_front_end_bulletins_path',:args=>{:category_id => [:bulletin_category,:id]}}
|
||||
field :subtitle
|
||||
link_to_more 'panel_announcement_front_end_bulletins_path',:title_i18n=> 'more_plus'
|
||||
end
|
||||
|
||||
+2
-2
@@ -37,14 +37,14 @@ class Panel::Faq::FrontEnd::QasController < OrbitWidgetController
|
||||
|
||||
def show
|
||||
@qa = Qa.find(params[:id])
|
||||
# get_categorys
|
||||
get_categorys
|
||||
end
|
||||
|
||||
|
||||
protected
|
||||
|
||||
def get_categorys
|
||||
# @qa_categorys = QaCategory.excludes('disable' => true)
|
||||
@qa_categorys = QaCategory.excludes('disable' => true)
|
||||
end
|
||||
|
||||
end
|
||||
+1
-1
@@ -22,7 +22,7 @@ class Qa
|
||||
accepts_nested_attributes_for :qa_files, :allow_destroy => true
|
||||
accepts_nested_attributes_for :qa_links, :allow_destroy => true
|
||||
|
||||
# belongs_to :qa_category
|
||||
belongs_to :qa_category
|
||||
|
||||
before_save :clean_values
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
<h1 class="h1"><%= @qa.title %></h1>
|
||||
<div class="info">
|
||||
<div class="info1">
|
||||
<span><%= t(:category) %>:<%= @qa.category.title rescue nil %></span>
|
||||
<span><%= t(:category) %>:<%= @qa.qa_category.title rescue nil %></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="news_paragraph">
|
||||
|
||||
Vendored
+8
-7
@@ -16,7 +16,7 @@ module Faq
|
||||
end
|
||||
end
|
||||
|
||||
# category ["QaCategory"]
|
||||
category ["QaCategory"]
|
||||
data_count 1..20
|
||||
|
||||
taggable
|
||||
@@ -25,9 +25,9 @@ module Faq
|
||||
|
||||
widgets do
|
||||
default_widget do
|
||||
query 'Qa'
|
||||
enable ['typeA']
|
||||
link_field :qa_category_with_title,{:method => 'panel_faq_front_end_qas_path',:args=>{:category_id => [:category,:id]}}
|
||||
query 'Qa.all'
|
||||
# enable ['typeA']
|
||||
link_field :qa_category_with_title,{:method => 'panel_faq_front_end_qas_path',:args=>{:category_id => [:qa_category,:id]}}
|
||||
link_field :title, {:method => 'panel_faq_front_end_qa_path',:args=>:self}
|
||||
link_to_more 'panel_faq_front_end_qas_path',:title_i18n=> 'faq.default_widget.to_more'
|
||||
end
|
||||
@@ -45,7 +45,7 @@ module Faq
|
||||
side_bar do
|
||||
head_label_i18n 'faq.faq',:icon_class=>"icons-help"
|
||||
available_for [:admin,:guest,:manager,:sub_manager]
|
||||
active_for_controllers ({:private=>['qas', 'qa_categorys','module_tags', 'categories']})
|
||||
active_for_controllers ({:private=>['qas', 'qa_categorys']})
|
||||
active_for_object_auth ['QaCategory']
|
||||
|
||||
head_link_path "panel_faq_back_end_qas_path"
|
||||
@@ -65,10 +65,11 @@ module Faq
|
||||
context_link 'categories',
|
||||
:link_path=>"admin_module_app_categories_path(get_module_app)" ,
|
||||
:priority=>3,
|
||||
:active_for_category => 'Faq',
|
||||
:active_for_category => 'Qa',
|
||||
:available_for => [:manager]
|
||||
|
||||
context_link 'tags',
|
||||
:link_path=>"admin_module_tags_path(module_app_id: get_module_app)" ,
|
||||
:link_path=>"admin_module_tags_path(:module_app_id => ModuleApp.first(conditions: {title: 'Faq'}))" ,
|
||||
:priority=>4,
|
||||
:active_for_tag => 'Faq',
|
||||
:available_for => [:manager]
|
||||
|
||||
+1
-1
@@ -213,7 +213,7 @@ var galleryAPI = function(){
|
||||
}
|
||||
|
||||
var preparestage = function(albumid){
|
||||
$.getJSON("/panel/gallery/front_end/albums/"+albumid+"/imgs",{"inner":true},function(album){
|
||||
$.getJSON("panel/gallery/front_end/albums/"+albumid+"/imgs",{"inner":true},function(album){
|
||||
imageArray = eval(album.images);
|
||||
$.each(album.images,function(i,image){
|
||||
if(image._id == id)
|
||||
|
||||
Reference in new issue
Block a user