first commit
This commit is contained in:
62
resources/views/settings/categories/create.blade.php
Normal file
62
resources/views/settings/categories/create.blade.php
Normal file
@@ -0,0 +1,62 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.new', ['type' => trans_choice('general.categories', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::open(['url' => 'settings/categories', 'role' => 'form']) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
|
||||
|
||||
{{ Form::selectGroup('type', trans_choice('general.types', 1), 'bars', ['expense' => 'Expense', 'income' => 'Income', 'item' => 'Item', 'other' => 'Other'], config('general.types')) }}
|
||||
|
||||
<div class="form-group col-md-6 required {{ $errors->has('color') ? 'has-error' : ''}}">
|
||||
{!! Form::label('color', trans('general.color'), ['class' => 'control-label']) !!}
|
||||
<div id="category-color-picker" class="input-group colorpicker-component">
|
||||
<div class="input-group-addon"><i></i></div>
|
||||
{!! Form::text('color', '#00a65a', ['id' => 'color', 'class' => 'form-control', 'required' => 'required']) !!}
|
||||
</div>
|
||||
{!! $errors->first('color', '<p class="help-block">:message</p>') !!}
|
||||
</div>
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('settings/categories') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/colorpicker/bootstrap-colorpicker.js') }}"></script>
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/colorpicker/bootstrap-colorpicker.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
var text_yes = '{{ trans('general.yes') }}';
|
||||
var text_no = '{{ trans('general.no') }}';
|
||||
|
||||
$(document).ready(function(){
|
||||
$('#enabled_1').trigger('click');
|
||||
|
||||
$('#name').focus();
|
||||
|
||||
$("#type").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.types', 1)]) }}"
|
||||
});
|
||||
|
||||
$('#category-color-picker').colorpicker();
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
64
resources/views/settings/categories/edit.blade.php
Normal file
64
resources/views/settings/categories/edit.blade.php
Normal file
@@ -0,0 +1,64 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.edit', ['type' => trans_choice('general.categories', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::model($category, [
|
||||
'method' => 'PATCH',
|
||||
'url' => ['settings/categories', $category->id],
|
||||
'role' => 'form'
|
||||
]) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
|
||||
|
||||
{{ Form::selectGroup('type', trans_choice('general.types', 1), 'bars', ['expense' => 'Expense', 'income' => 'Income', 'item' => 'Item', 'other' => 'Other'], config('general.types')) }}
|
||||
|
||||
<div class="form-group col-md-6 required {{ $errors->has('color') ? 'has-error' : ''}}">
|
||||
{!! Form::label('color', trans('general.color'), ['class' => 'control-label']) !!}
|
||||
<div id="category-color-picker" class="input-group colorpicker-component">
|
||||
<div class="input-group-addon"><i></i></div>
|
||||
{!! Form::text('color', null, ['id' => 'color', 'class' => 'form-control', 'required' => 'required']) !!}
|
||||
</div>
|
||||
{!! $errors->first('color', '<p class="help-block">:message</p>') !!}
|
||||
</div>
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
@permission('update-settings-categories')
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('settings/categories') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
@endpermission
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/colorpicker/bootstrap-colorpicker.js') }}"></script>
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/colorpicker/bootstrap-colorpicker.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
var text_yes = '{{ trans('general.yes') }}';
|
||||
var text_no = '{{ trans('general.no') }}';
|
||||
|
||||
$(document).ready(function(){
|
||||
$("#type").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.types', 1)]) }}"
|
||||
});
|
||||
|
||||
$('#category-color-picker').colorpicker();
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
75
resources/views/settings/categories/index.blade.php
Normal file
75
resources/views/settings/categories/index.blade.php
Normal file
@@ -0,0 +1,75 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans_choice('general.categories', 2))
|
||||
|
||||
@permission('create-settings-categories')
|
||||
@section('new_button')
|
||||
<span class="new-button"><a href="{{ url('settings/categories/create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
||||
@endsection
|
||||
@endpermission
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="box-header">
|
||||
{!! Form::open(['url' => 'settings/categories', 'role' => 'form', 'method' => 'GET']) !!}
|
||||
<div class="pull-left">
|
||||
<span class="title-filter">{{ trans('general.search') }}:</span>
|
||||
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
|
||||
{!! Form::select('type', $types, request('type'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('categories.all_types')]) !!}
|
||||
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<span class="title-filter">{{ trans('general.show') }}:</span>
|
||||
{!! Form::select('limit', $limits, request('limit', setting('general.list_limit', '25')), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover" id="tbl-categories">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>@sortablelink('name', trans('general.name'))</th>
|
||||
<th>@sortablelink('type', trans_choice('general.types', 1))</th>
|
||||
<th>{{ trans('general.color') }}</th>
|
||||
<th>@sortablelink('enabled', trans('general.status'))</th>
|
||||
<th class="col-md-2">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($categories as $item)
|
||||
<tr>
|
||||
<td><a href="{{ url('settings/categories/' . $item->id . '/edit') }}">{{ $item->name }}</a></td>
|
||||
<td>{{ $item->type }}</td>
|
||||
<td><i class="fa fa-2x fa-circle" style="color:{{ $item->color }};"></i></td>
|
||||
<td>
|
||||
@if ($item->enabled)
|
||||
<span class="label label-success">{{ trans('general.enabled') }}</span>
|
||||
@else
|
||||
<span class="label label-danger">{{ trans('general.disabled') }}</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ url('settings/categories/' . $item->id . '/edit') }}" class="btn btn-primary btn-xs"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> {{ trans('general.edit') }}</a>
|
||||
@permission('delete-settings-categories')
|
||||
{!! Form::deleteButton($item, 'settings/categories') !!}
|
||||
@endpermission
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
@include('partials.admin.pagination', ['items' => $categories, 'type' => 'categories'])
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
47
resources/views/settings/currencies/create.blade.php
Normal file
47
resources/views/settings/currencies/create.blade.php
Normal file
@@ -0,0 +1,47 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.new', ['type' => trans_choice('general.currencies', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::open(['url' => 'settings/currencies', 'role' => 'form']) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
|
||||
{{ Form::selectGroup('code', trans('currencies.code'), 'code', $codes, setting('currencies.code')) }}
|
||||
|
||||
{{ Form::radioGroup('default_currency', trans('currencies.default')) }}
|
||||
|
||||
{{ Form::textGroup('rate', trans('currencies.rate'), 'money') }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('settings/currencies') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
var text_yes = '{{ trans('general.yes') }}';
|
||||
var text_no = '{{ trans('general.no') }}';
|
||||
|
||||
$(document).ready(function(){
|
||||
$('#enabled_1').trigger('click');
|
||||
|
||||
$('#name').focus();
|
||||
|
||||
$("#code").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans('currencies.code')]) }}"
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
49
resources/views/settings/currencies/edit.blade.php
Normal file
49
resources/views/settings/currencies/edit.blade.php
Normal file
@@ -0,0 +1,49 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.edit', ['type' => trans_choice('general.currencies', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::model($currency, [
|
||||
'method' => 'PATCH',
|
||||
'url' => ['settings/currencies', $currency->id],
|
||||
'role' => 'form'
|
||||
]) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
|
||||
{{ Form::selectGroup('code', trans('currencies.code'), 'code', $codes, setting('currencies.code')) }}
|
||||
|
||||
{{ Form::radioGroup('default_currency', trans('currencies.default')) }}
|
||||
|
||||
{{ Form::textGroup('rate', trans('currencies.rate'), 'money') }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
@permission('update-settings-currencies')
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('settings/currencies') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
@endpermission
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
var text_yes = '{{ trans('general.yes') }}';
|
||||
var text_no = '{{ trans('general.no') }}';
|
||||
|
||||
$(document).ready(function(){
|
||||
$("#code").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans('currencies.code')]) }}"
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
72
resources/views/settings/currencies/index.blade.php
Normal file
72
resources/views/settings/currencies/index.blade.php
Normal file
@@ -0,0 +1,72 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans_choice('general.currencies', 2))
|
||||
|
||||
@permission('create-settings-currencies')
|
||||
@section('new_button')
|
||||
<span class="new-button"><a href="{{ url('settings/currencies/create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
||||
@endsection
|
||||
@endpermission
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="box-header">
|
||||
{!! Form::open(['url' => 'settings/currencies', 'role' => 'form', 'method' => 'GET']) !!}
|
||||
<div class="pull-left">
|
||||
<span class="title-filter">{{ trans('general.search') }}:</span>
|
||||
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
|
||||
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<span class="title-filter">{{ trans('general.show') }}:</span>
|
||||
{!! Form::select('limit', $limits, request('limit', setting('general.list_limit', '25')), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover" id="tbl-currencies">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>@sortablelink('name', trans('general.name'))</th>
|
||||
<th>@sortablelink('code', trans('currencies.code'))</th>
|
||||
<th>@sortablelink('rate', trans('currencies.rate'))</th>
|
||||
<th>@sortablelink('enabled', trans('general.status'))</th>
|
||||
<th class="col-md-2">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($currencies as $item)
|
||||
<tr>
|
||||
<td><a href="{{ url('settings/currencies/' . $item->id . '/edit') }}">{{ $item->name }}</a></td>
|
||||
<td>{{ $item->code }}</td>
|
||||
<td>{{ $item->rate }}</td>
|
||||
<td>
|
||||
@if ($item->enabled)
|
||||
<span class="label label-success">{{ trans('general.enabled') }}</span>
|
||||
@else
|
||||
<span class="label label-danger">{{ trans('general.disabled') }}</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ url('settings/currencies/' . $item->id . '/edit') }}" class="btn btn-primary btn-xs"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> {{ trans('general.edit') }}</a>
|
||||
@permission('delete-settings-currencies')
|
||||
{!! Form::deleteButton($item, 'settings/currencies') !!}
|
||||
@endpermission
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
@include('partials.admin.pagination', ['items' => $currencies, 'type' => 'currencies'])
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
50
resources/views/settings/modules/edit.blade.php
Normal file
50
resources/views/settings/modules/edit.blade.php
Normal file
@@ -0,0 +1,50 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', $module->getName())
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::model($setting, [
|
||||
'method' => 'PATCH',
|
||||
'url' => ['settings/modules/' . $module->getAlias()],
|
||||
'files' => true,
|
||||
'role' => 'form'
|
||||
]) !!}
|
||||
|
||||
<div class="box-body">
|
||||
@foreach($module->get('settings') as $field)
|
||||
@php $type = $field['type']; @endphp
|
||||
|
||||
@if (($type == 'textGroup') || ($type == 'emailGroup') || ($type == 'passwordGroup'))
|
||||
{{ Form::$type($field['name'], trans($field['title']), $field['icon'], $field['attributes']) }}
|
||||
@elseif ($type == 'textareaGroup')
|
||||
{{ Form::$type($field['name'], trans($field['title'])) }}
|
||||
@elseif ($type == 'selectGroup')
|
||||
{{ Form::$type($field['name'], trans($field['title']), $field['icon'], $field['values'], $field['selected'], $field['attributes']) }}
|
||||
@elseif ($type == 'radioGroup')
|
||||
{{ Form::$type($field['name'], trans($field['title']), trans($field['enable']), trans($field['disable']), $field['attributes']) }}
|
||||
@elseif ($type == 'checkboxGroup')
|
||||
{{ Form::$type($field['name'], trans($field['title']), $field['items'], $field['value'], $field['id'], $field['attributes']) }}
|
||||
@elseif ($type == 'fileGroup')
|
||||
{{ Form::$type($field['name'], trans($field['title']), $field['attributes']) }}
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons(URL::previous()) }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
var text_yes = '{{ trans('general.yes') }}';
|
||||
var text_no = '{{ trans('general.no') }}';
|
||||
</script>
|
||||
@endsection
|
||||
247
resources/views/settings/settings/edit.blade.php
Normal file
247
resources/views/settings/settings/edit.blade.php
Normal file
@@ -0,0 +1,247 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.general'))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="row">
|
||||
{!! Form::model($setting, [
|
||||
'method' => 'PATCH',
|
||||
'url' => ['settings/settings'],
|
||||
'class' => 'setting-form',
|
||||
'files' => true,
|
||||
'role' => 'form'
|
||||
]) !!}
|
||||
|
||||
<div class="col-sm-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#company" data-toggle="tab" aria-expanded="true">{{ trans_choice('general.companies', 1) }}</a></li>
|
||||
<li class=""><a href="#localisation" data-toggle="tab" aria-expanded="false">{{ trans('settings.localisation.tab') }}</a></li>
|
||||
<li class=""><a href="#invoice" data-toggle="tab" aria-expanded="false">{{ trans('settings.invoice.tab') }}</a></li>
|
||||
<li class=""><a href="#default" data-toggle="tab" aria-expanded="false">{{ trans('settings.default.tab') }}</a></li>
|
||||
<li class=""><a href="#email" data-toggle="tab" aria-expanded="false">{{ trans('general.email') }}</a></li>
|
||||
<li class=""><a href="#scheduling" data-toggle="tab" aria-expanded="false">{{ trans('settings.scheduling.tab') }}</a></li>
|
||||
<li class=""><a href="#appearance" data-toggle="tab" aria-expanded="false">{{ trans('settings.appearance.tab') }}</a></li>
|
||||
<li class=""><a href="#system" data-toggle="tab" aria-expanded="false">{{ trans('settings.system.tab') }}</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane tab-margin active" id="company">
|
||||
{{ Form::textGroup('company_name', trans('settings.company.name'), 'id-card-o') }}
|
||||
|
||||
{{ Form::textGroup('company_email', trans('settings.company.email'), 'envelope') }}
|
||||
|
||||
{{ Form::textGroup('company_tax_number', trans('general.tax_number'), 'percent', []) }}
|
||||
|
||||
{{ Form::textGroup('company_phone', trans('settings.company.phone'), 'phone', []) }}
|
||||
|
||||
{{ Form::textareaGroup('company_address', trans('settings.company.address')) }}
|
||||
|
||||
{{ Form::fileGroup('company_logo', trans('settings.company.logo')) }}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane tab-margin" id="localisation">
|
||||
{{ Form::selectGroup('date_format', trans('settings.localisation.date.format'), 'calendar', $date_formats, null, []) }}
|
||||
|
||||
{{ Form::selectGroup('date_separator', trans('settings.localisation.date.separator'), 'minus', $date_separators, null, []) }}
|
||||
|
||||
{{ Form::selectGroup('timezone', trans('settings.localisation.timezone'), 'globe', $timezones, null, []) }}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane tab-margin" id="invoice">
|
||||
{{ Form::textGroup('invoice_prefix', trans('settings.invoice.prefix'), 'font', []) }}
|
||||
|
||||
{{ Form::textGroup('invoice_digit', trans('settings.invoice.digit'), 'text-width', []) }}
|
||||
|
||||
{{ Form::textGroup('invoice_start', trans('settings.invoice.start'), 'chevron-right', []) }}
|
||||
|
||||
{{ Form::fileGroup('invoice_logo', trans('settings.invoice.logo')) }}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane tab-margin" id="default">
|
||||
{{ Form::selectGroup('default_account', trans('settings.default.account'), 'university', $accounts, null, []) }}
|
||||
|
||||
{{ Form::selectGroup('default_currency', trans('settings.default.currency'), 'exchange', $currencies, null, []) }}
|
||||
|
||||
{{ Form::selectGroup('default_tax', trans('settings.default.tax'), 'percent', $taxes, null, []) }}
|
||||
|
||||
{{ Form::selectGroup('default_payment_method', trans('settings.default.payment'), 'credit-card', ['cash' => 'Cash', 'bank' => 'Bank Transfer', 'paypal' => 'PayPal'], null, []) }}
|
||||
|
||||
{{ Form::selectGroup('default_locale', trans('settings.default.language'), 'flag', language()->allowed(), null, []) }}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane tab-margin" id="email">
|
||||
{{ Form::selectGroup('email_protocol', trans('settings.email.protocol'), 'share', $email_protocols, null, []) }}
|
||||
|
||||
{{ Form::textGroup('email_sendmail_path', trans('settings.email.sendmail_path'), 'road', []) }}
|
||||
|
||||
{{ Form::textGroup('email_smtp_host', trans('settings.email.smtp.host'), 'paper-plane-o', []) }}
|
||||
|
||||
{{ Form::textGroup('email_smtp_port', trans('settings.email.smtp.port'), 'paper-plane-o', []) }}
|
||||
|
||||
{{ Form::textGroup('email_smtp_username', trans('settings.email.smtp.username'), 'paper-plane-o', []) }}
|
||||
|
||||
{{ Form::textGroup('email_smtp_password', trans('settings.email.smtp.password'), 'paper-plane-o', []) }}
|
||||
|
||||
{{ Form::selectGroup('email_smtp_encryption', trans('settings.email.smtp.encryption'), 'paper-plane-o', ['' => trans('settings.email.smtp.none'), 'ssl' => 'SSL', 'tls' => 'TLS'], null, []) }}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane tab-margin" id="scheduling">
|
||||
{{ Form::radioGroup('send_invoice_reminder', trans('settings.scheduling.send_invoice')) }}
|
||||
|
||||
{{ Form::textGroup('schedule_invoice_days', trans('settings.scheduling.invoice_days'), 'calendar-check-o', []) }}
|
||||
|
||||
{{ Form::radioGroup('send_bill_reminder', trans('settings.scheduling.send_bill')) }}
|
||||
|
||||
{{ Form::textGroup('schedule_bill_days', trans('settings.scheduling.bill_days'), 'calendar-check-o', []) }}
|
||||
|
||||
<div class="col-sm-6">
|
||||
<label for="cron_command" class="control-label">{{ trans('settings.scheduling.cron_command') }}</label>
|
||||
<pre>php /path-to-akaunting/artisan schedule:run >> /dev/null 2>&1</pre>
|
||||
</div>
|
||||
|
||||
{{ Form::textGroup('schedule_time', trans('settings.scheduling.schedule_time'), 'clock-o', []) }}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane tab-margin" id="appearance">
|
||||
{{ Form::selectGroup('admin_theme', trans('settings.appearance.theme'), 'paint-brush', ['skin-green-light' => trans('settings.appearance.light'), 'skin-black' => trans('settings.appearance.dark')], null, []) }}
|
||||
|
||||
{{ Form::selectGroup('list_limit', trans('settings.appearance.list_limit'), 'columns', ['10' => '10', '25' => '25', '50' => '50', '100' => '100'], null, []) }}
|
||||
|
||||
{{ Form::radioGroup('use_gravatar', trans('settings.appearance.use_gravatar')) }}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane tab-margin" id="system">
|
||||
{{ Form::selectGroup('session_handler', trans('settings.system.session.handler'), 'database', ['file' => trans('settings.system.session.file'), 'database' => trans('settings.system.session.database')], null, []) }}
|
||||
|
||||
{{ Form::textGroup('session_lifetime', trans('settings.system.session.lifetime'), 'clock-o', []) }}
|
||||
|
||||
{{ Form::textGroup('file_size', trans('settings.system.file_size'), 'upload', []) }}
|
||||
|
||||
{{ Form::textGroup('file_types', trans('settings.system.file_types'), 'file-o', []) }}
|
||||
</div>
|
||||
|
||||
@permission('update-settings-settings')
|
||||
<div class="setting-buttons">
|
||||
<div class="form-group no-margin">
|
||||
{!! Form::button('<span class="fa fa-save"></span> ' . trans('general.save'), ['type' => 'submit', 'class' => 'btn btn-success']) !!}
|
||||
<a href="{{ URL::previous() }}" class="btn btn-default"><span class="fa fa-times-circle"></span> {{ trans('general.cancel') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
@endpermission
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="{{ asset('public/css/bootstrap-fancyfile.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
var text_yes = '{{ trans('general.yes') }}';
|
||||
var text_no = '{{ trans('general.no') }}';
|
||||
|
||||
$(document).ready(function() {
|
||||
$("#date_format").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans('settings.localisation.date.format')]) }}"
|
||||
});
|
||||
|
||||
$("#date_separator").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans('settings.localisation.date.separator')]) }}"
|
||||
});
|
||||
|
||||
$("#timezone").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans('settings.localisation.timezone')]) }}"
|
||||
});
|
||||
|
||||
$("#default_account").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans('settings.default.account')]) }}"
|
||||
});
|
||||
|
||||
$("#default_currency").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans('settings.default.currency')]) }}"
|
||||
});
|
||||
|
||||
$("#default_tax").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans('settings.default.tax')]) }}"
|
||||
});
|
||||
|
||||
$("#default_payment_method").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans('settings.default.payment')]) }}"
|
||||
});
|
||||
|
||||
$("#default_locale").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans('settings.default.language')]) }}"
|
||||
});
|
||||
|
||||
$("#admin_theme").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans('settings.appearance.theme')]) }}"
|
||||
});
|
||||
|
||||
$("#email_protocol").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans('settings.email.protocol')]) }}"
|
||||
});
|
||||
|
||||
$("#list_limit").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans('settings.appearance.list_limit')]) }}"
|
||||
});
|
||||
|
||||
$("#session_handler").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans('settings.system.session.handler')]) }}"
|
||||
});
|
||||
|
||||
$('#company_logo').fancyfile({
|
||||
text : '{{ trans('general.form.select.file') }}',
|
||||
style : 'btn-default',
|
||||
placeholder : '<?php echo $setting->pull('company_logo'); ?>'
|
||||
});
|
||||
|
||||
$('#invoice_logo').fancyfile({
|
||||
text : '{{ trans('general.form.select.file') }}',
|
||||
style : 'btn-default',
|
||||
placeholder : '<?php echo $setting->pull('invoice_logo'); ?>'
|
||||
});
|
||||
|
||||
$("select[name='email_protocol']").on('change', function() {
|
||||
var selection = $(this).val();
|
||||
|
||||
if (selection == 'mail' || selection == 'log') {
|
||||
$("input[name='email_sendmail_path']").prop('disabled', true);
|
||||
$("input[name='email_smtp_host']").prop('disabled', true);
|
||||
$("input[name='email_smtp_username']").prop('disabled', true);
|
||||
$("input[name='email_smtp_password']").prop('disabled', true);
|
||||
$("input[name='email_smtp_port']").prop('disabled', true);
|
||||
$("select[name='email_smtp_encryption']").prop('disabled', true);
|
||||
}
|
||||
else if(selection == 'sendmail') {
|
||||
$("input[name='email_sendmail_path']").prop('disabled', false);
|
||||
$("input[name='email_smtp_host']").prop('disabled', true);
|
||||
$("input[name='email_smtp_username']").prop('disabled', true);
|
||||
$("input[name='email_smtp_password']").prop('disabled', true);
|
||||
$("input[name='email_smtp_port']").prop('disabled', true);
|
||||
$("select[name='email_smtp_encryption']").prop('disabled', true);
|
||||
}
|
||||
else if (selection == 'smtp') {
|
||||
$("input[name='email_sendmail_path']").prop('disabled', true);
|
||||
$("input[name='email_smtp_host']").prop('disabled', false);
|
||||
$("input[name='email_smtp_username']").prop('disabled', false);
|
||||
$("input[name='email_smtp_password']").prop('disabled', false);
|
||||
$("input[name='email_smtp_port']").prop('disabled', false);
|
||||
$("select[name='email_smtp_encryption']").prop('disabled', false);
|
||||
}
|
||||
});
|
||||
|
||||
$("select[name='email_protocol']").trigger('change');
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
39
resources/views/settings/taxes/create.blade.php
Normal file
39
resources/views/settings/taxes/create.blade.php
Normal file
@@ -0,0 +1,39 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.new', ['type' => trans_choice('general.tax_rates', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::open(['url' => 'settings/taxes', 'role' => 'form']) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
|
||||
|
||||
{{ Form::textGroup('rate', trans('taxes.rate'), 'percent') }}
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('settings/taxes') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
var text_yes = '{{ trans('general.yes') }}';
|
||||
var text_no = '{{ trans('general.no') }}';
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#enabled_1').trigger('click');
|
||||
|
||||
$('#name').focus();
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
39
resources/views/settings/taxes/edit.blade.php
Normal file
39
resources/views/settings/taxes/edit.blade.php
Normal file
@@ -0,0 +1,39 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.edit', ['type' => trans_choice('general.tax_rates', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::model($tax, [
|
||||
'method' => 'PATCH',
|
||||
'url' => ['settings/taxes', $tax->id],
|
||||
'role' => 'form'
|
||||
]) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
|
||||
|
||||
{{ Form::textGroup('rate', trans('taxes.rate'), 'percent') }}
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
@permission('update-settings-taxes')
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('settings/taxes') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
@endpermission
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
var text_yes = '{{ trans('general.yes') }}';
|
||||
var text_no = '{{ trans('general.no') }}';
|
||||
</script>
|
||||
@endsection
|
||||
73
resources/views/settings/taxes/index.blade.php
Normal file
73
resources/views/settings/taxes/index.blade.php
Normal file
@@ -0,0 +1,73 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans_choice('general.tax_rates', 2))
|
||||
|
||||
@permission('create-settings-taxes')
|
||||
@section('new_button')
|
||||
<span class="new-button"><a href="{{ url('settings/taxes/create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span> Add New</a></span>
|
||||
@endsection
|
||||
@endpermission
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
|
||||
<div class="box-header">
|
||||
{!! Form::open(['url' => 'settings/taxes', 'role' => 'form', 'method' => 'GET']) !!}
|
||||
<div class="pull-left">
|
||||
<span class="title-filter">{{ trans('general.search') }}:</span>
|
||||
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
|
||||
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<span class="title-filter">{{ trans('general.show') }}:</span>
|
||||
{!! Form::select('limit', $limits, request('limit', setting('general.list_limit', '25')), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover" id="tbl-taxes">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>@sortablelink('name', trans('general.name'))</th>
|
||||
<th>@sortablelink('rate', trans('taxes.rate_percent'))</th>
|
||||
<th>@sortablelink('enabled', trans('general.status'))</th>
|
||||
<th class="col-md-2">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($taxes as $item)
|
||||
<tr>
|
||||
<td><a href="{{ url('settings/taxes/' . $item->id . '/edit') }}">{{ $item->name }}</a></td>
|
||||
<td>{{ $item->rate }}</td>
|
||||
<td>
|
||||
@if ($item->enabled)
|
||||
<span class="label label-success">{{ trans('general.enabled') }}</span>
|
||||
@else
|
||||
<span class="label label-danger">{{ trans('general.disabled') }}</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ url('settings/taxes/' . $item->id . '/edit') }}" class="btn btn-primary btn-xs"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> {{ trans('general.edit') }}</a>
|
||||
@permission('delete-settings-taxes')
|
||||
{!! Form::deleteButton($item, 'settings/taxes', 'tax_rates') !!}
|
||||
@endpermission
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
<div class="box-footer">
|
||||
@include('partials.admin.pagination', ['items' => $taxes, 'type' => 'taxes'])
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
Reference in New Issue
Block a user