diff options
Diffstat (limited to 'resources')
-rw-r--r-- | resources/views/add_root.blade.php | 26 | ||||
-rw-r--r-- | resources/views/contribute.blade.php | 14 | ||||
-rw-r--r-- | resources/views/suggestions.blade.php | 16 | ||||
-rw-r--r-- | resources/views/user/top.blade.php | 28 |
4 files changed, 59 insertions, 25 deletions
diff --git a/resources/views/add_root.blade.php b/resources/views/add_root.blade.php index 7da4955..8da9726 100644 --- a/resources/views/add_root.blade.php +++ b/resources/views/add_root.blade.php @@ -6,28 +6,22 @@ use HebrewParseTrainer\RootKind; <h3 class="panel-title">Add a new root</h3> </div> <div class="panel-body"> - <form class="form-horizontal" id="add-root"> + <form id="add-root"> <div class="alerts"></div> <div class="form-group"> - <label for="add-root-root" class="col-sm-2 control-label">Root</label> - <div class="col-sm-10"> - <input type="text" class="form-control" id="add-root-root" name="root" placeholder="קטל"/> - </div> + <label for="add-root-root">Root</label> + <input type="text" class="form-control" id="add-root-root" name="root" placeholder="קטל"/> </div> <div class="form-group"> - <label for="add-root-kind" class="col-sm-2 control-label">Kind</label> - <div class="col-sm-10"> - <select id="add-root-kind" class="form-control" name="root_kind_id"> - @foreach(RootKind::all() as $kind) - <option value="{{ $kind->id }}">{{{ $kind->name }}}</option> - @endforeach - </select> - </div> + <label for="add-root-kind">Kind</label> + <select id="add-root-kind" class="form-control" name="root_kind_id"> + @foreach(RootKind::all() as $kind) + <option value="{{ $kind->id }}">{{{ $kind->name }}}</option> + @endforeach + </select> </div> <div class="form-group"> - <div class="col-sm-offset-2 col-sm-10"> - <button type="submit" class="btn btn-primary">Add</button> - </div> + <button type="submit" class="btn btn-primary">Add</button> </div> </form> </div> diff --git a/resources/views/contribute.blade.php b/resources/views/contribute.blade.php index 226131b..dd2d8bb 100644 --- a/resources/views/contribute.blade.php +++ b/resources/views/contribute.blade.php @@ -27,16 +27,24 @@ @if(Auth::check()) <hr/> <div class="row"> - <div class="col-lg-6"> + <div class="col-md-6"> @include('suggestions') </div> - <div class="col-lg-6"> + <div class="col-lg-4 col-md-6"> @include('suggest') </div> - <div class="col-lg-6"> + <div class="col-lg-2 col-md-6"> @include('add_root') </div> </div> @endif +<hr/> + +<div class="row"> + <div class="col-md-6 col-lg-4"> + @include('user.top') + </div> +</div> + @endsection diff --git a/resources/views/suggestions.blade.php b/resources/views/suggestions.blade.php index e9b8efb..2e95eff 100644 --- a/resources/views/suggestions.blade.php +++ b/resources/views/suggestions.blade.php @@ -7,12 +7,15 @@ use HebrewParseTrainer\Verb; </div> <div class="panel-body"> <table class="table table-hover table-condensed suggestions"> - <tr> - <th>Verb</th> - <th>Root</th> - <th>Parsing</th> - <th colspan="3">Votes</th> - </tr> + <thead> + <tr> + <th>Verb</th> + <th>Root</th> + <th>Parsing</th> + <th colspan="3">Votes</th> + </tr> + </thead> + <tbody> @forelse(Verb::where('active', 0)->orderBy('verb')->get() as $verb) <tr> <td class="large">{{ $verb->verb }}</td> @@ -25,6 +28,7 @@ use HebrewParseTrainer\Verb; @empty <tr><td colspan="4">There are no active suggestions. Why not add a verb yourself?</td></tr> @endforelse + </tbody> </table> </div> </div> diff --git a/resources/views/user/top.blade.php b/resources/views/user/top.blade.php new file mode 100644 index 0000000..52973e6 --- /dev/null +++ b/resources/views/user/top.blade.php @@ -0,0 +1,28 @@ +<?php +use HebrewParseTrainer\User; +?> +<div class="panel panel-default"> + <div class="panel-heading"> + <h3 class="panel-title">Top users</h3> + </div> + <div class="panel-body"> + <table class="table table-hover"> + <thead> + <tr> + <th></th> + <th>Name</th> + <th>Points</th> + </tr> + </thead> + <tbody> + @foreach(User::orderBy('points', 'desc')->take(10)->get() as $user) + <tr> + <td><img src="https://gravatar.com/avatar/{{ md5(strtolower(trim($user->email))) }}?s=40"/></td> + <td>{{{ $user->name }}}</td> + <td>{{{ $user->points }}}</td> + </tr> + @endforeach + </tbody> + </table> + </div> +</div> |