faq authorization completed.

This commit is contained in:
Harry Bomrah 2013-08-22 17:56:13 +08:00 committed by saurabhbhatia
parent 53e5c57970
commit 399dfad392
3 changed files with 15 additions and 18 deletions

View File

@ -1,29 +1,25 @@
class Panel::Faq::BackEnd::QasController < OrbitBackendController
# before_filter :for_app_manager,:except => [:index,:show]
include AdminHelper
# include OrbitControllerLib::DivisionForDisable
before_filter :force_order_for_visitor,:only=>[:index]
before_filter :force_order_for_user,:except => [:index]
before_filter :for_app_sub_manager,:except => [:index]
open_for_sub_manager :except => [:index]
before_filter :only => [ :new, :create, :edit, :update ] do |controller|
@categories = get_categories_for_form
end
def index
@tags = get_tags
@categories = get_categories_for_index
@statuses = get_statuses
category_ids = @categories.collect{|t| t.id}
@tags = get_tags
@statuses = get_statuses
@categories = get_categories_for_index
category_ids = @categories.collect{|t| t.id}
@qas = get_sorted_and_filtered("qa", :category_id.in => category_ids)
respond_to do |format|
format.html # index.html.erb
format.xml { render :xml => @qas }
format.js
end
# respond_to do |format|
# format.html # index.html.erb
# format.xml { render :xml => @qas }
# format.js
# end
end
# GET /qas/1

View File

@ -77,6 +77,7 @@
<label class="checkbox inline btn <%= 'active' if @qa.tag_ids.include?(tag.id) %>">
<%= check_box_tag 'qa[tag_ids][]', tag.id, @qa.tag_ids.include?(tag.id)%>
<%= tag.name %>
</label>
<% end %>
</div>
</div>

View File

@ -21,6 +21,7 @@ module Faq
taggable
categorizable
authorizable
widgets do
default_widget do
@ -40,7 +41,6 @@ module Faq
# end
end
taggable
side_bar do
head_label_i18n 'faq.faq',:icon_class=>"icons-help"