Update category and tag
This commit is contained in:
parent
15d297ffff
commit
c171e4c00c
|
@ -15,13 +15,13 @@
|
||||||
<div class="input-area">
|
<div class="input-area">
|
||||||
|
|
||||||
<!-- Module Tabs -->
|
<!-- Module Tabs -->
|
||||||
<div class="nav-name"><strong>Module</strong></div>
|
<div class="nav-name"><strong><%= t(:module) %></strong></div>
|
||||||
<ul class="nav nav-pills module-nav">
|
<ul class="nav nav-pills module-nav">
|
||||||
<li class="active">
|
<li class="active">
|
||||||
<a href="#basic" data-toggle="tab">Basic</a>
|
<a href="#basic" data-toggle="tab"><%= t(:basic) %></a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="#tag" data-toggle="tab">Tags</a>
|
<a href="#tag" data-toggle="tab"><%= t(:tags) %></a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -33,9 +33,9 @@
|
||||||
|
|
||||||
<!-- Category -->
|
<!-- Category -->
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label muted">Category</label>
|
<label class="control-label muted"><%= t(:category) %></label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<%= f.select(:category_id, @categories.collect {|p| [ p.title, p.id ] }) %>
|
<%= select_category(f, @module_app) %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -45,21 +45,14 @@
|
||||||
|
|
||||||
<!-- Tag -->
|
<!-- Tag -->
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label muted">Tag</label>
|
<label class="control-label muted"><%= t(:tags) %></label>
|
||||||
<div class="controls" data-toggle="buttons-checkbox">
|
<%= select_tag(f, @module_app) %>
|
||||||
<%@tags.each do |tag|%>
|
|
||||||
<label class="checkbox inline btn <%= 'active' if @album.tags.include?(tag) %>">
|
|
||||||
<%= check_box_tag 'album[tags][]', tag.id, @album.tags.include?(tag)%>
|
|
||||||
<%= tag.name %>
|
|
||||||
</label>
|
|
||||||
<%end %>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="nav-name"><strong>Language</strong></div>
|
<div class="nav-name"><strong><%= t(:language) %></strong></div>
|
||||||
<ul class="nav nav-pills language-nav">
|
<ul class="nav nav-pills language-nav">
|
||||||
<% I18n.available_locales.each_with_index do |locale, i| %>
|
<% I18n.available_locales.each_with_index do |locale, i| %>
|
||||||
<li <%= (i == 0 ? 'class=active' : '') %>>
|
<li <%= (i == 0 ? 'class=active' : '') %>>
|
||||||
|
|
|
@ -23,6 +23,20 @@ module Gallery
|
||||||
:link_path=>"new_admin_gallery_path" ,
|
:link_path=>"new_admin_gallery_path" ,
|
||||||
:priority=>2,
|
:priority=>2,
|
||||||
:active_for_action=>{'admin/galleries'=>"new"}
|
:active_for_action=>{'admin/galleries'=>"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/galleries'=>'categories'},
|
||||||
|
:active_for_category => 'Gallery'
|
||||||
|
|
||||||
|
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/galleries'=>'tags'},
|
||||||
|
:active_for_tag => 'Gallery'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue