diff --git a/app/controllers/admin/import_data_controller.rb b/app/controllers/admin/import_data_controller.rb index 800c96b0..7ae3b265 100644 --- a/app/controllers/admin/import_data_controller.rb +++ b/app/controllers/admin/import_data_controller.rb @@ -322,12 +322,8 @@ def sync_conference_data puts "No conference by Teacher" end end - respond_to do |format| - - format.html - format.json { render json: {"success"=>true}.to_json} - end + redirect_to request.referer end @@ -400,12 +396,7 @@ def sync_conference_data end end - respond_to do |format| - - format.html - format.json { render json: {"success"=>true}.to_json} - - end + redirect_to request.referer end def sync_book_data @@ -449,12 +440,7 @@ def sync_book_data end end end - respond_to do |format| - - format.html - format.json { render json: {"success"=>true}.to_json} - - end + redirect_to request.referer end diff --git a/config/locales/en.yml b/config/locales/en.yml index c7f91ff4..354afafe 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -351,6 +351,7 @@ en: brief_intro : "Brief Intro." complete_list : "Complete List" frontend_page : "Frontend Page" + sync_data: "Synchronize" phone_number: "Phone Number" picture: Picture placeholder: Field Hint diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index d0e2d70a..2323f3c4 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -354,6 +354,7 @@ zh_tw: brief_intro : "摘要" complete_list : "完整列表" frontend_page : "前台呈現" + sync_data: "同步資料" phone_number: "電話" picture: 圖片 placeholder: 欄位提示文字 diff --git a/vendor/built_in_modules/personal_book/app/views/panel/personal_book/plugin/_profile.html.erb b/vendor/built_in_modules/personal_book/app/views/panel/personal_book/plugin/_profile.html.erb index d9df9f31..ee6aa786 100644 --- a/vendor/built_in_modules/personal_book/app/views/panel/personal_book/plugin/_profile.html.erb +++ b/vendor/built_in_modules/personal_book/app/views/panel/personal_book/plugin/_profile.html.erb @@ -75,8 +75,9 @@ <% if is_admin? %>
- <%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('personal_plugins.edit_brief_intro'), panel_personal_book_back_end_personal_book_intros_path(:user_id => @user.id), :class => 'btn btn-primary' %> - <%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('announcement.add_new'), new_panel_personal_book_back_end_writing_book_path(:user_id => @user.id), :class => 'btn btn-primary' %> + <%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('personal_plugins.sync_data'), admin_import_data_sync_book_data_path(:user_id => @user.id), :class => 'btn btn-primary' %> + <%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('personal_plugins.edit_brief_intro'), panel_personal_book_back_end_personal_book_intros_path(:user_id => @user.id), :class => 'btn btn-primary' %> + <%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('announcement.add_new'), new_panel_personal_book_back_end_writing_book_path(:user_id => @user.id), :class => 'btn btn-primary' %>