From a0806676153cdd9f2595b1512e291c73ed1b7a12 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Tue, 4 Sep 2012 17:17:18 +0800 Subject: [PATCH] frontend updates --- .../front_end/album_images_controller.rb | 8 +- .../gallery/front_end/albums_controller.rb | 10 +- .../gallery/front_end/albums/create.js.erb | 3 - .../gallery/front_end/albums/edit.html.erb | 137 ------------------ .../gallery/front_end/albums/new.html.erb | 51 ------- .../show.html.erb => albums/theater.html.erb} | 0 .../front_end/albums/upload_panel.html.erb | 107 -------------- .../built_in_modules/gallery/config/routes.rb | 4 +- 8 files changed, 12 insertions(+), 308 deletions(-) delete mode 100644 vendor/built_in_modules/gallery/app/views/panel/gallery/front_end/albums/create.js.erb delete mode 100644 vendor/built_in_modules/gallery/app/views/panel/gallery/front_end/albums/edit.html.erb delete mode 100644 vendor/built_in_modules/gallery/app/views/panel/gallery/front_end/albums/new.html.erb rename vendor/built_in_modules/gallery/app/views/panel/gallery/front_end/{album_images/show.html.erb => albums/theater.html.erb} (100%) delete mode 100755 vendor/built_in_modules/gallery/app/views/panel/gallery/front_end/albums/upload_panel.html.erb diff --git a/vendor/built_in_modules/gallery/app/controllers/panel/gallery/front_end/album_images_controller.rb b/vendor/built_in_modules/gallery/app/controllers/panel/gallery/front_end/album_images_controller.rb index f9740225..107a4826 100644 --- a/vendor/built_in_modules/gallery/app/controllers/panel/gallery/front_end/album_images_controller.rb +++ b/vendor/built_in_modules/gallery/app/controllers/panel/gallery/front_end/album_images_controller.rb @@ -1,11 +1,5 @@ class Panel::Gallery::FrontEnd::AlbumImagesController < OrbitWidgetController - def show - @tags = GalleryTag.all - @image = GalleryImage.find(params[:album_id]) - @albumid = @image.gallery_album_id - @album = GalleryAlbum.find(@albumid) - @images = @album.gallery_images.all - end + end 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 bd4ebbf0..b1f91f69 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 @@ -89,7 +89,7 @@ class Panel::Gallery::FrontEnd::AlbumsController < OrbitWidgetController values.tag_ids.each do |tag| tags << GalleryTag.find(tag)[I18n.locale] end - @output << {"_id"=>values.id,"theater_link"=>panel_gallery_front_end_album_path(values)+"/theater","description"=>values.description,"title"=>values.title,"file"=>values.file,"gallery_album_id"=>values.gallery_album_id,"tag_ids"=>values.tag_ids,"tag_names"=>tags} + @output << {"_id"=>values.id,"theater_link"=>theater_panel_gallery_front_end_album_path(values),"description"=>values.description,"title"=>values.title,"file"=>values.file,"gallery_album_id"=>values.gallery_album_id,"tag_ids"=>values.tag_ids,"tag_names"=>tags} end render :json=>{"images" => @output}.to_json end @@ -104,6 +104,14 @@ class Panel::Gallery::FrontEnd::AlbumsController < OrbitWidgetController render :json=>tags.to_json end + def theater + @tags = GalleryTag.all + @image = GalleryImage.find(params[:album_id]) + @albumid = @image.gallery_album_id + @album = GalleryAlbum.find(@albumid) + @images = @album.gallery_images.all + end + end diff --git a/vendor/built_in_modules/gallery/app/views/panel/gallery/front_end/albums/create.js.erb b/vendor/built_in_modules/gallery/app/views/panel/gallery/front_end/albums/create.js.erb deleted file mode 100644 index 36cfe297..00000000 --- a/vendor/built_in_modules/gallery/app/views/panel/gallery/front_end/albums/create.js.erb +++ /dev/null @@ -1,3 +0,0 @@ -var gal = new galleryAPI(); -gal.loadAlbums("all"); -rcom.modalWindowClose(); diff --git a/vendor/built_in_modules/gallery/app/views/panel/gallery/front_end/albums/edit.html.erb b/vendor/built_in_modules/gallery/app/views/panel/gallery/front_end/albums/edit.html.erb deleted file mode 100644 index 1052609e..00000000 --- a/vendor/built_in_modules/gallery/app/views/panel/gallery/front_end/albums/edit.html.erb +++ /dev/null @@ -1,137 +0,0 @@ -<%= stylesheet_link_tag "gallery" %> -