Skip to content
Extraits de code Groupes Projets
Valider eaea26e5 rédigé par ilya's avatar ilya
Parcourir les fichiers

the public aspect is now set in application controller

parent 796f198d
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -23,7 +23,9 @@ class ApplicationController < ActionController::Base
def set_friends_and_status
if current_user
if params[:aspect] == nil || params[:aspect] == 'all'
if params[:action] == 'public'
@aspect = :public
elsif params[:aspect] == nil || params[:aspect] == 'all'
@aspect = :all
else
@aspect = current_user.aspect_by_id( params[:aspect])
......
......@@ -50,7 +50,6 @@ class AspectsController < ApplicationController
:scope=>MiniFB.scopes.join(","))
@posts = current_user.visible_posts(:by_members_of => :all).paginate :page => params[:page], :per_page => 15, :order => 'created_at DESC'
@aspect = :all
respond_with @aspect
end
......
......@@ -8,7 +8,7 @@
- for friend in @friends
= person_image_link(friend)
-unless @aspect == :all
-unless (@aspect == :all) || (@aspect == :public)
= link_to (image_tag('add_friend_button.png', :height => "50px", :width => "50px")), "#add_request_pane", :id => 'add_request_button'
.yo{:style => 'display:none'}
......
......@@ -5,20 +5,21 @@
#publisher
= owner_image_tag
= @aspect
= form_for StatusMessage.new, :remote => true do |f|
= f.error_messages
%p
%label{:for => "status_message_message"} Message
= f.text_area :message, :rows => 2, :value => params[:prefill]
= "going to Facebook as #{MiniFB.get(@access_token, 'me')[:name]}" if @logged_in && (params[:action] == 'public')
= "going to Facebook as #{MiniFB.get(@access_token, 'me')[:name]}" if @logged_in && @aspect == :public
= f.hidden_field( :public, :value => (params[:action] == 'public') )
%ul.aspect_selector{ :style => "display:none;"}
going to...
- for aspect in @aspects
%li
= check_box_tag("aspect_ids[]", aspect.id, (params[:action] == 'public') || @aspect == :all || current_aspect?(aspect) )
= check_box_tag("aspect_ids[]", aspect.id, @aspect == :public || @aspect == :all || current_aspect?(aspect) )
= aspect.name
= f.submit "Share"
......
......@@ -10,6 +10,8 @@
= link_to "All Aspects", root_path
- elsif @aspect == :manage
= "Manage Aspects"
- elsif @aspect == :public
= "Public"
- else
= link_to @aspect.name, @aspect
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter