2020-09-10 23:09:23 +01:00
@ extends ( 'adminlte::page' )
2022-03-19 06:22:00 +00:00
@ section ( 'title' , config ( 'app.name' ) . ' | ' . __ ( 'Teams' ))
2020-09-10 23:09:23 +01:00
@ section ( 'content_header' )
2022-03-19 06:22:00 +00:00
< h1 > {{ config ( 'app.name' )}} / {{ __ ( 'Teams' )}} </ h1 >
2020-09-10 23:09:23 +01:00
@ stop
2020-10-03 21:36:35 +01:00
@ section ( 'js' )
< x - global - errors ></ x - global - errors >
@ endsection
2020-09-10 23:09:23 +01:00
@ section ( 'content' )
2020-10-03 21:36:35 +01:00
< x - modal id = " newTeamModal " modal - label = " newTeamModalLabel " modal - title = " New team " include - close - button = " true " >
< div class = " row " >
< div class = " col offset-3 " >
< img src = " /img/new_team.svg " height = " 220px " width = " 220px " alt = " New Team illustration " >
</ div >
</ div >
< form action = " { { route('teams.store') }} " method = " POST " id = " newTeamForm " >
@ csrf
2022-03-19 06:22:00 +00:00
2020-10-03 21:36:35 +01:00
< div class = " text-center " >
< input type = " text " id = " teamName " class = " form-control " required name = " teamName " >
</ div >
2022-03-19 06:22:00 +00:00
< p class = " text-muted text-sm " > {{ __ ( 'This is the name team members will see.' ) }} </ p >
2020-10-03 21:36:35 +01:00
</ form >
< x - slot name = " modalFooter " >
2022-03-19 06:22:00 +00:00
< button type = " button " class = " btn btn-success " onclick = " $ ('#newTeamForm').submit() " >< i class = " fas fa-check " ></ i > {{ __ ( 'Create' )}} </ button >
2020-10-03 21:36:35 +01:00
</ x - slot >
</ x - modal >
< div class = " row " >
< div class = " col-md-4 offset-4 text-center " >
2022-03-19 06:22:00 +00:00
< img src = " /img/team.svg " height = " 230px " width = " 230px " alt = " { { __('Team illustration') }} " >
2020-10-03 21:36:35 +01:00
</ div >
</ div >
< div class = " row " >
< div class = " col " >
< div class = " card bg-gray-dark " >
< div class = " card-header bg-indigo " >
2020-10-08 19:19:10 +01:00
< div class = " row " >
< div class = " col " >
2022-03-19 06:22:00 +00:00
< div class = " card-title " >< h4 > {{ __ ( 'Teams' ) }} < span class = " badge badge-warning " >< i class = " fas fa-check-circle " ></ i > {{ ( Auth :: user () -> currentTeam ) ? Auth :: user () -> currentTeam -> name : __ ( 'Select a team' ) }} </ span ></ h4 ></ div >
2020-10-08 19:19:10 +01:00
</ div >
</ div >
2020-10-03 21:36:35 +01:00
</ div >
< div class = " card-body " >
@ if ( ! $teams -> isEmpty ())
< table class = " table-borderless table-active table " >
< thead >
< tr >
< th > #</th>
2022-03-19 06:22:00 +00:00
< th > {{ __ ( 'Team Owner' ) }} </ th >
< th > {{ __ ( 'Team Name' ) }} </ th >
< th > {{ __ ( 'Actions' )}} </ th >
2020-10-03 21:36:35 +01:00
</ tr >
</ thead >
< tbody >
@ foreach ( $teams as $team )
2022-03-19 06:22:00 +00:00
2020-10-03 21:36:35 +01:00
< tr >
< td > {{ $team -> id }} </ td >
< td > {{ $team -> owner_id }} </ td >
< td > {{ $team -> name }} </ td >
< td >
2022-03-19 06:22:00 +00:00
< button type = " button " class = " btn btn-success btn-sm ml-2 " onclick = " location.href=' { { route('teams.edit', ['team' => $team->id ]) }}' " >< i class = " fas fa-cogs " ></ i > {{ __ ( 'Settings' ) }} </ button >
< button onclick = " location.href=' { { route('switchTeam', ['team' => $team ]) }}' " rel = " buttonTxtTooltip " data - placement = " top " data - toggle = " tooltip " title = " { { __('Select your active team (for dasboard context, etc)') }} " type = " button " class = " btn btn-warning btn-sm ml-2 " >< i class = " fas fa-random " ></ i > {{ __ ( 'Switch To' ) }} </ button >
2020-10-03 21:36:35 +01:00
</ td >
</ tr >
@ endforeach
</ tbody >
</ table >
@ else
< div class = " alert alert-warning " >
2022-03-19 06:22:00 +00:00
< i class = " fas fa-exclamation-triangle " ></ i > { !! __ ( " <b> There don't seem to be any teams here</b> " ) !! }
< p > {{ __ ( " Have you tried creating or joining a team? You may also click an invite link if you've been invited. " ) }} </ p >
2020-10-03 21:36:35 +01:00
</ div >
@ endif
</ div >
< div class = " card-footer " >
2022-03-19 06:22:00 +00:00
< button type = " button " class = " btn btn-success btn-sm ml-3 " onclick = " $ ('#newTeamModal').modal('show') " >< i class = " fas fa-plus-circle " ></ i > {{ __ ( 'New team' ) }} </ button >
< button type = " button " class = " btn btn-warning btn-sm ml-3 " >< i class = " fas fas fa-long-arrow-alt-right " ></ i > {{ __ ( 'Team Dashboard' ) }} </ button >
2020-10-03 21:36:35 +01:00
</ div >
</ div >
</ div >
</ div >
2020-09-10 23:09:23 +01:00
@ stop