remove aspect badges

This commit is contained in:
danielgrippi 2011-07-04 22:10:21 -07:00
parent 162f035c62
commit ecd79766ce
4 changed files with 20 additions and 50 deletions

View file

@ -9,35 +9,6 @@ module AspectGlobalHelper
end end
end end
def aspect_badges(aspects, opts={})
str = ''
aspects.each do |aspect|
str << aspect_badge(aspect, opts)
end
str.html_safe
end
def aspect_badge(aspect, opts={})
str = "<span class='aspect_badge single'>"
link = opts.delete(:link)
if !link
str << link_to(aspect.name, "#", 'data-guid' => aspect.id, :class => 'hard_aspect_link').html_safe
else
str << link_for_aspect(aspect).html_safe
end
str << "</span>"
end
def aspect_links(aspects, opts={})
str = ""
aspects.each do |aspect|
str << '<li>'
str << link_for_aspect(aspect, :params => opts, 'data-guid' => aspect.id, :class => 'hard_aspect_link').html_safe
str << '</li>'
end
str.html_safe
end
def link_for_aspect(aspect, opts={}) def link_for_aspect(aspect, opts={})
opts[:params] ||= {} opts[:params] ||= {}
params ||= {} params ||= {}

View file

@ -32,19 +32,24 @@
.info .info
- if post.public? - if post.public?
%span.aspect_badges %span.post_scope{:title => t('.viewable_to_anyone')}
%span.aspect_badge.public = t('public')
= t('the_world') ·
- elsif post.author.owner_id == current_user.id - else
%span.aspect_badges - if post.author.owner_id == current_user.id
= aspect_badges(aspects_with_post(all_aspects, post), :link => true) %span.post_scope{:title => t('.shared_with', :aspect_names => aspects_with_post(all_aspects, post).map!{|a| a.name}.join(', '))}
= t('limited')
- else
%span.post_scope
= t('limited')
·
%span.via %span.via
- if post.activity_streams? - if post.activity_streams?
= t('.via', :link => link_to("#{post.provider_display_name}", post.actor_url)).html_safe = t('.via', :link => link_to("#{post.provider_display_name}", post.actor_url)).html_safe
·
- unless (defined?(@commenting_disabled) && @commenting_disabled) - unless (defined?(@commenting_disabled) && @commenting_disabled)
·
%span.like_action %span.like_action
= like_action(post, current_user) = like_action(post, current_user)
· ·

View file

@ -26,7 +26,8 @@ en:
are_you_sure: "Are you sure?" are_you_sure: "Are you sure?"
fill_me_out: "Fill me out" fill_me_out: "Fill me out"
back: "Back" back: "Back"
the_world: "the world" public: "Public"
limited: "Limited"
search: "Search" search: "Search"
find_people: "Find people" find_people: "Find people"
_home: "Home" _home: "Home"
@ -657,10 +658,12 @@ en:
contact_list: contact_list:
all_contacts: "All contacts" all_contacts: "All contacts"
stream_element: stream_element:
viewable_to_anyone: "This post is viewable to anyone on the web"
via: "via %{link}" via: "via %{link}"
like: "Like" like: "Like"
unlike: "Unlike" unlike: "Unlike"
dislike: "Dislike" dislike: "Dislike"
shared_with: "Shared with: %{aspect_names}"
footer: footer:
logged_in_as: "logged in as %{name}" logged_in_as: "logged in as %{name}"
your_aspects: "your aspects" your_aspects: "your aspects"

View file

@ -476,12 +476,14 @@ ul.dropdown
:margin :margin
:bottom 5px :bottom 5px
.post_initial_info .post_initial_info
.details .details
:color #aaa :color #aaa
:margin :margin
:top 4px :bottom 5px
.post_scope
:cursor default
.time, .time,
.timeago, .timeago,
@ -2087,22 +2089,11 @@ h3,h4
.stream .stream
.avatar .avatar
:float left :float left
.arrow,
.stream_element
.aspect_badges
@include opacity(0.5)
&:hover
.aspect_badges
@include opacity(1)
.aspect_badge .aspect_badge
:position relative :position relative
:margin :margin
:bottom 0 :bottom 0
.arrow
:top -0.1em
.aspect_badge .aspect_badge
:top -0.2em :top -0.2em