Skip to content
Snippets Groups Projects
Commit d87345ca authored by danielvincent's avatar danielvincent
Browse files

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

parents ea00d35f d68644c3
No related branches found
No related tags found
No related merge requests found
......@@ -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)")
......
......@@ -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
......@@ -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); };
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment