if !user.nil? and user.has_permission?('edit_profile', profile) page.replace_html "profile-admin-url-#{@block.id}", link_to(_('Control panel'), @block.owner.admin_url) else page.hide "profile-admin-url-#{@block.id}" end page.replace_html "profile-info-options-#{@block.id}", :file => view_for_profile_actions(@block.owner.class)