Skip to content
Extraits de code Groupes Projets
Valider 619f5fd5 rédigé par Your Name's avatar Your Name
Parcourir les fichiers

move featured users to the other side and make a little sidebar widget for it

parent c854ac51
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -29,7 +29,6 @@ module StreamHelper
else
stream.posts.last.send(stream.order.to_sym).to_i
end
end
def time_for_sort post
......
......@@ -26,11 +26,6 @@
.li
%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
= render 'tags/followed_tags_listings'
......
......@@ -22,16 +22,4 @@
#featured_users
- unless @people.blank?
- @people.each do |person|
.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 }
= render 'featured_users/user', :person => person
.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')
= 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
.title
= image_tag('/images/icons/question.png')
......
......@@ -159,6 +159,8 @@ en:
index:
mentions: "Mentions"
featured_users: "Featured Users"
community_members: "Cool Diaspora* members"
see_more_from_us: "See more of the D* community."
donate: "Donate"
keep_us_running: "Keep %{pod} running fast and buy servers their coffee fix with a monthly donation!"
your_aspects: "Your Aspects"
......
......@@ -8,6 +8,13 @@ class BaseStream
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
def link(opts={})
......@@ -75,4 +82,9 @@ class BaseStream
@order = order_string
@order ||= 'created_at'
end
private
def featured_diaspora_id
@featured_diaspora_id ||= AppConfig[:featured_users].sample(1)
end
end
......@@ -2963,6 +2963,8 @@ ul.left_nav
.unfollow_icon
:display inline-block
.user_card
:margin-left 8px
.stream_container
:min-height 500px
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter