1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-16 08:02:40 +01:00
invoiceninja/resources/views/users/account_management.blade.php

89 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)
2017-03-24 12:51:24 +01:00
{!! Button::success(trans('texts.add_company'))->withAttributes(['onclick' => 'showSignUp()']) !!}
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 }}
</small></h3>
</td>
2016-12-29 21:24:11 +01:00
<td>
@if ($account->user_id == Auth::user()->id)
<b>{{ trans('texts.logged_in')}}</b>
@else
2017-04-12 16:04:09 +02:00
{{-- Button::primary(trans('texts.unlink'))->withAttributes(['onclick'=>"return showUnlink({$account->id}, {$account->user_id})"]) --}}
2016-12-29 21:24:11 +01:00
@endif
</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