Skip to content
This repository has been archived by the owner on Apr 26, 2022. It is now read-only.

Commit

Permalink
Merge pull request #211 from HashNuke/seperate_karma_from_name
Browse files Browse the repository at this point in the history
Separate karma from user's name with parens
  • Loading branch information
thejspr committed May 20, 2014
2 parents 8f4f6fe + edcc123 commit 60cf345
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions app/views/application/_header.html.haml
Expand Up @@ -53,8 +53,9 @@
= link_to path, title: s_('Tooltip|This is you!<br/>Click here to see or edit your profile.<br/>The number next to your name shows the "karma" points you can spend to vote on ideas. Gain more points as you participate!'), :'data-placement' => 'bottom' do
%span.first-name= current_login.first_name
%span.karma
%span.figure= number_with_delimiter current_user.karma
= user_karma_symbol
= surround '(', ')' do
%span.figure= number_with_delimiter current_user.karma
= user_karma_symbol
= content_tag_with_path_checking(:li, controller: 'notifications', action: 'index', html: { class:'inbox', title: s_('Tooltip|Your number of unread notifications. Click to view them'), :'data-placement' => 'left' }) do |path|
= link_to path, class: 'notifications' do
- count = current_user.notifications.unread.count
Expand Down
7 changes: 4 additions & 3 deletions app/views/users/_user.html.haml
Expand Up @@ -4,7 +4,7 @@
-# link (boolean, default true)
-# avatar (boolean or integer, default false)
-# classes (string, default none)
= cached_fragment(disabled:false, resource:User, id:user.id, v:8, key:[user.login.updated_at, user.updated_at, *local_assigns.values_at(:name, :avatar, :karma, :classes, :link), can?(:read, user)]) do
= cached_fragment(disabled:false, resource:User, id:user.id, v:9, key:[user.login.updated_at, user.updated_at, *local_assigns.values_at(:name, :avatar, :karma, :classes, :link), can?(:read, user)]) do

:ruby
show_avatar = !!local_assigns.fetch(:avatar, true)
Expand All @@ -29,8 +29,9 @@
= user.first_name
- if show_karma
%span.karma
= number_with_delimiter user.karma
= user_karma_symbol
= surround '(', ')' do
= number_with_delimiter user.karma
= user_karma_symbol
- if link_target
= link_to link_target, link_options do
= body
Expand Down

0 comments on commit 60cf345

Please sign in to comment.