Skip to content

Commit

Permalink
Merge pull request #165 from gerbenjacobs/use-name-for-avatar-circles
Browse files Browse the repository at this point in the history
switches to the configured display name for circle avatars
  • Loading branch information
marktopper authored Jan 26, 2018
2 parents 5545df8 + 7418b83 commit fe0e417
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
16 changes: 8 additions & 8 deletions src/Views/discussion.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
<div class="col-md-3 left-column">
<!-- SIDEBAR -->
<div class="chatter_sidebar">
<button class="btn btn-primary" id="new_discussion_btn"><i class="chatter-new"></i>@lang('chatter::messages.discussion.new')</button>
<a href="/{{ Config::get('chatter.routes.home') }}"><i class="chatter-bubble"></i>@lang('chatter::messages.discussion.all')</a>
<button class="btn btn-primary" id="new_discussion_btn"><i class="chatter-new"></i> @lang('chatter::messages.discussion.new')</button>
<a href="/{{ Config::get('chatter.routes.home') }}"><i class="chatter-bubble"></i> @lang('chatter::messages.discussion.all')</a>
<ul class="nav nav-pills nav-stacked">
<?php $categories = DevDojo\Chatter\Models\Models::category()->all(); ?>
@foreach($categories as $category)
Expand All @@ -84,7 +84,7 @@
<span class="chatter_posts">
@if(!Auth::guest() && (Auth::user()->id == $post->user->id))
<div id="delete_warning_{{ $post->id }}" class="chatter_warning_delete">
<i class="chatter-warning"></i>@lang('chatter::messages.response.confirm')
<i class="chatter-warning"></i> @lang('chatter::messages.response.confirm')
<button class="btn btn-sm btn-danger pull-right delete_response">@lang('chatter::messages.response.yes_confirm')</button>
<button class="btn btn-sm btn-default pull-right">@lang('chatter::messages.response.no_confirm')</button>
</div>
Expand All @@ -110,8 +110,8 @@
@endif

@else
<span class="chatter_avatar_circle" style="background-color:#<?= \DevDojo\Chatter\Helpers\ChatterHelper::stringToColorCode($post->user->email) ?>">
{{ ucfirst(substr($post->user->email, 0, 1)) }}
<span class="chatter_avatar_circle" style="background-color:#<?= \DevDojo\Chatter\Helpers\ChatterHelper::stringToColorCode($post->user->{Config::get('chatter.user.database_field_with_user_name')}) ?>">
{{ ucfirst(substr($post->user->{Config::get('chatter.user.database_field_with_user_name')}, 0, 1)) }}
</span>
@endif
</div>
Expand Down Expand Up @@ -159,8 +159,8 @@
@endif

@else
<span class="chatter_avatar_circle" style="background-color:#<?= \DevDojo\Chatter\Helpers\ChatterHelper::stringToColorCode(Auth::user()->email) ?>">
{{ strtoupper(substr(Auth::user()->email, 0, 1)) }}
<span class="chatter_avatar_circle" style="background-color:#<?= \DevDojo\Chatter\Helpers\ChatterHelper::stringToColorCode(Auth::user()->{Config::get('chatter.user.database_field_with_user_name')}) ?>">
{{ strtoupper(substr(Auth::user()->{Config::get('chatter.user.database_field_with_user_name')}, 0, 1)) }}
</span>
@endif
</div>
Expand Down Expand Up @@ -192,7 +192,7 @@

