Fixed import data controller to work for admin and user only

This commit is contained in:
saurabhbhatia 2013-12-11 11:58:08 +08:00 committed by Manson Wang
parent 363a87ee2a
commit bc05eca7cc
2 changed files with 2 additions and 2 deletions

View File

@ -6,6 +6,8 @@ require 'open-uri'
class Admin::ImportDataController < OrbitBackendController
# helper Admin::PagePartsHelper
# include Admin::FrontendWidgetInterface
open_for_user
open_for_admin
def get_teacher_data
uri = URI("https://localhost:8000/teachers.xml")

View File

@ -77,7 +77,6 @@
</tbody>
</table>
<% 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' %>
@ -88,7 +87,6 @@
<%= paginate @writing_journals, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>
</div>
</div>
<% end %>
<div id="dialog" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="Delete item" aria-hidden="true">
<div class="modal-header">