Merge branch 'master' of github.com:diaspora/diaspora

This commit is contained in:
danielvincent 2010-10-19 12:10:36 -07:00
commit d87345ca33
4 changed files with 10 additions and 14 deletions

View file

@ -7,6 +7,14 @@ module ApplicationHelper
!@aspect.is_a?(Symbol) && @aspect.id == aspect.id
end
def aspect_or_all_path aspect
if @aspect.is_a? Aspect
aspect_path @aspect
else
aspects_path
end
end
def object_path(object, opts = {})
object = object.person if object.is_a? User
eval("#{object.class.to_s.underscore}_path(object, opts)")

View file

@ -14,12 +14,4 @@ module AspectsHelper
"<span class='grey' title=#{I18n.t('aspects.helper.aspect_not_empty')}>#{I18n.t('aspects.helper.remove')}</span>"
end
end
def aspect_id(aspect)
if aspect.class == Aspect
aspect.id
else
:all
end
end
end

View file

@ -4,7 +4,7 @@
= javascript_include_tag 'FABridge', 'swfobject', 'web_socket'
:javascript
WebSocket.__swfLocation = "/javascripts/WebSocketMain.swf";
WebSocket.__swfLocation = "#{javascript_path 'WebSocketMain.swf'}";
$(document).ready(function(){
function debug(str){ $("#debug").append("<p>" + str); };

View file

@ -28,11 +28,7 @@
%br
%br
%ul
- if @aspect == :all
%li= link_to 'stream', root_path
- else
%li= link_to 'stream', aspect_path(@aspect)
%li= link_to 'stream', aspect_or_all_path(@aspect)
%li= link_to t('.photos'), albums_path(:aspect => @aspect)
%br