Fixed import data controller to work for admin and user only
This commit is contained in:
parent
363a87ee2a
commit
bc05eca7cc
|
@ -6,6 +6,8 @@ require 'open-uri'
|
||||||
class Admin::ImportDataController < OrbitBackendController
|
class Admin::ImportDataController < OrbitBackendController
|
||||||
# helper Admin::PagePartsHelper
|
# helper Admin::PagePartsHelper
|
||||||
# include Admin::FrontendWidgetInterface
|
# include Admin::FrontendWidgetInterface
|
||||||
|
open_for_user
|
||||||
|
open_for_admin
|
||||||
|
|
||||||
def get_teacher_data
|
def get_teacher_data
|
||||||
uri = URI("https://localhost:8000/teachers.xml")
|
uri = URI("https://localhost:8000/teachers.xml")
|
||||||
|
|
|
@ -77,7 +77,6 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<% 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.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.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} %>
|
<%= paginate @writing_journals, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<div id="dialog" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="Delete item" aria-hidden="true">
|
<div id="dialog" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="Delete item" aria-hidden="true">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
|
|
Reference in New Issue