Author: peter
Date: 2008-11-10 11:21:37 -0800 (Mon, 10 Nov 2008)
New Revision: 1543
Modified:
trunk/qubit/apps/qubit/modules/informationobject/actions/createAction.class.php
trunk/qubit/apps/qubit/modules/informationobject/actions/editAction.class.php
trunk/qubit/apps/qubit/modules/informationobject/actions/updateAction.class.php
trunk/qubit/apps/qubit/modules/informationobject/templates/editIsadSuccess.php
trunk/qubit/data/fixtures/sampleData.yml
trunk/qubit/lib/model/QubitTerm.php
Log:
initial check-in of create/edit upgrades for QubitEvent from editISAD form
Modified:
trunk/qubit/apps/qubit/modules/informationobject/actions/createAction.class.php
===================================================================
---
trunk/qubit/apps/qubit/modules/informationobject/actions/createAction.class.php
2008-11-10 19:04:05 UTC (rev 1542)
+++
trunk/qubit/apps/qubit/modules/informationobject/actions/createAction.class.php
2008-11-10 19:21:37 UTC (rev 1543)
@@ -60,9 +60,12 @@
$this->publicationNotes = null;
// Actor (Event) Relations
- $this->creationEvents = null;
+ $this->actorEvents = null;
$this->creators = null;
- $this->newCreationEvent = new QubitEvent;
+ $this->actorEventTypes =
QubitTerm::getOptionsForSelectList(QubitTaxonomy::EVENT_TYPE_ID);
+ $this->defaultActorEventType = QubitTerm::CREATION_ID;
+ $this->actorEventPlaces =
QubitTerm::getOptionsForSelectList(QubitTaxonomy::PLACE_ID, $options =
array('include_blank' => true));
+ $this->newActorEvent = new QubitEvent;
// Digital Object
$this->digitalObject = null;
Modified:
trunk/qubit/apps/qubit/modules/informationobject/actions/editAction.class.php
===================================================================
---
trunk/qubit/apps/qubit/modules/informationobject/actions/editAction.class.php
2008-11-10 19:04:05 UTC (rev 1542)
+++
trunk/qubit/apps/qubit/modules/informationobject/actions/editAction.class.php
2008-11-10 19:21:37 UTC (rev 1543)
@@ -43,9 +43,12 @@
$this->getResponse()->addJavaScript('multiInstanceSelect');
//Actor (Event) Relations
- $this->creationEvents = $this->informationObject->getCreationEvents();
- $this->newCreationEvent = new QubitEvent;
+ $this->actorEvents = $this->informationObject->getEvents();
+ $this->newActorEvent = new QubitEvent;
$this->creators = $this->informationObject->getCreators();
+ $this->actorEventTypes =
QubitTerm::getOptionsForSelectList(QubitTaxonomy::EVENT_TYPE_ID);
+ $this->defaultActorEventType = QubitTerm::CREATION_ID;
+ $this->actorEventPlaces =
QubitTerm::getOptionsForSelectList(QubitTaxonomy::PLACE_ID, $options =
array('include_blank' => true));
//Properties
$this->languageCodes = $this->informationObject->getProperties($name =
'information_object_language');
Modified:
trunk/qubit/apps/qubit/modules/informationobject/actions/updateAction.class.php
===================================================================
---
trunk/qubit/apps/qubit/modules/informationobject/actions/updateAction.class.php
2008-11-10 19:04:05 UTC (rev 1542)
+++
trunk/qubit/apps/qubit/modules/informationobject/actions/updateAction.class.php
2008-11-10 19:21:37 UTC (rev 1543)
@@ -439,9 +439,9 @@
$newCreationEvent->setStartDate($thisEvent['creationYear'].'-01-01');
$newCreationEvent->setEndDate($thisEvent['endYear'].'-01-01');
- if ($thisEvent['creationDateNote'])
+ if ($thisEvent['dateDisplay'])
{
- $newCreationEvent->setDescription($thisEvent['creationDateNote']);
+ $newCreationEvent->setDateDisplay($thisEvent['dateDisplay']);
}
else
{
@@ -450,7 +450,7 @@
{
$dateString .= ' - '.$thisEvent['endYear'];
}
- $newCreationEvent->setDescription($dateString);
+ $newCreationEvent->setDateDisplay($dateString);
}
$newCreationEvent->save();
Modified:
trunk/qubit/apps/qubit/modules/informationobject/templates/editIsadSuccess.php
===================================================================
---
trunk/qubit/apps/qubit/modules/informationobject/templates/editIsadSuccess.php
2008-11-10 19:04:05 UTC (rev 1542)
+++
trunk/qubit/apps/qubit/modules/informationobject/templates/editIsadSuccess.php
2008-11-10 19:21:37 UTC (rev 1543)
@@ -83,61 +83,84 @@
<fieldset class="collapsible collapsed">
<legend><?php echo __('context area'); ?></legend>
+ <table id="actorEvents" class="inline" style="margin-top: 25px;">
+ <tr style="border-top: 1px solid #999999;">
+ <td style="width: 35%; color: #999999; font-weight: bold"><?php echo
__('Name') ?></td>
+ <td style="width: 25%; color: #999999; font-weight: bold"><?php echo
__('Role') ?></td>
+ <td style= "width: 30%; color: #999999; font-weight: bold"><?php
echo __('Date(s)') ?></td>
+ <td style="width:10%"></td>
+ </tr>
+ <?php if(count($actorEvents)): ?>
+ <?php foreach ($actorEvents as $actorEvent): ?>
+ <tr>
+ <?php if ($actorEvent->getActor()): ?>
+ <td>
+ <?php echo link_to($actorEvent->getActor(),
'actor/edit?id='.$actorEvent->getActorId()) ?>
+ </td>
+ <?php else: ?>
+ <td><?php echo __('unknown') ?></td>
+ <?php endif; ?>
+ <td>
+ <?php echo $actorEvent->getType()->getRole() ?>
+ </td>
+ <td><?php echo $actorEvent->getDateDisplay(array('cultureFallback'
=> 'true')) ?></td>
+ <td style="text-align: center;">
+ <?php echo link_to(image_tag('delete', 'align=top'),
'informationobject/deleteEvent?eventId='.$actorEvent->getId().'&returnTemplate=isad')
?>
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ <?php endif; ?>
+ </table>
+
+
<!-- add new creation event yui dialog object -->
- <?php echo include_partial('newCreationEventDialog') ?>
+ <?php echo include_partial('newActorEventDialog') ?>
+
<div class="form-item">
- <label for="newCreationEvent"><?php echo __('creation context');
?></label>
+ <div style="border: 1px solid #cccccc; padding: 1px;">
+ <label for="event"><?php echo __('new event'); ?></label>
<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->
- <!-- NOTE: The newCreationEventDialog script cuts this *entire* -->
- <!-- "newCreationEvent" table and pastes it in a YUI dialog object. -->
+ <!-- NOTE: The newActorEventDialog script cuts this *entire* -->
+ <!-- "newActorEvent" table and pastes it in a YUI dialog object. -->
<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->
- <table id="newCreationEvent" class="inline">
+ <table id="newActorEvent" class="inline">
<tr>
- <td colspan ="2" class="headerCell" style="width: 55%;"><?php echo
__('creator'); ?></td>
- <td class="headerCell" style="width: 40%;"><i><?php echo __('or');
?> </i><?php echo __('add new creator name'); ?></td>
+ <td colspan ="2" class="headerCell" style="width: 55%;"><?php echo
__('name'); ?></td>
+ <td class="headerCell" style="width: 40%;"><i><?php echo __('or');
?> </i><?php echo __('add new name'); ?></td>
</tr>
<tr>
- <td colspan ="2" style="border: none"><?php echo
object_select_tag($newCreationEvent, 'getActorId',
+ <td colspan ="2"><?php echo object_select_tag($newActorEvent,
'getActorId',
array('related_class' => 'QubitActor',
- 'name' => 'newCreationEvent[actorId]',
+ 'name' => 'newActorEvent[actorId]',
'include_blank' => true,
'peer_method' => 'getAllExceptUsers')) ?></td>
- <td style="border: none"><?php echo
input_tag('newCreationEvent[newActorAuthorizedName]') ?></td>
+ <td><?php echo input_tag('newCreationEvent[newActorAuthorizedName]')
?></td>
</tr>
<tr>
- <td class="headerCell"><?php echo __('creation year'); ?></td><td
class="headerCell"><?php echo __('end year (if range)'); ?></td>
+ <td colspan="2" class="headerCell" style="width: 55%;"><?php echo
__('event type') ?></td><td class="headerCell" style="width: 40%;"><?php echo
__('place') ?></td>
+ </tr>
+ <tr>
+ <td colspan="2"><?php echo select_tag('newActorEvent[eventTypeId]',
options_for_select($actorEventTypes, $defaultActorEventType))?></td>
+ <td><?php echo select_tag('newActorEvent[placeId]',
options_for_select($actorEventPlaces))?></td>
+ </tr>
+ <tr>
+ <td class="headerCell"><?php echo __('year'); ?></td><td
class="headerCell"><?php echo __('end year'); ?></td>
<td class="headerCell"><?php echo __('date display (defaults to date
range)'); ?></td></tr>
<tr>
- <td style="border: none"><?php echo
input_tag('newCreationEvent[creationYear]', '', 'maxlength=4
style="width:35px;"') ?></td>
- <td style="border: none"><?php echo
input_tag('newCreationEvent[endYear]', '', 'maxlength=4 style="width:35px;"')
?></td>
- <td style="border: none"><?php echo
input_tag('newCreationEvent[creationDateNote]') ?></td>
+ <td><?php echo input_tag('newActorEvent[creationYear]', '',
'maxlength=4 style="width:35px;"') ?></td>
+ <td><?php echo input_tag('newActorEvent[endYear]', '', 'maxlength=4
style="width:35px;"') ?></td>
+ <td><?php echo input_tag('newActorEvent[dateDisplay]') ?></td>
</tr>
- </table>
-
- <table id="creationEvents" class="inline">
<tr>
- <td style="width: 55%; color: #999999; font-weight: bold"><?php echo
__('Creator') ?></td>
- <td style= "width: 40%; color: #999999; font-weight: bold"><?php
echo __('Creation date(s)') ?></td>
- <td style="width:5%"></td>
+ <td colspan="3" class="headerCell"><?php echo __('note'); ?></td>
</tr>
- <?php if(count($creationEvents)): ?>
- <?php foreach ($creationEvents as $creationEvent): ?>
<tr>
- <td>
- <?php if ($creationEvent->getActor()): ?>
- <?php echo link_to($creationEvent->getActor(),
'actor/edit?id='.$creationEvent->getActorId()) ?>
- <?php endif; ?>
- </td>
- <td><?php echo
$creationEvent->getDescription(array('cultureFallback' => 'true')) ?></td>
- <td style="text-align: center;">
- <?php echo link_to(image_tag('delete', 'align=top'),
'informationobject/deleteEvent?eventId='.$creationEvent->getId().'&returnTemplate=isad')
?>
- </td>
+ <td colspan="3"><?php echo input_tag('newActorEvent[description]')
?></td>
</tr>
- <?php endforeach; ?>
- <?php endif; ?>
</table>
+ </div>
</div>
<?php if ($creators): ?>
Modified: trunk/qubit/data/fixtures/sampleData.yml
===================================================================
--- trunk/qubit/data/fixtures/sampleData.yml 2008-11-10 19:04:05 UTC (rev
1542)
+++ trunk/qubit/data/fixtures/sampleData.yml 2008-11-10 19:21:37 UTC (rev
1543)
@@ -2097,7 +2097,7 @@
created_at: '2008-04-24 09:42:38'
updated_at: '2008-04-24 09:42:38'
source_culture: en
- description: { en: '1886-2003, predominant 1886-1993' }
+ date_display: { en: '1886-2003, predominant 1886-1993' }
QubitEvent_185:
type_id: QubitTerm_12
actor_id: QubitActor_130
@@ -2106,7 +2106,7 @@
created_at: '2008-04-24 09:50:31'
updated_at: '2008-04-24 09:50:31'
source_culture: en
- description: { en: 1886- }
+ date_display: { en: 1886- }
QubitEvent_186:
type_id: QubitTerm_11
information_object_id: QubitInformationObject_135
@@ -2116,7 +2116,7 @@
created_at: '2008-04-24 09:53:36'
updated_at: '2008-04-24 09:53:36'
source_culture: en
- description: { en: 1886-1976 }
+ date_display: { en: 1886-1976 }
QubitEvent_187:
type_id: QubitTerm_11
information_object_id: QubitInformationObject_136
@@ -2126,7 +2126,7 @@
created_at: '2008-04-24 09:58:51'
updated_at: '2008-04-24 09:58:51'
source_culture: en
- description: { en: 1935-1972 }
+ date_display: { en: 1935-1972 }
QubitEvent_188:
type_id: QubitTerm_11
information_object_id: QubitInformationObject_137
@@ -2136,7 +2136,7 @@
created_at: '2008-04-24 10:02:31'
updated_at: '2008-04-24 10:02:31'
source_culture: en
- description: { en: 1960-1962 }
+ date_display: { en: 1960-1962 }
QubitEvent_189:
type_id: QubitTerm_11
information_object_id: QubitInformationObject_139
@@ -2146,7 +2146,7 @@
created_at: '2008-04-24 10:05:47'
updated_at: '2008-04-24 10:05:47'
source_culture: en
- description: { en: 1973-1974 }
+ date_display: { en: 1973-1974 }
QubitEvent_190:
type_id: QubitTerm_11
information_object_id: QubitInformationObject_140
@@ -2156,7 +2156,7 @@
created_at: '2008-04-24 10:07:05'
updated_at: '2008-04-24 10:07:05'
source_culture: en
- description: { en: '1974' }
+ date_display: { en: '1974' }
QubitEvent_191:
type_id: QubitTerm_11
information_object_id: QubitInformationObject_141
@@ -2166,7 +2166,7 @@
created_at: '2008-04-24 10:07:49'
updated_at: '2008-04-24 10:07:49'
source_culture: en
- description: { en: '1974' }
+ date_display: { en: '1974' }
QubitEvent_192:
type_id: QubitTerm_11
information_object_id: QubitInformationObject_143
@@ -2176,7 +2176,7 @@
created_at: '2008-04-24 10:09:07'
updated_at: '2008-04-24 10:09:07'
source_culture: en
- description: { en: '1974' }
+ date_display: { en: '1974' }
QubitEvent_193:
type_id: QubitTerm_11
information_object_id: QubitInformationObject_144
@@ -2186,7 +2186,7 @@
created_at: '2008-04-24 10:10:54'
updated_at: '2008-04-24 10:10:54'
source_culture: en
- description: { en: '9 Nov. 1935 - 2 Mar. 1940' }
+ date_display: { en: '9 Nov. 1935 - 2 Mar. 1940' }
QubitEvent_194:
type_id: QubitTerm_11
information_object_id: QubitInformationObject_138
@@ -2196,7 +2196,7 @@
created_at: '2008-04-24 10:11:42'
updated_at: '2008-04-24 10:11:42'
source_culture: en
- description: { en: '4 Mar. 1940 - 2 Feb. 1944' }
+ date_display: { en: '4 Mar. 1940 - 2 Feb. 1944' }
QubitEvent_195:
type_id: QubitTerm_11
actor_role_id: QubitTerm_5
@@ -2208,7 +2208,7 @@
created_at: '2008-04-24 10:17:56'
updated_at: '2008-04-24 10:17:56'
source_culture: en
- description: { en: '1897-[ca. 1990]; predominant 1919-1974' }
+ date_display: { en: '1897-[ca. 1990]; predominant 1919-1974' }
QubitEvent_196:
type_id: QubitTerm_12
actor_id: QubitActor_131
@@ -2218,7 +2218,7 @@
created_at: '2008-04-24 10:19:05'
updated_at: '2008-04-24 10:25:16'
source_culture: en
- description: { en: 1919-1974 }
+ date_display: { en: 1919-1974 }
QubitEvent_197:
type_id: QubitTerm_11
information_object_id: QubitInformationObject_146
@@ -2228,7 +2228,7 @@
created_at: '2008-04-24 10:29:38'
updated_at: '2008-04-24 10:29:38'
source_culture: en
- description: { en: 1897-1977 }
+ date_display: { en: 1897-1977 }
QubitEvent_198:
type_id: QubitTerm_11
information_object_id: QubitInformationObject_147
@@ -2238,7 +2238,7 @@
created_at: '2008-04-24 10:42:23'
updated_at: '2008-04-24 10:42:23'
source_culture: en
- description: { en: '[ca. 1920] - [1971]' }
+ date_display: { en: '[ca. 1920] - [1971]' }
QubitEvent_199:
type_id: QubitTerm_11
information_object_id: QubitInformationObject_148
@@ -2248,7 +2248,7 @@
created_at: '2008-04-24 10:46:44'
updated_at: '2008-04-24 10:46:44'
source_culture: en
- description: { en: '1906 - [ca. 1990]' }
+ date_display: { en: '1906 - [ca. 1990]' }
QubitEvent_200:
type_id: QubitTerm_11
information_object_id: QubitInformationObject_149
@@ -2258,7 +2258,7 @@
created_at: '2008-04-24 10:49:47'
updated_at: '2008-04-24 10:49:47'
source_culture: en
- description: { en: '[1935]' }
+ date_display: { en: '[1935]' }
QubitEvent_201:
type_id: QubitTerm_11
information_object_id: QubitInformationObject_150
@@ -2268,7 +2268,7 @@
created_at: '2008-04-24 10:51:52'
updated_at: '2008-04-24 10:51:52'
source_culture: en
- description: { en: '[1937?]' }
+ date_display: { en: '[1937?]' }
QubitEvent_202:
type_id: QubitTerm_11
information_object_id: QubitInformationObject_151
@@ -2278,7 +2278,7 @@
created_at: '2008-04-24 11:10:37'
updated_at: '2008-04-24 11:10:37'
source_culture: en
- description: { en: '26 Mar 1945' }
+ date_display: { en: '26 Mar 1945' }
QubitEvent_203:
type_id: QubitTerm_11
information_object_id: QubitInformationObject_152
@@ -2288,7 +2288,7 @@
created_at: '2008-04-24 11:31:47'
updated_at: '2008-04-24 11:31:47'
source_culture: en
- description: { en: 'Sept. 1931' }
+ date_display: { en: 'Sept. 1931' }
QubitEvent_204:
type_id: QubitTerm_11
information_object_id: QubitInformationObject_153
@@ -2298,7 +2298,7 @@
created_at: '2008-04-24 11:33:22'
updated_at: '2008-04-24 11:33:22'
source_culture: en
- description: { en: '1968' }
+ date_display: { en: '1968' }
QubitEvent_205:
class_name: QubitEvent
created_at: '2008-06-16 16:07:13'
@@ -2313,7 +2313,7 @@
created_at: '2008-04-24 12:05:03'
updated_at: '2008-04-24 12:05:03'
source_culture: en
- description: { en: 1994-2002 }
+ date_display: { en: 1994-2002 }
QubitEvent_207:
type_id: QubitTerm_11
information_object_id: QubitInformationObject_156
@@ -2323,7 +2323,7 @@
created_at: '2008-04-24 12:14:34'
updated_at: '2008-04-24 12:14:34'
source_culture: en
- description: { en: 1995-2002 }
+ date_display: { en: 1995-2002 }
QubitEvent_208:
type_id: QubitTerm_11
information_object_id: QubitInformationObject_157
@@ -2333,7 +2333,7 @@
created_at: '2008-04-24 12:16:01'
updated_at: '2008-04-24 12:16:01'
source_culture: en
- description: { en: 1994-2002 }
+ date_display: { en: 1994-2002 }
QubitEvent_209:
type_id: QubitTerm_11
information_object_id: QubitInformationObject_158
@@ -2343,7 +2343,7 @@
created_at: '2008-04-24 13:12:54'
updated_at: '2008-04-24 13:12:54'
source_culture: en
- description: { en: 1994-2002 }
+ date_display: { en: 1994-2002 }
QubitEvent_210:
type_id: QubitTerm_11
information_object_id: QubitInformationObject_159
@@ -2353,7 +2353,7 @@
created_at: '2008-04-24 13:16:22'
updated_at: '2008-04-24 13:16:22'
source_culture: en
- description: { en: 1996-2002 }
+ date_display: { en: 1996-2002 }
QubitEvent_211:
type_id: QubitTerm_11
information_object_id: QubitInformationObject_160
@@ -2363,7 +2363,7 @@
created_at: '2008-04-24 13:18:56'
updated_at: '2008-04-24 13:18:56'
source_culture: en
- description: { en: '1994 - 2002' }
+ date_display: { en: '1994 - 2002' }
QubitEvent_212:
type_id: QubitTerm_11
information_object_id: QubitInformationObject_161
@@ -2373,7 +2373,7 @@
created_at: '2008-04-24 13:21:33'
updated_at: '2008-04-24 13:21:33'
source_culture: en
- description: { en: '[1996]' }
+ date_display: { en: '[1996]' }
QubitEvent_213:
type_id: QubitTerm_11
information_object_id: QubitInformationObject_162
@@ -2383,7 +2383,7 @@
created_at: '2008-04-24 13:22:25'
updated_at: '2008-04-24 13:22:25'
source_culture: en
- description: { en: '1999 - 1999' }
+ date_display: { en: '1999 - 1999' }
QubitEvent_214:
type_id: QubitTerm_11
information_object_id: QubitInformationObject_163
@@ -2393,7 +2393,7 @@
created_at: '2008-04-24 13:23:50'
updated_at: '2008-04-24 13:23:50'
source_culture: en
- description: { en: '1994 - 1996' }
+ date_display: { en: '1994 - 1996' }
QubitEvent_215:
type_id: QubitTerm_11
information_object_id: QubitInformationObject_164
@@ -2403,7 +2403,7 @@
created_at: '2008-04-24 13:25:38'
updated_at: '2008-04-24 13:25:38'
source_culture: en
- description: { en: '2000' }
+ date_display: { en: '2000' }
QubitEvent_216:
type_id: QubitTerm_11
information_object_id: QubitInformationObject_165
@@ -2413,7 +2413,7 @@
created_at: '2008-04-24 13:28:23'
updated_at: '2008-04-24 13:28:23'
source_culture: en
- description: { en: 1996-2002 }
+ date_display: { en: 1996-2002 }
QubitEvent_217:
type_id: QubitTerm_11
information_object_id: QubitInformationObject_166
@@ -2423,7 +2423,7 @@
created_at: '2008-04-24 13:30:41'
updated_at: '2008-04-24 13:30:41'
source_culture: en
- description: { en: 2001-2002 }
+ date_display: { en: 2001-2002 }
QubitEvent_218:
type_id: QubitTerm_11
information_object_id: QubitInformationObject_167
@@ -2433,7 +2433,7 @@
created_at: '2008-04-24 13:31:26'
updated_at: '2008-04-24 13:31:26'
source_culture: en
- description: { en: '2002' }
+ date_display: { en: '2002' }
QubitEvent_219:
type_id: QubitTerm_11
information_object_id: QubitInformationObject_168
@@ -2443,7 +2443,7 @@
created_at: '2008-04-24 13:32:14'
updated_at: '2008-04-24 13:32:14'
source_culture: en
- description: { en: '2002' }
+ date_display: { en: '2002' }
QubitEvent_220:
type_id: QubitTerm_11
information_object_id: QubitInformationObject_170
@@ -2453,7 +2453,7 @@
created_at: '2008-06-30 12:53:26'
updated_at: '2008-06-30 12:53:26'
source_culture: en
- description: { en: '1927' }
+ date_display: { en: '1927' }
QubitEvent_221:
type_id: QubitTerm_11
information_object_id: QubitInformationObject_171
@@ -2463,7 +2463,7 @@
created_at: '2008-06-30 12:57:43'
updated_at: '2008-06-30 12:57:43'
source_culture: en
- description: { en: 'Feb. 1936' }
+ date_display: { en: 'Feb. 1936' }
QubitEvent_222:
type_id: QubitTerm_11
information_object_id: QubitInformationObject_142
@@ -2473,7 +2473,7 @@
created_at: '2008-06-30 13:24:18'
updated_at: '2008-06-30 13:24:18'
source_culture: en
- description: { en: '1973 - 1974' }
+ date_display: { en: '1973 - 1974' }
QubitEvent_223:
type_id: QubitTerm_11
information_object_id: QubitInformationObject_154
@@ -2483,7 +2483,7 @@
created_at: '2008-06-30 13:47:34'
updated_at: '2008-06-30 13:47:34'
source_culture: en
- description: { en: 'April 1968' }
+ date_display: { en: 'April 1968' }
QubitEvent_224:
type_id: QubitTerm_11
information_object_id: QubitInformationObject_155
@@ -2493,7 +2493,7 @@
created_at: '2008-06-30 13:48:49'
updated_at: '2008-06-30 13:48:49'
source_culture: en
- description: { en: '1994 - 2002' }
+ date_display: { en: '1994 - 2002' }
QubitPhysicalObject:
QubitPhysicalObject_225:
type_id: QubitTerm_49
Modified: trunk/qubit/lib/model/QubitTerm.php
===================================================================
--- trunk/qubit/lib/model/QubitTerm.php 2008-11-10 19:04:05 UTC (rev 1542)
+++ trunk/qubit/lib/model/QubitTerm.php 2008-11-10 19:21:37 UTC (rev 1543)
@@ -44,33 +44,34 @@
const PUBLICATION_NOTE_ID = 119;
const SOURCE_NOTE_ID = 120;
const SCOPE_NOTE_ID = 121;
+ const EVENT_ROLE_ID = 122;
//CollectionType taxonomy
- const ARCHIVAL_MATERIAL_ID = 122;
- const FINDING_AIDS_ID = 123;
- const PUBLISHED_MATERIAL_ID = 124;
- const ARTEFACT_MATERIAL_ID = 125;
+ const ARCHIVAL_MATERIAL_ID = 123;
+ const FINDING_AIDS_ID = 124;
+ const PUBLISHED_MATERIAL_ID = 125;
+ const ARTEFACT_MATERIAL_ID = 126;
//ActorEntityType taxonomy
- const CORPORATE_BODY_ID = 126;
- const PERSON_ID = 127;
- const FAMILY_ID = 128;
+ const CORPORATE_BODY_ID = 127;
+ const PERSON_ID = 128;
+ const FAMILY_ID = 129;
//OtherNameType taxonomy
- const FAMILY_NAME_FIRST_NAME_ID = 129;
+ const FAMILY_NAME_FIRST_NAME_ID = 130;
//MediaType taxonomy
- const AUDIO_ID = 130;
- const IMAGE_ID = 131;
- const TEXT_ID = 132;
- const VIDEO_ID = 133;
- const OTHER_ID = 134;
+ const AUDIO_ID = 131;
+ const IMAGE_ID = 132;
+ const TEXT_ID = 134;
+ const VIDEO_ID = 135;
+ const OTHER_ID = 136;
//Digital Object Usage taxonomy
- const MASTER_ID = 135;
- const REFERENCE_ID = 136;
- const THUMBNAIL_ID = 137;
+ const MASTER_ID = 137;
+ const REFERENCE_ID = 138;
+ const THUMBNAIL_ID = 139;
//Physical Object Type taxonomy
- const LOCATION_ID = 138;
- const CONTAINER_ID = 139;
- const ARTEFACT_ID = 140;
+ const LOCATION_ID = 140;
+ const CONTAINER_ID = 141;
+ const ARTEFACT_ID = 142;
//Relation Type taxonomy
- const HAS_PHYSICAL_OBJECT_ID = 141;
+ const HAS_PHYSICAL_OBJECT_ID = 143;
public function isProtected()
@@ -89,6 +90,7 @@
$this->getId() == QubitTerm::PUBLICATION_NOTE_ID ||
$this->getId() == QubitTerm::SOURCE_NOTE_ID ||
$this->getId() == QubitTerm::SCOPE_NOTE_ID ||
+ $this->getId() == QubitTerm::EVENT_ROLE_ID ||
$this->getId() == QubitTerm::ARCHIVAL_MATERIAL_ID ||
$this->getId() == QubitTerm::FINDING_AIDS_ID ||
$this->getId() == QubitTerm::PUBLISHED_MATERIAL_ID ||
@@ -151,8 +153,13 @@
return QubitNote::get($criteria);
}
+ public function getRole()
+ {
+ return '<role>';
+ }
+
public static function getLevelsOfDescription($options = array())
{
return QubitTaxonomy::getTermsById(QubitTaxonomy::LEVEL_OF_DESCRIPTION_ID,
$options);
@@ -275,7 +282,7 @@
*
* @param integer $parentTermId Primary key of parent term
* @param string $indentStr String to prefix to each sub-level for
indenting
- *
+ *
* @return mixed false on failure, else array of children formatted for
select box
*/
public static function getIndentedChildTree($parentTermId,
$indentStr=' ')
@@ -411,10 +418,14 @@
*
*/
- public static function getOptionsForSelectList($taxonomyId)
+ public static function getOptionsForSelectList($taxonomyId, $options =
array())
{
$terms = QubitTaxonomy::getTermsById($taxonomyId);
$selectList = array();
+ if (isset($options['include_blank']))
+ {
+ $selectList[null] = '';
+ }
foreach ($terms as $term)
{
$selectList[$term->getId()] = $term->getName();
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---