<%= render :partial => "filter"%>
diff --git a/vendor/built_in_modules/gallery/app/assets/javascripts/galleryAPI_frontend.js.erb b/vendor/built_in_modules/gallery/app/assets/javascripts/galleryAPI_frontend.js.erb
index 37446401..d6eceb27 100644
--- a/vendor/built_in_modules/gallery/app/assets/javascripts/galleryAPI_frontend.js.erb
+++ b/vendor/built_in_modules/gallery/app/assets/javascripts/galleryAPI_frontend.js.erb
@@ -32,52 +32,8 @@ var galleryAPI = function(){
}
}
- $(document).ready(function(){
- //bindHandlers();
- })
- var bindHandlers = function(){
-
- }
+ }
- }
-
- this.loadAlbums = function(cids){
- g.albumArea.find(".rghead .rgfn a").click(function(){g.makeNewAlbum($(this).attr("href"))});
- g.albumArea.addClass('o_gallery');
- g.albumArea.find("#imgholder").empty();
- $.getJSON("/panel/gallery/front_end/get_albums",{"cid":cids,"inner":true},function(categories){
- $.each(categories,function(x,category){
- $.each(category,function(i,album){
- album.description = (album.description?album.description:"<%= I18n.t('gallery.no_description') %>")
- if(album.cover == "default")
- var $img = $("
");
- else
- var $img = $("
");
- var tag_string = "";
- for(tag in album.tag_names){
- if(tag == album.tag_names.length-1)
- tag_string+= '
' + album.tag_names[tag] + '';
- else
- tag_string+= '
' + album.tag_names[tag] + ', ';
- }
- $img.find(".tagnames").html(tag_string);
- g.albumArea.find("#imgholder").append($img);
- })
- })
- })
- }
- this.loadImages = function(id){
- g.albumArea.addClass('o_album');
- g.albumArea.find("#imgholder").empty();
- $.getJSON("panel/gallery/front_end/albums/"+id+"/imgs",{inner:true},function(album){
- $.each(album.images,function(i,image){
- var thumb = image.file.thumb.url;
- image.description = (image.description?image.description:"<%= I18n.t('gallery.no_description') %>")
- var $img = $("
");
- g.albumArea.find("#imgholder").append($img);
- })
- })
- }
this.loadTheater = function(id){
var imageArray;
var imagecount = 0;
diff --git a/vendor/built_in_modules/gallery/app/controllers/panel/gallery/front_end/albums_controller.rb b/vendor/built_in_modules/gallery/app/controllers/panel/gallery/front_end/albums_controller.rb
index 22e66415..ec8e8849 100644
--- a/vendor/built_in_modules/gallery/app/controllers/panel/gallery/front_end/albums_controller.rb
+++ b/vendor/built_in_modules/gallery/app/controllers/panel/gallery/front_end/albums_controller.rb
@@ -1,31 +1,11 @@
class Panel::Gallery::FrontEnd::AlbumsController < OrbitWidgetController
def index
- @categories = params[:category_id]
+ @albums = GalleryAlbum.where(:category_id.in => params[:category_id])
end
def show
@album = GalleryAlbum.find(params[:id])
- @tags = Tag.find(@album.tagged_ids).map{|t| t.name}
- end
-
- def get_albums
- @categoryids = params["cid"]
- @albums = Array.new
- @albums << GalleryAlbum.where(:category_id.in => @categoryids)
-
-
- @output = Array.new
- @albums.each do |album|
- @albs = Array.new
- album.each do |values|
- tags = Tag.find(values.tagged_ids).map{|t| t.name}
- category = Category.find(values.category_id).title
-
- @albs << {"_id"=>values.id,"show_path"=>panel_gallery_front_end_album_path(values),"cover"=>values.cover,"cover_path"=>values.cover_path,"description"=>values.description,"category_name"=>category,"gallery_category_id" => values.category_id,"name"=>values.name,"tag_ids"=>values.tag_ids,"tag_names"=>tags}
- end
- @output << @albs
- end
- render :json=>@output.to_json
+ @images = @album.gallery_images
end
def imgs
diff --git a/vendor/built_in_modules/gallery/app/views/panel/gallery/front_end/albums/_album.html.erb b/vendor/built_in_modules/gallery/app/views/panel/gallery/front_end/albums/_album.html.erb
new file mode 100644
index 00000000..0da18169
--- /dev/null
+++ b/vendor/built_in_modules/gallery/app/views/panel/gallery/front_end/albums/_album.html.erb
@@ -0,0 +1,14 @@
+
\ No newline at end of file
diff --git a/vendor/built_in_modules/gallery/app/views/panel/gallery/front_end/albums/_image.html.erb b/vendor/built_in_modules/gallery/app/views/panel/gallery/front_end/albums/_image.html.erb
new file mode 100644
index 00000000..304b942f
--- /dev/null
+++ b/vendor/built_in_modules/gallery/app/views/panel/gallery/front_end/albums/_image.html.erb
@@ -0,0 +1,5 @@
+
\ No newline at end of file
diff --git a/vendor/built_in_modules/gallery/app/views/panel/gallery/front_end/albums/index.html.erb b/vendor/built_in_modules/gallery/app/views/panel/gallery/front_end/albums/index.html.erb
index a99f04aa..cdb0669a 100644
--- a/vendor/built_in_modules/gallery/app/views/panel/gallery/front_end/albums/index.html.erb
+++ b/vendor/built_in_modules/gallery/app/views/panel/gallery/front_end/albums/index.html.erb
@@ -1,35 +1,14 @@
-
-
<%= stylesheet_link_tag "gallery_frontend" %>
-<%#= stylesheet_link_tag "gallery" %>
-
-
+ <% @albums.each do |album| %>
+ <%= render :partial => "album", :object => album %>
+ <% end %>
-
-
-
-
-<% content_for :page_specific_javascript do %>
- <%= javascript_include_tag "galleryAPI_frontend" %>
- <%#= javascript_include_tag "jquery.tinyscrollbar" %>
- <%= javascript_include_tag "rss" %>
-<% end %>
-
+
diff --git a/vendor/built_in_modules/gallery/app/views/panel/gallery/front_end/albums/show.html.erb b/vendor/built_in_modules/gallery/app/views/panel/gallery/front_end/albums/show.html.erb
index 4f3c9e40..29ffc8cf 100644
--- a/vendor/built_in_modules/gallery/app/views/panel/gallery/front_end/albums/show.html.erb
+++ b/vendor/built_in_modules/gallery/app/views/panel/gallery/front_end/albums/show.html.erb
@@ -1,42 +1,12 @@
-
<%= stylesheet_link_tag "gallery_frontend" %>
-
+ <% @images.each do |image| %>
+ <%= render :partial => "image", :object => image %>
+ <% end %>
-
-
-
-
<%= t('gallery.album_tag') %>
-
- <% @tags.each do |tag|%>
- - <%= tag %>
- <% end %>
-
-
-
-
-
-<% content_for :page_specific_javascript do %>
- <%= javascript_include_tag "galleryAPI_frontend" %>
- <%#= javascript_include_tag "jquery.tinyscrollbar" %>
- <%= javascript_include_tag "rss" %>
-<% end %>
-
-
-
-
-
-
-