From 067a2a2d340a22058f239de75caf2a71ea4e7335 Mon Sep 17 00:00:00 2001 From: Lucas Melo Date: Mon, 19 Aug 2013 13:00:36 -0300 Subject: [PATCH] articles, profiles: stop using ajax for some logged-in stuff --- app/controllers/public/content_viewer_controller.rb | 5 ----- app/views/blocks/profile_image.rhtml | 14 ++++++++------ app/views/blocks/profile_info.rhtml | 13 +++++++------ app/views/content_viewer/view_page.rhtml | 8 +++----- app/views/profile/profile_info.rjs | 6 ------ public/designs/themes/base/style.css | 6 ++++++ 6 files changed, 24 insertions(+), 28 deletions(-) delete mode 100644 app/views/profile/profile_info.rjs diff --git a/app/controllers/public/content_viewer_controller.rb b/app/controllers/public/content_viewer_controller.rb index 519d006..969a785 100644 --- a/app/controllers/public/content_viewer_controller.rb +++ b/app/controllers/public/content_viewer_controller.rb @@ -43,11 +43,6 @@ class ContentViewerController < ApplicationController return end - if request.xhr? && params[:toolbar] - render :partial => 'article_toolbar' - return - end - redirect_to_translation if @page.profile.redirect_l10n # At this point the page will be showed diff --git a/app/views/blocks/profile_image.rhtml b/app/views/blocks/profile_image.rhtml index 5c5194d..be1f7ef 100644 --- a/app/views/blocks/profile_image.rhtml +++ b/app/views/blocks/profile_image.rhtml @@ -14,11 +14,13 @@

<%= h block.owner.short_name %>

<% end %> -
- -
+<% if !user.nil? and user.has_permission?('edit_profile', profile) %> + +<% end %> +
+ <%= render :file => view_for_profile_actions(block.owner.class) %> +
- diff --git a/app/views/blocks/profile_info.rhtml b/app/views/blocks/profile_info.rhtml index 012ffc8..edbaa1b 100644 --- a/app/views/blocks/profile_info.rhtml +++ b/app/views/blocks/profile_info.rhtml @@ -14,13 +14,15 @@ -