Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(style): apply unified style to search bar and buttons #141

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 40 additions & 38 deletions resources/views/account/index.blade.php
Original file line number Diff line number Diff line change
@@ -1,39 +1,41 @@
@extends('layouts.app')

@section('content')
@include('layouts.partials._header', ['title' => __('Accounting')])
@include('layouts.partials._header', ['title' => __('Accounting')])

<div>
<div class="card">
<div class="card-body">
<form id="accountCreate" method="post" action="/account/save" class="form-horizontal">
<div class="row mb-3">
@csrf
<div class="col">
<label>{{ __('Issue date')}} <span class="text-danger">*</span></label>
<input type="date" name="issue_date" id="issue_date" value="{{ date('Y-m-d') }}" class="form-control form-control-lg" required="required">
</div>
<div class="col">
<label>{{ __('Name') }} <span class="text-danger">*</span></label>
<input type="text" name="name" id="name" value="" required="required" class="form-control form-control-lg">
</div>
<div class="col">
<label>{{ __('Amount') }} <span class="text-danger">*</span></label>
<div class="input-group">
<input type="number" name="amount" id="amount" required="required" step="0.01" autocomplete="false" class="form-control form-control-lg">
<span class="input-group-text">€</span>
<div class="row mb-3">
@csrf
<div class="col">
<label>{{ __('Issue date')}} <span class="text-danger">*</span></label>
<input type="date" name="issue_date" id="issue_date" value="{{ date('Y-m-d') }}" class="form-control form-control-lg" required="required">
</div>
<div class="col">
<label>{{ __('Name') }} <span class="text-danger">*</span></label>
<input type="text" name="name" id="name" value="" required="required" class="form-control form-control-lg">
</div>
<div class="col">
<label>{{ __('Amount') }} <span class="text-danger">*</span></label>
<div class="input-group">
<input type="number" name="amount" id="amount" required="required" step="0.01" autocomplete="false" class="form-control form-control-lg">
<span class="input-group-text">€</span>
</div>
</div>
<div class="col">
<label for="">&nbsp;</label>
<button type="submit" class="btn btn-primary btn-lg form-control">{{ __('Save') }}</button>
</div>
</div>
<div class="col">
<label for="">&nbsp;</label>
<button type="submit" class="btn btn-primary btn-lg form-control">{{ __('Save') }}</button>
</div>
</div>
</form>
</div>
</div>

