-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* start implementing search bar and dashboard * implemented user search logic with search dashboard * Added API implementation * Added tests for search * styling search for mobile * added pagination, fixed design * Completed User Search - moved validation from front to backend - fixed swagger-doc - fixed tests - added simple pagination * Fixed Codacy gods' requirements * removed datasources * whoops. URLs are hard * remove unused includes. * Fixed some things. * Removed auth::check * für Kris. <3 Co-authored-by: Thomas Englert <[email protected]>
- Loading branch information
Showing
16 changed files
with
257 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,7 @@ | |
border-radius: 50%; | ||
} | ||
} | ||
|
||
.search-image-box { | ||
display: block !important; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.navbar.navbar-dark form .md-form input:focus:not([readonly]) { | ||
border-color: $blueCounterColor; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
@extends('layouts.app') | ||
|
||
@section('title') | ||
Dashboard | ||
@endsection | ||
|
||
@section('content') | ||
<div class="container"> | ||
<div class="row justify-content-center"> | ||
<div class="col-md-8"> | ||
@if($userSearchResponse->count() == 0) | ||
<div class="col-md-8 offset-md-2"> | ||
<div class="alert my-3 alert-danger" role="alert"> | ||
{{ __('user.no-user') }} | ||
</div> | ||
</div> | ||
@endif | ||
@foreach($userSearchResponse as $user) | ||
<div class="card status mt-3"> | ||
<div class="card-body row"> | ||
<div class="col-2 image-box search-image-box d-lg-flex"> | ||
<a href="{{ route('account.show', ['username' => $user->username]) }}"> | ||
<img src="{{ route('account.showProfilePicture', ['username' => $user->username]) }}" alt="profile picture"> | ||
</a> | ||
</div> | ||
|
||
<div class="col pl-0"> | ||
<a href="{{ route('account.show', ['username' => $user->username]) }}"> | ||
<h4>{{ $user->name }} <small>{{ $user->username }}</small></h4> | ||
</a> | ||
<h6> | ||
<small> | ||
<span class="font-weight-bold"><i class="fa fa-route d-inline"></i> {{ $user->train_distance }}</span><span class="small font-weight-lighter">km</span> | ||
<span class="font-weight-bold pl-sm-2"><i class="fa fa-stopwatch d-inline"></i> {!! durationToSpan(secondsToDuration($user->train_duration * 60)) !!}</span> | ||
<span class="font-weight-bold pl-sm-2"><i class="fa fa-dice-d20 d-inline"></i> {{ $user->points }}</span><span class="small font-weight-lighter">{{__('profile.points-abbr')}}</span> | ||
</small> | ||
</h6> | ||
@if($user->id !== Auth::user()->id) | ||
@if(Auth::user()->follows->where('id', $user->id)->first() === null) | ||
<a href="#" class="btn btn-sm btn-primary follow" data-userid="{{ $user->id }}" data-following="no">{{__('profile.follow')}}</a> | ||
@else | ||
<a href="#" class="btn btn-sm btn-danger follow" data-userid="{{ $user->id }}" data-following="yes">{{__('profile.unfollow')}}</a> | ||
@endif | ||
<script> | ||
window.translFollow = "{{__('profile.follow')}}"; | ||
window.translUnfollow = "{{__('profile.unfollow')}}"; | ||
</script> | ||
@else | ||
<a href="{{ route('settings') }}" class="btn btn-sm btn-primary">{{ __('profile.settings') }}</a> | ||
@endif | ||
</div> | ||
</div> | ||
</div> | ||
@endforeach | ||
</div> | ||
</div> | ||
<div class="row justify-content-center mt-5"> | ||
{{ $userSearchResponse->withQueryString()->links() }} | ||
</div> | ||
@include('includes.edit-modal') | ||
@include('includes.delete-modal') | ||
</div><!--- /container --> | ||
@endsection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.