Updated tagging with galleries in new ui

This commit is contained in:
saurabhbhatia 2013-07-18 16:53:41 +08:00
parent 1c558a1783
commit e6c411b8e1
5 changed files with 23 additions and 69 deletions

View File

@ -17,6 +17,9 @@ class Panel::Gallery::BackEnd::AlbumsController < OrbitBackendController
@categories = get_categories_for_index @categories = get_categories_for_index
@albums = GalleryAlbum.all @albums = GalleryAlbum.all
@tags = get_tags @tags = get_tags
@c = []
@ac = @c.inject(@categories,:<<)
@album_category = @albums.map { |a| @categories.include?(a.category_id) }
end end
def show def show

View File

@ -11,14 +11,11 @@
<ul class="gallery_info clearfix"> <ul class="gallery_info clearfix">
<li class="view"><i class="icons-eye"></i> 321</li> <li class="view"><i class="icons-eye"></i> 321</li>
<li><i class="icons-tag"></i></li> <li><i class="icons-tag"></i></li>
<li class="albumcateg"><%= @categories.find(album.category_id).title %></li> <li><%= @ac%></li>
</ul> </ul>
<ul class="albumtag"> <ul class="albumtag">
<li class="label">Fake Tag</li> <% @tags.each do |tag| %>
<li class="label">Fake Tag</li> <li class="label"><%=t(tag.name)%></li>
<li class="label">Fake Tag</li> <%end%>
<li class="label">Fake Tag</li>
<li class="label">Fake Tag</li>
<li class="label">Fake Tag</li>
</ul> </ul>
</li> </li>

View File

@ -11,49 +11,6 @@ end %>
<%= stylesheet_link_tag "gallery" %> <%= stylesheet_link_tag "gallery" %>
<%#= stylesheet_link_tag "filter" %> <%#= stylesheet_link_tag "filter" %>
<!-- Top Nav -->
<div id="filter" class="topnav clearfix">
<!--<ul class="breadcrumb text-info pull-left">
<li><a href="/orbit_4.0.1/admin/dashboards/dashboards.shtml">Dashboard</a> <span class="divider">/</span></li>
<li class="active">Gallery</li>
</ul> -->
<div class="searchClear pull-right">
<form>
<input id="filter-input" class="search-query input-medium" type="text" placeholder="Search" value="">
</form>
</div>
<ul class="nav nav-pills filter-nav pull-right">
<li class="accordion-group">
<div class="accordion-heading">
<a href="#collapse-category" data-toggle="collapse" data-parent="#filter" class="accordion-toggle">Categories</a>
</div>
</li>
<li class="accordion-group">
<div class="accordion-heading">
<a href="#collapse-tags" data-toggle="collapse" data-parent="#filter" class="accordion-toggle">Tags</a>
</div>
</li>
</ul>
<div class="filter-group accordion-group">
<div class="accordion-body collapse" id="collapse-category">
<div class="accordion-inner pagination-right" data-toggle="buttons-checkbox">
<% @categories.each do |c| %>
<a href="#" class="btn btn-small"><%= c.title %></a>
<% end %>
</div>
<div class="filter-clear">
<a href="#" class="btn btn-link btn-small"><i class="icons-cycle"></i>Clear</a>
</div>
</div>
<div class="accordion-body collapse" id="collapse-tags">
<div class="filter-clear">
<a href="#" class="btn btn-link btn-small"><i class="icons-cycle"></i>Clear</a>
</div>
</div>
</div>
<!-- Bottom Nav --> <!-- Bottom Nav -->
<div class="bottomnav clearfix"> <div class="bottomnav clearfix">
<div class="action pull-right"> <div class="action pull-right">

View File

@ -36,15 +36,12 @@
<div class="control-group"> <div class="control-group">
<label class="control-label muted">Tag</label> <label class="control-label muted">Tag</label>
<div class="controls" data-toggle="buttons-checkbox"> <div class="controls" data-toggle="buttons-checkbox">
<%@tags.each do |t|%>
<label class="checkbox inline btn"> <label class="checkbox inline btn">
<input type="checkbox" value="1"> Tag1 <%= check_box_tag "t[]", t.id %>
</label> <%= label_tag t.name%>
<label class="checkbox inline btn">
<input type="checkbox" value="2"> Tag2
</label>
<label class="checkbox inline btn">
<input type="checkbox" value="3"> Tag3
</label> </label>
<%end %>
</div> </div>
</div> </div>