Update category and tag
This commit is contained in:
parent
352fdfa76c
commit
05713bdb2c
|
@ -3,7 +3,7 @@ class Admin::FaqsController < OrbitAdminController
|
|||
before_filter :setup_vars
|
||||
|
||||
def index
|
||||
@table_fields = ["Status","Category","Title","Tags"]
|
||||
@table_fields = ["status","category","title","tags"]
|
||||
@categories = @module_app.categories
|
||||
@tags = @module_app.tags
|
||||
@filter_fields = {
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
<div class="control-group">
|
||||
<%= f.label :category ,t(:category), :class=>"control-label muted" %>
|
||||
<div class="controls">
|
||||
<%= f.select :category_id, @categories.collect{|t| [ t.title, t.id ]} %>
|
||||
<%= select_category(f, @module_app) %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -72,14 +72,7 @@
|
|||
<!-- Tag -->
|
||||
<div class="control-group">
|
||||
<label class="control-label muted">Tag</label>
|
||||
<div class="controls" data-toggle="buttons-checkbox">
|
||||
<% @tags.each do |tag| %>
|
||||
<label class="checkbox inline btn <%= 'active' if @qa.tags.include?(tag) %>">
|
||||
<%= check_box_tag 'qa[tags][]', tag.id, @qa.tags.include?(tag)%>
|
||||
<%= tag.name %>
|
||||
</label>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= select_tag(f, @module_app) %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -120,7 +113,7 @@
|
|||
<% end %>
|
||||
<!-- Link -->
|
||||
<div class="control-group">
|
||||
<label class="control-label muted">Link</label>
|
||||
<label class="control-label muted"><%= t(:link) %></label>
|
||||
<div class="controls add-input">
|
||||
|
||||
<!-- Exist -->
|
||||
|
@ -147,7 +140,7 @@
|
|||
|
||||
<!-- File -->
|
||||
<div class="control-group">
|
||||
<label class="control-label muted">File</label>
|
||||
<label class="control-label muted"><%= t(:file_) %></label>
|
||||
<div class="controls">
|
||||
|
||||
<!-- Exist -->
|
||||
|
|
|
@ -15,15 +15,29 @@ module Faq
|
|||
active_for_controllers (['admin/faqs'])
|
||||
head_link_path "admin_faqs_path"
|
||||
|
||||
context_link 'faq.all',
|
||||
context_link 'all',
|
||||
:link_path=>"admin_faqs_path" ,
|
||||
:priority=>1,
|
||||
:active_for_action=>{'admin/faqs'=>"index"}
|
||||
|
||||
context_link 'faq.new',
|
||||
context_link 'new_',
|
||||
:link_path=>"new_admin_faq_path" ,
|
||||
:priority=>2,
|
||||
:active_for_action=>{'admin/faqs'=>"new"}
|
||||
|
||||
context_link 'categories',
|
||||
:link_path=>"admin_module_app_categories_path" ,
|
||||
:link_arg=>{:module_app_id=>get_module_app.id},
|
||||
:priority=>3,
|
||||
:active_for_action=>{'admin/faqs'=>'categories'},
|
||||
:active_for_category => 'Faq'
|
||||
|
||||
context_link 'tags',
|
||||
:link_path=>"admin_module_app_tags_path" ,
|
||||
:link_arg=>{:module_app_id=>get_module_app.id},
|
||||
:priority=>4,
|
||||
:active_for_action=>{'admin/faqs'=>'tags'},
|
||||
:active_for_tag => 'Faq'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue