Vermont Pro Bono
From PikaDocs
Customizations we've made to Pro Bono
- Added a new field called enabled.
- Changed the sort order of a PB Attorney's cases to be most recent on top. This is how it works in Pika for a contact's list of previous cases, so this makes the user interface more consistent. Also it is more intuitive to see most recent cases first as older cases are less valuable information.
To make this changed edit pb_attorneys.php. Around line 75 find this:
$result = $pk->fetchCaseList($filter, $case_count, 'open_date', 'ASC', 0, 100);
and change it to this, substituting your own name and date:
// Andrew Cameron 2006/5/12 reverse this order so newest cases are on top //$result = $pk->fetchCaseList($filter, $case_count, 'open_date', 'ASC', 0, 100); $result = $pk->fetchCaseList($filter, $case_count, 'open_date', 'DESC', 0, 100);
- Increased the size of the Firm Name field to 60 characters, with this SQL:
ALTER TABLE `pb_attorneys` CHANGE `firm` `firm` VARCHAR( 60 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL;
- Added a new merge field vol_attorney_phone_notes so you can put the attorney's phone number in a letter to the client. Also turned the pb attorney referral date into a merge field called vol_attorney_referral_date so you can use that in a letter to the volunteer attorney or client.
Modify ops/docgen.php around line 359:
// Andrew Cameron 2006/4/25 new stanza for PB attorney's phone number
if ($pba_row["phone_notes"])
$a['vol_attorney_phone_notes'] .= $pba_row["phone_notes"];
// Andrew Cameron 2006/5/12 another new stanza for PB attorney referral date. Used in tickle letters
if ($pba_row["referral_date"])
$a['vol_attorney_referral_date'] .= $pba_row["referral_date"];
- Added a [today] link to the referral date field on the Pro Bono tab. First, modify subtemplates/pro_bono_tab.html as follows. Before:
Referral Date:<br/> <input type="text" name="referral_date" value="%%[referral_date]%%"><br/> <br/>After:
<!-- Andrew Cameron 2006/5/12 adding javascript and link target here --> <a target="rd">Referral Date</a>: <a onClick="document.ws.referral_date.value='%%[current_date]%%';" href="#rd" tabindex=1>[today]</a><br/> <input type="text" name="referral_date" value="%%[referral_date]%%"><br/>
Second, modify modules/case-pb.php around line 10 where you see this:
$tpl['referral_date'] = pl_date_unmogrify($case_row["referral_date"]); $tpl['date_sent'] = pl_date_unmogrify($case_row["date_sent"]);
After that code, add this:
// Andrew Cameron 2006/5/12 adding code to make current_date an available merge variable on the screen
// this is so can add some javascript to fill in today's date when clicking [today] like is on the case info screen
$tpl['current_date'] = date('m/d/Y');
This code will create the merge variable for current_date so that you can use it in the subtemplate.
- We found it confusing that clicking on an attorney's name assigns them to the case. Our natural reaction was to think that clicking on a name would pull up the attorney. We figured there should be separate links to pull up the attorney vs. assign them to the case. Here's how to do it. Edit pb_attorneys.php around line 249:
First I commented out one section:
// Andrew Cameron 2006/4/24 commenting out next stanza
/*
if ('find_pb' == $screen)
{
$z = "<a href='dataops.php?action=set_case_pba&case_id=$case_id&field=$field&pba_id={$row['pba_id']}'>{$row["last_name"]}, {$row["first_name"]} {$row["middle_name"]} {$row["extra_name"]}</a>";
}
*/
Then I modified the code immediately following like this:
// Andrew Cameron 2006/4/24 removing the else and the brackets around next statement
// Also modifying how the links for the name display
//else
//{
$z = $row["last_name"] . ', ' . $row["first_name"] . ' ' . $row["middle_name"] . ' ' . $row["extra_name"];
//$z = $row["last_name"] . ', ' $row["first_name"] . ' ' . $row["middle_name"] . ' ' . $row["extra_name"];
//$z = "{$row["last_name"]}, {$row["first_name"]} {$row["middle_name"]} {$row["extra_name"]}";
$z .= "<br/><br/>-<a href=pb_attorneys.php?screen=edit_pb&pba_id={$row["pba_id"]}>View/Edit</a>";
$z .= "<br/>-<a href='dataops.php?action=set_case_pba&case_id=$case_id&field=$field&pba_id={$row['pba_id']}'>Assign</a> to Case</ul>";
//}
original entry by Andrew Cameron
Legal Services Lawline of Vermont (http://www.lawlinevt.org/) and Vermont Legal Aid (http://www.vtlegalaid.org/)
