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

This commit is contained in:
Dan Hansen 2010-12-12 00:06:10 -05:00
commit 20e2c2ed25
6 changed files with 96 additions and 82 deletions

View file

@ -29,6 +29,16 @@ module ApplicationHelper
post.aspect_ids.include?(a.id)
end
end
def aspect_badge aspects
str = ''
if aspects.count > 1
str = "<span class='aspect_badge all'>All aspects</span>"
elsif aspects.count == 1
aspect = aspects.first
str = "<span class='aspect_badge single'><a href=#{aspect_path(aspect)}>#{aspect.name}</a></span>"
end
str.html_safe
end
def aspect_links aspects, opts={}
str = ""
aspects.each do |a|
@ -62,7 +72,7 @@ module ApplicationHelper
aspects_path
end
end
def object_path(object, opts = {})
return "" if object.nil?
object = object.person if object.is_a? User

View file

@ -23,15 +23,15 @@
= stylesheet_link_tag "blueprint/print", :media => 'print'
= include_stylesheets :default, :media => 'all'
= javascript_include_tag "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"
:javascript
!window.jQuery && document.write(unescape('%3Cscript src="/javascripts/vendor/jquery144.min.js"%3E%3C/script%3E'))
- unless @landing_page
= include_javascripts :main
- if current_user
= include_javascripts :flash_socket unless modern_browser?
= javascript_include_tag 'web-socket-receiver'
@ -94,7 +94,7 @@
%li= link_to t('layouts.header.code'), "#{root_url}source.tar.gz"
-if !@landing_page && request.url.match(/joindiaspora.com/)
:javascript
:javascript
var is_ssl = ("https:" == document.location.protocol);
var asset_host = is_ssl ? "https://s3.amazonaws.com/getsatisfaction.com/" : "http://s3.amazonaws.com/getsatisfaction.com/";
document.write(unescape("%3Cscript src='" + asset_host + "javascripts/feedback-v2.js' type='text/javascript'%3E%3C/script%3E"));
@ -102,10 +102,10 @@
:javascript
var feedback_widget_options = {};
feedback_widget_options.display = "overlay";
feedback_widget_options.display = "overlay";
feedback_widget_options.company = "diaspora";
feedback_widget_options.placement = "right";
feedback_widget_options.color = "#222";
feedback_widget_options.style = "idea";
var feedback_widget = new GSFN.feedback_widget(feedback_widget_options);

View file

@ -3,15 +3,15 @@
.from
%h2
= person.name
- if current_user.owns?(post)
.aspect
%ul
- if post.public?
=t('the_world')
- else
- for aspect in post.aspects
%li= link_to aspect.name, aspect
- if post.public?
%span.arrow
%span.aspect_badge.public
=t('the_world')
- elsif current_user.owns?(post)
%span.arrow ➔
=aspect_badge(aspects_with_post(post.aspects, post))
#person_nav_links
= link_to t('layouts.header.view_profile'), person_path(person)

View file

@ -2,32 +2,28 @@
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
%li.message{:data=>{:guid=>post.id}, :class => ('public' if post.public?)}
%li.message{:data=>{:guid=>post.id}}
=person_image_link(person)
.public_badge
- if post.public?
= image_tag 'icons/globe.png', :title => "public post"
.content
.from
.right
- reshare_aspects = aspects_without_post(aspects, post)
- unless reshare_aspects.empty?
= render 'shared/reshare', :aspects => reshare_aspects, :post => post
= link_to t('delete'), status_message_path(post), :confirm => t('are_you_sure'), :method => :delete, :remote => true, :class => "delete"
%h4
=person_link(person)
- if person.owner_id == current_user.id
.aspect
%ul
- if post.public?
%li= t('the_world')
- else
=aspect_links(aspects_with_post(aspects, post))
- if post.public?
%span.arrow ➔
%span.aspect_badge.public
= t('the_world')
- elsif person.owner_id == current_user.id
%span.arrow ➔
=aspect_badge(aspects_with_post(aspects, post))
.right
- reshare_aspects = aspects_without_post(aspects, post)
- unless reshare_aspects.empty?
= render 'shared/reshare', :aspects => reshare_aspects, :post => post
= link_to t('delete'), status_message_path(post), :confirm => t('are_you_sure'), :method => :delete, :remote => true, :class => "delete"
= render 'status_messages/status_message', :post => post, :photos => photos

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -12,7 +12,7 @@ a
:text
:decoration none
&:hover
:color #22AAE0
:color #4CCAE0
&:active
:color #005D9C
@ -243,40 +243,21 @@ header
:border none
:height 370px
:width 500px
.from
:text
:shadow 0 1px #fff
.aspect
:cursor default
h4
:display inline
:color #bbb
a
:font
:weight normal
:color #bbb
&:hover
:text
:decoration underline
&:active
:color #999
ul
:display inline
:margin 0
:padding 0
li
:display inline
&:after
:content ","
&:last-child:after
:content ""
a
:font
:weight bold
.arrow
:color #ccc
:font
:weight lighter
#author_info
:position relative
:margin
@ -302,12 +283,6 @@ header
:margin
:bottom -2px
.aspect
ul > li a
:font
:weight 200
#person_nav_links
a
:margin
@ -1397,7 +1372,6 @@ ul.aspects
&:hover
:background
:color #fafafa
.right
:top 12px
@ -1969,20 +1943,6 @@ h3,h4
:font
:size 12px
.stream
.public_badge
:position absolute
:top 60px
:left 25px
.message.public
:background
:color #FEFFF0
&:hover
:background
:color #FEFFE3
#already_invited_pane
h4
:color #666
@ -1995,3 +1955,51 @@ h3,h4
.term
:font
:weight bold
.aspect_badge
:color #fff
:line-height auto
:padding 0 4px
:-webkit-border-radius 3px
:-moz-border-radius 3px
:border-radius 3px
:display inline-block
:font
:size smaller
:weight normal
:text
:shadow none
:cursor default
a
:color #fff
:font
:weight normal
&:hover
:color #eee
.aspect_badge.public
:background
:color #C0E76C
.aspect_badge.single
:background
:color #999
.aspect_badge.all
:background
:color #ccc
.stream
.arrow,
.aspect_badge
:position relative
.arrow
:top -0.1em
.aspect_badge
:top -0.2em