<div class="card mt-2">
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered table-striped table-hover">
<div class="card mt-2">
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>{{ __('Created at') }}</th>
Expand All @@ -43,19 +45,19 @@
</tr>
</thead>
<tbody>
@foreach ($accounts as $account)
<tr>
<td>{{ $account->created_at->format('d/m/Y H:i') }}</td>
<td>{{ $account->issue_date->format('d/m/Y H:i') }}</td>
<td>
<a href="/account/edit/{{ $account->id }}">{{ $account->name }}</a>
</td>
<td>{{ $account->amount }}</td>
</tr>
@endforeach
@foreach ($accounts as $account)
<tr>
<td>{{ $account->created_at->format('d/m/Y H:i') }}</td>
<td>{{ $account->issue_date->format('d/m/Y H:i') }}</td>
<td>
<a href="/account/edit/{{ $account->id }}">{{ $account->name }}</a>
</td>
<td>{{ $account->amount }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</table>
</div>
</div>
</div>
@endsection
64 changes: 34 additions & 30 deletions resources/views/brand/index.blade.php
Original file line number Diff line number Diff line change
@@ -1,38 +1,42 @@
@extends('layouts.app')

@section('content')
<header>
<h1>{{ __('Brands') }}</h1>
</header>
@include('layouts.partials._header', ['title' => __('Brands')])
@include('layouts.partials._search_buttons_bar', [
'action_search' => url("/brand"),
'buttons' => [
['url' => url('/brand/create'), 'class' => 'btn btn-primary', 'text' => __('New')]
]
])

<div class="mb-2">
<a href="{{ url('/brand/create') }}" class="btn btn-primary">{{ __('New') }}</a>
</div>

<div class="table-responsive">
<table class="table table-bordered table-striped table-bordered table-hover">
<thead>
<div class="card">
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered table-striped table-bordered table-hover">
<thead>
<tr>
<th>{{ __('Name') }}</th>
</tr>
</thead>
<tbody>
@foreach ($brands as $brand)
<tr>
<th>{{ __('Name') }}</th>
<td>
<a href="{{ url('/brand/update/'.$brand->id) }}">{{ $brand->name }}</a>
</td>
<td>
<a href="{{ url('/brand/update/'.$brand->id) }}" class="btn btn-xs btn-warning text-white">
<i class="las la-pen"></i>
</a>
<a onclick="Brand.delete({{ $brand->id }}, '{{ $brand->name }}');" class="btn btn-xs btn-danger">
<i class="las la-trash-alt"></i>
</a>
</td>
</tr>
</thead>
<tbody>
@foreach ($brands as $brand)
<tr>
<td>
<a href="{{ url('/brand/update/'.$brand->id) }}">{{ $brand->name }}</a>
</td>
<td>
<a href="{{ url('/brand/update/'.$brand->id) }}" class="btn btn-xs btn-warning text-white">
<i class="las la-pen"></i>
</a>
<a onclick="Brand.delete({{ $brand->id }}, '{{ $brand->name }}');" class="btn btn-xs btn-danger">
<i class="las la-trash-alt"></i>
</a>
</td>
</tr>
@endforeach
</tbody>
</table>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
@endsection
12 changes: 6 additions & 6 deletions resources/views/campaign/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

@section('content')
@include('layouts.partials._header', ['title' => __('Campaigns')])

<div class="row">
<div class="col">
<a href="{{ url('/campaign/create') }}" class="btn btn-primary">{{ __('New') }}</a>
</div>
</div>
@include('layouts.partials._search_buttons_bar', [
'action_search' => url("/campaign"),
'buttons' => [
['url' => url('/campaign/create'), 'class' => 'btn btn-primary', 'text' => __('New')],
]
])

<div class="card mt-2">
<div class="card-body">
Expand Down
70 changes: 37 additions & 33 deletions resources/views/category/index.blade.php
Original file line number Diff line number Diff line change
@@ -1,39 +1,43 @@
@extends('layouts.app')

@section('content')
<header>
<h1>{{ __('Categories') }}</h1>
</header>
@include('layouts.partials._header', ['title' => __('Categories')])
@include('layouts.partials._search_buttons_bar', [
'action_search' => url("/category"),
'buttons' => [
['url' => url('/category/create'), 'class' => 'btn btn-primary', 'text' => __('New')]
]
])

<div>
<a href=" {{ url('/category/create') }}" class="btn btn-primary">{{ __('New') }}</a>
</div>

<div class="mt-2">
<table class="table table-bordered table-striped table-bordered table-hover">
<thead>
<tr>
<th>{{ __('Name') }}</th>
<th>{{ __('Actions')}}</th>
</tr>
</thead>
<tbody>
@foreach ($categories as $category)
<tr>
<td>
<a href="{{ url('/category/update/'.$category->id) }}">{{ $category->name }}</a>
</td>
<td>
<a href="{{ url('/category/update/'.$category->id) }}" class="btn btn-xs btn-warning text-white">
<i class="las la-pen"></i>
</a>
<a onclick="Category.delete({{ $category->id }}, '{{ $category->name }}');" class="btn btn-xs btn-danger">
<i class="las la-trash-alt"></i>
</a>
</td>
</tr>
@endforeach
</tbody>
</table>
<div class="mt-2">
<div class="card">
<div class="card-body">
<table class="table table-bordered table-striped table-bordered table-hover">
<thead>
<tr>
<th>{{ __('Name') }}</th>
<th>{{ __('Actions')}}</th>
</tr>
</thead>
<tbody>
@foreach ($categories as $category)
<tr>
<td>
<a href="{{ url('/category/update/'.$category->id) }}">{{ $category->name }}</a>
</td>
<td>
<a href="{{ url('/category/update/'.$category->id) }}" class="btn btn-xs btn-warning text-white">
<i class="las la-pen"></i>
</a>
<a onclick="Category.delete({{ $category->id }}, '{{ $category->name }}');" class="btn btn-xs btn-danger">
<i class="las la-trash-alt"></i>
</a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
@endsection
38 changes: 16 additions & 22 deletions resources/views/customer/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,23 @@

@section('content')
@include('layouts.partials._header', ['title' => __('Customers'), 'count' => $customer_count])
@include('layouts.partials._search_buttons_bar', [
'action_search' => url("/customer"),
'buttons' => [
['url' => url('/customer/create'), 'class' => 'btn btn-primary', 'text' => __('New')],
['url' => url('/customer/import'), 'class' => 'btn btn-success', 'text' => __('Import'), 'icon_class' => 'las la-file-csv']
]
])

@if(\Illuminate\Support\Facades\Auth::user()->hasRole(['SuperAdmin', 'CompanyAdmin']))
<div class="row">
<div class="col d-flex">
<a href="{{ url('/customer/create') }}" class="btn btn-primary d-flex flex-fill align-items-center justify-content-center">{{ __('New') }}</a>
</div>
<div class="col">
<div class="btn-group d-flex" role="group" aria-label="Basic mixed styles example">
<a href="{{ url('/customer/import') }}" class="btn btn-success d-block">
{{ __('Import') }} <i class="las la-file-csv d-none d-sm-block"></i>
</a>

@if(\Illuminate\Support\Facades\Auth::user()->hasRole(['SuperAdmin', 'CompanyAdmin']))
<a href="{{ url('/customer/export') }}" class="btn btn-info d-block">
{{ __('Export') }} <i class="las la-file-csv d-none d-sm-block"></i>
</a>
@endif
</div><!--./btn-group-->
<div class="col">
<a href="{{ url('/customer/export') }}" class="btn btn-info d-block">
{{ __('Export') }} <i class="las la-file-csv d-none d-sm-block"></i>
</a>
</div>
</div>
@endif

@if(session('status'))
<div class="alert alert-{{ session('status') }} mt-2">
Expand All @@ -31,13 +29,6 @@
<div class="row mt-2">
<div class="col">
<form method="get" action="{{ url("/customer") }}" class="form-inline mb-2">
@csrf
<div class="input-group">
<input type="search" name="search" placeholder="{{ __('Search') }}" value="{{ !empty($search) ? $search : '' }}" class="form-control">
<div class="input-group-append">
<button class="btn btn-outline-primary" type="submit" id="btn-search"><i class="las la-search"></i></button>
</div>
</div>
<div class="card mt-2">
<div class="card-header">{{ __('Advanced search') }}</div>
<div class="card-body">
Expand Down Expand Up @@ -66,6 +57,9 @@
@endforeach
</select>
</div>
<div class="p-3">
<button class="btn btn-secundary btn-outline-dark" type="submit"><i class="fas fa-filter"></i></button>
</div>
</div><!--./row-->
</div>
</div>
Expand Down
21 changes: 6 additions & 15 deletions resources/views/email/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,12 @@

@section('content')
@include('layouts.partials._header', ['title' => __('E-mail')])

<div class="row">
<div class="col">
<a href="{{ url('/email/create') }}" class="btn btn-primary">{{ __('New') }}</a>
</div>

<div class="col">
<form method="GET" action="{{ url('/email') }}">
<div class="input-group">
<input name="search" type="search" class="form-control" placeholder="{{ __('Search') }}" value="{{ request()->get('search') }}">
<button class="btn btn-outline-secondary" type="submit" id="button-search"><i class="las la-search"></i></button>
</div>
</form>
</div>
</div>
@include('layouts.partials._search_buttons_bar', [
'action_search' => url("/email"),
'buttons' => [
['url' => url('/email/create'), 'class' => 'btn btn-primary', 'text' => __('New')]
]
])

<div class="card mt-2">
<div class="card-body">
Expand Down
28 changes: 17 additions & 11 deletions resources/views/email_template/index.blade.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
@extends('layouts.app')

@section('content')
<header>
<h1>E-mail templates</h1>
</header>

<div>
<a href="{{ url('/email-template/create') }}" class="btn btn-primary">{{ __('New') }}</a>
</div>
@section('content')
@include('layouts.partials._header', ['title' => __('E-mail templates')])
@include('layouts.partials._search_buttons_bar', [
'action_search' => url("/email-template"),
'buttons' => [
['url' => url('/email-template/create'), 'class' => 'btn btn-primary', 'text' => __('New')]
]
])

@foreach($templates as $template)
<div>
<img src="{{ $template->screenshot }}" alt="">
<div class="card">
<div class="card-body">
@foreach($templates as $template)
<div>
<img src="{{ $template->screenshot }}" alt="">
</div>
@endforeach
</div>
@endforeach
</div>

@endsection
Loading