added tags to index page, added html safe for show
This commit is contained in:
parent
3287a2ef17
commit
1c558a1783
|
@ -15,7 +15,8 @@ class Panel::Gallery::BackEnd::AlbumsController < OrbitBackendController
|
|||
@authenticated = false
|
||||
end
|
||||
@categories = get_categories_for_index
|
||||
@albums = GalleryAlbum.all
|
||||
@albums = GalleryAlbum.all
|
||||
@tags = get_tags
|
||||
end
|
||||
|
||||
def show
|
||||
|
@ -30,6 +31,7 @@ class Panel::Gallery::BackEnd::AlbumsController < OrbitBackendController
|
|||
|
||||
def new
|
||||
@categories = get_categories_for_index
|
||||
@tags = get_tags
|
||||
@album = GalleryAlbum.new
|
||||
|
||||
end
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
<% set_default_index do
|
||||
objects @albums
|
||||
filterable
|
||||
filter_field type: 'objects',
|
||||
values: @tags,
|
||||
translation: 'tags',
|
||||
object_field: 'name'
|
||||
end %>
|
||||
<%= render 'admin/default_index/index' %>
|
||||
|
||||
<%= stylesheet_link_tag "gallery" %>
|
||||
<%#= stylesheet_link_tag "filter" %>
|
||||
|
||||
|
@ -37,12 +47,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="accordion-body collapse" id="collapse-tags">
|
||||
<div class="accordion-inner pagination-right" data-toggle="buttons-checkbox">
|
||||
<a href="#" class="btn btn-small">Tags1</a>
|
||||
<a href="#" class="btn btn-small">Tags2</a>
|
||||
<a href="#" class="btn btn-small">Tags3</a>
|
||||
<a href="#" class="btn btn-small">Tags4</a>
|
||||
</div>
|
||||
|
||||
<div class="filter-clear">
|
||||
<a href="#" class="btn btn-link btn-small"><i class="icons-cycle"></i>Clear</a>
|
||||
</div>
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
<div class="rgbody">
|
||||
<div class="gallery-info">
|
||||
<h3><%= @album.name %></h3>
|
||||
<p class="muted"><%= @album.description %></p>
|
||||
<p class="muted"><%= @album.description.html_safe %></p>
|
||||
</div>
|
||||
<ul id="imgholder" class="gallery clearfix" data-gallery-id="album">
|
||||
<% @images.each do |image| %>
|
||||
|
|
Reference in New Issue