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"
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

View File

@ -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

View File

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

View File

@ -75,6 +75,7 @@
<% if is_admin? %>
<div class="bottomnav clearfix">
<div class="action pull-right">
<%= 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' %>
</div>

View File

@ -75,6 +75,7 @@
<% if is_admin? %>
<div class="bottomnav clearfix">
<div class="action pull-right">
<%= 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('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>

View File

@ -80,6 +80,7 @@
<% if is_admin? %>
<div class="bottomnav clearfix">
<div class="action pull-right">
<%= 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('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>