From bd154c9cabc5d906099e5882436df77a8c40b554 Mon Sep 17 00:00:00 2001 From: thomaschen <99703040@nccu.edu.tw> Date: Fri, 13 Dec 2013 11:53:32 +0800 Subject: [PATCH] fix link widget title --- .../panel/web_resource/widget/web_links_controller.rb | 3 ++- .../panel/web_resource/widget/web_links/_index.html.erb | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/vendor/built_in_modules/web_resource/app/controllers/panel/web_resource/widget/web_links_controller.rb b/vendor/built_in_modules/web_resource/app/controllers/panel/web_resource/widget/web_links_controller.rb index 1fc3b001..481561c8 100644 --- a/vendor/built_in_modules/web_resource/app/controllers/panel/web_resource/widget/web_links_controller.rb +++ b/vendor/built_in_modules/web_resource/app/controllers/panel/web_resource/widget/web_links_controller.rb @@ -11,7 +11,8 @@ class Panel::WebResource::Widget::WebLinksController < OrbitWidgetController def index @part = PagePart.find(params[:part_id]) - + @title = @part.title_translations[I18n.locale.to_s] + if @part.widget_data_count @page_num = @part.widget_data_count else diff --git a/vendor/built_in_modules/web_resource/app/views/panel/web_resource/widget/web_links/_index.html.erb b/vendor/built_in_modules/web_resource/app/views/panel/web_resource/widget/web_links/_index.html.erb index f2ffc883..b6a52189 100644 --- a/vendor/built_in_modules/web_resource/app/views/panel/web_resource/widget/web_links/_index.html.erb +++ b/vendor/built_in_modules/web_resource/app/views/panel/web_resource/widget/web_links/_index.html.erb @@ -1,3 +1,8 @@ +<% # encoding: utf-8 %> +<% if @title %> +

<%= @title %>

+<% end %> +