From 2a28adaca772f47207689b1a4236df077ff34236 Mon Sep 17 00:00:00 2001 From: abijah Date: Tue, 18 Aug 2009 06:41:49 +0000 Subject: [PATCH] Added tooltips to the sitemap. At some point, we hope to incorporate a jquery plugin for nicer presentation, but this gets the basics. git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716/site@616 97e9348a-65ac-dc4b-aefc-98561f571b83 --- controllers/maps_controller.php | 11 +++++++---- views/maps/view.ctp | 14 +++++++++++++- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/controllers/maps_controller.php b/controllers/maps_controller.php index a6bc7ac..4a073ad 100644 --- a/controllers/maps_controller.php +++ b/controllers/maps_controller.php @@ -95,8 +95,10 @@ class MapsController extends AppController { array('fields' => array()), 'CurrentLease' => - array('fields' => array($this->Map->Unit->CurrentLease-> - delinquentField('CurrentLease'))), + array('fields' => array('id', 'paid_through_date', + $this->Map->Unit->CurrentLease-> + delinquentField('CurrentLease')), + 'Customer'), 'UnitSize' => array('fields' => array('id', 'depth', 'width', @@ -166,12 +168,13 @@ class MapsController extends AppController { 'n-s' => $unit['MapsUnit']['transpose'] ? 0 : 1, 'status' => (($unit['Unit']['status'] === 'OCCUPIED' && !empty($unit[0]['delinquent'])) - ? 'LATE' : $unit['Unit']['status']) + ? 'LATE' : $unit['Unit']['status']), + 'data' => $unit, ); } /* pr($info); */ -/* $this->render('/empty'); */ +/* $this->render('/empty'); exit(); */ return $info; } diff --git a/views/maps/view.ctp b/views/maps/view.ctp index 1966ff9..dd2663e 100644 --- a/views/maps/view.ctp +++ b/views/maps/view.ctp @@ -16,8 +16,20 @@ $html->url(array('controller' => 'units', 'action' => 'view', $unit['id'])) . - '" alt="' . + '" alt="Unit #' . $unit['name'] . + '" title="Unit #' . + $unit['name'] . + (empty($unit['data']['CurrentLease']['id']) + ? '' + : ('; ' . +/* 'Lease #' . */ +/* $unit['data']['CurrentLease']['id'] . */ +/* '; ' . */ + $unit['data']['Customer']['name'] . + '; Paid Through ' . + $unit['data']['CurrentLease']['paid_through_date']) + ) . '">' . "\n"); } }// for indentation purposes