Added sync button in personal plugin back_end

This commit is contained in:
Manson Wang 2013-12-05 10:26:19 +08:00
parent 5e9c6924e2
commit 58051caac1
6 changed files with 14 additions and 23 deletions

View File

@ -322,12 +322,8 @@ def sync_conference_data
puts "No conference by Teacher" puts "No conference by Teacher"
end end
end end
respond_to do |format|
format.html redirect_to request.referer
format.json { render json: {"success"=>true}.to_json}
end
end end
@ -400,12 +396,7 @@ def sync_conference_data
end end
end end
respond_to do |format| redirect_to request.referer
format.html
format.json { render json: {"success"=>true}.to_json}
end
end end
def sync_book_data def sync_book_data
@ -449,12 +440,7 @@ def sync_book_data
end end
end end
end end
respond_to do |format| redirect_to request.referer
format.html
format.json { render json: {"success"=>true}.to_json}
end
end end

View File

@ -351,6 +351,7 @@ en:
brief_intro : "Brief Intro." brief_intro : "Brief Intro."
complete_list : "Complete List" complete_list : "Complete List"
frontend_page : "Frontend Page" frontend_page : "Frontend Page"
sync_data: "Synchronize"
phone_number: "Phone Number" phone_number: "Phone Number"
picture: Picture picture: Picture
placeholder: Field Hint placeholder: Field Hint

View File

@ -354,6 +354,7 @@ zh_tw:
brief_intro : "摘要" brief_intro : "摘要"
complete_list : "完整列表" complete_list : "完整列表"
frontend_page : "前台呈現" frontend_page : "前台呈現"
sync_data: "同步資料"
phone_number: "電話" phone_number: "電話"
picture: 圖片 picture: 圖片
placeholder: 欄位提示文字 placeholder: 欄位提示文字

View File

@ -75,8 +75,9 @@
<% if is_admin? %> <% if is_admin? %>
<div class="bottomnav clearfix"> <div class="bottomnav clearfix">
<div class="action pull-right"> <div class="action pull-right">
<%= 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('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('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.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' %>
</div> </div>
<div class="pagination pagination-centered"> <div class="pagination pagination-centered">
<%= paginate @writing_books, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %> <%= paginate @writing_books, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>

View File

@ -75,8 +75,9 @@
<% if is_admin? %> <% if is_admin? %>
<div class="bottomnav clearfix"> <div class="bottomnav clearfix">
<div class="action pull-right"> <div class="action pull-right">
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('personal_plugins.edit_brief_intro'), panel_personal_conference_back_end_personal_conference_intros_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_conference_data_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_conference_back_end_writing_conference_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_conference_back_end_personal_conference_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_conference_back_end_writing_conference_path(:user_id => @user.id), :class => 'btn btn-primary' %>
</div> </div>
<div class="pagination pagination-centered"> <div class="pagination pagination-centered">
<%= paginate @writing_conferences, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %> <%= paginate @writing_conferences, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>

View File

@ -80,8 +80,9 @@
<% if is_admin? %> <% if is_admin? %>
<div class="bottomnav clearfix"> <div class="bottomnav clearfix">
<div class="action pull-right"> <div class="action pull-right">
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('personal_plugins.edit_brief_intro'), panel_personal_journal_back_end_personal_journal_intros_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_journal_paper_data_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_journal_back_end_writing_journal_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_journal_back_end_personal_journal_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_journal_back_end_writing_journal_path(:user_id => @user.id), :class => 'btn btn-primary' %>
</div> </div>
<div class="pagination pagination-centered"> <div class="pagination pagination-centered">
<%= paginate @writing_journals, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %> <%= paginate @writing_journals, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>