From 445a13c645b789b0079dd5931e1074f604aa3f04 Mon Sep 17 00:00:00 2001 From: Bernie Chiu Date: Fri, 13 Dec 2013 11:53:40 +0800 Subject: [PATCH] Fix Gallery widget title --- .../app/controllers/panel/gallery/widget/albums_controller.rb | 1 + .../app/views/panel/gallery/widget/albums/widget1.html.erb | 3 +++ 2 files changed, 4 insertions(+) diff --git a/vendor/built_in_modules/gallery/app/controllers/panel/gallery/widget/albums_controller.rb b/vendor/built_in_modules/gallery/app/controllers/panel/gallery/widget/albums_controller.rb index 060520a7..2ca33e69 100644 --- a/vendor/built_in_modules/gallery/app/controllers/panel/gallery/widget/albums_controller.rb +++ b/vendor/built_in_modules/gallery/app/controllers/panel/gallery/widget/albums_controller.rb @@ -2,6 +2,7 @@ class Panel::Gallery::Widget::AlbumsController < OrbitWidgetController def widget1 @part = PagePart.find(params[:part_id]) + @title = @part.title_translations[I18n.locale.to_s] vertical = @part.widget_options['vertical'].to_i rescue 0 horizontal = @part.widget_options['horizontal'].to_i rescue 0 diff --git a/vendor/built_in_modules/gallery/app/views/panel/gallery/widget/albums/widget1.html.erb b/vendor/built_in_modules/gallery/app/views/panel/gallery/widget/albums/widget1.html.erb index 0f65f708..1951067b 100644 --- a/vendor/built_in_modules/gallery/app/views/panel/gallery/widget/albums/widget1.html.erb +++ b/vendor/built_in_modules/gallery/app/views/panel/gallery/widget/albums/widget1.html.erb @@ -2,6 +2,9 @@ <%# content_for :page_specific_javascript do %> <%#= javascript_include_tag "cycle" %> <%# end %> +<% if @title %> +

<%= @title %>

+<% end %>