</div><!-- #new_discussion -->
<div id="discussion_response_email">
<button id="submit_response" class="btn btn-success pull-right"><i class="chatter-new"></i>@lang('chatter::messages.response.submit')</button>
<button id="submit_response" class="btn btn-success pull-right"><i class="chatter-new"></i> @lang('chatter::messages.response.submit')</button>
@if(Config::get('chatter.email.enabled'))
<div id="notify_email">
<img src="{{ url('/vendor/devdojo/chatter/assets/images/email.gif') }}" class="chatter_email_loader">
Expand Down
2 changes: 1 addition & 1 deletion src/Views/email.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse:separate;mso-table-lspace:0pt;mso-table-rspace:0pt;width:100%;width:auto;">
<tbody>
<tr>
<td style="font-family:sans-serif;font-size:14px;vertical-align:top;background-color:#ffffff;border-radius:5px;text-align:center;background-color:#3498db;"> <a href="{{ url('/') }}/{{ Config::get('chatter.routes.home') }}/{{ Config::get('chatter.routes.discussion') }}/{{ $discussion->category->slug }}/{{ $discussion->slug }}" target="_blank" style="text-decoration:underline;background-color:#ffffff;border:solid 1px #3498db;border-radius:5px;box-sizing:border-box;color:#3498db;cursor:pointer;display:inline-block;font-size:14px;font-weight:bold;margin:0;padding:12px 25px;text-decoration:none;text-transform:capitalize;background-color:#3498db;border-color:#3498db;color:#ffffff;">@lang('chatter::email.view_discussion')/a> </td>
<td style="font-family:sans-serif;font-size:14px;vertical-align:top;background-color:#ffffff;border-radius:5px;text-align:center;background-color:#3498db;"> <a href="{{ url('/') }}/{{ Config::get('chatter.routes.home') }}/{{ Config::get('chatter.routes.discussion') }}/{{ $discussion->category->slug }}/{{ $discussion->slug }}" target="_blank" style="text-decoration:underline;background-color:#ffffff;border:solid 1px #3498db;border-radius:5px;box-sizing:border-box;color:#3498db;cursor:pointer;display:inline-block;font-size:14px;font-weight:bold;margin:0;padding:12px 25px;text-decoration:none;text-transform:capitalize;background-color:#3498db;border-color:#3498db;color:#ffffff;">@lang('chatter::email.view_discussion')</a></td>
</tr>
</tbody>
</table>
Expand Down
8 changes: 4 additions & 4 deletions src/Views/home.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<div class="col-md-3 left-column">
<!-- SIDEBAR -->
<div class="chatter_sidebar">
<button class="btn btn-primary" id="new_discussion_btn"><i class="chatter-new"></i>@lang('chatter::messages.discussion.new')</button>
<button class="btn btn-primary" id="new_discussion_btn"><i class="chatter-new"></i> @lang('chatter::messages.discussion.new')</button>
<a href="/{{ Config::get('chatter.routes.home') }}"><i class="chatter-bubble"></i> @lang('chatter::messages.discussion.all')</a>
{!! $categoriesMenu !!}
</div>
Expand All @@ -87,8 +87,8 @@

@else

<span class="chatter_avatar_circle" style="background-color:#<?= \DevDojo\Chatter\Helpers\ChatterHelper::stringToColorCode($discussion->user->email) ?>">
{{ strtoupper(substr($discussion->user->email, 0, 1)) }}
<span class="chatter_avatar_circle" style="background-color:#<?= \DevDojo\Chatter\Helpers\ChatterHelper::stringToColorCode($discussion->user->{Config::get('chatter.user.database_field_with_user_name')}) ?>">
{{ strtoupper(substr($discussion->user->{Config::get('chatter.user.database_field_with_user_name')}, 0, 1)) }}
</span>

@endif
Expand Down Expand Up @@ -174,7 +174,7 @@

<div id="new_discussion_footer">
<input type='text' id="color" name="color" /><span class="select_color_text">@lang('chatter::messages.editor.select_color_text')</span>
<button id="submit_discussion" class="btn btn-success pull-right"><i class="chatter-new"></i>@lang('chatter::messages.discussion.create')</button>
<button id="submit_discussion" class="btn btn-success pull-right"><i class="chatter-new"></i> @lang('chatter::messages.discussion.create')</button>
<a href="/{{ Config::get('chatter.routes.home') }}" class="btn btn-default pull-right" id="cancel_discussion">@lang('chatter::messages.words.cancel')</a>
<div style="clear:both"></div>
</div>
Expand Down

0 comments on commit fe0e417

Please sign in to comment.