fix new ui faq frontend

This commit is contained in:
Spen 2013-11-08 17:38:05 +08:00
parent ed569601c3
commit bbc3d3ae86
5 changed files with 12 additions and 13 deletions

View File

@ -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 => [:bulletin_category,:id]}}
link_field :bulletin_category_with_title,{:method => 'panel_announcement_front_end_bulletins_path',:args=>{:category_id => [:category,:id]}}
field :subtitle
link_to_more 'panel_announcement_front_end_bulletins_path',:title_i18n=> 'more_plus'
end

View File

@ -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

View File

@ -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

View File

@ -2,7 +2,7 @@
<h1 class="h1"><%= @qa.title %></h1>
<div class="info">
<div class="info1">
<span><%= t(:category) %><%= @qa.qa_category.title rescue nil %></span>
<span><%= t(:category) %><%= @qa.category.title rescue nil %></span>
</div>
</div>
<div class="news_paragraph">

View File

@ -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.all'
# enable ['typeA']
link_field :qa_category_with_title,{:method => 'panel_faq_front_end_qas_path',:args=>{:category_id => [:qa_category,:id]}}
query 'Qa'
enable ['typeA']
link_field :qa_category_with_title,{:method => 'panel_faq_front_end_qas_path',:args=>{:category_id => [: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']})
active_for_controllers ({:private=>['qas', 'qa_categorys','module_tags', 'categories']})
active_for_object_auth ['QaCategory']
head_link_path "panel_faq_back_end_qas_path"
@ -65,11 +65,10 @@ module Faq
context_link 'categories',
:link_path=>"admin_module_app_categories_path(get_module_app)" ,
:priority=>3,
:active_for_category => 'Qa',
:active_for_category => 'Faq',
:available_for => [:manager]
context_link 'tags',
:link_path=>"admin_module_tags_path(:module_app_id => ModuleApp.first(conditions: {title: 'Faq'}))" ,
:link_path=>"admin_module_tags_path(module_app_id: get_module_app)" ,
:priority=>4,
:active_for_tag => 'Faq',
:available_for => [:manager]