From b33fe549da3d1b1f7722a34a0efcf55002f8e5d6 Mon Sep 17 00:00:00 2001 From: thomaschen <99703040@nccu.edu.tw> Date: Fri, 13 Dec 2013 11:35:45 +0800 Subject: [PATCH] fix archive widget title --- .../panel/archive/widget/archive_files_controller.rb | 5 +++-- .../views/panel/archive/widget/archive_files/_index.html.erb | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/vendor/built_in_modules/archive/app/controllers/panel/archive/widget/archive_files_controller.rb b/vendor/built_in_modules/archive/app/controllers/panel/archive/widget/archive_files_controller.rb index 34265cdb..f2939a59 100644 --- a/vendor/built_in_modules/archive/app/controllers/panel/archive/widget/archive_files_controller.rb +++ b/vendor/built_in_modules/archive/app/controllers/panel/archive/widget/archive_files_controller.rb @@ -8,9 +8,10 @@ class Panel::Archive::Widget::ArchiveFilesController < OrbitWidgetController def index - @part = PagePart.find(params[:part_id]) + @part = PagePart.find(params[:part_id]) + @title = @part.title_translations[I18n.locale.to_s] - if @part.widget_data_count + if @part.widget_data_count @page_num = @part.widget_data_count else @page_num = 4 diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/widget/archive_files/_index.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/widget/archive_files/_index.html.erb index a4fa8bdf..0752dc18 100644 --- a/vendor/built_in_modules/archive/app/views/panel/archive/widget/archive_files/_index.html.erb +++ b/vendor/built_in_modules/archive/app/views/panel/archive/widget/archive_files/_index.html.erb @@ -1,5 +1,7 @@ <% # encoding: utf-8 %> - +<% if @title %> +