From 494286ba78f0b40330b1c86e46bd19d63cc40365 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 17 Feb 2014 01:09:34 +0200 Subject: [PATCH] bug fixes --- app/config/app.php | 6 ++--- app/controllers/ClientController.php | 1 + app/controllers/DashboardController.php | 2 +- app/controllers/InvoiceController.php | 2 ++ app/controllers/PaymentController.php | 1 + app/routes.php | 20 +++++++++++++++++ app/views/credits/edit.blade.php | 6 ----- app/views/dashboard.blade.php | 2 +- app/views/header.blade.php | 7 +++++- app/views/invoices/edit.blade.php | 6 +++++ app/views/payments/edit.blade.php | 6 ----- composer.json | 1 - public/css/style.css | 30 +++++++++++++------------ 13 files changed, 57 insertions(+), 33 deletions(-) diff --git a/app/config/app.php b/app/config/app.php index 5b4bee37d873..2788a7946e6b 100755 --- a/app/config/app.php +++ b/app/config/app.php @@ -187,8 +187,8 @@ return array( 'URL' => 'Illuminate\Support\Facades\URL', 'Validator' => 'Illuminate\Support\Facades\Validator', 'View' => 'Illuminate\Support\Facades\View', - 'SSH' => 'Illuminate\Support\Facades\SSH', - 'Basset' => 'Basset\Facade', + 'SSH' => 'Illuminate\Support\Facades\SSH', + 'Basset' => 'Basset\Facade', 'Alert' => 'Bootstrapper\Alert', 'Badge' => 'Bootstrapper\Badge', 'Breadcrumb' => 'Bootstrapper\Breadcrumb', @@ -212,7 +212,7 @@ return array( 'Thumbnail' => 'Bootstrapper\Thumbnail', 'Typeahead' => 'Bootstrapper\Typeahead', 'Typography' => 'Bootstrapper\Typography', - 'Confide' => 'Zizaco\Confide\ConfideFacade', + 'Confide' => 'Zizaco\Confide\ConfideFacade', 'Former' => 'Former\Facades\Former', 'Datatable' => 'Chumper\Datatable\Facades\Datatable', 'Omnipay' => 'Omnipay\Omnipay', diff --git a/app/controllers/ClientController.php b/app/controllers/ClientController.php index 09095e889d1e..81b42868abc6 100755 --- a/app/controllers/ClientController.php +++ b/app/controllers/ClientController.php @@ -108,6 +108,7 @@ class ClientController extends \BaseController { Utils::trackViewed($client->getDisplayName(), ENTITY_CLIENT); $data = array( + 'showBreadcrumbs' => false, 'client' => $client, 'credit' => $client->getTotalCredit(), 'title' => '- ' . $client->getDisplayName(), diff --git a/app/controllers/DashboardController.php b/app/controllers/DashboardController.php index 60fb7baa332a..f07037142b22 100644 --- a/app/controllers/DashboardController.php +++ b/app/controllers/DashboardController.php @@ -5,7 +5,7 @@ class DashboardController extends \BaseController { public function index() { // total_income, billed_clients, invoice_sent and active_clients - $select = DB::raw('SUM(clients.paid_to_date) total_income, + $select = DB::raw('SUM(DISTINCT clients.paid_to_date) total_income, COUNT(DISTINCT CASE WHEN invoices.id IS NOT NULL THEN clients.id ELSE null END) billed_clients, SUM(CASE WHEN invoices.invoice_status_id >= '.INVOICE_STATUS_SENT.' THEN 1 ELSE 0 END) invoices_sent, COUNT(DISTINCT clients.id) active_clients'); diff --git a/app/controllers/InvoiceController.php b/app/controllers/InvoiceController.php index 704769d7ebdb..934d96e3042b 100755 --- a/app/controllers/InvoiceController.php +++ b/app/controllers/InvoiceController.php @@ -141,6 +141,7 @@ class InvoiceController extends \BaseController { $invoice->due_date = Utils::fromSqlDate($invoice->due_date); $data = array( + 'showBreadcrumbs' => false, 'invoice' => $invoice->hidePrivateFields(), 'invitation' => $invitation ); @@ -166,6 +167,7 @@ class InvoiceController extends \BaseController { ->select('contacts.public_id')->lists('public_id'); $data = array( + 'showBreadcrumbs' => false, 'account' => $invoice->account, 'invoice' => $invoice, 'data' => false, diff --git a/app/controllers/PaymentController.php b/app/controllers/PaymentController.php index 58b8aee8efa7..7a9a70d4d7f6 100755 --- a/app/controllers/PaymentController.php +++ b/app/controllers/PaymentController.php @@ -167,6 +167,7 @@ class PaymentController extends \BaseController $client = $invoice->client; $data = [ + 'showBreadcrumbs' => false, 'invitationKey' => $invitationKey, 'invoice' => $invoice, 'client' => $client, diff --git a/app/routes.php b/app/routes.php index f1c1b8a1de27..39e2034f85af 100755 --- a/app/routes.php +++ b/app/routes.php @@ -159,6 +159,26 @@ HTML::macro('image_data', function($imagePath) { }); +HTML::macro('breadcrumbs', function() { + $str = ''; +}); + define('CONTACT_EMAIL', 'contact@invoiceninja.com'); define('ENV_DEVELOPMENT', 'local'); diff --git a/app/views/credits/edit.blade.php b/app/views/credits/edit.blade.php index fec26adeb239..938ddad253f7 100755 --- a/app/views/credits/edit.blade.php +++ b/app/views/credits/edit.blade.php @@ -16,12 +16,6 @@
- @if ($credit) - {{ Former::legend('Edit Credit') }} - @else - {{ Former::legend('New Credit') }} - @endif - {{ Former::select('client')->addOption('', '')->addGroupClass('client-select') }} {{ Former::text('amount') }} {{ Former::text('credit_date')->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT)) }} diff --git a/app/views/dashboard.blade.php b/app/views/dashboard.blade.php index 56d68e8a1b31..6a102a1b7024 100644 --- a/app/views/dashboard.blade.php +++ b/app/views/dashboard.blade.php @@ -58,7 +58,7 @@
    @foreach ($activities as $activity)
  • - {{ Utils::timestampToDateTimeString(strtotime($activity->created_at)) }}: + {{ Utils::timestampToDateString(strtotime($activity->created_at)) }}: {{ Utils::decodeActivity($activity->message) }}
  • @endforeach diff --git a/app/views/header.blade.php b/app/views/header.blade.php index 856bf022fbc8..5768ba163c37 100755 --- a/app/views/header.blade.php +++ b/app/views/header.blade.php @@ -148,9 +148,14 @@ -

     

    + +
    + @if (!isset($showBreadcrumbs) || $showBreadcrumbs) + {{ HTML::breadcrumbs() }} + @endif + @if (Session::has('message'))
    {{ Session::get('message') }}
    @endif diff --git a/app/views/invoices/edit.blade.php b/app/views/invoices/edit.blade.php index 2db96c0e92c9..af3e090458c1 100755 --- a/app/views/invoices/edit.blade.php +++ b/app/views/invoices/edit.blade.php @@ -9,6 +9,12 @@ @section('content') + @if ($invoice) + + @endif {{ Former::open($url)->method($method)->addClass('main_form')->rules(array( 'client' => 'required', diff --git a/app/views/payments/edit.blade.php b/app/views/payments/edit.blade.php index e0fafb63c8fc..581640f76d5f 100755 --- a/app/views/payments/edit.blade.php +++ b/app/views/payments/edit.blade.php @@ -17,12 +17,6 @@
    - @if ($payment) - {{ Former::legend('Edit Payment') }} - @else - {{ Former::legend('New Payment') }} - @endif - {{ Former::select('client')->addOption('', '')->addGroupClass('client-select') }} {{ Former::select('invoice')->addOption('', '')->addGroupClass('invoice-select') }} {{ Former::text('amount') }} diff --git a/composer.json b/composer.json index 2c6e15b53ea2..45ea6213565d 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,6 @@ "webpatser/laravel-countries": "dev-master", "anahkiasen/rocketeer": "dev-develop", "codeception/codeception": "dev-master", - "davejamesmiller/laravel-breadcrumbs": "~2" }, "autoload": { "classmap": [ diff --git a/public/css/style.css b/public/css/style.css index c4d0622f842c..42a92554ce73 100755 --- a/public/css/style.css +++ b/public/css/style.css @@ -11,8 +11,10 @@ label.control-label { font-weight: normal !important; } - - +.breadcrumb { + background-color: inherit; + font-size: 22px; +} div.panel { padding-left: 0px !important; @@ -47,11 +49,8 @@ table td { max-width: 250px; } -/* -table.dataTable tr.odd { background-color: white; } -table.dataTable tr.even { background-color: #f9f9f9; } -*/ - +/* hide table sorting indicators */ +table.table thead .sorting { background: url('') no-repeat center right; } table.dataTable tr.odd td.sorting_1 { background-color: white; } table.dataTable tr.odd td.sorting_2 { background-color: white; } table.dataTable tr.odd td.sorting_3 { background-color: white; } @@ -61,10 +60,6 @@ table.dataTable tr.even td.sorting_3 { background-color: white; } -/* hide table sorting indicators */ -table.table thead .sorting { background: url('') no-repeat center right; } - - /* Hover nav */ .sidebar-nav { padding: 9px 0; @@ -123,9 +118,9 @@ table.table thead .sorting { background: url('') no-repeat center right; } } -/******************* +/*********************************************** Dashboard - *******************/ +************************************************/ .in-bold { font-size: 26px; @@ -173,6 +168,11 @@ table.table thead .sorting { background: url('') no-repeat center right; } border-style: none !important; } +/*********************************************** + New/edit invoice page +************************************************/ + + /* table.invoice-table tbody tr:hover { background-color: #FFFFFF !important; @@ -225,7 +225,9 @@ body { - +/*********************************************** + Add mouse over drop down to header menu +************************************************/ .navbar-default { background-color: #428bff;