minor changes
This commit is contained in:
parent
34764fb28d
commit
3423167600
|
@ -69,11 +69,11 @@
|
||||||
|
|
||||||
<%= content_tag :li, :class => active_for_controllers('albums','album_images','gallery_categories','/panel/gallery/back_end/tags') || active_for_app_auth("gallery") do -%>
|
<%= content_tag :li, :class => active_for_controllers('albums','album_images','gallery_categories','/panel/gallery/back_end/tags') || active_for_app_auth("gallery") do -%>
|
||||||
<%= link_to content_tag(:i, nil, :class => 'icons-picture') + t('admin.orbit_gallery'), panel_gallery_back_end_albums_path %>
|
<%= link_to content_tag(:i, nil, :class => 'icons-picture') + t('admin.orbit_gallery'), panel_gallery_back_end_albums_path %>
|
||||||
<%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('orbit_galleries') ) do -%>
|
<%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('albums') ) do -%>
|
||||||
<%#= content_tag :li, link_to(t('admin.ad.all_banners'), admin_ad_banners_path), :class => active_for_action('ad_banners', 'index') %>
|
<%#= content_tag :li, link_to(t('admin.ad.all_banners'), admin_ad_banners_path), :class => active_for_action('ad_banners', 'index') %>
|
||||||
<%#= content_tag :li, link_to(t('admin.ad.new_banner'), new_admin_ad_banner_path), :class => active_for_action('ad_banners', 'new') %>
|
<%#= content_tag :li, link_to(t('admin.ad.new_banner'), new_admin_ad_banner_path), :class => active_for_action('ad_banners', 'new') %>
|
||||||
<%#= content_tag :li, link_to(t('admin.ad.new_image'), new_ad_image_admin_ad_banners_path), :class => active_for_action('ad_images', 'new') %>
|
<%#= content_tag :li, link_to(t('admin.ad.new_image'), new_ad_image_admin_ad_banners_path), :class => active_for_action('ad_images', 'new') %>
|
||||||
<%= content_tag :li, link_to(t('gallery.categories'), panel_gallery_back_end_gallery_categories_path), :class => active_for_action('/panel/gallery/back_end/categorylist','categorylist') %>
|
<%= content_tag :li, link_to(t('gallery.categories'), panel_gallery_back_end_gallery_categories_path), :class => active_for_action('/panel/gallery/back_end/gallery_categories','gallery_categories') %>
|
||||||
<%= content_tag :li, link_to(t('gallery.tags'), panel_gallery_back_end_tags_path), :class => active_for_action('/panel/gallery/back_end/tags', 'index') %>
|
<%= content_tag :li, link_to(t('gallery.tags'), panel_gallery_back_end_tags_path), :class => active_for_action('/panel/gallery/back_end/tags', 'index') %>
|
||||||
<%= content_tag :li, link_to(t('admin.module.authorization'),admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: "Gallery"}))), :class => active_for_app_auth('gallery') if (is_admin? rescue nil) %>
|
<%= content_tag :li, link_to(t('admin.module.authorization'),admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: "Gallery"}))), :class => active_for_app_auth('gallery') if (is_admin? rescue nil) %>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
|
@ -12,7 +12,6 @@ class Panel::Gallery::BackEnd::AlbumImagesController < OrbitBackendController
|
||||||
@albumid = @image.gallery_album_id
|
@albumid = @image.gallery_album_id
|
||||||
@album = GalleryAlbum.find(@albumid)
|
@album = GalleryAlbum.find(@albumid)
|
||||||
@images = @album.gallery_images.all
|
@images = @album.gallery_images.all
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -29,39 +28,4 @@ class Panel::Gallery::BackEnd::AlbumImagesController < OrbitBackendController
|
||||||
render :json =>{"success"=>true}.to_json
|
render :json =>{"success"=>true}.to_json
|
||||||
end
|
end
|
||||||
|
|
||||||
def update_album
|
|
||||||
# data = params['data']
|
|
||||||
# album_name = params['name']
|
|
||||||
# aid = params['aid']
|
|
||||||
# data.each do |d|
|
|
||||||
# image = GalleryImage.find(d[1][:id])
|
|
||||||
# image.update_attributes(:description=>d[1][:text])
|
|
||||||
# end
|
|
||||||
# album = GalleryAlbum.find(aid)
|
|
||||||
# album.update_attributes(:name => album_name)
|
|
||||||
# album_names = params[:albumnm]
|
|
||||||
# data = params[:data]
|
|
||||||
# aid =params[:aid]
|
|
||||||
# debugger
|
|
||||||
# data.each do |d|
|
|
||||||
# image = GalleryImage.find(d[1][:id])
|
|
||||||
# @site_valid_locales.each do |locale|
|
|
||||||
# image.description_translations[locale] = d[1][:text][locale]
|
|
||||||
# end
|
|
||||||
# image.save!
|
|
||||||
# end
|
|
||||||
|
|
||||||
# album = GalleryAlbum.find(aid)
|
|
||||||
|
|
||||||
# @site_valid_locales.each_with_index do |locale,i|
|
|
||||||
# album.name_translations[locale] = album_names[i]
|
|
||||||
# end
|
|
||||||
# album.save!
|
|
||||||
@album = GalleryAlbum.find(params[:id])
|
|
||||||
@album.update_attributes(params[:gallery_albums])
|
|
||||||
|
|
||||||
render :json =>{"success"=>true}.to_json
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Reference in New Issue