Fixed Typo: They're spelled "interments"

git-svn-id: https://rosehill.googlecode.com/svn/branches/php@10 100bd78a-fc82-11de-b5bc-ffd2847a4b57
This commit is contained in:
inghamn 2009-12-18 17:40:05 +00:00
parent ace118bc0a
commit 997d26ec8b
12 changed files with 142 additions and 142 deletions

View File

@ -19,7 +19,7 @@ foreach ($roles as $role) {
*/
$ZEND_ACL->add(new Zend_Acl_Resource('Users'));
$ZEND_ACL->add(new Zend_Acl_Resource('Deeds'));
$ZEND_ACL->add(new Zend_Acl_Resource('Internments'));
$ZEND_ACL->add(new Zend_Acl_Resource('Interments'));
$ZEND_ACL->add(new Zend_Acl_Resource('Cemeteries'));
@ -30,4 +30,4 @@ $ZEND_ACL->add(new Zend_Acl_Resource('Cemeteries'));
$ZEND_ACL->allow('Administrator');
$ZEND_ACL->allow('Editor','Deeds');
$ZEND_ACL->allow('Editor','Internments');
$ZEND_ACL->allow('Editor','Interments');

View File

@ -5,55 +5,55 @@
* @author Cliff Ingham <inghamn@bloomington.in.gov>
*/
?>
<h1>Add Internment</h1>
<h1>Add Interment</h1>
<form method="post" action="<?php echo $_SERVER['SCRIPT_NAME']; ?>">
<fieldset><legend>Internment Info</legend>
<fieldset><legend>Interment Info</legend>
<table>
<tr><td><label for="internment-section">Section</label></td>
<td><input name="internment[section]" id="internment-section"
<tr><td><label for="interment-section">Section</label></td>
<td><input name="interment[section]" id="interment-section"
size="5" maxlength="5" />
<label for="internment-lot">Lot</label>
<input name="internment[lot]" id="internment-lot"
<label for="interment-lot">Lot</label>
<input name="interment[lot]" id="interment-lot"
size="5" maxlength="5" />
</td>
</tr>
<tr><td><label for="internment-book">Book</label></td>
<td><input name="internment[book]" id="internment-book"
<tr><td><label for="interment-book">Book</label></td>
<td><input name="interment[book]" id="interment-book"
size="4" maxlength="4" />
<label for="internment-pageNumber">Page</label>
<input name="internment[pageNumber]" id="internment-pageNumber"
<label for="interment-pageNumber">Page</label>
<input name="interment[pageNumber]" id="interment-pageNumber"
size="5" maxlength="5" />
</td>
</tr>
<tr><td><label for="internment-firstname">Name</label></td>
<td><label for="internment-firstname">First</label>
<input name="internment[firstname]" id="internment-firstname" />
<label for="internment-middleInitial">MI</label>
<input name="internment[middleInitial]" id="internment-middleInitial" />
<label for="internment-lastname">Last</label>
<input name="internment[lastname]" id="internment-lastname" />
<tr><td><label for="interment-firstname">Name</label></td>
<td><label for="interment-firstname">First</label>
<input name="interment[firstname]" id="interment-firstname" />
<label for="interment-middleInitial">MI</label>
<input name="interment[middleInitial]" id="interment-middleInitial" />
<label for="interment-lastname">Last</label>
<input name="interment[lastname]" id="interment-lastname" />
</td>
</tr>
<tr><td><label for="internment-birthPlace">Place of Birth</label></td>
<td><input name="internment[birthPlace]" id="internment-birthPlace" />
<tr><td><label for="interment-birthPlace">Place of Birth</label></td>
<td><input name="interment[birthPlace]" id="interment-birthPlace" />
</td>
</tr>
<tr><td><label for="internment-lastResidence">Last Residence</label></td>
<td><input name="internment[lastResidence]" id="internment-lastResidence" />
<tr><td><label for="interment-lastResidence">Last Residence</label></td>
<td><input name="interment[lastResidence]" id="interment-lastResidence" />
</td>
</tr>
<tr><td><label for="internment-deceasedDate">Date of Death</label></td>
<td><input name="internment[deceasedDate]" id="internment-deceasedDate" size="10" />
<label for="internment-age">Age</label>
<input name="internment[age]" id="internment-age" size="3" maxlength="3" />
<label for="internment-sex">Gender</label>
<select name="internment[sex]" id="internment-sex">
<tr><td><label for="interment-deceasedDate">Date of Death</label></td>
<td><input name="interment[deceasedDate]" id="interment-deceasedDate" size="10" />
<label for="interment-age">Age</label>
<input name="interment[age]" id="interment-age" size="3" maxlength="3" />
<label for="interment-sex">Gender</label>
<select name="interment[sex]" id="interment-sex">
<option></option>
<option>M</option>
<option>F</option>
@ -61,8 +61,8 @@
</td>
</tr>
<tr><td><label for="internment-cemetery_id">Cemetery</label></td>
<td><select name="internment[cemetery_id]" id="internment-cemetery_id">
<tr><td><label for="interment-cemetery_id">Cemetery</label></td>
<td><select name="interment[cemetery_id]" id="interment-cemetery_id">
<option></option>
<?php
$list = new CemeteryList();
@ -76,8 +76,8 @@
</td>
</tr>
<tr><td><label for="internment-notes">Notes</label></td>
<td><textarea name="internment[notes]" id="internment-notes" rows="3" cols="60"></textarea>
<tr><td><label for="interment-notes">Notes</label></td>
<td><textarea name="interment[notes]" id="interment-notes" rows="3" cols="60"></textarea>
</td>
</tr>
@ -85,7 +85,7 @@
</table>
<button type="submit" class="submit">Submit</button>
<button type="button" class="cancel" onclick="document.location.href='<?php echo BASE_URL; ?>/internments';">
<button type="button" class="cancel" onclick="document.location.href='<?php echo BASE_URL; ?>/interments';">
Cancel
</button>
</fieldset>

View File

@ -6,7 +6,7 @@
*/
?>
<h1>Search Burial Records</h1>
<form method="get" action="<?php echo BASE_URL; ?>/internments">
<form method="get" action="<?php echo BASE_URL; ?>/interments">
<table>
<tr><td><label for="lastname">Last Name</label></td>
<td><input name="lastname" id="lastname"

View File

@ -3,21 +3,21 @@
* @copyright 2009 City of Bloomington, Indiana
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.txt
* @author Cliff Ingham <inghamn@bloomington.in.gov>
* @param InternmentList $this->internmentList
* @param IntermentList $this->intermentList
*/
?>
<div class="interfaceBox">
<h1>
<?php
if (userIsAllowed('Internments')) {
if (userIsAllowed('Interments')) {
echo "
<button type=\"button\" class=\"add\" onclick=\"document.location.href='".BASE_URL."/internments/addInternment.php';\">
<button type=\"button\" class=\"add\" onclick=\"document.location.href='".BASE_URL."/interments/addInterment.php';\">
Add
</button>
";
}
?>
Internments
Interments
</h1>
<table>
<thead>
@ -31,28 +31,28 @@
</thead>
<tbody>
<?php
foreach ($this->internmentList as $internment) {
foreach ($this->intermentList as $interment) {
$editButton = '';
if (userIsAllowed('Internments')) {
$url = new URL(BASE_URL.'/internments/updateInternment.php');
$url->internment_id = $internment->getId();
if (userIsAllowed('Interments')) {
$url = new URL(BASE_URL.'/interments/updateInterment.php');
$url->interment_id = $interment->getId();
$editButton = "
<button type=\"button\" class=\"edit\" onclick=\"document.location.href='$url';\">
Edit
</button>
";
}
$last = View::escape($internment->getLastname());
$first = View::escape($internment->getFirstname());
$date = $internment->getDeceasedDate('n/j/Y');
$cemetery = View::escape($internment->getCemetery());
$last = View::escape($interment->getLastname());
$first = View::escape($interment->getFirstname());
$date = $interment->getDeceasedDate('n/j/Y');
$cemetery = View::escape($interment->getCemetery());
$section_lot = array();
if ($internment->getSection()) {
$section_lot[] = $internment->getSection();
if ($interment->getSection()) {
$section_lot[] = $interment->getSection();
}
if ($internment->getLot()) {
$section_lot[] = $internment->getLot();
if ($interment->getLot()) {
$section_lot[] = $interment->getLot();
}
$section_lot = View::escape(implode(', ',$section_lot));
@ -71,9 +71,9 @@
</table>
</div>
<?php
if ($this->internmentList->getPaginator()) {
if ($this->intermentList->getPaginator()) {
$pageNavigation = new Block('pageNavigation.inc',
array('pages'=>$this->internmentList->getPaginator()->getPages()));
array('pages'=>$this->intermentList->getPaginator()->getPages()));
echo $pageNavigation->render('html');
}
?>

View File

@ -3,91 +3,91 @@
* @copyright 2009 City of Bloomington, Indiana
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.txt
* @author Cliff Ingham <inghamn@bloomington.in.gov>
* @param Internment $this->internment
* @param Interment $this->interment
*/
?>
<h1>Update Internment</h1>
<h1>Update Interment</h1>
<form method="post" action="<?php echo $_SERVER['SCRIPT_NAME']; ?>">
<fieldset><legend>Internment Info</legend>
<input name="internment_id" type="hidden" value="<?php echo $this->internment->getId(); ?>" />
<fieldset><legend>Interment Info</legend>
<input name="interment_id" type="hidden" value="<?php echo $this->interment->getId(); ?>" />
<table>
<tr><td><label for="internment-section">Section</label></td>
<td><input name="internment[section]" id="internment-section"
<tr><td><label for="interment-section">Section</label></td>
<td><input name="interment[section]" id="interment-section"
size="5" maxlength="5"
value="<?php echo View::escape($this->internment->getSection()); ?>" />
<label for="internment-lot">Lot</label>
<input name="internment[lot]" id="internment-lot"
value="<?php echo View::escape($this->interment->getSection()); ?>" />
<label for="interment-lot">Lot</label>
<input name="interment[lot]" id="interment-lot"
size="5" maxlength="5"
value="<?php echo View::escape($this->internment->getLot()); ?>" />
value="<?php echo View::escape($this->interment->getLot()); ?>" />
</td>
</tr>
<tr><td><label for="internment-book">Book</label></td>
<td><input name="internment[book]" id="internment-book"
<tr><td><label for="interment-book">Book</label></td>
<td><input name="interment[book]" id="interment-book"
size="4" maxlength="4"
value="<?php echo View::escape($this->internment->getBook()); ?>" />
<label for="internment-pageNumber">Page</label>
<input name="internment[pageNumber]" id="internment-pageNumber"
value="<?php echo View::escape($this->interment->getBook()); ?>" />
<label for="interment-pageNumber">Page</label>
<input name="interment[pageNumber]" id="interment-pageNumber"
size="5" maxlength="5"
value="<?php echo View::escape($this->internment->getPageNumber()); ?>" />
value="<?php echo View::escape($this->interment->getPageNumber()); ?>" />
</td>
</tr>
<tr><td><label for="internment-firstname">Name</label></td>
<td><label for="internment-firstname">First</label>
<input name="internment[firstname]" id="internment-firstname"
value="<?php echo View::escape($this->internment->getFirstname()); ?>" />
<label for="internment-middleInitial">MI</label>
<input name="internment[middleInitial]" id="internment-middleInitial"
value="<?php echo View::escape($this->internment->getMiddleInitial()); ?>" />
<label for="internment-lastname">Last</label>
<input name="internment[lastname]" id="internment-lastname"
value="<?php echo View::escape($this->internment->getLastname()); ?>" />
<tr><td><label for="interment-firstname">Name</label></td>
<td><label for="interment-firstname">First</label>
<input name="interment[firstname]" id="interment-firstname"
value="<?php echo View::escape($this->interment->getFirstname()); ?>" />
<label for="interment-middleInitial">MI</label>
<input name="interment[middleInitial]" id="interment-middleInitial"
value="<?php echo View::escape($this->interment->getMiddleInitial()); ?>" />
<label for="interment-lastname">Last</label>
<input name="interment[lastname]" id="interment-lastname"
value="<?php echo View::escape($this->interment->getLastname()); ?>" />
</td>
</tr>
<tr><td><label for="internment-birthPlace">Place of Birth</label></td>
<td><input name="internment[birthPlace]" id="internment-birthPlace"
value="<?php echo View::escape($this->internment->getBirthPlace()); ?>" />
<tr><td><label for="interment-birthPlace">Place of Birth</label></td>
<td><input name="interment[birthPlace]" id="interment-birthPlace"
value="<?php echo View::escape($this->interment->getBirthPlace()); ?>" />
</td>
</tr>
<tr><td><label for="internment-lastResidence">Last Residence</label></td>
<td><input name="internment[lastResidence]" id="internment-lastResidence"
value="<?php echo View::escape($this->internment->getLastResidence()); ?>" />
<tr><td><label for="interment-lastResidence">Last Residence</label></td>
<td><input name="interment[lastResidence]" id="interment-lastResidence"
value="<?php echo View::escape($this->interment->getLastResidence()); ?>" />
</td>
</tr>
<tr><td><label for="internment-deceasedDate">Date of Death</label></td>
<td><input name="internment[deceasedDate]" id="internment-deceasedDate"
size="10" value="<?php echo $this->internment->getDeceasedDate('n/j/Y'); ?>" />
<label for="internment-age">Age</label>
<input name="internment[age]" id="internment-age"
<tr><td><label for="interment-deceasedDate">Date of Death</label></td>
<td><input name="interment[deceasedDate]" id="interment-deceasedDate"
size="10" value="<?php echo $this->interment->getDeceasedDate('n/j/Y'); ?>" />
<label for="interment-age">Age</label>
<input name="interment[age]" id="interment-age"
size="3" maxlength="3"
value="<?php echo View::escape($this->internment->getAge()); ?>" />
<label for="internment-sex">Gender</label>
<select name="internment[sex]" id="internment-sex">
value="<?php echo View::escape($this->interment->getAge()); ?>" />
<label for="interment-sex">Gender</label>
<select name="interment[sex]" id="interment-sex">
<option></option>
<option value="M" <?php echo $this->internment->getSex()=='M' ? 'selected="selected"' : ''; ?>>
<option value="M" <?php echo $this->interment->getSex()=='M' ? 'selected="selected"' : ''; ?>>
M
</option>
<option value="F" <?php echo $this->internment->getSex()=='F' ? 'selected="selected"' : ''; ?>>
<option value="F" <?php echo $this->interment->getSex()=='F' ? 'selected="selected"' : ''; ?>>
F
</option>
</select>
</td>
</tr>
<tr><td><label for="internment-cemetery_id">Cemetery</label></td>
<td><select name="internment[cemetery_id]" id="internment-cemetery_id">
<tr><td><label for="interment-cemetery_id">Cemetery</label></td>
<td><select name="interment[cemetery_id]" id="interment-cemetery_id">
<option></option>
<?php
$list = new CemeteryList();
$list->find();
foreach ($list as $cemetery) {
$name = View::escape($cemetery->getName());
$selected = $this->internment->getCemetery_id()==$cemetery->getId()
$selected = $this->interment->getCemetery_id()==$cemetery->getId()
? 'selected="selected"'
: '';
echo "<option value=\"{$cemetery->getId()}\" $selected>$name</option>";
@ -97,15 +97,15 @@
</td>
</tr>
<tr><td><label for="internment-notes">Notes</label></td>
<td><textarea name="internment[notes]" id="internment-notes" rows="3" cols="60"><?php echo View::escape($this->internment->getNotes()); ?></textarea>
<tr><td><label for="interment-notes">Notes</label></td>
<td><textarea name="interment[notes]" id="interment-notes" rows="3" cols="60"><?php echo View::escape($this->interment->getNotes()); ?></textarea>
</td>
</tr>
</table>
<button type="submit" class="submit">Submit</button>
<button type="button" class="cancel" onclick="document.location.href='<?php echo BASE_URL; ?>/internments';">
<button type="button" class="cancel" onclick="document.location.href='<?php echo BASE_URL; ?>/interments';">
Cancel
</button>
</fieldset>

View File

@ -147,6 +147,6 @@ class Cemetery
*/
public function getSections()
{
return Internment::getSections($this);
return Interment::getSections($this);
}
}

View File

@ -4,7 +4,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.txt
* @author Cliff Ingham <inghamn@bloomington.in.gov>
*/
class Internment
class Interment
{
private $id;
private $section;
@ -45,7 +45,7 @@ class Internment
}
else {
$zend_db = Database::getConnection();
$sql = 'select * from internments where id=?';
$sql = 'select * from interments where id=?';
$result = $zend_db->fetchRow($sql,array($id));
}
@ -60,7 +60,7 @@ class Internment
}
}
else {
throw new Exception('internments/unknownInternment');
throw new Exception('interments/unknownInterment');
}
}
else {
@ -114,14 +114,14 @@ class Internment
private function update($data)
{
$zend_db = Database::getConnection();
$zend_db->update('internments',$data,"id='{$this->id}'");
$zend_db->update('interments',$data,"id='{$this->id}'");
}
private function insert($data)
{
$zend_db = Database::getConnection();
$zend_db->insert('internments',$data);
$this->id = $zend_db->lastInsertId('internments','id');
$zend_db->insert('interments',$data);
$this->id = $zend_db->lastInsertId('interments','id');
}
//----------------------------------------------------------------
@ -441,7 +441,7 @@ class Internment
{
$zend_db = Database::getConnection();
$select = new Zend_Db_Select($zend_db);
$select->distinct()->from('internments','section');
$select->distinct()->from('interments','section');
$select->where('section is not null');
if ($cemetery) {
$select->where('cemetery_id=?',$cemetery->getId());

View File

@ -1,12 +1,12 @@
<?php
/**
* A collection class for Internment objects
* A collection class for Interment objects
*
* This class creates a zend_db select statement.
* ZendDbResultIterator handles iterating and paginating those results.
* As the results are iterated over, ZendDbResultIterator will pass each desired
* row back to this class's loadResult() which will be responsible for hydrating
* each Internment object
* each Interment object
*
* Beyond the basic $fields handled, you will need to write your own handling
* of whatever extra $fields you need
@ -15,7 +15,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.txt
* @author Cliff Ingham <inghamn@bloomington.in.gov>
*/
class InternmentList extends ZendDbResultIterator
class IntermentList extends ZendDbResultIterator
{
/**
* Creates a basic select statement for the collection.
@ -46,9 +46,9 @@ class InternmentList extends ZendDbResultIterator
*/
public function find($fields=null,$order='id',$limit=null,$groupBy=null)
{
$this->select->from('internments');
$this->select->from('interments');
// Finding on fields from the internments table is handled here
// Finding on fields from the interments table is handled here
if (count($fields)) {
foreach ($fields as $key=>$value) {
switch ($key) {
@ -65,7 +65,7 @@ class InternmentList extends ZendDbResultIterator
// Finding on fields from other tables requires joining those tables.
// You can handle fields from other tables by adding the joins here
// If you add more joins you probably want to make sure that the
// above foreach only handles fields from the internments table.
// above foreach only handles fields from the interments table.
$this->select->order($order);
if ($limit) {
@ -78,16 +78,16 @@ class InternmentList extends ZendDbResultIterator
}
/**
* Hydrates all the Internment objects from a database result set
* Hydrates all the Interment objects from a database result set
*
* This is a callback function, called from ZendDbResultIterator. It is
* called once per row of the result.
*
* @param int $key The index of the result row to load
* @return Internment
* @return Interment
*/
protected function loadResult($key)
{
return new Internment($this->result[$key]);
return new Interment($this->result[$key]);
}
}

View File

@ -5,22 +5,22 @@
* @author Cliff Ingham <inghamn@bloomington.in.gov>
*/
if (!userIsAllowed('Internments')) {
if (!userIsAllowed('Interments')) {
$_SESSION['errorMessages'][] = new Exception('noAccessAllowed');
header('Location: '.BASE_URL.'/internments');
header('Location: '.BASE_URL.'/interments');
exit();
}
if (isset($_POST['internment'])) {
$internment = new Internment();
foreach ($_POST['internment'] as $field=>$value) {
if (isset($_POST['interment'])) {
$interment = new Interment();
foreach ($_POST['interment'] as $field=>$value) {
$set = 'set'.ucfirst($field);
$internment->$set($value);
$interment->$set($value);
}
try {
$internment->save();
header('Location: '.BASE_URL.'/internments');
$interment->save();
header('Location: '.BASE_URL.'/interments');
exit();
}
catch(Exception $e) {
@ -29,5 +29,5 @@ if (isset($_POST['internment'])) {
}
$template = new Template();
$template->blocks[] = new Block('internments/addInternmentForm.inc');
$template->blocks[] = new Block('interments/addIntermentForm.inc');
echo $template->render();

View File

@ -29,14 +29,14 @@ foreach ($_GET as $field=>$value) {
}
if (count($search)) {
$internmentList = new InternmentList($search,20,$currentPage);
$intermentList = new IntermentList($search,20,$currentPage);
}
$template = new Template();
$template->blocks[] = new Block('internments/findForm.inc');
if (isset($internmentList)) {
$template->blocks[] = new Block('internments/internmentList.inc',
array('internmentList'=>$internmentList));
$template->blocks[] = new Block('interments/findForm.inc');
if (isset($intermentList)) {
$template->blocks[] = new Block('interments/intermentList.inc',
array('intermentList'=>$intermentList));
}
echo $template->render();

View File

@ -4,22 +4,22 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.txt
* @author Cliff Ingham <inghamn@bloomington.in.gov>
*/
if (!userIsAllowed('Internments')) {
if (!userIsAllowed('Interments')) {
$_SESSION['errorMessages'][] = new Exception('noAccessAllowed');
header('Location: '.BASE_URL.'/internments');
header('Location: '.BASE_URL.'/interments');
exit();
}
$internment = new Internment($_REQUEST['internment_id']);
if (isset($_POST['internment'])) {
foreach ($_POST['internment'] as $field=>$value) {
$interment = new Interment($_REQUEST['interment_id']);
if (isset($_POST['interment'])) {
foreach ($_POST['interment'] as $field=>$value) {
$set = 'set'.ucfirst($field);
$internment->$set($value);
$interment->$set($value);
}
try {
$internment->save();
header('Location: '.BASE_URL.'/internments');
$interment->save();
header('Location: '.BASE_URL.'/interments');
exit();
}
catch (Exception $e) {
@ -28,5 +28,5 @@ if (isset($_POST['internment'])) {
}
$template = new Template();
$template->blocks[] = new Block('internments/updateInternmentForm.inc',array('internment'=>$internment));
$template->blocks[] = new Block('interments/updateIntermentForm.inc',array('interment'=>$interment));
echo $template->render();

View File

@ -1,5 +1,5 @@
<div class="menuBar">
<ul><li><a href="<?php echo BASE_URL; ?>/internments">Internments</a></li>
<ul><li><a href="<?php echo BASE_URL; ?>/interments">Interments</a></li>
<?php
if (userIsAllowed('Cemeteries')) {
echo "<li><a href=\"".BASE_URL."/cemeteries\">Cemeteries</a></li>";