Merge branch 'master' of github.com:diaspora/diaspora
This commit is contained in:
commit
20e2c2ed25
6 changed files with 96 additions and 82 deletions
|
|
@ -29,6 +29,16 @@ module ApplicationHelper
|
||||||
post.aspect_ids.include?(a.id)
|
post.aspect_ids.include?(a.id)
|
||||||
end
|
end
|
||||||
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={}
|
def aspect_links aspects, opts={}
|
||||||
str = ""
|
str = ""
|
||||||
aspects.each do |a|
|
aspects.each do |a|
|
||||||
|
|
@ -62,7 +72,7 @@ module ApplicationHelper
|
||||||
aspects_path
|
aspects_path
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def object_path(object, opts = {})
|
def object_path(object, opts = {})
|
||||||
return "" if object.nil?
|
return "" if object.nil?
|
||||||
object = object.person if object.is_a? User
|
object = object.person if object.is_a? User
|
||||||
|
|
|
||||||
|
|
@ -23,15 +23,15 @@
|
||||||
= stylesheet_link_tag "blueprint/print", :media => 'print'
|
= stylesheet_link_tag "blueprint/print", :media => 'print'
|
||||||
= include_stylesheets :default, :media => 'all'
|
= include_stylesheets :default, :media => 'all'
|
||||||
|
|
||||||
|
|
||||||
= javascript_include_tag "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"
|
= javascript_include_tag "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"
|
||||||
|
|
||||||
:javascript
|
:javascript
|
||||||
!window.jQuery && document.write(unescape('%3Cscript src="/javascripts/vendor/jquery144.min.js"%3E%3C/script%3E'))
|
!window.jQuery && document.write(unescape('%3Cscript src="/javascripts/vendor/jquery144.min.js"%3E%3C/script%3E'))
|
||||||
|
|
||||||
- unless @landing_page
|
- unless @landing_page
|
||||||
= include_javascripts :main
|
= include_javascripts :main
|
||||||
|
|
||||||
- if current_user
|
- if current_user
|
||||||
= include_javascripts :flash_socket unless modern_browser?
|
= include_javascripts :flash_socket unless modern_browser?
|
||||||
= javascript_include_tag 'web-socket-receiver'
|
= javascript_include_tag 'web-socket-receiver'
|
||||||
|
|
@ -94,7 +94,7 @@
|
||||||
%li= link_to t('layouts.header.code'), "#{root_url}source.tar.gz"
|
%li= link_to t('layouts.header.code'), "#{root_url}source.tar.gz"
|
||||||
|
|
||||||
-if !@landing_page && request.url.match(/joindiaspora.com/)
|
-if !@landing_page && request.url.match(/joindiaspora.com/)
|
||||||
:javascript
|
:javascript
|
||||||
var is_ssl = ("https:" == document.location.protocol);
|
var is_ssl = ("https:" == document.location.protocol);
|
||||||
var asset_host = is_ssl ? "https://s3.amazonaws.com/getsatisfaction.com/" : "http://s3.amazonaws.com/getsatisfaction.com/";
|
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"));
|
document.write(unescape("%3Cscript src='" + asset_host + "javascripts/feedback-v2.js' type='text/javascript'%3E%3C/script%3E"));
|
||||||
|
|
@ -102,10 +102,10 @@
|
||||||
:javascript
|
:javascript
|
||||||
var feedback_widget_options = {};
|
var feedback_widget_options = {};
|
||||||
|
|
||||||
feedback_widget_options.display = "overlay";
|
feedback_widget_options.display = "overlay";
|
||||||
feedback_widget_options.company = "diaspora";
|
feedback_widget_options.company = "diaspora";
|
||||||
feedback_widget_options.placement = "right";
|
feedback_widget_options.placement = "right";
|
||||||
feedback_widget_options.color = "#222";
|
feedback_widget_options.color = "#222";
|
||||||
feedback_widget_options.style = "idea";
|
feedback_widget_options.style = "idea";
|
||||||
var feedback_widget = new GSFN.feedback_widget(feedback_widget_options);
|
var feedback_widget = new GSFN.feedback_widget(feedback_widget_options);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,15 +3,15 @@
|
||||||
.from
|
.from
|
||||||
%h2
|
%h2
|
||||||
= person.name
|
= person.name
|
||||||
- if current_user.owns?(post)
|
|
||||||
.aspect
|
- if post.public?
|
||||||
➔
|
%span.arrow ➔
|
||||||
%ul
|
%span.aspect_badge.public
|
||||||
- if post.public?
|
=t('the_world')
|
||||||
=t('the_world')
|
|
||||||
- else
|
- elsif current_user.owns?(post)
|
||||||
- for aspect in post.aspects
|
%span.arrow ➔
|
||||||
%li= link_to aspect.name, aspect
|
=aspect_badge(aspects_with_post(post.aspects, post))
|
||||||
|
|
||||||
#person_nav_links
|
#person_nav_links
|
||||||
= link_to t('layouts.header.view_profile'), person_path(person)
|
= link_to t('layouts.header.view_profile'), person_path(person)
|
||||||
|
|
|
||||||
|
|
@ -2,32 +2,28 @@
|
||||||
-# licensed under the Affero General Public License version 3 or later. See
|
-# licensed under the Affero General Public License version 3 or later. See
|
||||||
-# the COPYRIGHT file.
|
-# the COPYRIGHT file.
|
||||||
|
|
||||||
%li.message{:data=>{:guid=>post.id}, :class => ('public' if post.public?)}
|
%li.message{:data=>{:guid=>post.id}}
|
||||||
=person_image_link(person)
|
=person_image_link(person)
|
||||||
|
|
||||||
.public_badge
|
|
||||||
- if post.public?
|
|
||||||
= image_tag 'icons/globe.png', :title => "public post"
|
|
||||||
|
|
||||||
.content
|
.content
|
||||||
.from
|
.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
|
%h4
|
||||||
=person_link(person)
|
=person_link(person)
|
||||||
|
|
||||||
- if person.owner_id == current_user.id
|
- if post.public?
|
||||||
.aspect
|
%span.arrow ➔
|
||||||
➔
|
%span.aspect_badge.public
|
||||||
%ul
|
= t('the_world')
|
||||||
- if post.public?
|
|
||||||
%li= t('the_world')
|
- elsif person.owner_id == current_user.id
|
||||||
- else
|
%span.arrow ➔
|
||||||
=aspect_links(aspects_with_post(aspects, post))
|
=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
|
= 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 |
|
|
@ -12,7 +12,7 @@ a
|
||||||
:text
|
:text
|
||||||
:decoration none
|
:decoration none
|
||||||
&:hover
|
&:hover
|
||||||
:color #22AAE0
|
:color #4CCAE0
|
||||||
&:active
|
&:active
|
||||||
:color #005D9C
|
:color #005D9C
|
||||||
|
|
||||||
|
|
@ -243,40 +243,21 @@ header
|
||||||
:border none
|
:border none
|
||||||
:height 370px
|
:height 370px
|
||||||
:width 500px
|
:width 500px
|
||||||
|
|
||||||
.from
|
.from
|
||||||
:text
|
:text
|
||||||
:shadow 0 1px #fff
|
:shadow 0 1px #fff
|
||||||
|
h4
|
||||||
.aspect
|
|
||||||
:cursor default
|
|
||||||
:display inline
|
: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
|
a
|
||||||
:font
|
:font
|
||||||
:weight bold
|
:weight bold
|
||||||
|
|
||||||
|
.arrow
|
||||||
|
:color #ccc
|
||||||
|
:font
|
||||||
|
:weight lighter
|
||||||
|
|
||||||
#author_info
|
#author_info
|
||||||
:position relative
|
:position relative
|
||||||
:margin
|
:margin
|
||||||
|
|
@ -302,12 +283,6 @@ header
|
||||||
:margin
|
:margin
|
||||||
:bottom -2px
|
:bottom -2px
|
||||||
|
|
||||||
.aspect
|
|
||||||
ul > li a
|
|
||||||
:font
|
|
||||||
:weight 200
|
|
||||||
|
|
||||||
|
|
||||||
#person_nav_links
|
#person_nav_links
|
||||||
a
|
a
|
||||||
:margin
|
:margin
|
||||||
|
|
@ -1397,7 +1372,6 @@ ul.aspects
|
||||||
&:hover
|
&:hover
|
||||||
:background
|
:background
|
||||||
:color #fafafa
|
:color #fafafa
|
||||||
|
|
||||||
|
|
||||||
.right
|
.right
|
||||||
:top 12px
|
:top 12px
|
||||||
|
|
@ -1969,20 +1943,6 @@ h3,h4
|
||||||
:font
|
:font
|
||||||
:size 12px
|
:size 12px
|
||||||
|
|
||||||
.stream
|
|
||||||
.public_badge
|
|
||||||
:position absolute
|
|
||||||
:top 60px
|
|
||||||
:left 25px
|
|
||||||
|
|
||||||
.message.public
|
|
||||||
:background
|
|
||||||
:color #FEFFF0
|
|
||||||
|
|
||||||
&:hover
|
|
||||||
:background
|
|
||||||
:color #FEFFE3
|
|
||||||
|
|
||||||
#already_invited_pane
|
#already_invited_pane
|
||||||
h4
|
h4
|
||||||
:color #666
|
:color #666
|
||||||
|
|
@ -1995,3 +1955,51 @@ h3,h4
|
||||||
.term
|
.term
|
||||||
:font
|
:font
|
||||||
:weight bold
|
: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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue