Merge branch 'master' of github.com:diaspora/diaspora
This commit is contained in:
commit
d87345ca33
4 changed files with 10 additions and 14 deletions
|
|
@ -7,6 +7,14 @@ module ApplicationHelper
|
||||||
!@aspect.is_a?(Symbol) && @aspect.id == aspect.id
|
!@aspect.is_a?(Symbol) && @aspect.id == aspect.id
|
||||||
end
|
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 = {})
|
def object_path(object, opts = {})
|
||||||
object = object.person if object.is_a? User
|
object = object.person if object.is_a? User
|
||||||
eval("#{object.class.to_s.underscore}_path(object, opts)")
|
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>"
|
"<span class='grey' title=#{I18n.t('aspects.helper.aspect_not_empty')}>#{I18n.t('aspects.helper.remove')}</span>"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def aspect_id(aspect)
|
|
||||||
if aspect.class == Aspect
|
|
||||||
aspect.id
|
|
||||||
else
|
|
||||||
:all
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
= javascript_include_tag 'FABridge', 'swfobject', 'web_socket'
|
= javascript_include_tag 'FABridge', 'swfobject', 'web_socket'
|
||||||
:javascript
|
:javascript
|
||||||
WebSocket.__swfLocation = "/javascripts/WebSocketMain.swf";
|
WebSocket.__swfLocation = "#{javascript_path 'WebSocketMain.swf'}";
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
function debug(str){ $("#debug").append("<p>" + str); };
|
function debug(str){ $("#debug").append("<p>" + str); };
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,11 +28,7 @@
|
||||||
%br
|
%br
|
||||||
%br
|
%br
|
||||||
%ul
|
%ul
|
||||||
- if @aspect == :all
|
%li= link_to 'stream', aspect_or_all_path(@aspect)
|
||||||
%li= link_to 'stream', root_path
|
|
||||||
- else
|
|
||||||
%li= link_to 'stream', aspect_path(@aspect)
|
|
||||||
|
|
||||||
%li= link_to t('.photos'), albums_path(:aspect => @aspect)
|
%li= link_to t('.photos'), albums_path(:aspect => @aspect)
|
||||||
|
|
||||||
%br
|
%br
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue