Merge pull request #1944 from verg/user_dropdown_message_count

Add Private Message count to User Dropdown
This commit is contained in:
Régis Hanol 2014-02-14 15:07:27 +01:00
commit 067b220a62
4 changed files with 11 additions and 3 deletions

View file

@ -4,7 +4,11 @@
{{#if showAdminLinks}} {{#if showAdminLinks}}
<li>{{#link-to 'adminUser' currentUser.username }}{{i18n admin_title}}{{/link-to}}</li> <li>{{#link-to 'adminUser' currentUser.username }}{{i18n admin_title}}{{/link-to}}</li>
{{/if}} {{/if}}
<li>{{#link-to 'userPrivateMessages.index' currentUser}}{{i18n user.private_messages}}{{/link-to}}</li> <li>
{{#link-to 'userPrivateMessages.index' currentUser class='user-messages-link'}}
{{i18n user.unread_message_count count=currentUser.unread_private_messages}}
{{/link-to}}
</li>
<li>{{#link-to 'preferences' currentUser}}{{i18n user.preferences}}{{/link-to}}</li> <li>{{#link-to 'preferences' currentUser}}{{i18n user.preferences}}{{/link-to}}</li>
<li><button {{action "logout"}} class='btn btn-danger right logout'><i class='fa fa-sign-out'></i>{{i18n user.log_out}}</button></li> <li><button {{action "logout"}} class='btn btn-danger right logout'><i class='fa fa-sign-out'></i>{{i18n user.log_out}}</button></li>
</ul> </ul>

View file

@ -239,7 +239,7 @@
} }
&#user-dropdown { &#user-dropdown {
width: 154px; width: 155px;
} }
.btn { .btn {

View file

@ -241,7 +241,7 @@
} }
&#user-dropdown { &#user-dropdown {
width: 154px; width: 155px;
} }
.btn { .btn {

View file

@ -256,6 +256,10 @@ en:
delete_account_confirm: "Are you sure you want to permanently delete your account? This action cannot be undone!" delete_account_confirm: "Are you sure you want to permanently delete your account? This action cannot be undone!"
deleted_yourself: "Your account has been deleted successfully." deleted_yourself: "Your account has been deleted successfully."
delete_yourself_not_allowed: "You cannot delete your account right now. Contact an admin to do delete your account for you." delete_yourself_not_allowed: "You cannot delete your account right now. Contact an admin to do delete your account for you."
unread_message_count:
one: "Messages (1)"
other: "Messages ({{count}})"
zero: "Messages"
messages: messages:
all: "All" all: "All"