diff --git a/app/controllers/public/content_viewer_controller.rb b/app/controllers/public/content_viewer_controller.rb index 89041bd..d19897e 100644 --- a/app/controllers/public/content_viewer_controller.rb +++ b/app/controllers/public/content_viewer_controller.rb @@ -51,6 +51,11 @@ class ContentViewerController < ApplicationController return end + if request.xhr? && params[:toolbar] + render :partial => 'article_toolbar' + return + end + redirect_to_translation # At this point the page will be showed diff --git a/app/controllers/public/profile_controller.rb b/app/controllers/public/profile_controller.rb index 6f287fa..b9250b2 100644 --- a/app/controllers/public/profile_controller.rb +++ b/app/controllers/public/profile_controller.rb @@ -215,6 +215,14 @@ class ProfileController < PublicController end end + def profile_info + begin + @block = profile.blocks.find(params[:block_id]) + rescue + render :text => _('Profile information could not be loaded') + end + end + protected def check_access_to_profile diff --git a/app/helpers/lightbox_helper.rb b/app/helpers/lightbox_helper.rb index c5e213a..4567c3c 100644 --- a/app/helpers/lightbox_helper.rb +++ b/app/helpers/lightbox_helper.rb @@ -32,4 +32,8 @@ module LightboxHelper request.xhr? end + def lightbox_remote_button(type, label, url, options = {}) + button(type, label, url, lightbox_options(options, 'remote-lbOn')) + end + end diff --git a/app/views/blocks/profile_image.rhtml b/app/views/blocks/profile_image.rhtml index fe0fd30..465635a 100644 --- a/app/views/blocks/profile_image.rhtml +++ b/app/views/blocks/profile_image.rhtml @@ -14,14 +14,11 @@

<%= h block.owner.short_name %>

<% end %> -<% if !user.nil? and user.has_permission?('edit_profile', profile) %> -
- <%= link_to _('Control panel'), :controller => 'profile_editor' %> -
-<% end %> +
-
- <%= render :file => 'blocks/profile_info_actions/' + block.owner.class.name.underscore %> -
+
+ diff --git a/app/views/blocks/profile_info.rhtml b/app/views/blocks/profile_info.rhtml index 20e2f48..527bd16 100644 --- a/app/views/blocks/profile_info.rhtml +++ b/app/views/blocks/profile_info.rhtml @@ -14,15 +14,13 @@ -