move featured users to the other side and make a little sidebar widget for it
This commit is contained in:
parent
c854ac51a3
commit
619f5fd56e
8 changed files with 39 additions and 19 deletions
|
|
@ -29,7 +29,6 @@ module StreamHelper
|
||||||
else
|
else
|
||||||
stream.posts.last.send(stream.order.to_sym).to_i
|
stream.posts.last.send(stream.order.to_sym).to_i
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def time_for_sort post
|
def time_for_sort post
|
||||||
|
|
|
||||||
|
|
@ -26,11 +26,6 @@
|
||||||
.li
|
.li
|
||||||
%b= link_to t('.mentions'), mentions_path, :class => 'home_selector'
|
%b= link_to t('.mentions'), mentions_path, :class => 'home_selector'
|
||||||
|
|
||||||
.section
|
|
||||||
%ul.left_nav
|
|
||||||
.li
|
|
||||||
%b= link_to t('.featured_users'), featured_path, :class => 'home_selector'
|
|
||||||
|
|
||||||
.section#followed_tags_listing
|
.section#followed_tags_listing
|
||||||
= render 'tags/followed_tags_listings'
|
= render 'tags/followed_tags_listings'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,16 +22,4 @@
|
||||||
#featured_users
|
#featured_users
|
||||||
- unless @people.blank?
|
- unless @people.blank?
|
||||||
- @people.each do |person|
|
- @people.each do |person|
|
||||||
.user_card
|
= render 'featured_users/user', :person => person
|
||||||
= person_image_link(person, :size => :thumb_large)
|
|
||||||
%h4
|
|
||||||
= person.name
|
|
||||||
|
|
||||||
.tags
|
|
||||||
- person.profile.tags.each do |tg|
|
|
||||||
= "##{tg}"
|
|
||||||
|
|
||||||
.add_user_to_aspect
|
|
||||||
= render :partial => 'people/relationship_action',
|
|
||||||
:locals => { :person => person, :contact => current_user.contact_for(person),
|
|
||||||
:current_user => current_user }
|
|
||||||
|
|
|
||||||
13
app/views/featured_users/_user.html.haml
Normal file
13
app/views/featured_users/_user.html.haml
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
.user_card
|
||||||
|
= person_image_link(person, :size => :thumb_large)
|
||||||
|
%h4
|
||||||
|
= person.name
|
||||||
|
|
||||||
|
.tags
|
||||||
|
- person.profile.tags.each do |tg|
|
||||||
|
= "##{tg}"
|
||||||
|
|
||||||
|
.add_user_to_aspect
|
||||||
|
= render :partial => 'people/relationship_action',
|
||||||
|
:locals => { :person => person, :contact => current_user.contact_for(person),
|
||||||
|
:current_user => current_user }
|
||||||
|
|
@ -22,6 +22,15 @@
|
||||||
= t('aspects.index.cubbies.explanation')
|
= t('aspects.index.cubbies.explanation')
|
||||||
= link_to t('aspects.index.cubbies.learn_more'), token_path
|
= link_to t('aspects.index.cubbies.learn_more'), token_path
|
||||||
|
|
||||||
|
- if @stream.has_featured_users?
|
||||||
|
.section
|
||||||
|
.title.no_icon
|
||||||
|
%h5
|
||||||
|
=t('aspects.index.community_members')
|
||||||
|
.content#featured_users
|
||||||
|
= render 'featured_users/user', :person => @stream.random_featured_user
|
||||||
|
= link_to t('aspects.index.see_more_from_us'), featured_path, :id => 'view_all_contacts_link'
|
||||||
|
|
||||||
.section
|
.section
|
||||||
.title
|
.title
|
||||||
= image_tag('/images/icons/question.png')
|
= image_tag('/images/icons/question.png')
|
||||||
|
|
|
||||||
|
|
@ -159,6 +159,8 @@ en:
|
||||||
index:
|
index:
|
||||||
mentions: "Mentions"
|
mentions: "Mentions"
|
||||||
featured_users: "Featured Users"
|
featured_users: "Featured Users"
|
||||||
|
community_members: "Cool Diaspora* members"
|
||||||
|
see_more_from_us: "See more of the D* community."
|
||||||
donate: "Donate"
|
donate: "Donate"
|
||||||
keep_us_running: "Keep %{pod} running fast and buy servers their coffee fix with a monthly donation!"
|
keep_us_running: "Keep %{pod} running fast and buy servers their coffee fix with a monthly donation!"
|
||||||
your_aspects: "Your Aspects"
|
your_aspects: "Your Aspects"
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,13 @@ class BaseStream
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
def random_featured_user
|
||||||
|
Person.find_by_diaspora_handle(featured_diaspora_id)
|
||||||
|
end
|
||||||
|
|
||||||
|
def has_featured_users?
|
||||||
|
featured_diaspora_id.present?
|
||||||
|
end
|
||||||
|
|
||||||
#requied to implement said stream
|
#requied to implement said stream
|
||||||
def link(opts={})
|
def link(opts={})
|
||||||
|
|
@ -75,4 +82,9 @@ class BaseStream
|
||||||
@order = order_string
|
@order = order_string
|
||||||
@order ||= 'created_at'
|
@order ||= 'created_at'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
private
|
||||||
|
def featured_diaspora_id
|
||||||
|
@featured_diaspora_id ||= AppConfig[:featured_users].sample(1)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -2963,6 +2963,8 @@ ul.left_nav
|
||||||
.unfollow_icon
|
.unfollow_icon
|
||||||
:display inline-block
|
:display inline-block
|
||||||
|
|
||||||
|
.user_card
|
||||||
|
:margin-left 8px
|
||||||
.stream_container
|
.stream_container
|
||||||
:min-height 500px
|
:min-height 500px
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue