remove aspect badges
This commit is contained in:
parent
162f035c62
commit
ecd79766ce
4 changed files with 20 additions and 50 deletions
|
|
@ -9,35 +9,6 @@ module AspectGlobalHelper
|
|||
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={})
|
||||
opts[:params] ||= {}
|
||||
params ||= {}
|
||||
|
|
|
|||
|
|
@ -32,19 +32,24 @@
|
|||
|
||||
.info
|
||||
- if post.public?
|
||||
%span.aspect_badges
|
||||
%span.aspect_badge.public
|
||||
= t('the_world')
|
||||
- elsif post.author.owner_id == current_user.id
|
||||
%span.aspect_badges
|
||||
= aspect_badges(aspects_with_post(all_aspects, post), :link => true)
|
||||
%span.post_scope{:title => t('.viewable_to_anyone')}
|
||||
= t('public')
|
||||
·
|
||||
- else
|
||||
- if post.author.owner_id == current_user.id
|
||||
%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
|
||||
- if post.activity_streams?
|
||||
= t('.via', :link => link_to("#{post.provider_display_name}", post.actor_url)).html_safe
|
||||
·
|
||||
|
||||
- unless (defined?(@commenting_disabled) && @commenting_disabled)
|
||||
·
|
||||
%span.like_action
|
||||
= like_action(post, current_user)
|
||||
·
|
||||
|
|
|
|||
|
|
@ -26,7 +26,8 @@ en:
|
|||
are_you_sure: "Are you sure?"
|
||||
fill_me_out: "Fill me out"
|
||||
back: "Back"
|
||||
the_world: "the world"
|
||||
public: "Public"
|
||||
limited: "Limited"
|
||||
search: "Search"
|
||||
find_people: "Find people"
|
||||
_home: "Home"
|
||||
|
|
@ -657,10 +658,12 @@ en:
|
|||
contact_list:
|
||||
all_contacts: "All contacts"
|
||||
stream_element:
|
||||
viewable_to_anyone: "This post is viewable to anyone on the web"
|
||||
via: "via %{link}"
|
||||
like: "Like"
|
||||
unlike: "Unlike"
|
||||
dislike: "Dislike"
|
||||
shared_with: "Shared with: %{aspect_names}"
|
||||
footer:
|
||||
logged_in_as: "logged in as %{name}"
|
||||
your_aspects: "your aspects"
|
||||
|
|
|
|||
|
|
@ -476,12 +476,14 @@ ul.dropdown
|
|||
:margin
|
||||
:bottom 5px
|
||||
|
||||
|
||||
.post_initial_info
|
||||
.details
|
||||
:color #aaa
|
||||
:margin
|
||||
:top 4px
|
||||
:bottom 5px
|
||||
|
||||
.post_scope
|
||||
:cursor default
|
||||
|
||||
.time,
|
||||
.timeago,
|
||||
|
|
@ -2087,22 +2089,11 @@ h3,h4
|
|||
.stream
|
||||
.avatar
|
||||
:float left
|
||||
.arrow,
|
||||
|
||||
.stream_element
|
||||
.aspect_badges
|
||||
@include opacity(0.5)
|
||||
|
||||
&:hover
|
||||
.aspect_badges
|
||||
@include opacity(1)
|
||||
|
||||
.aspect_badge
|
||||
:position relative
|
||||
:margin
|
||||
:bottom 0
|
||||
.arrow
|
||||
:top -0.1em
|
||||
.aspect_badge
|
||||
:top -0.2em
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue