diff --git a/app/controllers/admin/users_new_interface_controller.rb b/app/controllers/admin/users_new_interface_controller.rb index 8c5ec93a..69c22ed6 100644 --- a/app/controllers/admin/users_new_interface_controller.rb +++ b/app/controllers/admin/users_new_interface_controller.rb @@ -1,9 +1,13 @@ -class Admin::UsersNewInterfaceController < ApplicationController +class Admin::UsersNewInterfaceController < OrbitBackendController layout "new_admin" - before_filter :authenticate_user! - before_filter :set_attribute, :only => [:index, :show, :new, :edit] + # before_filter :authenticate_user! + # before_filter :set_attribute, :only => [:index, :show, :new, :edit] + before_filter :force_order_for_visitor,:only=>[:index,:show] + before_filter :force_order_for_user,:except => [:index,:show] + before_filter :for_app_sub_manager,:except => [:index,:show] + def index get_tags get_sub_roles diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 07d6b577..ba018099 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -260,12 +260,12 @@ module ApplicationHelper end def share_links(object, key) - js = '' - js << "\n" rescue '' - js << "\n" rescue '' - js << "\n" rescue '' + # js = '' + # js << "\n" rescue '' + # js << "\n" rescue '' + # js << "\n" rescue '' content_tag :div, :class => 'fb' do - concat social_share_button_tag(object.title, :fb_url => generate_fb_url(object,key), :image => "http://#{request.env['HTTP_HOST']}#{object.image.url}") + concat social_share_button_tag(object.title, :fb_url => generate_fb_url(object,key), :image => "http://#{request.env['HTTP_HOST']}#{object.image.url if !object.image.blank?}") # concat javascript_tag "$('head').append('#{j js}');" end end diff --git a/app/views/admin/users_new_interface/_filter.html.erb b/app/views/admin/users_new_interface/_filter.html.erb index 3262ea5d..4033ff5e 100644 --- a/app/views/admin/users_new_interface/_filter.html.erb +++ b/app/views/admin/users_new_interface/_filter.html.erb @@ -61,8 +61,10 @@ - - + <% if is_admin? %> + + + <%end%> <%= t("admin.new_admin.attributes.roles")%> <%= t("admin.new_admin.attributes.name")%> diff --git a/app/views/admin/users_new_interface/_index_paginator.html.erb b/app/views/admin/users_new_interface/_index_paginator.html.erb index 04fff093..3d8864d0 100644 --- a/app/views/admin/users_new_interface/_index_paginator.html.erb +++ b/app/views/admin/users_new_interface/_index_paginator.html.erb @@ -1,7 +1,9 @@
+ <% if is_admin? %> <%= link_to(new_admin_users_new_interface_path,:class=> "btn btn-primary pull-right") do%> <%= t("admin.new_admin.action.add")%> <% end -%> + <%end -%>
<%= paginate @users, :params => {:inner => false}%>
diff --git a/app/views/admin/users_new_interface/_user_for_listing.html.erb b/app/views/admin/users_new_interface/_user_for_listing.html.erb index 9df1eb10..e7fe44ee 100644 --- a/app/views/admin/users_new_interface/_user_for_listing.html.erb +++ b/app/views/admin/users_new_interface/_user_for_listing.html.erb @@ -1,5 +1,5 @@ - + <% if is_admin? %><% end%>
@@ -48,19 +51,21 @@
- <% if @authenticated %> + <%# if @authenticated %> - <% end %> + <%# end %>
+ + <%end%> diff --git a/vendor/built_in_modules/gallery/app/views/panel/gallery/front_end/albums/show.html.erb b/vendor/built_in_modules/gallery/app/views/panel/gallery/front_end/albums/show.html.erb index c0d7fb1f..10520358 100644 --- a/vendor/built_in_modules/gallery/app/views/panel/gallery/front_end/albums/show.html.erb +++ b/vendor/built_in_modules/gallery/app/views/panel/gallery/front_end/albums/show.html.erb @@ -20,7 +20,7 @@
diff --git a/vendor/built_in_modules/gallery/app/views/panel/gallery/front_end/albums/theater.html.erb b/vendor/built_in_modules/gallery/app/views/panel/gallery/front_end/albums/theater.html.erb index 58137ea5..dc1a38f6 100644 --- a/vendor/built_in_modules/gallery/app/views/panel/gallery/front_end/albums/theater.html.erb +++ b/vendor/built_in_modules/gallery/app/views/panel/gallery/front_end/albums/theater.html.erb @@ -42,7 +42,7 @@
diff --git a/vendor/built_in_modules/gallery/app/views/panel/gallery/front_end/orbit_galleries/index.html.erb b/vendor/built_in_modules/gallery/app/views/panel/gallery/front_end/orbit_galleries/index.html.erb index 5d8f5a49..9a7aa973 100644 --- a/vendor/built_in_modules/gallery/app/views/panel/gallery/front_end/orbit_galleries/index.html.erb +++ b/vendor/built_in_modules/gallery/app/views/panel/gallery/front_end/orbit_galleries/index.html.erb @@ -14,7 +14,7 @@
- <% if @authenticated %> + <%# if @authenticated %>
@@ -41,7 +41,7 @@
- <% end %> + <%# end %> <% content_for :page_specific_javascript do %> <%= javascript_include_tag "jquery.tinyscrollbar" %> <% end %> diff --git a/vendor/built_in_modules/gprs/app/controllers/panel/gprs/back_end/locations_controller.rb b/vendor/built_in_modules/gprs/app/controllers/panel/gprs/back_end/locations_controller.rb index 8609cce1..1ba13703 100644 --- a/vendor/built_in_modules/gprs/app/controllers/panel/gprs/back_end/locations_controller.rb +++ b/vendor/built_in_modules/gprs/app/controllers/panel/gprs/back_end/locations_controller.rb @@ -3,7 +3,7 @@ class Panel::Gprs::BackEnd::LocationsController < OrbitBackendController #before_filter :clean_values, :only => [:create, :update] before_filter :force_order_for_visitor,:only => [:index, :new, :edit, :delete] - before_filter :force_order_for_user,:except => :get_locations + before_filter :force_order_for_user,:except => [:get_locations,:index] #before_filter :for_app_sub_manager,:except => [:index, :new, :edit, :delete, :get_locations] def index diff --git a/vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/index.html.erb b/vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/index.html.erb index eb8b0485..95b72b73 100644 --- a/vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/index.html.erb +++ b/vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/index.html.erb @@ -6,8 +6,10 @@ <%= t('location.longitude') %> <%= t('location.latitude') %> <%= t('location.description') %> - <%= t('location.edit') %> - <%= t('location.delete') %> + <%if is_manager? %> + <%= t('location.edit') %> + <%= t('location.delete') %> + <% end %> @@ -18,11 +20,15 @@ <%= location.longitude%> <%= location.latitude%> <%= location.description%> - <%= link_to 'Edit', edit_panel_gprs_back_end_location_path(location) %> - <%= link_to 'Destroy', panel_gprs_back_end_location_path(location), method: :delete , :confirm => t(:sure?) %> + <%if is_manager? %> + <%= link_to 'Edit', edit_panel_gprs_back_end_location_path(location) %> + <%= link_to 'Destroy', panel_gprs_back_end_location_path(location), method: :delete , :confirm => t(:sure?) %> + <%end%> + <% end %> - +<%if is_manager? %> <%= link_to 'New', new_panel_gprs_back_end_location_path %> +<% end %> \ No newline at end of file