back button fix for frontend

This commit is contained in:
Harry Bomrah 2012-11-21 15:00:07 +08:00
parent 4966537491
commit 9fc8ec8e16
4 changed files with 5 additions and 3 deletions

View File

@ -10,6 +10,7 @@ class Panel::Gallery::FrontEnd::AlbumsController < OrbitWidgetController
@album.tag_ids.each do |tag|
@tags << GalleryTag.find(tag)[I18n.locale]
end
end
def get_albums
@ -96,6 +97,7 @@ class Panel::Gallery::FrontEnd::AlbumsController < OrbitWidgetController
tags.each do |tag|
@tagnames << GalleryTag.find(tag)[I18n.locale]
end
@back_link = panel_gallery_front_end_album_path(@albumid)
end

View File

@ -36,7 +36,7 @@
gallery.loadAlbums(gallery.urlVars['tag']);
}else{
gallery.loadArea = "albums";
g.loadAlbums("all");
gallery.loadAlbums("all");
}
</script>

View File

@ -20,7 +20,7 @@
<!-- tag end -->
<div class="form-actions form-fixed pagination-right rghead">
<div class="rgfn">
<a class="bt-back rgbt" title="<%= I18n.t("gallery.back_to_albums") %>" href="gallery"><i class="icon-arrow-left"></i> <%= I18n.t("gallery.back_to_albums") %></a>
<a class="bt-back rgbt" title="<%= I18n.t("gallery.back_to_albums") %>" href="<%= panel_gallery_front_end_albums_path %>"><i class="icon-arrow-left"></i> <%= I18n.t("gallery.back_to_albums") %></a>
</div>
</div>
</div>

View File

@ -42,7 +42,7 @@
<!-- tag end -->
<div class="form-actions form-fixed pagination-right rghead">
<div class="rgfn">
<a class="bt-back rgbt" title="<%= I18n.t("gallery.back_to_albums") %>" href="gallery?id=<%= @albumid %>"><i class="icon-arrow-left"></i> <%= I18n.t("gallery.back_to_albums") %></a>
<a class="bt-back rgbt" title="<%= I18n.t("gallery.back_to_albums") %>" href="<%= @back_link %>"><i class="icon-arrow-left"></i> <%= I18n.t("gallery.back_to_albums") %></a>
</div>
</div>
</div>