1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-14 15:13:29 +01:00
invoiceninja/resources/views/users/account_management.blade.php

86 lines
2.8 KiB
PHP
Raw Normal View History

2015-08-03 09:15:58 +02:00
@extends('header')
@section('content')
2015-08-07 08:14:29 +02:00
<center>
2015-09-07 11:07:55 +02:00
@if (!session(SESSION_USER_ACCOUNTS) || count(session(SESSION_USER_ACCOUNTS)) < 5)
2016-06-25 21:05:08 +02:00
{!! Button::success(trans('texts.add_company'))->asLinkTo(url('/login?new_company=true')) !!}
2015-09-07 11:07:55 +02:00
@endif
2015-08-07 08:14:29 +02:00
</center>
2015-08-03 09:15:58 +02:00
<p>&nbsp;</p>
2015-08-07 08:14:29 +02:00
<div class="row">
<div class="col-md-6 col-md-offset-3">
</div>
</div>
2015-08-03 09:15:58 +02:00
<div class="row">
<div class="col-md-6 col-md-offset-3">
<div class="panel panel-default">
<div class="panel-body">
<table class="table table-striped">
2015-08-07 08:14:29 +02:00
@foreach (Session::get(SESSION_USER_ACCOUNTS) as $account)
2015-08-03 09:15:58 +02:00
<tr>
2015-08-07 08:14:29 +02:00
<td>
@if (isset($account->logo_url))
{!! HTML::image($account->logo_url.'?no_cache='.time(), 'Logo', ['width' => 100]) !!}
2015-08-07 08:14:29 +02:00
@endif
2016-06-25 21:05:08 +02:00
</td>
2015-08-07 08:14:29 +02:00
<td>
<h3>{{ $account->account_name }}<br/>
<small>{{ $account->user_name }}
@if ($account->user_id == Auth::user()->id)
| {{ trans('texts.current_user')}}
@endif
</small></h3>
</td>
<td>{!! Button::primary(trans('texts.unlink'))->withAttributes(['onclick'=>"return showUnlink({$account->id}, {$account->user_id})"]) !!}</td>
2015-08-03 09:15:58 +02:00
</tr>
@endforeach
</table>
</div>
</div>
</div>
</div>
<div class="modal fade" id="unlinkModal" tabindex="-1" role="dialog" aria-labelledby="unlinkModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title" id="myModalLabel">{{ trans('texts.unlink_account') }}</h4>
</div>
2016-06-25 21:05:08 +02:00
<div class="container">
<h3>{{ trans('texts.are_you_sure') }}</h3>
2015-08-03 09:15:58 +02:00
</div>
2016-06-25 21:05:08 +02:00
<div class="modal-footer" id="signUpFooter">
2015-08-03 09:15:58 +02:00
<button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('texts.cancel') }}</button>
2016-06-25 21:05:08 +02:00
<button type="button" class="btn btn-primary" onclick="unlinkAccount()">{{ trans('texts.unlink') }}</button>
2015-08-03 09:15:58 +02:00
</div>
</div>
</div>
</div>
<script type="text/javascript">
2016-06-25 21:05:08 +02:00
function showUnlink(userAccountId, userId) {
2015-08-03 09:15:58 +02:00
NINJA.unlink = {
'userAccountId': userAccountId,
'userId': userId
};
2016-06-25 21:05:08 +02:00
$('#unlinkModal').modal('show');
2015-08-03 09:15:58 +02:00
return false;
}
2016-06-25 21:05:08 +02:00
function unlinkAccount() {
window.location = '{{ URL::to('/unlink_account') }}' + '/' + NINJA.unlink.userAccountId + '/' + NINJA.unlink.userId;
2015-08-03 09:15:58 +02:00
}
</script>
2016-06-25 21:05:08 +02:00
@stop