Fixed import data controller to work for admin and user only
This commit is contained in:
parent
58051caac1
commit
0028a21307
|
@ -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")
|
||||
|
|
|
@ -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">
|
||||
|
|
Reference in New Issue