diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_form.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_form.html.erb
index aa2edcbf..c6f07000 100644
--- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_form.html.erb
+++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_form.html.erb
@@ -307,6 +307,15 @@
$(this).parents('.start-line').hide();
}
});
+ $(document).on('click',"*[data-toggle=buttons-checkbox] input",function(){
+ var d = $(this).parent().find("input[type=hidden]");
+ if($(this).is(":checked")){
+ d.val("1");
+ }else{
+ d.val("0");
+ }
+
+ })
});
<% end %>
diff --git a/vendor/built_in_modules/faq/app/controllers/panel/faq/back_end/qa_categorys_controller.rb b/vendor/built_in_modules/faq/app/controllers/panel/faq/back_end/qa_categorys_controller.rb
deleted file mode 100644
index e894bab1..00000000
--- a/vendor/built_in_modules/faq/app/controllers/panel/faq/back_end/qa_categorys_controller.rb
+++ /dev/null
@@ -1,104 +0,0 @@
-class Panel::Faq::BackEnd::QaCategorysController < OrbitBackendController
- before_filter :for_app_manager,:except => [:index]
- include OrbitControllerLib::DivisionForDisable
-
- def index
- @qa_categorys = get_categories_for_index("QaCategory")
- @qa_category = QaCategory.new(:display => 'List')
-
- @url = panel_faq_back_end_qa_categorys_path
-
- respond_to do |format|
- format.html # index.html.erb
- format.js
- end
- end
-
- # GET /qas/1
- # GET /qas/1.xml
- def show
- @qa_category = QaCategory.find(params[:id])
-
- respond_to do |format|
- format.html # show.html.erb
- format.js
- end
- end
-
- # GET /qas/new
- # GET /qas/new.xml
- def new
- @qa_category = QaCategory.new(:display => 'List')
-
- respond_to do |format|
- format.html # new.html.erb
- format.js
- end
- end
-
- # GET /qas/1/edit
- def edit
- @qa_category = QaCategory.find(params[:id])
-
- @url = panel_faq_back_end_qa_category_path(@qa_category)
-
- respond_to do |format|
- format.html
- format.js
- end
- end
-
- # POST /qas
- # POST /qas.xml
- def create
- @qa_category = QaCategory.new(params[:qa_category])
-
- respond_to do |format|
- if @qa_category.save
- format.html { redirect_to(panel_faq_back_end_qa_categorys_url, :notice => t('qa.create_qa_category_success')) }
- format.js
- else
- format.html { render :action => "new" }
- format.js { render action: "new" }
- end
- end
- end
-
- # PUT /qas/1
- # PUT /qas/1.xml
- def update
- @qa_category = QaCategory.find(params[:id])
-
- @url = panel_faq_back_end_qa_category_path(@qa_category)
-
- respond_to do |format|
- if @qa_category.update_attributes(params[:qa_category])
- format.html { redirect_to(panel_faq_back_end_qa_categorys_url, :notice => t('qa.update_qa_category_success')) }
- # format.xml { head :ok }
- format.js
- else
- format.html { render :action => "edit" }
- format.js { render :action => "edit" }
- end
- end
- end
-
- # DELETE /qas/1
- # DELETE /qas/1.xml
- def destroy
- @qa_category = QaCategory.find(params[:id])
- @qa_category.disable = @qa_category.disable ? false : true
-
- if @qa_category.save!
- respond_to do |format|
- format.html { redirect_to(panel_faq_back_end_qa_categorys_url) }
- # format.xml { head :ok }
- format.js
- end
- else
- flash[:error] = t("update.fail")
- format.html { render :action => "index" }
- end
-
- end
-end
diff --git a/vendor/built_in_modules/faq/app/controllers/panel/faq/back_end/qas_controller.rb b/vendor/built_in_modules/faq/app/controllers/panel/faq/back_end/qas_controller.rb
index 07dd41a8..2ced73bf 100644
--- a/vendor/built_in_modules/faq/app/controllers/panel/faq/back_end/qas_controller.rb
+++ b/vendor/built_in_modules/faq/app/controllers/panel/faq/back_end/qas_controller.rb
@@ -1,44 +1,24 @@
class Panel::Faq::BackEnd::QasController < OrbitBackendController
# before_filter :for_app_manager,:except => [:index,:show]
include AdminHelper
- include OrbitControllerLib::DivisionForDisable
+ # 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]
- before_filter :only => [ :new,:edit,:update,:create] do |controller|
- controller.get_categorys('QaCategory')
+ before_filter :only => [ :new, :create, :edit, :update ] do |controller|
+ @categories = get_categories_for_form
end
def index
- get_categorys("QaCategory",params[:qa_category_id])
- @filter = params[:filter]
- new_filter = params[:new_filter]
-
- if @filter && params[:clear]
- @filter.delete(params[:type])
- elsif @filter && new_filter
- if @filter.has_key?(new_filter[:type]) && @filter[new_filter[:type]].include?(new_filter[:id].to_s)
- @filter[new_filter[:type]].delete(new_filter[:id].to_s)
- elsif @filter.has_key?(new_filter[:type])
- @filter[new_filter[:type]] << new_filter[:id].to_s
- else
- @filter.merge!({new_filter[:type] => [new_filter[:id].to_s]})
- end
- elsif new_filter
- @filter = {new_filter[:type] => [new_filter[:id].to_s]}
- end
- @qa_categories = get_categories_for_index("QaCategory")
- @qa_category_ids = @qa_categories.collect{|t| t.id.to_s} + [nil]
-
- # @qas = Qa.search(params[:category_id])
- #@qas = (params[:sort] || @filter) ? get_sorted_and_filtered_qas : Qa.all.page(params[:page]).per(10)
- @qas = (params[:sort] || @filter) ? get_sorted_and_filtered("qa",:qa_category_id.in => @qa_category_ids) : get_viewable("qa",:qa_category_id.in => @qa_category_ids)
- @all_qas = @qas.page params[:page]
@tags = get_tags
+ @categories = get_categories_for_index
+ @statuses = get_statuses
+ 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 }
@@ -61,7 +41,7 @@ class Panel::Faq::BackEnd::QasController < OrbitBackendController
def new
@qa = Qa.new
@tags = get_tags
-
+ @statuses = get_statuses
respond_to do |format|
format.html # new.html.erb
format.xml { render :xml => @qa }
@@ -71,7 +51,8 @@ class Panel::Faq::BackEnd::QasController < OrbitBackendController
# GET /qas/1/edit
def edit
@qa = Qa.find(params[:id])
- @tags = get_tags
+ @statuses = get_statuses
+ @tags = get_tags
end
# POST /qas
@@ -97,15 +78,13 @@ class Panel::Faq::BackEnd::QasController < OrbitBackendController
# PUT /qas/1.xml
def update
@qa = Qa.find(params[:id])
-
@qa.update_user_id = current_user.id
-
- params[:qa][:tag_ids] ||=[]
respond_to do |format|
if @qa.update_attributes(params[:qa])
- format.html { redirect_to(panel_faq_back_end_qas_url(:page => params[:page])) }
- format.js { render 'toggle_enable' }
+
+ format.html { redirect_to(panel_faq_back_end_qas_path) }
+ format.js { render 'toggle_enable' }
format.xml { head :ok }
else
format.html { render :action => "edit" }
diff --git a/vendor/built_in_modules/faq/app/models/qa.rb b/vendor/built_in_modules/faq/app/models/qa.rb
index 9ff023cd..a48800cf 100644
--- a/vendor/built_in_modules/faq/app/models/qa.rb
+++ b/vendor/built_in_modules/faq/app/models/qa.rb
@@ -8,6 +8,7 @@ class Qa
include OrbitModel::LanguageRestrict
include OrbitModel::Status
include OrbitTag::Taggable
+ include OrbitCategory::Categorizable
field :title, localize: true
field :answer, localize: true
diff --git a/vendor/built_in_modules/faq/app/models/qa_category.rb b/vendor/built_in_modules/faq/app/models/qa_category.rb
deleted file mode 100644
index 5a188aad..00000000
--- a/vendor/built_in_modules/faq/app/models/qa_category.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-# encoding: utf-8
-
-class QaCategory
- include Mongoid::Document
- include Mongoid::Timestamps
- include OrbitCoreLib::ObjectAuthable
- include OrbitCoreLib::ObjectDisable
- # include Mongoid::MultiParameterAttributes
- AfterObjectAuthUrl = '/panel/page_content/back_end/page_contexts'
- APP_NAME = 'faq'
- ObjectAuthTitlesOptions = %W{edit}
-
- field :key
-
- field :title, localize: true
-
- has_many :qas
-
- def pp_object
- title
- end
-
- def self.from_id(id)
- QaCategory.find(id) rescue nil
- end
-
-end
\ No newline at end of file
diff --git a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qa_categorys/_form.html.erb b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qa_categorys/_form.html.erb
deleted file mode 100644
index 2beb179f..00000000
--- a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qa_categorys/_form.html.erb
+++ /dev/null
@@ -1,30 +0,0 @@
-<% # encoding: utf-8 %>
-
-<%= form_for(@qa_category, :remote => true, :url => @url) do |f| %>
-
-
<%= (@qa_category.new_record? ? t(:add) : t(:edit)) %>
-
-
- <%= f.label :key, t(:key) %>
- <%= f.text_field :key %>
-
-
-
-
-
- <%= f.submit t(:submit), :class=>'btn btn-primary' %>
-
-
-<% end %>
-
\ No newline at end of file
diff --git a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qa_categorys/_qa_category.html.erb b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qa_categorys/_qa_category.html.erb
deleted file mode 100644
index 79ce14d8..00000000
--- a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qa_categorys/_qa_category.html.erb
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
- <%= qa_category.key %>
- <%if at_least_module_manager %>
-
-
- - <%= link_to t(:edit), edit_panel_faq_back_end_qa_category_path(qa_category), :remote => true %>
- - <%= link_to show_toggle_archive_btn(qa_category), panel_faq_back_end_qa_category_path(qa_category), :confirm => t(:sure?), :method => :delete, :remote => true ,:class=> "archive_toggle"%>
- - <%#= show_qa_permission_link qa_category %>
-
-
- <% end -%>
- |
- <% @site_valid_locales.each do |locale| %>
- <%= qa_category.title_translations[locale] rescue nil %> |
- <% end %>
-
\ No newline at end of file
diff --git a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qa_categorys/create.js.erb b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qa_categorys/create.js.erb
deleted file mode 100644
index 5ace5e0f..00000000
--- a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qa_categorys/create.js.erb
+++ /dev/null
@@ -1,2 +0,0 @@
-$('<%= j render :partial => 'qa_category', :collection => [@qa_category] %>').appendTo('#qa_categorys').hide().fadeIn();
-$("#new_qa_category")[0].reset();
\ No newline at end of file
diff --git a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qa_categorys/destroy.js.erb b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qa_categorys/destroy.js.erb
deleted file mode 100644
index 83dbb196..00000000
--- a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qa_categorys/destroy.js.erb
+++ /dev/null
@@ -1 +0,0 @@
-$("#<%= dom_id @qa_category %>").find(".archive_toggle").text("<%= show_toggle_archive_btn(@qa_category) %> ");
\ No newline at end of file
diff --git a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qa_categorys/edit.js.erb b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qa_categorys/edit.js.erb
deleted file mode 100644
index eaff01fa..00000000
--- a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qa_categorys/edit.js.erb
+++ /dev/null
@@ -1 +0,0 @@
-$("#form > form").replaceWith("<%= j render "form" %>");
\ No newline at end of file
diff --git a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qa_categorys/edit.js.erb~HEAD b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qa_categorys/edit.js.erb~HEAD
deleted file mode 100644
index eaff01fa..00000000
--- a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qa_categorys/edit.js.erb~HEAD
+++ /dev/null
@@ -1 +0,0 @@
-$("#form > form").replaceWith("<%= j render "form" %>");
\ No newline at end of file
diff --git a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qa_categorys/edit.js.erb~c8292a7619a2e9894d323c09861500b2bb71419e b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qa_categorys/edit.js.erb~c8292a7619a2e9894d323c09861500b2bb71419e
deleted file mode 100644
index eaff01fa..00000000
--- a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qa_categorys/edit.js.erb~c8292a7619a2e9894d323c09861500b2bb71419e
+++ /dev/null
@@ -1 +0,0 @@
-$("#form > form").replaceWith("<%= j render "form" %>");
\ No newline at end of file
diff --git a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qa_categorys/index.html.erb b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qa_categorys/index.html.erb
deleted file mode 100644
index a1b7c033..00000000
--- a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qa_categorys/index.html.erb
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-<%= flash_messages %>
-
-
-
-
-
- |
- <% @site_valid_locales.each do |locale| %>
- |
- <% end %>
-
-
-
-
- <%= render :partial => 'qa_category', :collection => @qa_categorys %>
-
-
-
-
-<%= render :partial => "form" if at_least_module_manager%>
-
-
diff --git a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qa_categorys/new.js.erb b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qa_categorys/new.js.erb
deleted file mode 100644
index 40061b9f..00000000
--- a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qa_categorys/new.js.erb
+++ /dev/null
@@ -1 +0,0 @@
-$("#form > form").replaceWith("<%= j render "form" %>");
diff --git a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qa_categorys/new.js.erb~HEAD b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qa_categorys/new.js.erb~HEAD
deleted file mode 100644
index 40061b9f..00000000
--- a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qa_categorys/new.js.erb~HEAD
+++ /dev/null
@@ -1 +0,0 @@
-$("#form > form").replaceWith("<%= j render "form" %>");
diff --git a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qa_categorys/new.js.erb~c8292a7619a2e9894d323c09861500b2bb71419e b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qa_categorys/new.js.erb~c8292a7619a2e9894d323c09861500b2bb71419e
deleted file mode 100644
index 40061b9f..00000000
--- a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qa_categorys/new.js.erb~c8292a7619a2e9894d323c09861500b2bb71419e
+++ /dev/null
@@ -1 +0,0 @@
-$("#form > form").replaceWith("<%= j render "form" %>");
diff --git a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qa_categorys/quick_edit.js.erb b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qa_categorys/quick_edit.js.erb
deleted file mode 100644
index 6bd56906..00000000
--- a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qa_categorys/quick_edit.js.erb
+++ /dev/null
@@ -1,3 +0,0 @@
-$.each($(".quick_edit"),function(obj){ $(this).remove(); });
-$("#<%= dom_id @qa_category %>").append("<%= j render "form" %>
");
-//$("#form > form").replaceWith("<%= j render "form" %>");
diff --git a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qa_categorys/update.js.erb b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qa_categorys/update.js.erb
deleted file mode 100644
index 95b5aa68..00000000
--- a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qa_categorys/update.js.erb
+++ /dev/null
@@ -1,4 +0,0 @@
-$("#<%= dom_id @qa_category %>").replaceWith("<%= j render :partial => 'qa_category', :collection => [@qa_category] %>");
-<% @qa_category = QaCategory.new(:display => 'List') # reset for new form %>
-$(".edit_qa_category").replaceWith("<%= j render "form" %>")
-$(".new_qa_category")[0].reset();
\ No newline at end of file
diff --git a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/_form.html.erb b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/_form.html.erb
index 18b49cc2..ea5a7c26 100644
--- a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/_form.html.erb
+++ b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/_form.html.erb
@@ -1,228 +1,233 @@
-
-<% # encoding: utf-8 %>
-
- <%= f.error_messages %>
-
-
-
-
-
-
-
-
-
-
-
-
- <%= f.label :category ,t(:category)%>
- <%= f.select :qa_category_id, @qa_categorys.collect {|t| [ t.title, t.id ]} %>
-
-
-
-
-
- <% @site_valid_locales.each_with_index do |locale, i| %>
-
-
">
-
- <%= f.label :title , t('faq.question') %>
- <%= f.fields_for :title_translations do |f| %>
- <%= I18nVariable.from_locale(locale) %>
- <%= f.text_field locale, :class=>'post-title', :value => (@qa.title_translations[locale] rescue nil) %>
- <% end %>
-
-
-
- <%= f.label :answer ,t('faq.answer') %>
- <%= f.fields_for :answer_translations do |f| %>
- <%= I18nVariable.from_locale(locale) %>
- <%= f.text_area locale, :style=>"width:100%", :class => 'tinymce_textarea', :value => (@qa.answer_translations[locale] rescue nil) %>
- <% end %>
-
-
-
-
- <% end %>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <%= hidden_field_tag 'page', params[:page] if !params[:page].blank? %>
- <%= f.submit t('submit'), :class=>'btn btn-primary' %>
- <%= link_to t('cancel'), get_go_back, :class=>"btn" %>
-
-
-
-
-
-<% content_for :page_specific_javascript do %>
- <%= javascript_include_tag "faq/qa_form" %>
- <%= javascript_include_tag "inc/jquery.imagesloaded.js" %>
-
+<% content_for :page_specific_css do %>
+ <%= stylesheet_link_tag "lib/main-forms" %>
+ <%= stylesheet_link_tag "lib/fileupload" %>
+ <%= stylesheet_link_tag "lib/main-list" %>
<% end %>
+<% content_for :page_specific_javascript do %>
+ <%= javascript_include_tag "lib/bootstrap-fileupload" %>
+ <%= javascript_include_tag "lib/bootstrap-datetimepicker" %>
+ <%= javascript_include_tag "lib/datetimepicker/datetimepicker.js" %>
+ <%= javascript_include_tag "lib/modal-preview" %>
+ <%= javascript_include_tag "lib/file-type" %>
+<% end %>
+<%= f.error_messages %>
+
+<% content_for :page_specific_javascript do %>
+
+<% end %>
\ No newline at end of file
diff --git a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/_form_qa_file.html.erb b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/_form_qa_file.html.erb
index 8eac96b5..87b32a71 100644
--- a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/_form_qa_file.html.erb
+++ b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/_form_qa_file.html.erb
@@ -1,74 +1,55 @@
-<% # encoding: utf-8 %>
-
-" class='list_item'>
-
-
-
+<% if form_qa_file.new_record? %>
+
+<% else %>
+
+ <% if form_qa_file.file.blank? %>
+ <%= t(:no_file) %>
+ <% else %>
+ <%= link_to content_tag(:i) + form_qa_file.file_identifier, form_qa_file.file.url, {:class => 'file-link file-type', :target => '_blank', :title => form_qa_file.file_identifier} %>
+ <% end %>
+<% end %>
+
- |
-
-
-
-
+
+
+
<% @site_valid_locales.each_with_index do |locale, i| %>
-
- ">
-
+ <%= locale %>">
<%= f.fields_for :title_translations do |f| %>
-
-
-
- <%= f.text_field locale, :id => "link-#{locale}", :value => (form_qa_file.title_translations[locale] rescue nil) %>
-
-
+ <%= f.text_field locale, :class => "input-medium", placeholder: t(:alternative), :value => (form_qa_file.title_translations[locale] rescue nil) %>
<% end %>
-
-
-
- <% end %>
-
-
-
- |
-
-
-
-
- <% @site_valid_locales.each_with_index do |locale, i| %>
-
- ">
-
- <%= f.fields_for :description_translations do |f| %>
-
-
-
- <%= f.text_field locale, :id => "link-#{locale}", :value => (form_qa_file.description_translations[locale] rescue nil) %>
-
-
- <% end %>
-
-
-
- <% end %>
-
-
-
- |
-
-
- <% if form_qa_file.new_record? %>
-
- <% else %>
- <%= f.hidden_field :id %>
- <%= hidden_field_tag :tr, (dom_id form_qa_file) %>
-
- <%= f.hidden_field :_destroy, :value => nil, :class => 'should_destroy' %>
+
<% end %>
-
- |
-
-
+
+
+ <% @site_valid_locales.each_with_index do |locale, i| %>
+ <%= locale %>">
+ <%= f.fields_for :description_translations do |f| %>
+ <%= f.text_field locale, :class => "input-medium", placeholder: t(:description), :value => (form_qa_file.description_translations[locale] rescue nil) %>
+ <% end %>
+
+ <% end %>
+
+
+ <% if form_qa_file.new_record? %>
+
+
+
+ <% else %>
+
+ <%= f.hidden_field :id %>
+
+ <%= f.hidden_field :_destroy, :value => nil, :class => 'should_destroy' %>
+
+ <% end %>
+
+
\ No newline at end of file
diff --git a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/_form_qa_link.html.erb b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/_form_qa_link.html.erb
index 0f7cc6c6..fbf06932 100644
--- a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/_form_qa_link.html.erb
+++ b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/_form_qa_link.html.erb
@@ -1,48 +1,26 @@
-
- " class='list_item'>
-
-
-
-
- <%= f.text_field :url %>
-
-
- |
-
-
-
-
-
- <% @site_valid_locales.each_with_index do |locale, i| %>
-
- ">
-
- <%= f.fields_for :title_translations do |f| %>
-
-
-
- <%= f.text_field locale, :id => "link-#{locale}", :class => "input-xlarge", :value => (form_qa_link.title_translations[locale] rescue nil) %>
-
-
- <% end %>
-
-
-
- <% end %>
-
-
-
- |
-
-
- <% if form_qa_link.new_record? %>
-
- <% else %>
- <%= f.hidden_field :id %>
- <%= hidden_field_tag :tr, (dom_id form_qa_link) %>
-
- <%= f.hidden_field :_destroy, :value => nil, :class => 'should_destroy' %>
- <% end %>
-
- |
-
+
diff --git a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/edit.html.erb b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/edit.html.erb
index f4dc5d5d..5fc91f55 100644
--- a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/edit.html.erb
+++ b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/edit.html.erb
@@ -1,5 +1,5 @@
<%= t('qa.editing_faq') %>
-<%= form_for @qa, :url => panel_faq_back_end_qa_path(@qa), :html => {:class => 'clear'} do |f| %>
+<%= form_for @qa, :url => panel_faq_back_end_qa_path(@qa), :html => {:class => 'form-horizontal main-forms'} do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>
<% end %>
diff --git a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/index.html.erb b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/index.html.erb
index d4b96215..df852484 100644
--- a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/index.html.erb
+++ b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/index.html.erb
@@ -1,22 +1,41 @@
-<%= render 'filter' %>
-
-
-
- |
- |
- |
- |
- |
-
-
-
- <%= render :partial => 'qa', :collection => @qas %>
-
-
+<% set_default_index do
+ objects @qas
+ quick_edit_link type: 'edit',
+ link: 'edit_panel_faq_back_end_qa_path'
+ quick_edit_link type: 'delete',
+ link: 'panel_faq_back_end_qa_path'
+ field type: 'status',
+ db_field: @statuses,
+ translation: 'status',
+ hide: 'phone',
+ sort: 'status'
+ field type: 'associated',
+ db_field: 'category',
+ model_field: 'title',
+ translation: 'category',
+ hide: 'phone',
+ sort: 'category'
+ field db_field: 'title',
+ translation: 'title',
+ sort: 'title',
+ display_option: 'link_to value, panel_faq_front_end_qa_path(object)',
+ quick_edit: true,
+ header_class: 'span5'
+ field type: 'tags',
+ hide: 'phone',
+ sort: 'tags'
+ filter_field type: 'array',
+ values: @statuses,
+ translation: 'status'
+ filter_field type: 'objects',
+ values: @categories,
+ translation: 'category',
+ object_field: 'title'
+ filter_field type: 'objects',
+ values: @tags,
+ translation: 'tags',
+ object_field: 'name'
+ footer link: 'new_panel_faq_back_end_qa_path'
+end %>
-
+<%= render 'admin/default_index/index' %>
diff --git a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/new.html.erb b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/new.html.erb
index 4de67088..47e6c67c 100644
--- a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/new.html.erb
+++ b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/new.html.erb
@@ -2,7 +2,7 @@
<%= flash_messages %>
<%= t('qa.new_faq') %>
-<%= form_for @qa, :url => panel_faq_back_end_qas_path, :html => {:class => 'clear'} do |f| %>
+<%= form_for @qa, :url => panel_faq_back_end_qas_path, :html => {:class => 'form-horizontal main-forms'} do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>
<% end %>
diff --git a/vendor/built_in_modules/faq/config/locales/en.yml b/vendor/built_in_modules/faq/config/locales/en.yml
index 5be79e88..d401e481 100644
--- a/vendor/built_in_modules/faq/config/locales/en.yml
+++ b/vendor/built_in_modules/faq/config/locales/en.yml
@@ -15,7 +15,6 @@ en:
read_more: Read More
question: Question
answer: Answer
-
qa:
create_qa_category_success: FAQ category was successfully created
editing_web_resource: Editing FAQ
diff --git a/vendor/built_in_modules/faq/init.rb b/vendor/built_in_modules/faq/init.rb
index c5094e95..1ace1553 100644
--- a/vendor/built_in_modules/faq/init.rb
+++ b/vendor/built_in_modules/faq/init.rb
@@ -20,6 +20,7 @@ module Faq
data_count 1..20
taggable
+ categorizable
widgets do
default_widget do
@@ -61,10 +62,10 @@ module Faq
:active_for_action=>{:qas=>:new},
:available_for => [:sub_manager]
- context_link 'categories',
- :link_path=>"panel_faq_back_end_qa_categorys_path" ,
+ context_link 'categories',
+ :link_path=>"admin_module_app_categories_path(get_module_app)" ,
:priority=>3,
- :active_for_action=>{:qa_categorys=>:index},
+ :active_for_category => 'Qa',
:available_for => [:manager]
context_link 'tags',