faq authorization completed.
This commit is contained in:
parent
53e5c57970
commit
399dfad392
|
@ -1,12 +1,7 @@
|
||||||
class Panel::Faq::BackEnd::QasController < OrbitBackendController
|
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]
|
open_for_sub_manager :except => [:index]
|
||||||
before_filter :force_order_for_user,:except => [:index]
|
|
||||||
|
|
||||||
before_filter :for_app_sub_manager,:except => [:index]
|
|
||||||
before_filter :only => [ :new, :create, :edit, :update ] do |controller|
|
before_filter :only => [ :new, :create, :edit, :update ] do |controller|
|
||||||
@categories = get_categories_for_form
|
@categories = get_categories_for_form
|
||||||
end
|
end
|
||||||
|
@ -14,16 +9,17 @@ class Panel::Faq::BackEnd::QasController < OrbitBackendController
|
||||||
def index
|
def index
|
||||||
|
|
||||||
@tags = get_tags
|
@tags = get_tags
|
||||||
@categories = get_categories_for_index
|
|
||||||
@statuses = get_statuses
|
@statuses = get_statuses
|
||||||
category_ids = @categories.collect{|t| t.id}
|
@categories = get_categories_for_index
|
||||||
|
|
||||||
|
category_ids = @categories.collect{|t| t.id}
|
||||||
@qas = get_sorted_and_filtered("qa", :category_id.in => category_ids)
|
@qas = get_sorted_and_filtered("qa", :category_id.in => category_ids)
|
||||||
respond_to do |format|
|
|
||||||
format.html # index.html.erb
|
# respond_to do |format|
|
||||||
format.xml { render :xml => @qas }
|
# format.html # index.html.erb
|
||||||
format.js
|
# format.xml { render :xml => @qas }
|
||||||
end
|
# format.js
|
||||||
|
# end
|
||||||
end
|
end
|
||||||
|
|
||||||
# GET /qas/1
|
# GET /qas/1
|
||||||
|
|
|
@ -77,6 +77,7 @@
|
||||||
<label class="checkbox inline btn <%= 'active' if @qa.tag_ids.include?(tag.id) %>">
|
<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)%>
|
<%= check_box_tag 'qa[tag_ids][]', tag.id, @qa.tag_ids.include?(tag.id)%>
|
||||||
<%= tag.name %>
|
<%= tag.name %>
|
||||||
|
</label>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -21,6 +21,7 @@ module Faq
|
||||||
|
|
||||||
taggable
|
taggable
|
||||||
categorizable
|
categorizable
|
||||||
|
authorizable
|
||||||
|
|
||||||
widgets do
|
widgets do
|
||||||
default_widget do
|
default_widget do
|
||||||
|
@ -40,7 +41,6 @@ module Faq
|
||||||
# end
|
# end
|
||||||
end
|
end
|
||||||
|
|
||||||
taggable
|
|
||||||
|
|
||||||
side_bar do
|
side_bar do
|
||||||
head_label_i18n 'faq.faq',:icon_class=>"icons-help"
|
head_label_i18n 'faq.faq',:icon_class=>"icons-help"
|
||||||
|
|
Loading…
Reference in New Issue