diff --git a/ItemRelationsPlugin.php b/ItemRelationsPlugin.php index c0819a3..c93a359 100644 --- a/ItemRelationsPlugin.php +++ b/ItemRelationsPlugin.php @@ -1,6 +1,7 @@ '[]', + 'item_relations_provide_relation_comments' => 0, + 'item_relations_relation_format' => 'prefix_local_part', + 'item_relations_admin_sidebar_or_maincontent' => 'sidebar', 'item_relations_public_append_to_items_show' => 1, - 'item_relations_relation_format' => 'prefix_local_part' + 'item_relations_public_display_mode' => 'table', + 'item_relations_admin_display_mode' => 'table', ); /** @@ -56,38 +66,40 @@ public function hookInstall() $sql = " CREATE TABLE IF NOT EXISTS `$db->ItemRelationsVocabulary` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `name` varchar(100) NOT NULL, - `description` text, - `namespace_prefix` varchar(100) NOT NULL, - `namespace_uri` varchar(200) DEFAULT NULL, - `custom` BOOLEAN NOT NULL, - PRIMARY KEY (`id`) + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + `description` text, + `namespace_prefix` varchar(100) NOT NULL, + `namespace_uri` varchar(200) DEFAULT NULL, + `custom` BOOLEAN NOT NULL, + PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci"; $db->query($sql); $sql = " CREATE TABLE IF NOT EXISTS `$db->ItemRelationsProperty` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `vocabulary_id` int(10) unsigned NOT NULL, - `local_part` varchar(100) NOT NULL, - `label` varchar(100) DEFAULT NULL, - `description` text, - PRIMARY KEY (`id`) + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `vocabulary_id` int(10) unsigned NOT NULL, + `local_part` varchar(100) NOT NULL, + `label` varchar(100) DEFAULT NULL, + `description` text, + PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci"; $db->query($sql); $sql = " CREATE TABLE IF NOT EXISTS `$db->ItemRelationsRelation` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `subject_item_id` int(10) unsigned NOT NULL, - `property_id` int(10) unsigned NOT NULL, - `object_item_id` int(10) unsigned NOT NULL, - PRIMARY KEY (`id`) + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `subject_item_id` int(10) unsigned NOT NULL, + `property_id` int(10) unsigned NOT NULL, + `object_item_id` int(10) unsigned NOT NULL, + `relation_comment` varchar(60) NOT NULL DEFAULT '', + PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci"; $db->query($sql); // Install the formal vocabularies and their properties. + self::hookInitialize(); // Make sure that the i18n file is already loaded $formalVocabularies = include 'formal_vocabularies.php'; foreach ($formalVocabularies as $formalVocabulary) { $vocabulary = new ItemRelationsVocabulary; @@ -112,8 +124,8 @@ public function hookInstall() // Install a custom vocabulary. $customVocabulary = new ItemRelationsVocabulary; - $customVocabulary->name = 'Custom'; - $customVocabulary->description = 'Custom vocabulary containing relations defined for this Omeka instance.'; + $customVocabulary->name = __('Custom'); + $customVocabulary->description = __('Custom vocabulary containing relations defined for this Omeka instance.'); $customVocabulary->namespace_prefix = ''; // cannot be NULL $customVocabulary->namespace_uri = null; $customVocabulary->custom = 1; @@ -144,26 +156,33 @@ public function hookUninstall() $this->_uninstallOptions(); } - /** + /** * Display the plugin configuration form. */ - public static function hookConfigForm() + public function hookConfigForm($args) { - $publicAppendToItemsShow = get_option('item_relations_public_append_to_items_show'); - $relationFormat = get_option('item_relations_relation_format'); - - require dirname(__FILE__) . '/config_form.php'; + $view = get_view(); + echo $view->partial( + 'plugins/item-relations-config-form.php' + ); } /** * Handle the plugin configuration form. */ - public static function hookConfig() + public function hookConfig($args) { - set_option('item_relations_public_append_to_items_show', - (int)(boolean) $_POST['item_relations_public_append_to_items_show']); - set_option('item_relations_relation_format', - $_POST['item_relations_relation_format']); + $post = $args['post']; + foreach ($this->_options as $optionKey => $optionValue) { + if (in_array($optionKey, array( + 'item_relations_allow_vocabularies', + ))) { + $post[$optionKey] = json_encode($post[$optionKey]) ?: json_encode(array()); + } + if (isset($post[$optionKey])) { + set_option($optionKey, $post[$optionKey]); + } + } } /** @@ -175,6 +194,7 @@ public function hookUpgrade($args) { $oldVersion = $args['old_version']; $db = $this->_db; + if ($oldVersion <= '1.1') { $sql = " INSERT INTO `{$db->ItemRelationsProperty}` @@ -218,9 +238,15 @@ public function hookUpgrade($args) $db->query($sql); } } + + if ($oldVersion < '2.0.2.1') { + // Insert relation_comment column + $sql = "ALTER TABLE `{$db->prefix}item_relations_relations` ADD `relation_comment` VARCHAR(60) NOT NULL DEFAULT '' AFTER `object_item_id`"; + $db->query($sql); + } } - /** + /** * Add the translations. */ public function hookInitialize() @@ -246,29 +272,52 @@ public function hookDefineAcl($args) /** * Display item relations on the public items show page. */ - public function hookPublicItemsShow() { + public function hookPublicItemsShow() + { if (get_option('item_relations_public_append_to_items_show')) { $item = get_current_record('item'); - echo common('item-relations-show', array( - 'subjectRelations' => self::prepareSubjectRelations($item), - 'objectRelations' => self::prepareObjectRelations($item) - )); + echo common('item-relations-show', array('item' => $item)); } } /** - * Display item relations on the admin items show page. + * Display item relations on the admin items show page underneath main content. + * + * @param Item $item + */ + public function hookAdminItemsShow($args) + { + $adminSidebarOrMaincontent = get_option('item_relations_admin_sidebar_or_maincontent'); + if ($adminSidebarOrMaincontent == "maincontent") { + $item = $args['item']; + + echo common('item-relations-show', array('item' => $item)); + } + } + + /** + * Display item relations on the admin items show page in the side bar in the lower right. * * @param Item $item */ public function hookAdminItemsShowSidebar($args) { - $item = $args['item']; + $adminSidebarOrMaincontent = get_option('item_relations_admin_sidebar_or_maincontent'); + if ($adminSidebarOrMaincontent != "maincontent") { + $item = $args['item']; + + echo common('item-relations-show', array('item' => $item)); + } + } - echo common('item-relations-show', array( - 'subjectRelations' => self::prepareSubjectRelations($item), - 'objectRelations' => self::prepareObjectRelations($item) + /** + * Display the item relations form on the advanced search page. + */ + protected function _ItemsSearch() + { + echo common('item-relations-advanced-search', array( + 'formSelectProperties' => get_table_options('ItemRelationsProperty'), )); } @@ -277,11 +326,36 @@ public function hookAdminItemsShowSidebar($args) */ public function hookAdminItemsSearch() { - echo common('item-relations-advanced-search', array( - 'formSelectProperties' => get_table_options('ItemRelationsProperty')) - ); + self::_itemsSearch(); + } + + /** + * Display the item relations form on the public advanced search page. + */ + public function hookPublicItemsSearch() { + self::_itemsSearch(); } - + + /** + * Manual implementation of addSearchItem() + */ + protected function myAddSearchText($item, $enrichedSearchTexts) { + // http://omeka.org/forums/topic/adding-item-search-text-from-a-plugin + //look up the existing search text + $searchText = $this->_db->getTable('SearchText')->findByRecord('Item', $item->id); + + // searchText should already exist, but if something goes wrong, create it + if (!$searchText) { + $searchText = new SearchText; + $searchText->record_type = 'Item'; + $searchText->record_id = $item->id; + $searchText->public = $item->public; + $searchText->title = metadata($item, array('Dublin Core', 'Title')); + } + $searchText->text .= ' ' . $enrichedSearchTexts; + $searchText->save(); + } + /** * Save the item relations after saving an item add/edit form. * @@ -289,26 +363,77 @@ public function hookAdminItemsSearch() */ public function hookAfterSaveItem($args) { - if (!$args['post']) { - return; - } + $db = $this->_db; + if ($args['post']) { $record = $args['record']; $post = $args['post']; - $db = $this->_db; - // Save item relations. if (isset($post['item_relations_property_id'])) { foreach ($post['item_relations_property_id'] as $key => $propertyId) { self::insertItemRelation( $record, $propertyId, - $post['item_relations_item_relation_object_item_id'][$key] + $post['item_relations_item_relation_object_item_id'][$key], + $post['item_relations_item_relation_relation_comment'][$key] ); } } + // update the comment when the comment is edited in subject + if (isset($post['item_relations_item_relation_subject_comment'])) { + if (isset($post['item_relations_subject_comment'])) { + $comments = array(); + foreach($post['item_relations_item_relation_subject_comment'] as $key) { + $key = intval($key); + if ($key) { + $comments[$key] = $post['item_relations_subject_comment'][$key]; + } + } + $commentIds = implode(',', array_keys($comments)); + + // Optimized the update query to avoid multiple execution. + $sql = "UPDATE `$db->ItemRelationsRelation` SET relation_comment = CASE id "; + foreach ($comments as $commentId => $comment) { + $sql .= sprintf(' WHEN %d THEN %s', $commentId, $db->quote($comment)); + } + $sql .= " END WHERE id IN ($commentIds)"; + $db->query($sql); + } + else { + $this->_helper->flashMessenger(__('There was an error in the item relation comments.'), 'error'); + } + } + + // Update the relation when the relation is edited in subject. + if (isset($post['item_relations_item_relation_subject_property'])) { + if (isset($post['item_relations_subject_property'])) { + $properties = array(); + foreach($post['item_relations_item_relation_subject_property'] as $key) { + $key = intval($key); + if ($key) { + $val = intval($post['item_relations_subject_property'][$key]); + if ($val) { + $properties[$key] = $val; + } + } + } + $propertyIds = implode(',', array_keys($properties)); + + // Optimized the update query to avoid multiple execution. + $sql = "UPDATE `$db->ItemRelationsRelation` SET property_id = CASE id "; + foreach ($properties as $propertyId => $property) { + $sql .= sprintf(' WHEN %d THEN %d', $propertyId, $property); + } + $sql .= " END WHERE id IN ($propertyIds)"; + $db->query($sql); + } + else { + $this->_helper->flashMessenger(__('There was an error in listing the item relation.'), 'error'); + } + } + // Delete item relations. if (isset($post['item_relations_item_relation_delete'])) { foreach ($post['item_relations_item_relation_delete'] as $itemRelationId) { @@ -321,6 +446,48 @@ public function hookAfterSaveItem($args) } } } + } # if ($args['post']) + + $itemId = intval(@$args["record"]["id"]); + if ($itemId) { + // saving relation comments into the search index + $provideRelationComments = get_option('item_relations_provide_relation_comments'); + if ($provideRelationComments) { + $sql = "SELECT relation_comment". + " FROM $db->ItemRelationsRelations". + " WHERE subject_item_id = $itemId"; + $rawComments = $db->fetchAll($sql); + + if ($rawComments) { + $comments = array(); + foreach($rawComments as $rawComment) { + $comments[] = $rawComment["relation_comment"]; + } + if ($comments) { + $item = get_record_by_id('Item', $itemId); + $enrichedSearchTexts = implode(" ", $comments); + SELF::myAddSearchText($item, $enrichedSearchTexts); + } + } + } + } + } + + /** + * Delete an item's relations after deleting that item. + * + * @param array $args + */ + public function hookAfterDeleteItem($args) + { + $db = $this->_db; + + $item_id = intval($args["record"]["id"]); + + if ($item_id) { + $sql = "delete from `$db->ItemRelationsRelation` where subject_item_id=$item_id or object_item_id=$item_id"; + $db->query($sql); + } } /** @@ -333,28 +500,44 @@ public function hookItemsBrowseSql($args) $select = $args['select']; $params = $args['params']; - if (isset($params['item_relations_property_id']) - && is_numeric($params['item_relations_property_id']) - ) { - $db = $this->_db; - // Set the field on which to join. - if (isset($params['item_relations_clause_part']) + // Set the field on which to join. + if (isset($params['item_relations_clause_part']) && $params['item_relations_clause_part'] == 'object' ) { - $onField = 'object_item_id'; - } else { - $onField = 'subject_item_id'; - } + $onField = 'object_item_id'; + } else { + $onField = 'subject_item_id'; + } + + $filter_relation = isset($params['item_relations_property_id']) + && is_numeric($params['item_relations_property_id']); + $filter_comment = isset($params['item_relations_comment']) + && (trim($params['item_relations_comment'])); + + if ($filter_relation || $filter_comment) { + + $db = $this->_db; $select ->join( array('item_relations_relations' => $db->ItemRelationsRelation), "item_relations_relations.$onField = items.id", array() - ) - ->where('item_relations_relations.property_id = ?', - $params['item_relations_property_id'] ); + + if ($filter_relation) { + $select->where('item_relations_relations.property_id = ?', + $params['item_relations_property_id']); + } + + if ($filter_comment) { + $select->where('item_relations_relations.relation_comment LIKE ?', + "%" . trim($params['item_relations_comment']) . "%" ); + } } + + # echo "
"; print_r($select); die("
"); + + // $select->where('items.id = ?', 2); } /** @@ -363,30 +546,41 @@ public function hookItemsBrowseSql($args) public function hookAdminItemsBatchEditForm() { $formSelectProperties = get_table_options('ItemRelationsProperty'); -?> -
-

- - - - - - - - - - - - - - - -
formSelect('custom[item_relations_property_id]', null, array(), $formSelectProperties); ?> - - formText('custom[item_relations_item_relation_object_item_id]', null, array('size' => 6)); ?> -
-
- +
+

+ + + + + + + + + + + + + + + + + + + + + +
formSelect('custom[item_relations_property_id]', + null, array(), $formSelectProperties); ?>formText('custom[item_relations_item_relation_object_item_id]', + null, array('size' => 4, 'placeholder' => __('Item ID'))); + ?>formText('custom[item_relations_item_relation_relation_comment]', + null, array('size' => 12)); + ?>
+
+ itemRelationsForm($item); return $tabs; } + /** + * Add the "Item Relations" tab to the admin items add/edit page. + * + * @return array + */ + public function filterItemRelationsPropertiesSelectOptions($selectOptions) + { + $allowedVocabularies = json_decode(get_option('item_relations_allow_vocabularies')); + if (!empty($allowedVocabularies)) { + $selectOptions = array_intersect_key($selectOptions, array_flip($allowedVocabularies)); + } + return $selectOptions; + } + /** * Prepare subject item relations for display. * @@ -453,19 +652,17 @@ public function filterAdminItemsFormTabs($tabs, $args) */ public static function prepareSubjectRelations(Item $item) { - $subjects = get_db()->getTable('ItemRelationsRelation')->findBySubjectItemId($item->id); + $subjects = get_db()->getTable('ItemRelationsRelation')->findBySubjectItemId($item->id, true); $subjectRelations = array(); - foreach ($subjects as $subject) { - if (!($item = get_record_by_id('item', $subject->object_item_id))) { - continue; - } + $objectItem = get_record_by_id('Item', $subject->object_item_id); $subjectRelations[] = array( 'item_relation_id' => $subject->id, - 'object_item_id' => $subject->object_item_id, - 'object_item_title' => self::getItemTitle($item), + 'object_item' => $objectItem, + 'object_item_title' => self::getItemTitle($objectItem), + 'relation_comment' => $subject->relation_comment, 'relation_text' => $subject->getPropertyText(), - 'relation_description' => $subject->property_description + 'relation_description' => $subject->property_description, ); } return $subjectRelations; @@ -479,23 +676,82 @@ public static function prepareSubjectRelations(Item $item) */ public static function prepareObjectRelations(Item $item) { - $objects = get_db()->getTable('ItemRelationsRelation')->findByObjectItemId($item->id); + $objects = get_db()->getTable('ItemRelationsRelation')->findByObjectItemId($item->id, true); $objectRelations = array(); foreach ($objects as $object) { - if (!($item = get_record_by_id('item', $object->subject_item_id))) { - continue; - } + $subjectItem = get_record_by_id('Item', $object->subject_item_id); $objectRelations[] = array( 'item_relation_id' => $object->id, - 'subject_item_id' => $object->subject_item_id, - 'subject_item_title' => self::getItemTitle($item), + 'subject_item' => $subjectItem, + 'subject_item_title' => self::getItemTitle($subjectItem), + 'relation_comment' => $object->relation_comment, 'relation_text' => $object->getPropertyText(), - 'relation_description' => $object->property_description + 'relation_description' => $object->property_description, ); } return $objectRelations; } + /** + * Prepare all item relations (subject & object) for display. + * ... Should (could?) replace prepareSubjectRelations + prepareObjectRelations entirely + * ... Currently, the two are necessary for (new) show relations by show-list-by-item-type + * + * @param Item $item + * @return array + */ + public static function prepareAllRelations(Item $item) + { + if (!isset($item->id)) { return array(); } + + $db = get_db(); + $query = "SELECT *, irr.id irrid, irp.description irpdesc". + " FROM `$db->ItemRelationsRelations` irr". + " JOIN `$db->ItemRelationsProperty` irp on irr.property_id = irp.id". + " JOIN `$db->ItemRelationsVocabulary` irv on irp.vocabulary_id = irv.id". + " WHERE irr.subject_item_id = $item->id". + " OR irr.object_item_id = $item->id". + " ORDER BY irv.name ASC, irp.vocabulary_id ASC". + ""; + # echo "
$query
"; + $partners = $db->fetchAll($query); + # echo "
$query:\n" . print_r($partners,true) . "
"; + + $relations = array(); + + foreach($partners as $partner) { + $otherItemType = ( $item->id == $partner["subject_item_id"] ? "object" : "subject" ); + $otherItem = get_record_by_id('item', $partner[$otherItemType."_item_id"]); + # echo "
".$otherItem->id." = $otherItemType
"; + if ($otherItem) { + $relation = array( + 'item_relation_id' => $partner["irrid"], + 'relation_comment' => $partner["relation_comment"], + 'relation_text' => $partner["label"], + 'relation_property' => $partner["property_id"], + 'relation_description' => $partner["irpdesc"], + 'vocabulary_id' => $partner["vocabulary_id"], + 'vocabulary' => $partner["name"], + 'vocabulary_desc' => $partner["description"], + 'subject_item_id' => $partner["subject_item_id"], + 'object_item_id' => $partner["object_item_id"], + ); + if ($otherItemType=="subject") { + $relation['subject_item_title'] = self::getItemTitle($otherItem); + $relation['object_item_title'] = self::getItemTitle($item); + } + else { + $relation['subject_item_title'] = self::getItemTitle($item); + $relation['object_item_title'] = self::getItemTitle($otherItem); + } + $relations[] = $relation; + } + } + + # echo "
" . print_r($relations, true) . "
"; + return $relations; + } + /** * Return a item's title. * @@ -519,21 +775,23 @@ public static function getItemTitle($item) * @param Item|int $objectItem * @return bool True: success; false: unsuccessful */ - public static function insertItemRelation($subjectItem, $propertyId, $objectItem) + public static function insertItemRelation($subjectItem, $propertyId, $objectItem, $relationComment) { // Only numeric property IDs are valid. if (!is_numeric($propertyId)) { return false; } + $db = get_db(); + // Set the subject item. if (!($subjectItem instanceOf Item)) { - $subjectItem = get_db()->getTable('Item')->find($subjectItem); + $subjectItem = $db->getTable('Item')->find($subjectItem); } // Set the object item. if (!($objectItem instanceOf Item)) { - $objectItem = get_db()->getTable('Item')->find($objectItem); + $objectItem = $db->getTable('Item')->find($objectItem); } // Don't save the relation if the subject or object items don't exist. @@ -545,6 +803,7 @@ public static function insertItemRelation($subjectItem, $propertyId, $objectItem $itemRelation->subject_item_id = $subjectItem->id; $itemRelation->property_id = $propertyId; $itemRelation->object_item_id = $objectItem->id; + $itemRelation->relation_comment = strlen($relationComment)? $relationComment : ''; $itemRelation->save(); return true; diff --git a/README.md b/README.md new file mode 100644 index 0000000..964a181 --- /dev/null +++ b/README.md @@ -0,0 +1,90 @@ +Item Relations (plugin for Omeka) +================================= + +[Item Relations] is a plugin for [Omeka] that lets you define relations between +items. For example, you can make one item a part of another item, where +"part of" is the relation. You can also make one item a "reproduction of" or a +"translation of" another item. + +We've bundled the plugin with common relations derived from several formal +vocabularies, like Dublin Core and FRBR. You can use these or you could populate +a custom vocabulary with the relations needed in your archive. You could, for +example, define custom relations like "is parent of", "is better than", and +"fits within". + +See http://omeka.org/codex/Plugins/ItemRelations for more info. + +This fork adds a quick visual selector and made the item relations themable. + + +Installation +------------ + +Uncompress files and rename plugin folder "ItemRelations". + +Then install it like any other Omeka plugin and follow the config instructions. + + +Warning +------- + +Use it at your own risk. + +It's always recommended to backup your files and database regularly so you can +roll back if needed. + + +Troubleshooting +--------------- + +See online [plugin issues] and [fork issues]. + + +License +------- + +This plugin is published under [GNU/GPL]. + +This program is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free Software +Foundation; either version 3 of the License, or (at your option) any later +version. + +This program is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +details. + +You should have received a copy of the GNU General Public License along with +this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + +Contact +------- + +Current maintainers: + +* [Center for History & New Media] +* Gero Zahn (see [GerZah]) +* Michael Slone (see [cokernel](https://github.com/cokernel)) +* Daniel Berthereau (see [Daniel-KM]) + + +Copyright +--------- + +* Copyright Center for History and New Media, 2011-2015 +* Copyright Michael Slone, 2015 +* Copyright Gero Zahn, 2015-2016 +* Copyright Daniel Berthereau, 2015-2016 + + +[Item Relations]: https://github.com/omeka/plugin-ItemRelations +[Omeka]: https://omeka.org +[plugin issues]: https://github.com/omeka/plugin-ItemRelations/issues +[fork issues]: https://github.com/Daniel-KM/ItemRelations/issues +[GNU/GPL]: https://www.gnu.org/licenses/gpl-3.0.html +[Center for History & New Media]: http://chnm.gmu.edu +[GerZah]: https://github.com/GerZah +[Daniel-KM]: https://github.com/Daniel-KM "Daniel Berthereau" diff --git a/config_form.php b/config_form.php deleted file mode 100644 index c849d01..0000000 --- a/config_form.php +++ /dev/null @@ -1,28 +0,0 @@ -
-
- formLabel('item_relations_public_append_to_items_show', __('Append to Public Items Show')); ?> -
-
-

- -

- formCheckbox('item_relations_public_append_to_items_show', null, array('checked' => $publicAppendToItemsShow)); ?> -
-
-
-
- formLabel('item_relations_relation_format', __('Relation Format')); ?> -
-
-

- -

- formSelect('item_relations_relation_format', $relationFormat, null, array('prefix_local_part' => 'prefix:localPart', 'label' => 'label')); ?> -
-
diff --git a/controllers/LookupController.php b/controllers/LookupController.php new file mode 100644 index 0000000..ac42fa3 --- /dev/null +++ b/controllers/LookupController.php @@ -0,0 +1,213 @@ +hasParam('subject_id')) { + $this->setParam('subject_id', -1); + } + if (!$this->hasParam('partial')) { + $this->setParam('partial', ''); + } + if (!$this->hasParam('id_limit')) { + $this->setParam('id_limit', ''); + } + if (!$this->hasParam('item_type')) { + $this->setParam('item_type', -1); + } + if (!$this->hasParam('collection')) { + $this->setParam('collection', -1); + } + if (!$this->hasParam('sort')) { + $this->setParam('sort', 'mod_desc'); + } + if (!$this->hasParam('page')) { + $this->setParam('page', 0); + } + if (!$this->hasParam('per_page')) { + $this->setParam('per_page', 15); + } + + $subject_id = intval($this->_getParam('subject_id')); + $where_subject_id = ''; + if ($subject_id > 0) { + $where_subject_id = "AND items.id != $subject_id"; + } + + $partial = preg_replace('/[^ \.,\!\?\p{L}\p{N}\p{Mc}]/ui', '', $this->_getParam('partial')); + $where_text = ''; + if (strlen($partial) > 0) { + $where_text = 'AND text RLIKE ' . $db->quote($partial); + } + + $where_id_limit = ''; + if (preg_match('/\s*(\d+)(?:-(\d+))?\s*/', $this->getParam('id_limit'), $matches)) { + $fromId = (integer) $matches[1]; + $toId = (integer) @$matches[2]; + if (!$toId) { + $toId = $fromId; + } + if ($fromId > $toId) { + $tmpId = $toId; + $toId = $fromId; + $fromId = $tmpId; + } + $where_id_limit = "AND items.id BETWEEN $fromId AND $toId"; + } + + $item_type = intval($this->_getParam('item_type')); + $where_item_type = ''; + if ($item_type > 0) { + $where_item_type = "AND items.item_type_id = $item_type"; + } + + $collection = intval($this->_getParam('collection')); + $where_collection = ''; + if ($collection > 0) { + $where_collection = "AND items.collection_id = $collection"; + } + + $per_page = intval($this->_getParam('per_page')); + $page = intval($this->_getParam('page')); + $offset = $page * $per_page; + + $order_clause = 'ORDER BY items.item_type_id ASC, text ASC'; + switch ($this->_getParam('sort')) { + case 'mod_desc': + $order_clause = 'ORDER BY UNIX_TIMESTAMP(modified) DESC, items.item_type_id ASC, text ASC'; + break; + case 'mod_asc': + $order_clause = 'ORDER BY UNIX_TIMESTAMP(modified) ASC, items.item_type_id ASC, text ASC'; + break; + case 'alpha_desc': + $order_clause = 'ORDER BY items.item_type_id ASC, text DESC'; + break; + case 'alpha_asc': + $order_clause = 'ORDER BY items.item_type_id ASC, text ASC'; + break; + default: + /* do nothing */ + break; + } + + $titleId = 50; + $query = <<Item} items +LEFT JOIN {$db->Element_Texts} elementtexts +ON (items.id = elementtexts.record_id) AND (elementtexts.record_type = 'Item') +WHERE elementtexts.element_id = $titleId +$where_subject_id +$where_item_type +$where_collection +$where_text +$where_id_limit +GROUP BY elementtexts.record_id +QCOUNT; + $m_count = count($db->fetchAll($query)); + + $max_page = floor($m_count / $per_page); + if ($page > $max_page) { + $page = $max_page; + $offset = $page * $per_page; + } + + $query = <<Item} items +LEFT JOIN {$db->Element_Texts} elementtexts +ON (items.id = elementtexts.record_id) AND (elementtexts.record_type = 'Item') +WHERE elementtexts.element_id = $titleId +$where_subject_id +$where_item_type +$where_collection +$where_text +$where_id_limit +GROUP BY elementtexts.record_id +$order_clause +LIMIT $per_page +OFFSET $offset +QUERY; + $items = $db->fetchAll($query); + $m_items = array(); + + foreach ($items as $item) { + $m_items[] = array( + 'value' => $item['id'], + 'label' => $item['text'], + ); + } + + $metadata = array( + 'count' => $m_count, + 'items' => $m_items, + ); + + $this->_helper->json($metadata); + } + + public function listItemTypesAction() + { + $itemTypesList = array( + '' => '- ' . __('All') . ' -', + ); + $itemTypesList += $this->_getUsedItemTypes(); + // Convert to a pseudo-associative array to keep order of ids. + $json = array( + 'id' => array_keys($itemTypesList), + 'label' => array_values($itemTypesList), + ); + $this->_helper->json($json); + } + + public function listCollectionsAction() + { + $collections = get_table_options('Collection'); + // Convert to a pseudo-associative array to keep order of ids. + $json = array( + 'id' => array_keys($collections), + 'label' => array_values($collections), + ); + $this->_helper->json($json); + } + + /** + * Get the list of used item types for select form. + * + * @return array + */ + protected function _getUsedItemTypes() + { + $db = get_db(); + + $itemTypesTable = $db->getTable('ItemType'); + $itemTypesAlias = $itemTypesTable->getTableAlias(); + + $select = $itemTypesTable->getSelect() + ->reset(Zend_Db_Select::COLUMNS) + ->from(array(), array($itemTypesAlias . '.id', $itemTypesAlias . '.name')) + ->joinInner(array('items' => $db->Item), "items.item_type_id = $itemTypesAlias.id", array()) + ->group($itemTypesAlias . '.id') + ->order($itemTypesAlias . '.name ASC'); + + $permissions = new Omeka_Db_Select_PublicPermissions('Items'); + $permissions->apply($select, 'items'); + + $itemTypes = $db->fetchPairs($select); + + return $itemTypes; + } +} diff --git a/controllers/VocabulariesController.php b/controllers/VocabulariesController.php index ee0653d..5362c0e 100644 --- a/controllers/VocabulariesController.php +++ b/controllers/VocabulariesController.php @@ -1,107 +1,179 @@ _helper->db->setDefaultModelName('ItemRelationsVocabulary'); + /** + * Initialize the controller before each request. + * + * Set ItemRelationsVocabulary as the model for the controller. + */ + public function init() + { + $this->_helper->db->setDefaultModelName('ItemRelationsVocabulary'); + } + + /** + * + * create action + */ + public function createAction() + { + if ($this->getRequest()->isPost()) { + $vocabularyName = $this->_getParam('vocabulary_name'); + $vocabularyDescription = $this->_getParam('vocabulary_description'); + $db = get_db(); + $select = "SELECT name FROM `$db->ItemRelationsVocabulary` WHERE `name` = ?"; + $result = $db->fetchAll($select, array(addslashes($vocabularyName))); + if ($result) + { + $this->_helper->flashMessenger(__('The vocabulary name already exists. Please choose a different one.'), 'error'); + } + else + { + if ($vocabularyName){ + $db->query("INSERT INTO `{$db->ItemRelationsVocabulary}` (`name`, `description`, `custom`) VALUES (?, ?, ?)", array( + addslashes($vocabularyName), + addslashes($vocabularyDescription), + 1 + )); + $this->_helper->flashMessenger(__('The vocabulary is successfully added.'), 'success'); + } + else{ + $this->_helper->flashMessenger(__('The vocabulary cannot be added.'), 'error'); + } + } + $this->_helper->redirector('browse'); + return; } + } + /** + * Save action. + */ + public function saveAction() + { + if ($this->getRequest()->isPost()) { + $vocabularyName = $this->_getParam('vocabulary_name'); + $vocabularyDescription = $this->_getParam('vocabulary_description'); + $vocabularyId = intval($this->_getParam('vocabulary_id')); + if (($vocabularyName) and ($vocabularyId)){ + $db = get_db(); + $sql = "UPDATE `$db->ItemRelationsVocabulary` set name = ?, description = ? where id = $vocabularyId"; + $db->query($sql, array(addslashes($vocabularyName) ,addslashes($vocabularyDescription))); + $this->_helper->flashMessenger(__('The vocabulary was successfully edited.'), 'success'); + } + else { + $this->_helper->flashMessenger(__('The vocabulary name cannot be empty.'), 'error'); + } + + + $this->_helper->redirector('browse'); + return; - /** - * Dummy add action. - * - * Vocabularies cannot be added through the UI. - */ - public function addAction() - { - throw new Omeka_Controller_Exception_404; } + } + /** + * Delete action. + */ + public function deleteAction() + { - /** - * Edit action. - */ - public function editAction() - { - $vocabulary = $this->_helper->db->findById(); - - // Only custom vocabularies can be edited. - if (!$vocabulary->custom) { - throw new Omeka_Controller_Exception_404; - } - - // Handle edit vocabulary form. - if ($this->getRequest()->isPost()) { - $this->_handleEditVocabularyForm($vocabulary->id); - - // Redirect to browse. - $this->_helper->flashMessenger(__('The vocabulary was successfully edited.'), 'success'); - $this->_helper->redirector('browse'); - return; - } - - $properties = $vocabulary->getProperties(); - $this->view->properties = $properties; + } + /** + * Edit action. + */ + public function editAction() + { + $vocabulary = $this->_helper->db->findById(); + + // Only custom vocabularies can be edited. + if (!$vocabulary->custom) { + throw new Omeka_Controller_Exception_404; } - /** - * Actually alter and save the vocabulary with the request data. - * - * @param int $vocabularyId - */ - protected function _handleEditVocabularyForm($vocabularyId) - { - // Edit existing properties. - $propertyDescriptions = $this->_getParam('property_description'); - foreach ($propertyDescriptions as $propertyId => $propertyDescription) { - $property = $this->_helper->db->getTable('ItemRelationsProperty')->find($propertyId); - $property->description = $propertyDescription; - $property->save(); - } - - // Add new properties. - $newPropertyLabels = $this->_getParam('new_property_label'); - $newPropertyDescriptions = $this->_getParam('new_property_description'); - foreach ($newPropertyLabels as $key => $newPropertyLabel) { - $newPropertyLabel = trim($newPropertyLabel); - $newPropertyDescription = trim($newPropertyDescriptions[$key]); - - // Labels are required. - if (!$newPropertyLabel) { - continue; - } - - // Labels must be unique. - if ($this->_helper->db->getTable('ItemRelationsProperty')->findByLabel($newPropertyLabel)) { - continue; - } - - $newProperty = new ItemRelationsProperty; - $newProperty->vocabulary_id = $vocabularyId; - $newProperty->local_part = ''; // cannot be NULL - $newProperty->label = $newPropertyLabel; - $newProperty->description = $newPropertyDescription; - $newProperty->save(); - } - - // Delete existing properties. - $propertyDeletes = $this->_getParam('property_delete'); - foreach ($propertyDeletes as $propertyId => $propertyDelete) { - if ($propertyDelete) { - $this->_helper->db->getTable('ItemRelationsProperty')->find($propertyId)->delete(); - } + // Handle edit vocabulary form. + if ($this->getRequest()->isPost()) { + + $this->_handleEditVocabularyForm($vocabulary->id); + // Redirect to Show instead of browse. + $this->_helper->redirector('show', null, null, array('id'=>$vocabulary->id)); + return; + } + $properties = $vocabulary->getProperties(); + $this->view->properties = $properties; + + } + + /** + * Actually alter and save the vocabulary with the request data. + * + * @param int $vocabularyId + */ + protected function _handleEditVocabularyForm($vocabularyId) + { + // Edit existing properties. + $propertyDescriptions = $this->_getParam('property_description'); + $propertyLabels = $this->_getParam('property_label'); + + // Edit property Descriptions + foreach ($propertyDescriptions as $propertyId => $propertyDescription) { + $property = $this->_helper->db->getTable('ItemRelationsProperty')->find($propertyId); + $property->description = $propertyDescription; + $property->save(); + } + + // Edit property Labels + foreach ($propertyLabels as $propertyId => $propertyLabel) { + $property = $this->_helper->db->getTable('ItemRelationsProperty')->find($propertyId); + + $property->label = $propertyLabel; + $property->save(); + } + + // Add new properties. + $newPropertyLabels = $this->_getParam('new_property_label'); + $newPropertyDescriptions = $this->_getParam('new_property_description'); + foreach ($newPropertyLabels as $key => $newPropertyLabel) { + $newPropertyLabel = trim($newPropertyLabel); + $newPropertyDescription = trim($newPropertyDescriptions[$key]); + + // Labels are required. + if (!$newPropertyLabel) { + continue; + } + + // Labels must be unique. + if ($this->_helper->db->getTable('ItemRelationsProperty')->findByLabel($newPropertyLabel)) { + $this->_helper->flashMessenger(__('Existing vocabulary properties cannot be added again.'), 'error'); + continue; } + + $newProperty = new ItemRelationsProperty; + $newProperty->vocabulary_id = $vocabularyId; + $newProperty->local_part = ''; // cannot be NULL + $newProperty->label = $newPropertyLabel; + $newProperty->description = $newPropertyDescription; + $newProperty->save(); + + } + + // Delete existing properties. + $propertyDeletes = $this->_getParam('property_delete'); + foreach ($propertyDeletes as $propertyId => $propertyDelete) { + if ($propertyDelete) { + $this->_helper->db->getTable('ItemRelationsProperty')->find($propertyId)->delete(); + } } + + $this->_helper->flashMessenger(__('The vocabulary was successfully edited.'), 'success'); + + } + } diff --git a/formal_vocabularies.php b/formal_vocabularies.php index 2949eec..f171fca 100644 --- a/formal_vocabularies.php +++ b/formal_vocabularies.php @@ -8,598 +8,598 @@ return $formalVocabularies = array( array( 'name' => 'Dublin Core', - 'description' => 'Relations defined by DCMI Metadata Terms: http://dublincore.org/documents/dcmi-terms/', + 'description' => __('Relations defined by DCMI Metadata Terms: http://dublincore.org/documents/dcmi-terms/'), 'namespace_prefix' => 'dcterms', 'namespace_uri' => 'http://purl.org/dc/terms/', 'properties' => array( array( 'local_part' => 'relation', - 'label' => 'Relation', - 'description' => 'A related resource.' + 'label' => __('Relation'), + 'description' => __('A related resource.') ), array( 'local_part' => 'conformsTo', - 'label' => 'Conforms To', - 'description' => 'An established standard to which the described resource conforms.' + 'label' => __('Conforms To'), + 'description' => __('An established standard to which the described resource conforms.') ), array( 'local_part' => 'hasFormat', - 'label' => 'Has Format', - 'description' => 'A related resource that is substantially the same as the pre-existing described resource, but in another format.' + 'label' => __('Has Format'), + 'description' => __('A related resource that is substantially the same as the pre-existing described resource, but in another format.') ), array( 'local_part' => 'hasPart', - 'label' => 'Has Part', - 'description' => 'A related resource that is included either physically or logically in the described resource.' + 'label' => __('Has Part'), + 'description' => __('A related resource that is included either physically or logically in the described resource.') ), array( 'local_part' => 'hasVersion', - 'label' => 'Has Version', - 'description' => 'A related resource that is a version, edition, or adaptation of the described resource.' + 'label' => __('Has Version'), + 'description' => __('A related resource that is a version, edition, or adaptation of the described resource.') ), array( 'local_part' => 'isFormatOf', - 'label' => 'Is Format Of', - 'description' => 'A related resource that is substantially the same as the described resource, but in another format.' + 'label' => __('Is Format Of'), + 'description' => __('A related resource that is substantially the same as the described resource, but in another format.') ), array( 'local_part' => 'isPartOf', - 'label' => 'Is Part Of', - 'description' => 'A related resource in which the described resource is physically or logically included.' + 'label' => __('Is Part Of'), + 'description' => __('A related resource in which the described resource is physically or logically included.') ), array( 'local_part' => 'isReferencedBy', - 'label' => 'Is Referenced By', - 'description' => 'A related resource that references, cites, or otherwise points to the described resource.' + 'label' => __('Is Referenced By'), + 'description' => __('A related resource that references, cites, or otherwise points to the described resource.') ), array( 'local_part' => 'isReplacedBy', - 'label' => 'Is Replaced By', - 'description' => 'A related resource that supplants, displaces, or supersedes the described resource.' + 'label' => __('Is Replaced By'), + 'description' => __('A related resource that supplants, displaces, or supersedes the described resource.') ), array( 'local_part' => 'isRequiredBy', - 'label' => 'Is Required By', - 'description' => 'A related resource that requires the described resource to support its function, delivery, or coherence.' + 'label' => __('Is Required By'), + 'description' => __('A related resource that requires the described resource to support its function, delivery, or coherence.') ), array( 'local_part' => 'isVersionOf', - 'label' => 'Is Version Of', - 'description' => 'A related resource of which the described resource is a version, edition, or adaptation.' + 'label' => __('Is Version Of'), + 'description' => __('A related resource of which the described resource is a version, edition, or adaptation.') ), array( 'local_part' => 'references', - 'label' => 'References', - 'description' => 'A related resource that is referenced, cited, or otherwise pointed to by the described resource.' + 'label' => __('References'), + 'description' => __('A related resource that is referenced, cited, or otherwise pointed to by the described resource.') ), array( 'local_part' => 'replaces', - 'label' => 'Replaces', - 'description' => 'A related resource that is supplanted, displaced, or superseded by the described resource.' + 'label' => __('Replaces'), + 'description' => __('A related resource that is supplanted, displaced, or superseded by the described resource.') ), array( 'local_part' => 'requires', - 'label' => 'Requires', - 'description' => 'A related resource that is required by the described resource to support its function, delivery, or coherence.' + 'label' => __('Requires'), + 'description' => __('A related resource that is required by the described resource to support its function, delivery, or coherence.') ), array( 'local_part' => 'source', - 'label' => 'Source', - 'description' => 'A related resource from which the described resource is derived.' + 'label' => __('Source'), + 'description' => __('A related resource from which the described resource is derived.') ), array( 'local_part' => 'abstract', - 'label' => 'Abstract', - 'description' => 'A summary of the resource.' + 'label' => __('Abstract'), + 'description' => __('A summary of the resource.') ), array( 'local_part' => 'accessRights', - 'label' => 'Access Rights', - 'description' => 'Information about who can access the resource or an indication of its security status.' + 'label' => __('Access Rights'), + 'description' => __('Information about who can access the resource or an indication of its security status.') ), array( 'local_part' => 'accrualMethod', - 'label' => 'Accrual Method', - 'description' => 'The method by which items are added to a collection.' + 'label' => __('Accrual Method'), + 'description' => __('The method by which items are added to a collection.') ), array( 'local_part' => 'accrualPeriodicity', - 'label' => 'Accrual Periodicity', - 'description' => 'The frequency with which items are added to a collection.' + 'label' => __('Accrual Periodicity'), + 'description' => __('The frequency with which items are added to a collection.') ), array( 'local_part' => 'accrualPolicy', - 'label' => 'Accrual Policy', - 'description' => 'The policy governing the addition of items to a collection.' + 'label' => __('Accrual Policy'), + 'description' => __('The policy governing the addition of items to a collection.') ), array( 'local_part' => 'audience', - 'label' => 'Audience', - 'description' => 'A class of entity for whom the resource is intended or useful.' + 'label' => __('Audience'), + 'description' => __('A class of entity for whom the resource is intended or useful.') ), array( 'local_part' => 'contributor', - 'label' => 'Contributor', - 'description' => 'An entity responsible for making contributions to the resource.' + 'label' => __('Contributor'), + 'description' => __('An entity responsible for making contributions to the resource.') ), array( 'local_part' => 'coverage', - 'label' => 'Coverage', - 'description' => 'The spatial or temporal topic of the resource, the spatial applicability of the resource, or the jurisdiction under which the resource is relevant.' + 'label' => __('Coverage'), + 'description' => __('The spatial or temporal topic of the resource, the spatial applicability of the resource, or the jurisdiction under which the resource is relevant.') ), array( 'local_part' => 'creator', - 'label' => 'Creator', - 'description' => 'An entity primarily responsible for making the resource.' + 'label' => __('Creator'), + 'description' => __('An entity primarily responsible for making the resource.') ), array( 'local_part' => 'description', - 'label' => 'Description', - 'description' => 'An account of the resource.' + 'label' => __('Description'), + 'description' => __('An account of the resource.') ), array( 'local_part' => 'educationLevel', - 'label' => 'Audience Education Level', - 'description' => 'A class of entity, defined in terms of progression through an educational or training context, for which the described resource is intended.' + 'label' => __('Audience Education Level'), + 'description' => __('A class of entity, defined in terms of progression through an educational or training context, for which the described resource is intended.') ), array( 'local_part' => 'extent', - 'label' => 'Extent', - 'description' => 'The size or duration of the resource.' + 'label' => __('Extent'), + 'description' => __('The size or duration of the resource.') ), array( 'local_part' => 'format', - 'label' => 'Format', - 'description' => 'The file format, physical medium, or dimensions of the resource.' + 'label' => __('Format'), + 'description' => __('The file format, physical medium, or dimensions of the resource.') ), array( 'local_part' => 'instructionalMethod', - 'label' => 'Instructional Method', - 'description' => 'A process, used to engender knowledge, attitudes and skills, that the described resource is designed to support.' + 'label' => __('Instructional Method'), + 'description' => __('A process, used to engender knowledge, attitudes and skills, that the described resource is designed to support.') ), array( 'local_part' => 'language', - 'label' => 'Language', - 'description' => 'A language of the resource.' + 'label' => __('Language'), + 'description' => __('A language of the resource.') ), array( 'local_part' => 'license', - 'label' => 'License', - 'description' => 'A legal document giving official permission to do something with the resource.' + 'label' => __('License'), + 'description' => __('A legal document giving official permission to do something with the resource.') ), array( 'local_part' => 'mediator', - 'label' => 'Mediator', - 'description' => 'An entity that mediates access to the resource and for whom the resource is intended or useful.' + 'label' => __('Mediator'), + 'description' => __('An entity that mediates access to the resource and for whom the resource is intended or useful.') ), array( 'local_part' => 'medium', - 'label' => 'Medium', - 'description' => 'The material or physical carrier of the resource.' + 'label' => __('Medium'), + 'description' => __('The material or physical carrier of the resource.') ), array( 'local_part' => 'provenance', - 'label' => 'Provenance', - 'description' => 'A statement of any changes in ownership and custody of the resource since its creation that are significant for its authenticity, integrity, and interpretation.' + 'label' => __('Provenance'), + 'description' => __('A statement of any changes in ownership and custody of the resource since its creation that are significant for its authenticity, integrity, and interpretation.') ), array( 'local_part' => 'publisher', - 'label' => 'Publisher', - 'description' => 'An entity responsible for making the resource available.' + 'label' => __('Publisher'), + 'description' => __('An entity responsible for making the resource available.') ), array( 'local_part' => 'rights', - 'label' => 'Rights', - 'description' => 'Information about rights held in and over the resource.' + 'label' => __('Rights'), + 'description' => __('Information about rights held in and over the resource.') ), array( 'local_part' => 'rightsHolder', - 'label' => 'Rights Holder', - 'description' => 'A person or organization owning or managing rights over the resource.' + 'label' => __('Rights Holder'), + 'description' => __('A person or organization owning or managing rights over the resource.') ), array( 'local_part' => 'spatial', - 'label' => 'Spatial Coverage', - 'description' => 'Spatial characteristics of the resource.' + 'label' => __('Spatial Coverage'), + 'description' => __('Spatial characteristics of the resource.') ), array( 'local_part' => 'subject', - 'label' => 'Subject', - 'description' => 'The topic of the resource.' + 'label' => __('Subject'), + 'description' => __('The topic of the resource.') ), array( 'local_part' => 'tableOfContents', - 'label' => 'Table Of Contents', - 'description' => 'A list of subunits of the resource.' + 'label' => __('Table Of Contents'), + 'description' => __('A list of subunits of the resource.') ), array( 'local_part' => 'temporal', - 'label' => 'Temporal Coverage', - 'description' => 'Temporal characteristics of the resource.' + 'label' => __('Temporal Coverage'), + 'description' => __('Temporal characteristics of the resource.') ), array( 'local_part' => 'type', - 'label' => 'Type', - 'description' => 'The nature or genre of the resource.' + 'label' => __('Type'), + 'description' => __('The nature or genre of the resource.') ), ) ), array( 'name' => 'BIBO', - 'description' => 'Relations defined by the Bibliographic Ontology (BIBO): http://bibotools.googlecode.com/svn/bibo-ontology/trunk/doc/index.html', + 'description' => __('Relations defined by the Bibliographic Ontology (BIBO): http://bibotools.googlecode.com/svn/bibo-ontology/trunk/doc/index.html'), 'namespace_prefix' => 'bibo', 'namespace_uri' => 'http://purl.org/ontology/bibo/', 'properties' => array( array( 'local_part' => 'annotates', - 'label' => 'annotates', - 'description' => 'Critical or explanatory note for a Document.' + 'label' => __('annotates'), + 'description' => __('Critical or explanatory note for a Document.') ), array( 'local_part' => 'citedBy', - 'label' => 'cited by', - 'description' => 'Relates a document to another document that cites the first document.' + 'label' => __('cited by'), + 'description' => __('Relates a document to another document that cites the first document.') ), array( 'local_part' => 'cites', - 'label' => 'cites', - 'description' => 'Relates a document to another document that is cited by the first document as reference, comment, review, quotation or for another purpose.' + 'label' => __('cites'), + 'description' => __('Relates a document to another document that is cited by the first document as reference, comment, review, quotation or for another purpose.') ), array( 'local_part' => 'reviewOf', - 'label' => 'review of', - 'description' => 'Relates a review document to a reviewed thing (resource, item, etc.).' + 'label' => __('review of'), + 'description' => __('Relates a review document to a reviewed thing (resource, item, etc.).') ), array( 'local_part' => 'reproducedIn', - 'label' => 'reproduced in', - 'description' => 'The resource in which another resource is reproduced.' + 'label' => __('reproduced in'), + 'description' => __('The resource in which another resource is reproduced.') ), array( 'local_part' => 'affirmedBy', - 'label' => 'affirmed by', - 'description' => 'A legal decision that affirms a ruling.' + 'label' => __('affirmed by'), + 'description' => __('A legal decision that affirms a ruling.') ), array( 'local_part' => 'reversedBy', - 'label' => 'reversed by', - 'description' => 'A legal decision that reverses a ruling.' + 'label' => __('reversed by'), + 'description' => __('A legal decision that reverses a ruling.') ), array( 'local_part' => 'subsequentLegalDecision', - 'label' => 'subsequent legal decision', - 'description' => 'A legal decision on appeal that takes action on a case (affirming it, reversing it, etc.).' + 'label' => __('subsequent legal decision'), + 'description' => __('A legal decision on appeal that takes action on a case (affirming it, reversing it, etc.).') ), array( 'local_part' => 'transcriptOf', - 'label' => 'transcript of', - 'description' => 'Relates a document to some transcribed original.' + 'label' => __('transcript of'), + 'description' => __('Relates a document to some transcribed original.') ), array( 'local_part' => 'translationOf', - 'label' => 'translation of', - 'description' => 'Relates a translated document to the original document.' + 'label' => __('translation of'), + 'description' => __('Relates a translated document to the original document.') ), ) ), array( 'name' => 'FOAF', - 'description' => 'Relations defined by the Friend of a Friend vocabulary (FOAF): http://xmlns.com/foaf/spec/', + 'description' => __('Relations defined by the Friend of a Friend vocabulary (FOAF): http://xmlns.com/foaf/spec/'), 'namespace_prefix' => 'foaf', 'namespace_uri' => 'http://xmlns.com/foaf/0.1/', 'properties' => array( array( 'local_part' => 'based_near', - 'label' => 'based near', - 'description' => 'A location that something is based near, for some broadly human notion of near.' + 'label' => __('based near'), + 'description' => __('A location that something is based near, for some broadly human notion of near.') ), array( 'local_part' => 'depiction', - 'label' => 'depiction', - 'description' => 'A depiction of some thing.' + 'label' => __('depiction'), + 'description' => __('A depiction of some thing.') ), array( 'local_part' => 'depicts', - 'label' => 'depicts', - 'description' => 'A thing depicted in this representation.' + 'label' => __('depicts'), + 'description' => __('A thing depicted in this representation.') ), array( 'local_part' => 'fundedBy', - 'label' => 'funded by', - 'description' => 'An organization funding a project or person.' + 'label' => __('funded by'), + 'description' => __('An organization funding a project or person.') ), array( 'local_part' => 'img', - 'label' => 'image', - 'description' => 'An image that can be used to represent some thing (ie. those depictions which are particularly representative of something, eg. one\'s photo on a homepage).' + 'label' => __('image'), + 'description' => __('An image that can be used to represent some thing (ie. those depictions which are particularly representative of something, eg. one\'s photo on a homepage).') ), array( 'local_part' => 'isPrimaryTopicOf', - 'label' => 'is primary topic of', - 'description' => 'A document that this thing is the primary topic of.' + 'label' => __('is primary topic of'), + 'description' => __('A document that this thing is the primary topic of.') ), array( 'local_part' => 'knows', - 'label' => 'knows', - 'description' => 'A person known by this person (indicating some level of reciprocated interaction between the parties).' + 'label' => __('knows'), + 'description' => __('A person known by this person (indicating some level of reciprocated interaction between the parties).') ), array( 'local_part' => 'logo', - 'label' => 'logo', - 'description' => 'A logo representing some thing.' + 'label' => __('logo'), + 'description' => __('A logo representing some thing.') ), array( 'local_part' => 'made', - 'label' => 'made', - 'description' => 'Something that was made by this agent.' + 'label' => __('made'), + 'description' => __('Something that was made by this agent.') ), array( 'local_part' => 'maker', - 'label' => 'maker', - 'description' => 'An agent that made this thing.' + 'label' => __('maker'), + 'description' => __('An agent that made this thing.') ), array( 'local_part' => 'member', - 'label' => 'member', - 'description' => 'Indicates a member of a Group.' + 'label' => __('member'), + 'description' => __('Indicates a member of a Group.') ), array( 'local_part' => 'page', - 'label' => 'page', - 'description' => 'A page or document about this thing.' + 'label' => __('page'), + 'description' => __('A page or document about this thing.') ), array( 'local_part' => 'primaryTopic', - 'label' => 'primary topic', - 'description' => 'The primary topic of some page or document.' + 'label' => __('primary topic'), + 'description' => __('The primary topic of some page or document.') ), array( 'local_part' => 'thumbnail', - 'label' => 'thumbnail', - 'description' => 'A derived thumbnail image.' + 'label' => __('thumbnail'), + 'description' => __('A derived thumbnail image.') ), ) ), array( 'name' => 'FRBR', - 'description' => 'Relations defined by the Functional Requirements for Bibliographic Records (FRBR): http://vocab.org/frbr/core.html', + 'description' => __('Relations defined by the Functional Requirements for Bibliographic Records (FRBR): http://vocab.org/frbr/core.html'), 'namespace_prefix' => 'frbr', 'namespace_uri' => 'http://purl.org/vocab/frbr/core#', 'properties' => array( array( 'local_part' => 'abridgement', - 'label' => 'abridgement', - 'description' => 'A property representing an abridgment of an expression.' + 'label' => __('abridgement'), + 'description' => __('A property representing an abridgment of an expression.') ), array( 'local_part' => 'abridgementOf', - 'label' => 'abridgement of', - 'description' => 'A property representing an expression that is abridged.' + 'label' => __('abridgement of'), + 'description' => __('A property representing an expression that is abridged.') ), array( 'local_part' => 'adaption', - 'label' => 'adaption', - 'description' => 'A property representing an adaption of a work or expression.' + 'label' => __('adaption'), + 'description' => __('A property representing an adaption of a work or expression.') ), array( 'local_part' => 'adaptionOf', - 'label' => 'adaption of', - 'description' => 'A property representing a work or expression that is adapted.' + 'label' => __('adaption of'), + 'description' => __('A property representing a work or expression that is adapted.') ), array( 'local_part' => 'alternate', - 'label' => 'alternate', - 'description' => 'A property representing an alternative to a manifestation.' + 'label' => __('alternate'), + 'description' => __('A property representing an alternative to a manifestation.') ), array( 'local_part' => 'alternateOf', - 'label' => 'alternate of', - 'description' => 'A property representing a manifestation that is alternated.' + 'label' => __('alternate of'), + 'description' => __('A property representing a manifestation that is alternated.') ), array( 'local_part' => 'arrangement', - 'label' => 'arrangement', - 'description' => 'A property representing an arrangement of an expression.' + 'label' => __('arrangement'), + 'description' => __('A property representing an arrangement of an expression.') ), array( 'local_part' => 'arrangementOf', - 'label' => 'arrangement of', - 'description' => 'A property representing an expression that is arranged.' + 'label' => __('arrangement of'), + 'description' => __('A property representing an expression that is arranged.') ), array( 'local_part' => 'complement', - 'label' => 'complement', - 'description' => 'A property representing a complement to a work or expression.' + 'label' => __('complement'), + 'description' => __('A property representing a complement to a work or expression.') ), array( 'local_part' => 'complementOf', - 'label' => 'complement of', - 'description' => 'A property representing a work or expression that is complemented.' + 'label' => __('complement of'), + 'description' => __('A property representing a work or expression that is complemented.') ), array( 'local_part' => 'creator', - 'label' => 'creator', - 'description' => 'A property representing an entity in some way responsible for the creation of a work.' + 'label' => __('creator'), + 'description' => __('A property representing an entity in some way responsible for the creation of a work.') ), array( 'local_part' => 'creatorOf', - 'label' => 'creator of', - 'description' => 'A property representing a work that was in some way created by of an entity.' + 'label' => __('creator of'), + 'description' => __('A property representing a work that was in some way created by of an entity.') ), array( 'local_part' => 'embodiment', - 'label' => 'embodiment', - 'description' => 'A property representing a manifestation that embodies an expression.' + 'label' => __('embodiment'), + 'description' => __('A property representing a manifestation that embodies an expression.') ), array( 'local_part' => 'embodimentOf', - 'label' => 'embodiment of', - 'description' => 'A property representing an expression that is embodied by a manifestation.' + 'label' => __('embodiment of'), + 'description' => __('A property representing an expression that is embodied by a manifestation.') ), array( 'local_part' => 'exemplar', - 'label' => 'exemplar', - 'description' => 'A property representing an item that is an exemplar of a manifestation.' + 'label' => __('exemplar'), + 'description' => __('A property representing an item that is an exemplar of a manifestation.') ), array( 'local_part' => 'exemplarOf', - 'label' => 'exemplar of', - 'description' => 'A property representing the manifestation that is exemplified by a item.' + 'label' => __('exemplar of'), + 'description' => __('A property representing the manifestation that is exemplified by a item.') ), array( 'local_part' => 'imitation', - 'label' => 'imitation', - 'description' => 'A property representing an imitation of a work or expression.' + 'label' => __('imitation'), + 'description' => __('A property representing an imitation of a work or expression.') ), array( 'local_part' => 'imitationOf', - 'label' => 'imitation of', - 'description' => 'A property representing a work or expression that is imitated.' + 'label' => __('imitation of'), + 'description' => __('A property representing a work or expression that is imitated.') ), array( 'local_part' => 'owner', - 'label' => 'owner', - 'description' => 'A property representing an entity that owns an item.' + 'label' => __('owner'), + 'description' => __('A property representing an entity that owns an item.') ), array( 'local_part' => 'ownerOf', - 'label' => 'owner of', - 'description' => 'A property representing an item that is in some way owned an entity.' + 'label' => __('owner of'), + 'description' => __('A property representing an item that is in some way owned an entity.') ), array( 'local_part' => 'part', - 'label' => 'part', - 'description' => 'A property representing a part of an endeavour.' + 'label' => __('part'), + 'description' => __('A property representing a part of an endeavour.') ), array( 'local_part' => 'partOf', - 'label' => 'part of', - 'description' => 'A property representing an endeavour incorporating an endeavour.' + 'label' => __('part of'), + 'description' => __('A property representing an endeavour incorporating an endeavour.') ), array( 'local_part' => 'producer', - 'label' => 'producer', - 'description' => 'A property representing an entity in some way responsible for producing a manifestation.' + 'label' => __('producer'), + 'description' => __('A property representing an entity in some way responsible for producing a manifestation.') ), array( 'local_part' => 'producerOf', - 'label' => 'producer of', - 'description' => 'A property representing a manifestation that was in some way produced an entity.' + 'label' => __('producer of'), + 'description' => __('A property representing a manifestation that was in some way produced an entity.') ), array( 'local_part' => 'realization', - 'label' => 'realization', - 'description' => 'A property representing an expression that is an intellectual or artistic realization of a work.' + 'label' => __('realization'), + 'description' => __('A property representing an expression that is an intellectual or artistic realization of a work.') ), array( 'local_part' => 'realizationOf', - 'label' => 'realization of', - 'description' => 'A property representing the work that has been realized by an expression.' + 'label' => __('realization of'), + 'description' => __('A property representing the work that has been realized by an expression.') ), array( 'local_part' => 'realizer', - 'label' => 'realizer', - 'description' => 'A property representing an entity in some way responsible for realizing an expression.' + 'label' => __('realizer'), + 'description' => __('A property representing an entity in some way responsible for realizing an expression.') ), array( 'local_part' => 'realizerOf', - 'label' => 'realizer of', - 'description' => 'A property representing an expression that was in some way realized by an entity.' + 'label' => __('realizer of'), + 'description' => __('A property representing an expression that was in some way realized by an entity.') ), array( 'local_part' => 'reconfiguration', - 'label' => 'reconfiguration', - 'description' => 'A property representing a recongifuration of an item.' + 'label' => __('reconfiguration'), + 'description' => __('A property representing a recongifuration of an item.') ), array( 'local_part' => 'reconfigurationOf', - 'label' => 'reconfiguration of', - 'description' => 'A property representing an item that is reconfigured.' + 'label' => __('reconfiguration of'), + 'description' => __('A property representing an item that is reconfigured.') ), array( 'local_part' => 'relatedEndeavour', - 'label' => 'related endeavour', - 'description' => 'A property representing another endeavour that is related in some way to an endeavour.' + 'label' => __('related endeavour'), + 'description' => __('A property representing another endeavour that is related in some way to an endeavour.') ), array( 'local_part' => 'reproduction', - 'label' => 'reproduction', - 'description' => 'A property representing a reproduction of a manifestation or item.' + 'label' => __('reproduction'), + 'description' => __('A property representing a reproduction of a manifestation or item.') ), array( 'local_part' => 'reproductionOf', - 'label' => 'reproduction of', - 'description' => 'A property representing a manifestation or item that is reproduced.' + 'label' => __('reproduction of'), + 'description' => __('A property representing a manifestation or item that is reproduced.') ), array( 'local_part' => 'responsibleEntity', - 'label' => 'responsible entity', - 'description' => 'A property representing an entity in some way responsible for an endeavour.' + 'label' => __('responsible entity'), + 'description' => __('A property representing an entity in some way responsible for an endeavour.') ), array( 'local_part' => 'responsibleEntityOf', - 'label' => 'responsible entity of', - 'description' => 'A property representing an endeavour that is the responsibility of an entity.' + 'label' => __('responsible entity of'), + 'description' => __('A property representing an endeavour that is the responsibility of an entity.') ), array( 'local_part' => 'revision', - 'label' => 'revision', - 'description' => 'A property representing a revision of an expression.' + 'label' => __('revision'), + 'description' => __('A property representing a revision of an expression.') ), array( 'local_part' => 'revisionOf', - 'label' => 'revision of', - 'description' => 'A property representing an expression that is revised.' + 'label' => __('revision of'), + 'description' => __('A property representing an expression that is revised.') ), array( 'local_part' => 'successor', - 'label' => 'successor', - 'description' => 'A property representing a successor to a work or expression.' + 'label' => __('successor'), + 'description' => __('A property representing a successor to a work or expression.') ), array( 'local_part' => 'successorOf', - 'label' => 'successor of', - 'description' => 'A property representing a work or expression that is succeeded.' + 'label' => __('successor of'), + 'description' => __('A property representing a work or expression that is succeeded.') ), array( 'local_part' => 'summarization', - 'label' => 'summarization', - 'description' => 'A property representing a summarization of a work or expression.' + 'label' => __('summarization'), + 'description' => __('A property representing a summarization of a work or expression.') ), array( 'local_part' => 'summarizationOf', - 'label' => 'summarization of', - 'description' => 'A property representing a work or expression that is summarized.' + 'label' => __('summarization of'), + 'description' => __('A property representing a work or expression that is summarized.') ), array( 'local_part' => 'supplement', - 'label' => 'supplement', - 'description' => 'A property representing a supplement to a work or expression.' + 'label' => __('supplement'), + 'description' => __('A property representing a supplement to a work or expression.') ), array( 'local_part' => 'supplementOf', - 'label' => 'supplement of', - 'description' => 'A property representing a work or expression that is supplemented.' + 'label' => __('supplement of'), + 'description' => __('A property representing a work or expression that is supplemented.') ), array( 'local_part' => 'transformation', - 'label' => 'transformation', - 'description' => 'A property representing a transformation of a work or expression.' + 'label' => __('transformation'), + 'description' => __('A property representing a transformation of a work or expression.') ), array( 'local_part' => 'transformationOf', - 'label' => 'transformation of', - 'description' => 'A property representing a work or expression that is transformed.' + 'label' => __('transformation of'), + 'description' => __('A property representing a work or expression that is transformed.') ), array( 'local_part' => 'translation', - 'label' => 'translation', - 'description' => 'A property representing a translation of an expression.' + 'label' => __('translation'), + 'description' => __('A property representing a translation of an expression.') ), array( 'local_part' => 'translationOf', - 'label' => 'translation of', - 'description' => 'A property representing an expression that is translated.' + 'label' => __('translation of'), + 'description' => __('A property representing an expression that is translated.') ), ) ), diff --git a/item_relations_form.php b/item_relations_form.php deleted file mode 100644 index 5ee0fda..0000000 --- a/item_relations_form.php +++ /dev/null @@ -1,57 +0,0 @@ -

-' - . __('Browse Vocabularies') . ''; - -echo __('Here you can relate this item to another item and delete existing ' - . 'relations. For descriptions of the relations, see the %s page. Invalid ' - . 'item IDs will be ignored.', $link -); -?> -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
formSelect('item_relations_property_id[]', null, array('multiple' => false), $formSelectProperties); ?> formText('item_relations_item_relation_object_item_id[]', null, array('size' => 8)); ?>n/a
- - diff --git a/languages/de_DE.mo b/languages/de_DE.mo new file mode 100644 index 0000000..12b5cd7 Binary files /dev/null and b/languages/de_DE.mo differ diff --git a/languages/de_DE.po b/languages/de_DE.po new file mode 100644 index 0000000..7ac7ad6 --- /dev/null +++ b/languages/de_DE.po @@ -0,0 +1,1357 @@ +# Translation for the Exhibit Builder plugin for Omeka. +# Copyright (C) 2014 Roy Rosenzweig Center for History and New Media +# This file is distributed under the same license as the Omeka package. +# +# Translators: +# Gero Zahn , 2015-2016 +msgid "" +msgstr "" +"Project-Id-Version: WeSa Omeka\n" +"Report-Msgid-Bugs-To: http://github.com/GerZah/plugin-ItemRelations/issues\n" +"POT-Creation-Date: 2014-01-13 12:59-0500\n" +"PO-Revision-Date: 2016-07-06 19:03+0200\n" +"Last-Translator: Gero Zahn \n" +"Language-Team: German (Germany) (http://www.transifex.com/upb/wesa-omeka/language/de_DE/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de_DE\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 1.8.8\n" + +#: ItemRelationsPlugin.php:127 +msgid "Custom" +msgstr "Benutzerdefiniert" + +#: ItemRelationsPlugin.php:128 +msgid "Custom vocabulary containing relations defined for this Omeka instance." +msgstr "Benutzerdefiniertes Vokabular, das Beziehungen enthält, die für diese Omeka-Installation definiert wurden." + +#: ItemRelationsPlugin.php:405 +msgid "There was an error in the item relation comments." +msgstr "Es ist ein Fehler in den Objekt-Beziehungs-Kommentaren aufgetreten." + +#: ItemRelationsPlugin.php:433 +msgid "There was an error in listing the item relation." +msgstr "Es ist ein Fehler beim Auflisten der Objekt-Beziehungen aufgetreten." + +#: ItemRelationsPlugin.php:552 ItemRelationsPlugin.php:613 views/admin/common/item-relations-show.php:18 views/public/common/item-relations-show.php:14 views/shared/common/item-relations-advanced-search.php:6 +msgid "Item Relations" +msgstr "Objekt-Beziehungen" + +#: ItemRelationsPlugin.php:556 +msgid "Subjects" +msgstr "Subjekt-Ressourcen" + +#: ItemRelationsPlugin.php:557 formal_vocabularies.php:17 views/shared/common/item-relations-form.php:12 +msgid "Relation" +msgstr "Beziehung" + +#: ItemRelationsPlugin.php:558 views/shared/common/item-relations-advanced-search.php:32 views/shared/common/item-relations-form.php:13 +msgid "Object" +msgstr "Objekt-Ressource" + +#: ItemRelationsPlugin.php:560 views/shared/common/item-relations-form.php:15 views/shared/common/item-relations-form.php:146 +msgid "Comment" +msgstr "Kommentar" + +#: ItemRelationsPlugin.php:566 +msgid "These Items" +msgstr "Diese Objekte" + +#: ItemRelationsPlugin.php:571 +msgid "Item ID" +msgstr "Objekt-ID" + +#: controllers/LookupController.php:163 +msgid "All" +msgstr "Alle" + +#: controllers/VocabulariesController.php:37 +msgid "The vocabulary name already exists. Please choose a different one." +msgstr "Der Vokabular-Name existiert bereits. Bitte wählen Sie einen anderen." + +#: controllers/VocabulariesController.php:47 +msgid "The vocabulary is successfully added." +msgstr "Das Vokabular wurde erfolgreich hinzugefügt." + +#: controllers/VocabulariesController.php:50 +msgid "The vocabulary cannot be added." +msgstr "Das Vokabular konnte nicht hinzugefügt werden." + +#: controllers/VocabulariesController.php:70 controllers/VocabulariesController.php:175 +msgid "The vocabulary was successfully edited." +msgstr "Das Vokabular wurde erfolgreich editiert." + +#: controllers/VocabulariesController.php:73 +msgid "The vocabulary name cannot be empty." +msgstr "Der Vokabular-Name darf nicht leer gelassen werden." + +#: controllers/VocabulariesController.php:154 +msgid "Existing vocabulary properties cannot be added again." +msgstr "Bereits existierende Vokabular-Eigenschaften können nicht erneut hinzugefügt werden." + +#: formal_vocabularies.php:11 +msgid "Relations defined by DCMI Metadata Terms: http://dublincore.org/documents/dcmi-terms/" +msgstr "Beziehungs-Definitionen gemäß DCMI Metadata Terms: http://dublincore.org/documents/dcmi-terms/" + +#: formal_vocabularies.php:18 +msgid "A related resource." +msgstr "Eine verwandte Ressource." + +#: formal_vocabularies.php:22 +msgid "Conforms To" +msgstr "Konform mit" + +#: formal_vocabularies.php:23 +msgid "An established standard to which the described resource conforms." +msgstr "Ein etablierter Standard, mit dem die bezeichnete Ressource konform geht." + +#: formal_vocabularies.php:27 +msgid "Has Format" +msgstr "Enthält Format" + +#: formal_vocabularies.php:28 +msgid "A related resource that is substantially the same as the pre-existing described resource, but in another format." +msgstr "Verwandte Ressource, die i.W. der zuvor existierenden, bezeichneten Ressource entspricht, aber in einem anderen Format." + +#: formal_vocabularies.php:32 +msgid "Has Part" +msgstr "Enthält Teil" + +#: formal_vocabularies.php:33 +msgid "A related resource that is included either physically or logically in the described resource." +msgstr "Verwandte Ressource, die entweder physisch oder logisch in der bezeichneten Ressource enthalten ist." + +#: formal_vocabularies.php:37 +msgid "Has Version" +msgstr "Enthält Version" + +#: formal_vocabularies.php:38 +msgid "A related resource that is a version, edition, or adaptation of the described resource." +msgstr "Verwandte Ressource, die eine Version, Edition oder Adaption der bezeichneten Ressource darstellt." + +#: formal_vocabularies.php:42 +msgid "Is Format Of" +msgstr "Ist Format von" + +#: formal_vocabularies.php:43 +msgid "A related resource that is substantially the same as the described resource, but in another format." +msgstr "Verwandte Ressource, die i.W. der bezeichneten Ressource entspricht, aber in einem anderen Format." + +#: formal_vocabularies.php:47 +msgid "Is Part Of" +msgstr "Ist Teil von" + +#: formal_vocabularies.php:48 +msgid "A related resource in which the described resource is physically or logically included." +msgstr "Verwandte Ressource, in der die bezeichnete Ressource physisch oder logisch enthalten ist." + +#: formal_vocabularies.php:52 +msgid "Is Referenced By" +msgstr "Wird referenziert von" + +#: formal_vocabularies.php:53 +msgid "A related resource that references, cites, or otherwise points to the described resource." +msgstr "Verwandte Ressource, die die bezeichnete Ressource referenziert, zitiert oder anderweitig auf sie verweist." + +#: formal_vocabularies.php:57 +msgid "Is Replaced By" +msgstr "Wird ersetzt von" + +#: formal_vocabularies.php:58 +msgid "A related resource that supplants, displaces, or supersedes the described resource." +msgstr "Verwandte Ressource, die die bezeichnete Ressource ablöst, verdrängt oder ersetzt." + +#: formal_vocabularies.php:62 +msgid "Is Required By" +msgstr "Ist erforderlich durch" + +#: formal_vocabularies.php:63 +msgid "A related resource that requires the described resource to support its function, delivery, or coherence." +msgstr "Verwandte Ressource, die die bezeichnete Ressource für ihre Funktion, Lieferung oder ihre Kohärenz erfordert." + +#: formal_vocabularies.php:67 +msgid "Is Version Of" +msgstr "Ist Version von" + +#: formal_vocabularies.php:68 +msgid "A related resource of which the described resource is a version, edition, or adaptation." +msgstr "Verwandte Ressource, von der die bezeichnete Ressource eine Version, Edition oder Adaption darstellt." + +#: formal_vocabularies.php:72 +msgid "References" +msgstr "Referenziert" + +#: formal_vocabularies.php:73 +msgid "A related resource that is referenced, cited, or otherwise pointed to by the described resource." +msgstr "Verwandte Ressource, die von der bezeichneten Ressource referenziert, zitiert oder anderweitig auf sie verwiesen wird." + +#: formal_vocabularies.php:77 +msgid "Replaces" +msgstr "Ersetzt" + +#: formal_vocabularies.php:78 +msgid "A related resource that is supplanted, displaced, or superseded by the described resource." +msgstr "Verwandte Ressource, die durch die bezeichnete Ressource abgelöst, verdrängt oder ersetzt wird." + +#: formal_vocabularies.php:82 +msgid "Requires" +msgstr "Erfordert" + +#: formal_vocabularies.php:83 +msgid "A related resource that is required by the described resource to support its function, delivery, or coherence." +msgstr "Verwandte Ressource, für die die bezeichnete Ressource für deren Funktion, Lieferung oder ihre Kohärenz erfordert ist." + +#: formal_vocabularies.php:87 +msgid "Source" +msgstr "Quelle" + +#: formal_vocabularies.php:88 +msgid "A related resource from which the described resource is derived." +msgstr "Verwandte Ressource, aus der die bezeichnete Ressource abgeleitet ist." + +#: formal_vocabularies.php:92 +msgid "Abstract" +msgstr "Zusammenfassung" + +#: formal_vocabularies.php:93 +msgid "A summary of the resource." +msgstr "Eine Zusammenfassung der Ressource." + +#: formal_vocabularies.php:97 +msgid "Access Rights" +msgstr "Zugriffsrechte" + +#: formal_vocabularies.php:98 +msgid "Information about who can access the resource or an indication of its security status." +msgstr "Informationen darüber, wer auf die Ressource zugreifen darf, oder ein Hinweis auf ihren Sicherheitsstatus." + +#: formal_vocabularies.php:102 +msgid "Accrual Method" +msgstr "Periodenrechnung" + +#: formal_vocabularies.php:103 +msgid "The method by which items are added to a collection." +msgstr "Eine Methode, durch die Objekte zu einer Kollektion hinzugefügt werden." + +#: formal_vocabularies.php:107 +msgid "Accrual Periodicity" +msgstr "Periodenhäufigkeit" + +#: formal_vocabularies.php:108 +msgid "The frequency with which items are added to a collection." +msgstr "Die Häufigkeit, mit der Objekte zu einer Kollektion hinzugefügt werden." + +#: formal_vocabularies.php:112 +msgid "Accrual Policy" +msgstr "Periodenrichtlinie" + +#: formal_vocabularies.php:113 +msgid "The policy governing the addition of items to a collection." +msgstr "Richtlinie, die das Hinzufügen von Objekten zu einer Kollektion regelt." + +#: formal_vocabularies.php:117 +msgid "Audience" +msgstr "Zielgruppe" + +#: formal_vocabularies.php:118 +msgid "A class of entity for whom the resource is intended or useful." +msgstr "Eine Klasse von Personen oder Organisationen, für die die Ressource gedacht bzw. nützlich ist." + +#: formal_vocabularies.php:122 +msgid "Contributor" +msgstr "Mitarbeiter" + +#: formal_vocabularies.php:123 +msgid "An entity responsible for making contributions to the resource." +msgstr "Eine Person oder Organisation, die verantwortlich ist für die Mitwirkung an dieser Ressource." + +#: formal_vocabularies.php:127 +msgid "Coverage" +msgstr "Abdeckung" + +#: formal_vocabularies.php:128 +msgid "The spatial or temporal topic of the resource, the spatial applicability of the resource, or the jurisdiction under which the resource is relevant." +msgstr "Das räumliche oder zeitliche Rahmen der Ressource, die räumliche Anwendbarkeit der Ressource, oder der Zuständigkeitsbereich, für die die Ressource relevant ist." + +#: formal_vocabularies.php:132 +msgid "Creator" +msgstr "Urheber" + +#: formal_vocabularies.php:133 +msgid "An entity primarily responsible for making the resource." +msgstr "Die Person oder Organisation, die hauptverantwortlich für die Erstellung der Ressource ist." + +#: formal_vocabularies.php:137 views/admin/vocabularies/browse.php:14 views/admin/vocabularies/edit.php:18 views/admin/vocabularies/show.php:36 +msgid "Description" +msgstr "Beschreibung" + +#: formal_vocabularies.php:138 +msgid "An account of the resource." +msgstr "Ein Bericht über die Ressource." + +#: formal_vocabularies.php:142 +msgid "Audience Education Level" +msgstr "Zielgruppen-Bildungsgrad" + +#: formal_vocabularies.php:143 +msgid "A class of entity, defined in terms of progression through an educational or training context, for which the described resource is intended." +msgstr "Eine Klasse von Personen oder Organisationen, definiert in Hinblick auf deren Bildungs- oder Ausbildungsfortschritt, für den die bezeichnete Ressource gedacht ist." + +#: formal_vocabularies.php:147 +msgid "Extent" +msgstr "Umfang" + +#: formal_vocabularies.php:148 +msgid "The size or duration of the resource." +msgstr "Die Größe oder die Zeitdauer der Ressource." + +#: formal_vocabularies.php:152 +msgid "Format" +msgstr "Format" + +#: formal_vocabularies.php:153 +msgid "The file format, physical medium, or dimensions of the resource." +msgstr "Das Dateiformat, das physische Medium oder die räumlichen Ausmaße der Ressource." + +#: formal_vocabularies.php:157 +msgid "Instructional Method" +msgstr "Lehrmethode" + +#: formal_vocabularies.php:158 +msgid "A process, used to engender knowledge, attitudes and skills, that the described resource is designed to support." +msgstr "Ein Prozess, der dazu verwendet wird, Wissen, Einstellungen und Fertigkeiten hervorzubringen, zu dessen Unterstützung die bezeichnete Ressource entwickelt wurde." + +#: formal_vocabularies.php:162 +msgid "Language" +msgstr "Sprache" + +#: formal_vocabularies.php:163 +msgid "A language of the resource." +msgstr "Die Sprache der Ressource." + +#: formal_vocabularies.php:167 +msgid "License" +msgstr "Lizenz" + +#: formal_vocabularies.php:168 +msgid "A legal document giving official permission to do something with the resource." +msgstr "Eine Rechtsurkunde, die die Berechtigung erteilt, die Ressource auf eine bestimmte Weise zu nutzen." + +#: formal_vocabularies.php:172 +msgid "Mediator" +msgstr "Vermittler" + +#: formal_vocabularies.php:173 +msgid "An entity that mediates access to the resource and for whom the resource is intended or useful." +msgstr "Eine Person oder Organisation, die für den- oder diejenigen den Zugriff auf die Ressource vermittelt, für den die Ressource gedacht und nützlich ist." + +#: formal_vocabularies.php:177 +msgid "Medium" +msgstr "Medium" + +#: formal_vocabularies.php:178 +msgid "The material or physical carrier of the resource." +msgstr "Das Material oder das physische Trägermedium der Ressource." + +#: formal_vocabularies.php:182 +msgid "Provenance" +msgstr "Herkunft" + +#: formal_vocabularies.php:183 +msgid "A statement of any changes in ownership and custody of the resource since its creation that are significant for its authenticity, integrity, and interpretation." +msgstr "Eine Aussage über jedwede Änderung der Eigentümerschaft der Ressource seit ihrer Erstellung, die Bedeutung für ihre Authentizität, Richtigkeit und Deutung besitzt." + +#: formal_vocabularies.php:187 +msgid "Publisher" +msgstr "Verleger" + +#: formal_vocabularies.php:188 +msgid "An entity responsible for making the resource available." +msgstr "Eine Person oder Organisation, die verantwortlich für die Verfügbarkeit der Ressource ist." + +#: formal_vocabularies.php:192 +msgid "Rights" +msgstr "Rechte" + +#: formal_vocabularies.php:193 +msgid "Information about rights held in and over the resource." +msgstr "Informationen über die Rechte, die im Rahmen oder hinsichtlich der Ressource gehalten werden." + +#: formal_vocabularies.php:197 +msgid "Rights Holder" +msgstr "Rechteinhaber" + +#: formal_vocabularies.php:198 +msgid "A person or organization owning or managing rights over the resource." +msgstr "Eine Person oder Organisation, die die Rechte über die Ressource besitzt oder verwaltet." + +#: formal_vocabularies.php:202 +msgid "Spatial Coverage" +msgstr "Räumlicher Umfang" + +#: formal_vocabularies.php:203 +msgid "Spatial characteristics of the resource." +msgstr "Räumliche Charakteristiken der Ressource." + +#: formal_vocabularies.php:207 +msgid "Subject" +msgstr "Subjekt-Ressource" + +#: formal_vocabularies.php:208 +msgid "The topic of the resource." +msgstr "Das Thema der Ressource." + +#: formal_vocabularies.php:212 +msgid "Table Of Contents" +msgstr "Inhaltsverzeichnis" + +#: formal_vocabularies.php:213 +msgid "A list of subunits of the resource." +msgstr "Eine Liste der Untereinheiten der Ressource." + +#: formal_vocabularies.php:217 +msgid "Temporal Coverage" +msgstr "Zeitlicher Umfang" + +#: formal_vocabularies.php:218 +msgid "Temporal characteristics of the resource." +msgstr "Zeitliche Charakteristiken der Ressource." + +#: formal_vocabularies.php:222 +msgid "Type" +msgstr "Typ" + +#: formal_vocabularies.php:223 +msgid "The nature or genre of the resource." +msgstr "Die Art oder das Genre der Ressource." + +#: formal_vocabularies.php:229 +msgid "Relations defined by the Bibliographic Ontology (BIBO): http://bibotools.googlecode.com/svn/bibo-ontology/trunk/doc/index.html" +msgstr "Beziehungsdefinitionen gemäß Bibliographic Ontology (BIBO): http://bibotools.googlecode.com/svn/bibo-ontology/trunk/doc/index.html" + +#: formal_vocabularies.php:235 +msgid "annotates" +msgstr "kommentiert" + +#: formal_vocabularies.php:236 +msgid "Critical or explanatory note for a Document." +msgstr "Kritische oder erklärende Notiz für ein Dokument." + +#: formal_vocabularies.php:240 +msgid "cited by" +msgstr "zitiert von" + +#: formal_vocabularies.php:241 +msgid "Relates a document to another document that cites the first document." +msgstr "Setzt ein Dokument mit einem anderen Dokument in Beziehung, das ersteres Dokument zitiert." + +#: formal_vocabularies.php:245 +msgid "cites" +msgstr "zitiert" + +#: formal_vocabularies.php:246 +msgid "Relates a document to another document that is cited by the first document as reference, comment, review, quotation or for another purpose." +msgstr "Setzt ein Dokument mit einem anderen Dokument in Beziehung, das von ersterem Dokument referenziert, kommentiert, rezensiert, zitiert oder auf andere Weise genannt wird." + +#: formal_vocabularies.php:250 +msgid "review of" +msgstr "Rezension von" + +#: formal_vocabularies.php:251 +msgid "Relates a review document to a reviewed thing (resource, item, etc.)." +msgstr "Bezieht eine Rezension auf ein referenziertes Objekt (Ressource, Gegenstand etc.)." + +#: formal_vocabularies.php:255 +msgid "reproduced in" +msgstr "Reproduziert in" + +#: formal_vocabularies.php:256 +msgid "The resource in which another resource is reproduced." +msgstr "Die Ressource, in der eine andere Ressource wiedergegeben wird." + +#: formal_vocabularies.php:260 +msgid "affirmed by" +msgstr "Bestätigt von" + +#: formal_vocabularies.php:261 +msgid "A legal decision that affirms a ruling." +msgstr "Ein Rechtsentscheid, der eine Regelung bestätigt." + +#: formal_vocabularies.php:265 +msgid "reversed by" +msgstr "Aufgehoben von" + +#: formal_vocabularies.php:266 +msgid "A legal decision that reverses a ruling." +msgstr "Ein Rechtsentscheid, der eine Regelung aufhebt." + +#: formal_vocabularies.php:270 +msgid "subsequent legal decision" +msgstr "Späterer Rechtsentscheid" + +#: formal_vocabularies.php:271 +msgid "A legal decision on appeal that takes action on a case (affirming it, reversing it, etc.)." +msgstr "Eine Rechtsentscheid-Revision, die weitere Schritte einleitet (bestätigen, aufheben, etc.)." + +#: formal_vocabularies.php:275 +msgid "transcript of" +msgstr "Abschrift von" + +#: formal_vocabularies.php:276 +msgid "Relates a document to some transcribed original." +msgstr "Bezieht ein Dokument auf ein niedergeschriebenes Original." + +#: formal_vocabularies.php:280 formal_vocabularies.php:601 +msgid "translation of" +msgstr "Übersetzung von" + +#: formal_vocabularies.php:281 +msgid "Relates a translated document to the original document." +msgstr "Bezieht ein übersetztes Dokument auf das Original-Dokument." + +#: formal_vocabularies.php:287 +msgid "Relations defined by the Friend of a Friend vocabulary (FOAF): http://xmlns.com/foaf/spec/" +msgstr "Beziehungs-Definitionen gemäß Friend of a Friend Vokabular (FOAF): http://xmlns.com/foaf/spec/" + +#: formal_vocabularies.php:293 +msgid "based near" +msgstr "In der Nähe von" + +#: formal_vocabularies.php:294 +msgid "A location that something is based near, for some broadly human notion of near." +msgstr "Ein Ort, der im weitesten Sinne in der Nähe von etwas liegt." + +#: formal_vocabularies.php:298 +msgid "depiction" +msgstr "Abbildung" + +#: formal_vocabularies.php:299 +msgid "A depiction of some thing." +msgstr "Die Abbildung von etwas." + +#: formal_vocabularies.php:303 +msgid "depicts" +msgstr "stellt dar" + +#: formal_vocabularies.php:304 +msgid "A thing depicted in this representation." +msgstr "Etwas ist in dieser Repräsentation abgebildet." + +#: formal_vocabularies.php:308 +msgid "funded by" +msgstr "gegründet von" + +#: formal_vocabularies.php:309 +msgid "An organization funding a project or person." +msgstr "Eine Organisation, die ein Projekt oder eine Person finanziert." + +#: formal_vocabularies.php:313 +msgid "image" +msgstr "Bild" + +#: formal_vocabularies.php:314 +msgid "An image that can be used to represent some thing (ie. those depictions which are particularly representative of something, eg. one's photo on a homepage)." +msgstr "Ein Bild, das dazu verwendet werden kann, etwas zu repräsentieren (d.h. solcherlei Darstellungen, die besonders repräsentativ für etwas sind, beispielsweise das Porträtfoto auf einer Homepage)." + +#: formal_vocabularies.php:318 +msgid "is primary topic of" +msgstr "ist Hauptthema von" + +#: formal_vocabularies.php:319 +msgid "A document that this thing is the primary topic of." +msgstr "Ein Dokument, dessen Hauptthema etwas ist." + +#: formal_vocabularies.php:323 +msgid "knows" +msgstr "weiß" + +#: formal_vocabularies.php:324 +msgid "A person known by this person (indicating some level of reciprocated interaction between the parties)." +msgstr "Eine andere Person, die diese Person kennt (was auf eine gegenseitige Interaktion zwischen beiden Parteien hindeutet)." + +#: formal_vocabularies.php:328 +msgid "logo" +msgstr "Logo" + +#: formal_vocabularies.php:329 +msgid "A logo representing some thing." +msgstr "Ein Logo, das etwas repräsentiert." + +#: formal_vocabularies.php:333 +msgid "made" +msgstr "hergestellt" + +#: formal_vocabularies.php:334 +msgid "Something that was made by this agent." +msgstr "Etwas, das von diesem Akteur hergestellt worden ist." + +#: formal_vocabularies.php:338 +msgid "maker" +msgstr "Hersteller" + +#: formal_vocabularies.php:339 +msgid "An agent that made this thing." +msgstr "Ein Akteur, der dieses Objekt hergestellt hat." + +#: formal_vocabularies.php:343 +msgid "member" +msgstr "Mitglied" + +#: formal_vocabularies.php:344 +msgid "Indicates a member of a Group." +msgstr "Deutet auf ein Mitglied einer Gruppe hin." + +#: formal_vocabularies.php:348 +msgid "page" +msgstr "Seite" + +#: formal_vocabularies.php:349 +msgid "A page or document about this thing." +msgstr "Eine Seite oder ein Dokument über dieses Objekt." + +#: formal_vocabularies.php:353 +msgid "primary topic" +msgstr "Hauptthema" + +#: formal_vocabularies.php:354 +msgid "The primary topic of some page or document." +msgstr "Das Hauptthema einer Seite oder eines Dokuments." + +#: formal_vocabularies.php:358 +msgid "thumbnail" +msgstr "Miniaturansicht" + +#: formal_vocabularies.php:359 +msgid "A derived thumbnail image." +msgstr "Eine abgeleitete Miniaturansicht eines Bildes." + +#: formal_vocabularies.php:365 +msgid "Relations defined by the Functional Requirements for Bibliographic Records (FRBR): http://vocab.org/frbr/core.html" +msgstr "Beziehungsdefinitionen gemäß Functional Requirements for Bibliographic Records (FRBR): http://vocab.org/frbr/core.html" + +#: formal_vocabularies.php:371 +msgid "abridgement" +msgstr "Kurzfassung" + +#: formal_vocabularies.php:372 +msgid "A property representing an abridgment of an expression." +msgstr "Eigenschaft, die eine verkürzte Fassung einer Aussage darstellt." + +#: formal_vocabularies.php:376 +msgid "abridgement of" +msgstr "Kurzfassung von" + +#: formal_vocabularies.php:377 +msgid "A property representing an expression that is abridged." +msgstr "Eigenschaft, die eine verkürzte Aussage darstellt." + +#: formal_vocabularies.php:381 +msgid "adaption" +msgstr "Adaption" + +#: formal_vocabularies.php:382 +msgid "A property representing an adaption of a work or expression." +msgstr "Eigenschaft, die eine Ableitung eines Werks oder einer Aussage darstellt." + +#: formal_vocabularies.php:386 +msgid "adaption of" +msgstr "Adaption von" + +#: formal_vocabularies.php:387 +msgid "A property representing a work or expression that is adapted." +msgstr "Eigenschaft, die eine abgeleitetes Werk oder eine abgeleitete Aussage darstellt." + +#: formal_vocabularies.php:391 +msgid "alternate" +msgstr "Alternative" + +#: formal_vocabularies.php:392 +msgid "A property representing an alternative to a manifestation." +msgstr "Eigenschaft, die die die Alternative zu einer Erscheinungsform darstellt." + +#: formal_vocabularies.php:396 +msgid "alternate of" +msgstr "Alternative von" + +#: formal_vocabularies.php:397 +msgid "A property representing a manifestation that is alternated." +msgstr "Eigenschaft, die die eine alternative Erscheinungsform darstellt." + +#: formal_vocabularies.php:401 +msgid "arrangement" +msgstr "Anordnung" + +#: formal_vocabularies.php:402 +msgid "A property representing an arrangement of an expression." +msgstr "Eigenschaft, die eine Anordnung einer Aussage darstellt. " + +#: formal_vocabularies.php:406 +msgid "arrangement of" +msgstr "Anordnung von" + +#: formal_vocabularies.php:407 +msgid "A property representing an expression that is arranged." +msgstr "Eigenschaft, die eine angeordnete Aussage darstellt." + +#: formal_vocabularies.php:411 +msgid "complement" +msgstr "Gegenteil" + +#: formal_vocabularies.php:412 +msgid "A property representing a complement to a work or expression." +msgstr "Eigenschaft, die das Gegenteil einer Arbeit oder einer Aussage darstellt." + +#: formal_vocabularies.php:416 +msgid "complement of" +msgstr "Gegenteil von" + +#: formal_vocabularies.php:417 +msgid "A property representing a work or expression that is complemented." +msgstr "Eigenschaft, die eine gegenteilige Arbeit oder Aussage darstellt." + +#: formal_vocabularies.php:421 +msgid "creator" +msgstr "Erschaffer" + +#: formal_vocabularies.php:422 +msgid "A property representing an entity in some way responsible for the creation of a work." +msgstr "Eigenschaft, die die Körperschaft darstellt, die in bestimmter Weise für die Herstellung eines Werks verantwortlich ist." + +#: formal_vocabularies.php:426 +msgid "creator of" +msgstr "Erschaffen von" + +#: formal_vocabularies.php:427 +msgid "A property representing a work that was in some way created by of an entity." +msgstr "Eigenschaft, die ein Werk darstellt, das in bestimmter Weise von einer Körperschaft hergestellt worden ist." + +#: formal_vocabularies.php:431 +msgid "embodiment" +msgstr "Verkörperung" + +#: formal_vocabularies.php:432 +msgid "A property representing a manifestation that embodies an expression." +msgstr "Eigenschaft, die eine Erscheinungsform darstellt, die eine Aussage verkörpert." + +#: formal_vocabularies.php:436 +msgid "embodiment of" +msgstr "Verkörperung von" + +#: formal_vocabularies.php:437 +msgid "A property representing an expression that is embodied by a manifestation." +msgstr "Eigenschaft, die eine Aussage verkörpert, die durch eine Erscheinungsform dargestellt wird." + +#: formal_vocabularies.php:441 +msgid "exemplar" +msgstr "Muster" + +#: formal_vocabularies.php:442 +msgid "A property representing an item that is an exemplar of a manifestation." +msgstr "Eigenschaft, die einen Gegenstand repräsentiert, die ein Muster einer Erscheinungsform darstellt." + +#: formal_vocabularies.php:446 +msgid "exemplar of" +msgstr "Muster von" + +#: formal_vocabularies.php:447 +msgid "A property representing the manifestation that is exemplified by a item." +msgstr "Eigenschaft, die eine Erscheinungsform darstellt, die ein Muster eines Gegenstandes repräsentiert." + +#: formal_vocabularies.php:451 +msgid "imitation" +msgstr "Nachahmung" + +#: formal_vocabularies.php:452 +msgid "A property representing an imitation of a work or expression." +msgstr "Eigenschaft, die eine Nachahmung eines Werks oder eines Ausdrucks darstellt." + +#: formal_vocabularies.php:456 +msgid "imitation of" +msgstr "Nachahmung von" + +#: formal_vocabularies.php:457 +msgid "A property representing a work or expression that is imitated." +msgstr "Eigenschaft, die ein nachgeahmtes Werk oder eine nachgeahmte Aussage darstellt." + +#: formal_vocabularies.php:461 +msgid "owner" +msgstr "Besitzer" + +#: formal_vocabularies.php:462 +msgid "A property representing an entity that owns an item." +msgstr "Eigenschaft, die eine Körperschaft darstellt, die einen Gegenstand besitzt." + +#: formal_vocabularies.php:466 +msgid "owner of" +msgstr "Besitzer von" + +#: formal_vocabularies.php:467 +msgid "A property representing an item that is in some way owned an entity." +msgstr "Eigenschaft, die einen Gegenstand darstellt, die eine Körperschaft besitzt." + +#: formal_vocabularies.php:471 +msgid "part" +msgstr "Teil" + +#: formal_vocabularies.php:472 +msgid "A property representing a part of an endeavour." +msgstr "Eigenschaft, die einen Teil einer Aufgabe darstellt." + +#: formal_vocabularies.php:476 +msgid "part of" +msgstr "Teil von" + +#: formal_vocabularies.php:477 +msgid "A property representing an endeavour incorporating an endeavour." +msgstr "Eigenschaft, die eine Aufgabe einschließlich einer Unter-Aufgabe darstellt." + +#: formal_vocabularies.php:481 +msgid "producer" +msgstr "Produzent" + +#: formal_vocabularies.php:482 +msgid "A property representing an entity in some way responsible for producing a manifestation." +msgstr "Eigenschaft, die die Körperschaft darstellt, die in bestimmter Weise für die Produktion eines Werks verantwortlich ist." + +#: formal_vocabularies.php:486 +msgid "producer of" +msgstr "Produzent von" + +#: formal_vocabularies.php:487 +msgid "A property representing a manifestation that was in some way produced an entity." +msgstr "Eigenschaft, die ein Werk darstellt, das in bestimmter Weise von einer Körperschaft produziert worden ist." + +#: formal_vocabularies.php:491 +msgid "realization" +msgstr "Ausführung" + +#: formal_vocabularies.php:492 +msgid "A property representing an expression that is an intellectual or artistic realization of a work." +msgstr "Eigenschaft, die eine Aussage repräsentiert, die eine intellektuelle oder künstlerische Ausführung einer Arbeit bildet." + +#: formal_vocabularies.php:496 +msgid "realization of" +msgstr "Ausführung von" + +#: formal_vocabularies.php:497 +msgid "A property representing the work that has been realized by an expression." +msgstr "Eigenschaft, die eine Arbeit repräsentiert, die durch eine Aussage ausgeführt wurde." + +#: formal_vocabularies.php:501 +msgid "realizer" +msgstr "Ausführender" + +#: formal_vocabularies.php:502 +msgid "A property representing an entity in some way responsible for realizing an expression." +msgstr "Eigenschaft, die eine Körperschaft repräsentiert, die in bestimmter Weise für die Ausführung einer Aussage verantwortlich ist." + +#: formal_vocabularies.php:506 +msgid "realizer of" +msgstr "Ausführender von" + +#: formal_vocabularies.php:507 +msgid "A property representing an expression that was in some way realized by an entity." +msgstr "Eigenschaft, die eine Aussage repräsentiert, die in bestimmter Weise durch eine Körperschaft ausgeführt wurde." + +#: formal_vocabularies.php:511 +msgid "reconfiguration" +msgstr "Umgestaltung" + +#: formal_vocabularies.php:512 +msgid "A property representing a recongifuration of an item." +msgstr "Eigenschaft, die eine Umgestaltung eines Gegenstandes repräsentiert." + +#: formal_vocabularies.php:516 +msgid "reconfiguration of" +msgstr "Umgestaltung von" + +#: formal_vocabularies.php:517 +msgid "A property representing an item that is reconfigured." +msgstr "Eigenschaft, die einen Gegenstand repräsentiert, der umgestaltet wird." + +#: formal_vocabularies.php:521 +msgid "related endeavour" +msgstr "Verwandte Aufgabe" + +#: formal_vocabularies.php:522 +msgid "A property representing another endeavour that is related in some way to an endeavour." +msgstr "Eigenschaft, die eine andere Aufgabe repräsentiert, die in bestimmter Weise mit einer Aufgabe verwandt ist." + +#: formal_vocabularies.php:526 +msgid "reproduction" +msgstr "Reproduktion" + +#: formal_vocabularies.php:527 +msgid "A property representing a reproduction of a manifestation or item." +msgstr "Eigenschaft, die eine Reproduktion eines Werkes oder eines Gegenstandes repräsentiert." + +#: formal_vocabularies.php:531 +msgid "reproduction of" +msgstr "Reproduktion von" + +#: formal_vocabularies.php:532 +msgid "A property representing a manifestation or item that is reproduced." +msgstr "Eigenschaft, die ein Werk oder einen Gegenstand repräsentiert, der reproduziert wird." + +#: formal_vocabularies.php:536 +msgid "responsible entity" +msgstr "Verantwortliche Körperschaft" + +#: formal_vocabularies.php:537 +msgid "A property representing an entity in some way responsible for an endeavour." +msgstr "Eigenschaft, die eine Körperschaft repräsentiert, die auf bestimmte Weise verantwortlich für eine Aufgabe ist." + +#: formal_vocabularies.php:541 +msgid "responsible entity of" +msgstr "Verantwortliche Körperschaft von" + +#: formal_vocabularies.php:542 +msgid "A property representing an endeavour that is the responsibility of an entity." +msgstr "Eigenschaft, die eine Aufgabe repräsentiert, für die eine Körperschaft verantwortlich ist." + +#: formal_vocabularies.php:546 +msgid "revision" +msgstr "Überarbeitung" + +#: formal_vocabularies.php:547 +msgid "A property representing a revision of an expression." +msgstr "Eigenschaft, die eine Überarbeitung eines Ausdrucks repräsentiert." + +#: formal_vocabularies.php:551 +msgid "revision of" +msgstr "Überarbeitung von" + +#: formal_vocabularies.php:552 +msgid "A property representing an expression that is revised." +msgstr "Eigenschaft, die einen Ausdruck repräsentiert, der überarbeitet wird." + +#: formal_vocabularies.php:556 +msgid "successor" +msgstr "Nachfolger" + +#: formal_vocabularies.php:557 +msgid "A property representing a successor to a work or expression." +msgstr "Eigenschaft, die einen Nachfolger bezüglich einer Arbeit oder eines Ausdrucks repräsentiert." + +#: formal_vocabularies.php:561 +msgid "successor of" +msgstr "Nachfolger von" + +#: formal_vocabularies.php:562 +msgid "A property representing a work or expression that is succeeded." +msgstr "Eigenschaft, die eine Arbeit oder einen Ausdruck repräsentiert, auf den nachgefolgt wird." + +#: formal_vocabularies.php:566 +msgid "summarization" +msgstr "Zusammenfassung" + +#: formal_vocabularies.php:567 +msgid "A property representing a summarization of a work or expression." +msgstr "Eigenschaft, die eine Zusammenfassung einer Arbeit oder eines Ausdrucks repräsentiert." + +#: formal_vocabularies.php:571 +msgid "summarization of" +msgstr "Zusammenfassung von" + +#: formal_vocabularies.php:572 +msgid "A property representing a work or expression that is summarized." +msgstr "Eigenschaft, die eine Arbeit oder einen Ausdruck repräsentiert, der zusammengefasst wird." + +#: formal_vocabularies.php:576 +msgid "supplement" +msgstr "Ergänzung" + +#: formal_vocabularies.php:577 +msgid "A property representing a supplement to a work or expression." +msgstr "Eigenschaft, die eine Ergänzung eines Werks oder eines Ausdrucks repräsentiert." + +#: formal_vocabularies.php:581 +msgid "supplement of" +msgstr "Ergänzung von" + +#: formal_vocabularies.php:582 +msgid "A property representing a work or expression that is supplemented." +msgstr "Eigenschaft, die ein Werk oder einen Ausdruck repräsentiert, der ergänzt wird." + +#: formal_vocabularies.php:586 +msgid "transformation" +msgstr "Umgestaltung" + +#: formal_vocabularies.php:587 +msgid "A property representing a transformation of a work or expression." +msgstr "Eigenschaft, die eine Umgestaltung eines Werks oder eines Ausdrucks repräsentiert." + +#: formal_vocabularies.php:591 +msgid "transformation of" +msgstr "Umgestaltung von" + +#: formal_vocabularies.php:592 +msgid "A property representing a work or expression that is transformed." +msgstr "Eigenschaft, die eine Arbeit oder einen Ausdruck repräsentiert, der umgestaltet wird." + +#: formal_vocabularies.php:596 +msgid "translation" +msgstr "Übersetzung" + +#: formal_vocabularies.php:597 +msgid "A property representing a translation of an expression." +msgstr "Eigenschaft, die eine Übersetzung eines Ausdrucks repräsentiert." + +#: formal_vocabularies.php:602 +msgid "A property representing an expression that is translated." +msgstr "Eigenschaft, die einen Ausdruck repräsentiert, der übersetzt wird." + +#: models/ItemRelationsProperty.php:62 +msgid "[unknown]" +msgstr "[unbekannt]" + +#: views/admin/common/item-relations-show.php:21 views/public/common/item-relations-show.php:16 +msgid "This item has no relations." +msgstr "Dieses Objekt besitzt keine Beziehungen." + +#: views/admin/plugins/item-relations-config-form.php:1 +msgid "Input" +msgstr "Eingabe" + +#: views/admin/plugins/item-relations-config-form.php:5 +msgid "Limit Relations to Vocabularies" +msgstr "Beziehungen auf Vokabulare beschränken" + +#: views/admin/plugins/item-relations-config-form.php:10 +msgid "Check the vocabularies that can be used to set relations." +msgstr "Markieren Sie die Vokabulare, die in Beziehungen verwendet werden können." + +#: views/admin/plugins/item-relations-config-form.php:11 +msgid "If none is checked, all vocabularies will be allowed." +msgstr "Wenn kein Vokabular markiert ist, sind alle zugelassen." + +#: views/admin/plugins/item-relations-config-form.php:41 +msgid "Provide comment field for relations" +msgstr "Kommentarfeld für Relationen anbieten" + +#: views/admin/plugins/item-relations-config-form.php:46 +msgid "Check this if you want to be able to enter a comment to a relation." +msgstr "Aktivieren Sie diese Einstellung, wenn Sie zu einer Relation einen Kommentar eingeben möchten." + +#: views/admin/plugins/item-relations-config-form.php:54 +msgid "Display" +msgstr "Anzeige" + +#: views/admin/plugins/item-relations-config-form.php:58 +msgid "Relation Format" +msgstr "Beziehungs-Format" + +#: views/admin/plugins/item-relations-config-form.php:63 +msgid "Select the format of an item's relations that you would prefer to show. If one is unavailable the other will be used." +msgstr "Wählen Sie das Format einer Objekt-Beziehung, die Sie vornehmlich anzeigen möchten. Ist eine davon nicht verfügbar, wird die andere verwendet." + +#: views/admin/plugins/item-relations-config-form.php:69 +msgid "prefix:localPart" +msgstr "Präfix:Lokaler Teil" + +#: views/admin/plugins/item-relations-config-form.php:70 +msgid "label" +msgstr "Bezeichnung" + +#: views/admin/plugins/item-relations-config-form.php:77 +msgid "Display position in admin view" +msgstr "Anzeigeposition in Admin-Ansicht" + +#: views/admin/plugins/item-relations-config-form.php:82 +msgid "Select the position where you would prefer to display the relations in admin view: In the side bar in the lower right (default) or underneath the regular field values to the left." +msgstr "Wählen Sie die Anzeigeposition, die Sie für die Beziehungen in der Admin-Ansicht bevorzugen: In der Seitenleiste unten rechts (Default) oder unterhalb der regulären Feldern auf der linken Seite." + +#: views/admin/plugins/item-relations-config-form.php:88 +msgid "Side bar" +msgstr "Seitenleiste" + +#: views/admin/plugins/item-relations-config-form.php:89 +msgid "Main content" +msgstr "Hauptinhalt" + +#: views/admin/plugins/item-relations-config-form.php:96 +msgid "Admin Display Mode" +msgstr "Admin-Anzeigemodus" + +#: views/admin/plugins/item-relations-config-form.php:101 +msgid "Set how to display the list of relations in the admin view." +msgstr "Definieren Sie, wie die Beziehungsliste in der Admin-Ansicht angezeigt werden soll." + +#: views/admin/plugins/item-relations-config-form.php:102 views/admin/plugins/item-relations-config-form.php:137 +msgid "Anyway, the view can be themed." +msgstr "Die Darstellung ist in jedem Fall im Theme definierbar." + +#: views/admin/plugins/item-relations-config-form.php:107 views/admin/plugins/item-relations-config-form.php:142 +msgid "As a table" +msgstr "Als Tabelle" + +#: views/admin/plugins/item-relations-config-form.php:108 views/admin/plugins/item-relations-config-form.php:143 +msgid "As a list" +msgstr "Als Liste" + +#: views/admin/plugins/item-relations-config-form.php:109 views/admin/plugins/item-relations-config-form.php:144 +msgid "By item type" +msgstr "Nach Objekttyp" + +#: views/admin/plugins/item-relations-config-form.php:116 +msgid "Append to Public Items Show" +msgstr "Auf der öffentlichen Seite anzeigen" + +#: views/admin/plugins/item-relations-config-form.php:121 +msgid "Check this if you want to display an item's relations on its public show page." +msgstr "Aktivieren Sie diese Einstellung, wenn Sie die Objekt-Beziehungen auf der öffentlichen Seite anzeigen wollen." + +#: views/admin/plugins/item-relations-config-form.php:131 +msgid "Public Display Mode" +msgstr "Öffentlicher Anzeigemodus" + +#: views/admin/plugins/item-relations-config-form.php:136 +msgid "Set how to display the list of relations in the public view." +msgstr "Definieren Sie, wie die Beziehungsliste in der öffentlichen Ansicht angezeigt werden soll." + +#: views/admin/vocabularies/add.php:2 +msgid "Add New Vocabulary" +msgstr "Neues Vokabular hinzufügen" + +#: views/admin/vocabularies/add.php:6 +msgid "Vocabulary Name" +msgstr "Vokabular-Name" + +#: views/admin/vocabularies/add.php:9 +msgid "Vocabulary Description" +msgstr "Vokabular-Beschreibung" + +#: views/admin/vocabularies/add.php:11 views/admin/vocabularies/show.php:20 +msgid "Save Vocabulary" +msgstr "Vokabular speichern" + +#: views/admin/vocabularies/browse.php:3 views/shared/common/item-relations-form.php:3 +msgid "Browse Vocabularies" +msgstr "Vokabular durchsuchen" + +#: views/admin/vocabularies/browse.php:7 +msgid "Add Vocabulary" +msgstr "Vokabular hinzufügen" + +#: views/admin/vocabularies/browse.php:12 +msgid "Allowed" +msgstr "Zugelassen" + +#: views/admin/vocabularies/browse.php:13 +msgid "Name" +msgstr "Name" + +#: views/admin/vocabularies/browse.php:15 +msgid "Namespace Prefix" +msgstr "Namensraum-Präfix" + +#: views/admin/vocabularies/browse.php:16 +msgid "Namespace URI" +msgstr "Namensraum-URI" + +#: views/admin/vocabularies/browse.php:22 +msgid "Yes" +msgstr "Ja" + +#: views/admin/vocabularies/browse.php:22 +msgid "No" +msgstr "Nein" + +#: views/admin/vocabularies/delete.php:2 views/admin/vocabularies/show.php:23 +msgid "Delete Vocabulary" +msgstr "Vokabular löschen" + +#: views/admin/vocabularies/delete.php:18 +msgid "You have successfully deleted the vocabulary." +msgstr "Sie haben das Vokabular erfolgreich gelöscht." + +#: views/admin/vocabularies/delete.php:21 +msgid "The vocabulary name cannot be deleted" +msgstr "Das Vokabular konnte nicht gelöscht werden." + +#: views/admin/vocabularies/delete.php:29 +msgid "Back" +msgstr "Zurück" + +#: views/admin/vocabularies/edit.php:1 +msgid "Edit Custom Vocabulary" +msgstr "Benutzerdefiniertes Vokabular editieren" + +#: views/admin/vocabularies/edit.php:8 +msgid "Here you can add, edit, and delete properties in your custom vocabulary. Property labels must be unique. You cannot edit property labels once they have been created, so make sure they are spelled correctly and convey the exact relation you want them to convey." +msgstr "Hier können Sie Eigenschaften in das benutzerdefinierte Vokabular hinzufügen, sowie bestehende editieren oder löschen. Die Eigenschafts-Bezeichnungen müssen eindeutig sein. Sie können die Eigenschafts-Bezeichnungen nach dem Anlegen nicht mehr nachträglich editieren. Stellen Sie daher bitte sicher, dass diese fehlerfrei geschrieben sind und die zu definierende Beziehung exakt beschreiben." + +#: views/admin/vocabularies/edit.php:17 views/admin/vocabularies/show.php:35 +msgid "Label" +msgstr "Bezeichnung" + +#: views/admin/vocabularies/edit.php:19 views/shared/common/item-relations-form.php:17 +msgid "Delete" +msgstr "Löschen" + +#: views/admin/vocabularies/edit.php:37 +msgid "Add a Property" +msgstr "Eigenschaft hinzufügen" + +#: views/admin/vocabularies/edit.php:41 +msgid "Save Changes" +msgstr "Änderungen speichern" + +#: views/admin/vocabularies/show.php:2 +msgid "Vocabulary Properties" +msgstr "Vokabular-Eigenschaften" + +#: views/admin/vocabularies/show.php:17 +msgid "Edit Vocabulary" +msgstr "Vokabular editieren" + +#: views/admin/vocabularies/show.php:25 +msgid "This vocabulary has no properties." +msgstr "Dieses Vokabular besitzt keine Eigenschaften." + +#: views/admin/vocabularies/show.php:27 +msgid "Why don't you add some?" +msgstr "Möchten Sie einige hinzufügen?" + +#: views/admin/vocabularies/show.php:34 +msgid "Local Part" +msgstr "Lokaler Teil" + +#: views/helpers/ItemRelationsForm.php:33 views/shared/common/item-relations-form.php:139 +msgid "[Search and Select Below]" +msgstr "[Unten suchen und auswählen]" + +#: views/shared/common/item-relations-advanced-search.php:11 +msgid "Filter this search for items with the selected relation. For example, when selecting \"Subject\" items with the \"hasPart\" relation, the search will return all items that have parts. When selecting \"Object\" items with the same relation, the search will return all items that are parts of other items." +msgstr "Diese Suche auf Objekte mit einer bestimmten Beziehung begrenzen. Wenn Sie z.B. eine „Subjekt-Ressource” mit der „Enthält Teil”-Beziehung auswählen, wird diese Suche alle Objekte auflisten, die Teile enthalten. Wenn Sie eine „Objekt-Ressource“ mit derselben Beziehung auswählen, wird die Suche alle Objekte auflisten, die Teile anderer Objekte sind." + +#: views/shared/common/item-relations-advanced-search.php:22 +msgid "Filter this search for items being \"Subject\" (or \"Object\", respectively) in relations that contain a certain text portion in their comments." +msgstr "Diese Suche auf Objekte einschränken, die „Subjekt-Ressource” (bzw. „Objekt-Ressource”) in Beziehungen sind, die einen bestimmten Text in ihren Kommentaren enthalten." + +#: views/shared/common/item-relations-advanced-search.php:31 views/shared/common/item-relations-form.php:11 +msgid "Subject " +msgstr "Subjekt-Ressource" + +#: views/shared/common/item-relations-form.php:4 +msgid "Here you can relate this item to another item and delete existing relations." +msgstr "Hier können Sie ein Objekt mit einem anderen Objekt in Beziehung setzen oder bestehende Beziehungen löschen." + +#: views/shared/common/item-relations-form.php:5 +#, php-format +msgid "For descriptions of the relations, see the %s page." +msgstr "Für die Beschreibungen der Beziehungen, lesen Sie bitte unter %s weiter." + +#: views/shared/common/item-relations-form.php:6 +msgid "Invalid item IDs will be ignored." +msgstr "Invalid item IDs will be ignored." + +#: views/shared/common/item-relations-form.php:38 views/shared/common/item-relations-form.php:59 views/shared/common/item-relations-form.php:85 views/shared/common/item-relations-show-list.php:16 views/shared/common/item-relations-show-list.php:21 views/shared/common/item-relations-show-table.php:30 views/shared/common/item-relations-show-table.php:37 +msgid "This Item" +msgstr "Dieses Objekt" + +#: views/shared/common/item-relations-form.php:81 +msgid "New Relations" +msgstr "Neue Beziehungen" + +#: views/shared/common/item-relations-form.php:103 +msgid "Delete now" +msgstr "Jetzt löschen" + +#: views/shared/common/item-relations-form.php:108 +msgid "Add a Relation" +msgstr "Eine Beziehung hinzufügen" + +#: views/shared/common/item-relations-form.php:113 +msgid "This Subject" +msgstr "Diese Subjekt-Resource" + +#: views/shared/common/item-relations-form.php:116 +msgid "[New]" +msgstr "[Neu]" + +#: views/shared/common/item-relations-form.php:124 +msgid "Is Related By" +msgstr "steht in Beziehung" + +#: views/shared/common/item-relations-form.php:133 +msgid "With Object" +msgstr "mit Objekt-Resource" + +#: views/shared/common/item-relations-form.php:158 +msgid "Add this Relation" +msgstr "Diese Beziehung hinzufügen" + +#: views/shared/common/item-relations-form.php:162 +msgid "Cancel" +msgstr "Abbrechen" + +#: views/shared/common/item-relations-form.php:168 +msgid "Search and Select a Record" +msgstr "Objekt suchen und auswählen" + +#: views/shared/common/item-relations-form.php:172 +msgid "Create a new Item" +msgstr "Neues Objekt erstellen" + +#: views/shared/common/item-relations-form.php:175 +msgid "Refresh" +msgstr "Aktualisieren" + +#: views/shared/common/item-relations-form.php:180 +msgid "By Item Types" +msgstr "Nach Objekttyp" + +#: views/shared/common/item-relations-form.php:189 +msgid "By Collection" +msgstr "Nach Sammlung" + +#: views/shared/common/item-relations-form.php:199 +msgid "By Partial Title" +msgstr "Nach teilweisem Objekt-Titel" + +#: views/shared/common/item-relations-form.php:206 +msgid "Limit Item IDs (“x” or “x-y”)" +msgstr "Objekt-IDs beschr. („x“ oder „x-y“)" + +#: views/shared/common/item-relations-form.php:216 +msgid "Sort By" +msgstr "Sortieren nach" + +#: views/shared/common/item-relations-form.php:221 +msgid "Most recently updated" +msgstr "Kürzlich bearbeitet" + +#: views/shared/common/item-relations-form.php:225 +msgid "Alphabetically" +msgstr "Alphabetisch" + +#: views/shared/common/item-relations-show-list-by-item-type.php:20 +msgid "Relation from this item" +msgstr "Beziehungen ausgehend von diesem Objekt" + +#: views/shared/common/item-relations-show-list-by-item-type.php:22 +msgid "This item has no relation to other records." +msgstr "Dieses Objekt steht in keiner Beziehung zu anderen Objekten." + +#: views/shared/common/item-relations-show-list-by-item-type.php:27 views/shared/common/item-relations-show-list-by-item-type.php:53 +msgid "No Item Type" +msgstr "Ohne Objekttyp" + +#: views/shared/common/item-relations-show-list-by-item-type.php:46 +msgid "Relations to this item" +msgstr "Beziehungen auf dieses Objekt" + +#: views/shared/common/item-relations-show-list-by-item-type.php:48 +msgid "No record is related to this item." +msgstr "Kein Objekt steht in Beziehung zu diesem Objekt." + +#: views/shared/common/item-relations-show-table.php:5 +msgid "Show / Hide" +msgstr "Ein- / ausblenden" + +#: views/shared/common/item-relations-show-table.php:6 +msgid "Show / Hide All" +msgstr "Alle ein- / ausblenden" diff --git a/languages/template.base.pot b/languages/template.base.pot index 896a46d..ffdfd2e 100644 --- a/languages/template.base.pot +++ b/languages/template.base.pot @@ -7,13 +7,12 @@ msgid "" msgstr "" "Project-Id-Version: Item Relations\n" -"Report-Msgid-Bugs-To: http://github.com/omeka/plugin-ItemRelations/issues\n" +"Report-Msgid-Bugs-To: http://github.com/GerZah/plugin-ItemRelations/issues\n" "POT-Creation-Date: 2014-01-13 12:59-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" +"Last-Translator: Gero Zahn\n" +"Language-Team: English (https://www.transifex.com/upb/wesa-omeka/language/en/)\n" +"Language: en\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" - diff --git a/languages/template.pot b/languages/template.pot index 8754c1b..baf1e12 100644 --- a/languages/template.pot +++ b/languages/template.pot @@ -7,105 +7,1273 @@ msgid "" msgstr "" "Project-Id-Version: Item Relations\n" -"Report-Msgid-Bugs-To: http://github.com/omeka/plugin-ItemRelations/issues\n" +"Report-Msgid-Bugs-To: http://github.com/GerZah/plugin-ItemRelations/issues\n" "POT-Creation-Date: 2014-01-13 12:59-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" +"Last-Translator: Gero Zahn\n" +"Language-Team: English (https://www.transifex.com/upb/wesa-omeka/language/" +"en/)\n" +"Language: en\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ItemRelationsPlugin.php:357 ItemRelationsPlugin.php:407 -#: views/admin/common/item-relations-show.php:2 -#: views/public/common/item-relations-show.php:2 -#: views/shared/common/item-relations-advanced-search.php:3 +#: ItemRelationsPlugin.php:127 +msgid "Custom" +msgstr "" + +#: ItemRelationsPlugin.php:128 +msgid "Custom vocabulary containing relations defined for this Omeka instance." +msgstr "" + +#: ItemRelationsPlugin.php:405 +msgid "There was an error in the item relation comments." +msgstr "" + +#: ItemRelationsPlugin.php:433 +msgid "There was an error in listing the item relation." +msgstr "" + +#: ItemRelationsPlugin.php:552 ItemRelationsPlugin.php:613 +#: views/admin/common/item-relations-show.php:18 +#: views/public/common/item-relations-show.php:14 +#: views/shared/common/item-relations-advanced-search.php:6 msgid "Item Relations" msgstr "" -#: ItemRelationsPlugin.php:361 -msgid "Subjects" +#: ItemRelationsPlugin.php:556 +msgid "Subjects" +msgstr "" + +#: ItemRelationsPlugin.php:557 formal_vocabularies.php:17 +#: views/shared/common/item-relations-form.php:12 +msgid "Relation" +msgstr "" + +#: ItemRelationsPlugin.php:558 +#: views/shared/common/item-relations-advanced-search.php:32 +#: views/shared/common/item-relations-form.php:13 +msgid "Object" +msgstr "" + +#: ItemRelationsPlugin.php:560 views/shared/common/item-relations-form.php:15 +#: views/shared/common/item-relations-form.php:146 +msgid "Comment" +msgstr "" + +#: ItemRelationsPlugin.php:566 +msgid "These Items" +msgstr "" + +#: ItemRelationsPlugin.php:571 +msgid "Item ID" +msgstr "" + +#: controllers/LookupController.php:163 +msgid "All" +msgstr "" + +#: controllers/VocabulariesController.php:37 +msgid "The vocabulary name already exists. Please choose a different one." +msgstr "" + +#: controllers/VocabulariesController.php:47 +msgid "The vocabulary is successfully added." +msgstr "" + +#: controllers/VocabulariesController.php:50 +msgid "The vocabulary cannot be added." +msgstr "" + +#: controllers/VocabulariesController.php:70 +#: controllers/VocabulariesController.php:175 +msgid "The vocabulary was successfully edited." +msgstr "" + +#: controllers/VocabulariesController.php:73 +msgid "The vocabulary name cannot be empty." +msgstr "" + +#: controllers/VocabulariesController.php:154 +msgid "Existing vocabulary properties cannot be added again." +msgstr "" + +#: formal_vocabularies.php:11 +msgid "" +"Relations defined by DCMI Metadata Terms: http://dublincore.org/documents/" +"dcmi-terms/" +msgstr "" + +#: formal_vocabularies.php:18 +msgid "A related resource." +msgstr "" + +#: formal_vocabularies.php:22 +msgid "Conforms To" +msgstr "" + +#: formal_vocabularies.php:23 +msgid "An established standard to which the described resource conforms." +msgstr "" + +#: formal_vocabularies.php:27 +msgid "Has Format" +msgstr "" + +#: formal_vocabularies.php:28 +msgid "" +"A related resource that is substantially the same as the pre-existing " +"described resource, but in another format." +msgstr "" + +#: formal_vocabularies.php:32 +msgid "Has Part" +msgstr "" + +#: formal_vocabularies.php:33 +msgid "" +"A related resource that is included either physically or logically in the " +"described resource." +msgstr "" + +#: formal_vocabularies.php:37 +msgid "Has Version" +msgstr "" + +#: formal_vocabularies.php:38 +msgid "" +"A related resource that is a version, edition, or adaptation of the " +"described resource." +msgstr "" + +#: formal_vocabularies.php:42 +msgid "Is Format Of" +msgstr "" + +#: formal_vocabularies.php:43 +msgid "" +"A related resource that is substantially the same as the described resource, " +"but in another format." +msgstr "" + +#: formal_vocabularies.php:47 +msgid "Is Part Of" +msgstr "" + +#: formal_vocabularies.php:48 +msgid "" +"A related resource in which the described resource is physically or " +"logically included." +msgstr "" + +#: formal_vocabularies.php:52 +msgid "Is Referenced By" +msgstr "" + +#: formal_vocabularies.php:53 +msgid "" +"A related resource that references, cites, or otherwise points to the " +"described resource." +msgstr "" + +#: formal_vocabularies.php:57 +msgid "Is Replaced By" +msgstr "" + +#: formal_vocabularies.php:58 +msgid "" +"A related resource that supplants, displaces, or supersedes the described " +"resource." +msgstr "" + +#: formal_vocabularies.php:62 +msgid "Is Required By" +msgstr "" + +#: formal_vocabularies.php:63 +msgid "" +"A related resource that requires the described resource to support its " +"function, delivery, or coherence." +msgstr "" + +#: formal_vocabularies.php:67 +msgid "Is Version Of" +msgstr "" + +#: formal_vocabularies.php:68 +msgid "" +"A related resource of which the described resource is a version, edition, or " +"adaptation." +msgstr "" + +#: formal_vocabularies.php:72 +msgid "References" +msgstr "" + +#: formal_vocabularies.php:73 +msgid "" +"A related resource that is referenced, cited, or otherwise pointed to by the " +"described resource." +msgstr "" + +#: formal_vocabularies.php:77 +msgid "Replaces" +msgstr "" + +#: formal_vocabularies.php:78 +msgid "" +"A related resource that is supplanted, displaced, or superseded by the " +"described resource." +msgstr "" + +#: formal_vocabularies.php:82 +msgid "Requires" +msgstr "" + +#: formal_vocabularies.php:83 +msgid "" +"A related resource that is required by the described resource to support its " +"function, delivery, or coherence." +msgstr "" + +#: formal_vocabularies.php:87 +msgid "Source" +msgstr "" + +#: formal_vocabularies.php:88 +msgid "A related resource from which the described resource is derived." +msgstr "" + +#: formal_vocabularies.php:92 +msgid "Abstract" +msgstr "" + +#: formal_vocabularies.php:93 +msgid "A summary of the resource." +msgstr "" + +#: formal_vocabularies.php:97 +msgid "Access Rights" +msgstr "" + +#: formal_vocabularies.php:98 +msgid "" +"Information about who can access the resource or an indication of its " +"security status." +msgstr "" + +#: formal_vocabularies.php:102 +msgid "Accrual Method" +msgstr "" + +#: formal_vocabularies.php:103 +msgid "The method by which items are added to a collection." +msgstr "" + +#: formal_vocabularies.php:107 +msgid "Accrual Periodicity" +msgstr "" + +#: formal_vocabularies.php:108 +msgid "The frequency with which items are added to a collection." +msgstr "" + +#: formal_vocabularies.php:112 +msgid "Accrual Policy" +msgstr "" + +#: formal_vocabularies.php:113 +msgid "The policy governing the addition of items to a collection." +msgstr "" + +#: formal_vocabularies.php:117 +msgid "Audience" +msgstr "" + +#: formal_vocabularies.php:118 +msgid "A class of entity for whom the resource is intended or useful." +msgstr "" + +#: formal_vocabularies.php:122 +msgid "Contributor" +msgstr "" + +#: formal_vocabularies.php:123 +msgid "An entity responsible for making contributions to the resource." +msgstr "" + +#: formal_vocabularies.php:127 +msgid "Coverage" +msgstr "" + +#: formal_vocabularies.php:128 +msgid "" +"The spatial or temporal topic of the resource, the spatial applicability of " +"the resource, or the jurisdiction under which the resource is relevant." +msgstr "" + +#: formal_vocabularies.php:132 +msgid "Creator" +msgstr "" + +#: formal_vocabularies.php:133 +msgid "An entity primarily responsible for making the resource." +msgstr "" + +#: formal_vocabularies.php:137 views/admin/vocabularies/browse.php:14 +#: views/admin/vocabularies/edit.php:18 views/admin/vocabularies/show.php:36 +msgid "Description" +msgstr "" + +#: formal_vocabularies.php:138 +msgid "An account of the resource." +msgstr "" + +#: formal_vocabularies.php:142 +msgid "Audience Education Level" +msgstr "" + +#: formal_vocabularies.php:143 +msgid "" +"A class of entity, defined in terms of progression through an educational or " +"training context, for which the described resource is intended." +msgstr "" + +#: formal_vocabularies.php:147 +msgid "Extent" +msgstr "" + +#: formal_vocabularies.php:148 +msgid "The size or duration of the resource." +msgstr "" + +#: formal_vocabularies.php:152 +msgid "Format" +msgstr "" + +#: formal_vocabularies.php:153 +msgid "The file format, physical medium, or dimensions of the resource." +msgstr "" + +#: formal_vocabularies.php:157 +msgid "Instructional Method" +msgstr "" + +#: formal_vocabularies.php:158 +msgid "" +"A process, used to engender knowledge, attitudes and skills, that the " +"described resource is designed to support." +msgstr "" + +#: formal_vocabularies.php:162 +msgid "Language" +msgstr "" + +#: formal_vocabularies.php:163 +msgid "A language of the resource." +msgstr "" + +#: formal_vocabularies.php:167 +msgid "License" +msgstr "" + +#: formal_vocabularies.php:168 +msgid "" +"A legal document giving official permission to do something with the " +"resource." +msgstr "" + +#: formal_vocabularies.php:172 +msgid "Mediator" +msgstr "" + +#: formal_vocabularies.php:173 +msgid "" +"An entity that mediates access to the resource and for whom the resource is " +"intended or useful." +msgstr "" + +#: formal_vocabularies.php:177 +msgid "Medium" +msgstr "" + +#: formal_vocabularies.php:178 +msgid "The material or physical carrier of the resource." +msgstr "" + +#: formal_vocabularies.php:182 +msgid "Provenance" +msgstr "" + +#: formal_vocabularies.php:183 +msgid "" +"A statement of any changes in ownership and custody of the resource since " +"its creation that are significant for its authenticity, integrity, and " +"interpretation." +msgstr "" + +#: formal_vocabularies.php:187 +msgid "Publisher" +msgstr "" + +#: formal_vocabularies.php:188 +msgid "An entity responsible for making the resource available." +msgstr "" + +#: formal_vocabularies.php:192 +msgid "Rights" +msgstr "" + +#: formal_vocabularies.php:193 +msgid "Information about rights held in and over the resource." +msgstr "" + +#: formal_vocabularies.php:197 +msgid "Rights Holder" +msgstr "" + +#: formal_vocabularies.php:198 +msgid "A person or organization owning or managing rights over the resource." +msgstr "" + +#: formal_vocabularies.php:202 +msgid "Spatial Coverage" +msgstr "" + +#: formal_vocabularies.php:203 +msgid "Spatial characteristics of the resource." +msgstr "" + +#: formal_vocabularies.php:207 +msgid "Subject" +msgstr "" + +#: formal_vocabularies.php:208 +msgid "The topic of the resource." +msgstr "" + +#: formal_vocabularies.php:212 +msgid "Table Of Contents" +msgstr "" + +#: formal_vocabularies.php:213 +msgid "A list of subunits of the resource." +msgstr "" + +#: formal_vocabularies.php:217 +msgid "Temporal Coverage" +msgstr "" + +#: formal_vocabularies.php:218 +msgid "Temporal characteristics of the resource." +msgstr "" + +#: formal_vocabularies.php:222 +msgid "Type" +msgstr "" + +#: formal_vocabularies.php:223 +msgid "The nature or genre of the resource." +msgstr "" + +#: formal_vocabularies.php:229 +msgid "" +"Relations defined by the Bibliographic Ontology (BIBO): http://bibotools." +"googlecode.com/svn/bibo-ontology/trunk/doc/index.html" +msgstr "" + +#: formal_vocabularies.php:235 +msgid "annotates" +msgstr "" + +#: formal_vocabularies.php:236 +msgid "Critical or explanatory note for a Document." +msgstr "" + +#: formal_vocabularies.php:240 +msgid "cited by" +msgstr "" + +#: formal_vocabularies.php:241 +msgid "Relates a document to another document that cites the first document." +msgstr "" + +#: formal_vocabularies.php:245 +msgid "cites" +msgstr "" + +#: formal_vocabularies.php:246 +msgid "" +"Relates a document to another document that is cited by the first document " +"as reference, comment, review, quotation or for another purpose." +msgstr "" + +#: formal_vocabularies.php:250 +msgid "review of" +msgstr "" + +#: formal_vocabularies.php:251 +msgid "Relates a review document to a reviewed thing (resource, item, etc.)." +msgstr "" + +#: formal_vocabularies.php:255 +msgid "reproduced in" +msgstr "" + +#: formal_vocabularies.php:256 +msgid "The resource in which another resource is reproduced." +msgstr "" + +#: formal_vocabularies.php:260 +msgid "affirmed by" +msgstr "" + +#: formal_vocabularies.php:261 +msgid "A legal decision that affirms a ruling." +msgstr "" + +#: formal_vocabularies.php:265 +msgid "reversed by" +msgstr "" + +#: formal_vocabularies.php:266 +msgid "A legal decision that reverses a ruling." +msgstr "" + +#: formal_vocabularies.php:270 +msgid "subsequent legal decision" +msgstr "" + +#: formal_vocabularies.php:271 +msgid "" +"A legal decision on appeal that takes action on a case (affirming it, " +"reversing it, etc.)." +msgstr "" + +#: formal_vocabularies.php:275 +msgid "transcript of" +msgstr "" + +#: formal_vocabularies.php:276 +msgid "Relates a document to some transcribed original." +msgstr "" + +#: formal_vocabularies.php:280 formal_vocabularies.php:601 +msgid "translation of" +msgstr "" + +#: formal_vocabularies.php:281 +msgid "Relates a translated document to the original document." +msgstr "" + +#: formal_vocabularies.php:287 +msgid "" +"Relations defined by the Friend of a Friend vocabulary (FOAF): http://xmlns." +"com/foaf/spec/" +msgstr "" + +#: formal_vocabularies.php:293 +msgid "based near" +msgstr "" + +#: formal_vocabularies.php:294 +msgid "" +"A location that something is based near, for some broadly human notion of " +"near." +msgstr "" + +#: formal_vocabularies.php:298 +msgid "depiction" +msgstr "" + +#: formal_vocabularies.php:299 +msgid "A depiction of some thing." +msgstr "" + +#: formal_vocabularies.php:303 +msgid "depicts" +msgstr "" + +#: formal_vocabularies.php:304 +msgid "A thing depicted in this representation." +msgstr "" + +#: formal_vocabularies.php:308 +msgid "funded by" +msgstr "" + +#: formal_vocabularies.php:309 +msgid "An organization funding a project or person." +msgstr "" + +#: formal_vocabularies.php:313 +msgid "image" +msgstr "" + +#: formal_vocabularies.php:314 +msgid "" +"An image that can be used to represent some thing (ie. those depictions " +"which are particularly representative of something, eg. one's photo on a " +"homepage)." +msgstr "" + +#: formal_vocabularies.php:318 +msgid "is primary topic of" +msgstr "" + +#: formal_vocabularies.php:319 +msgid "A document that this thing is the primary topic of." +msgstr "" + +#: formal_vocabularies.php:323 +msgid "knows" +msgstr "" + +#: formal_vocabularies.php:324 +msgid "" +"A person known by this person (indicating some level of reciprocated " +"interaction between the parties)." +msgstr "" + +#: formal_vocabularies.php:328 +msgid "logo" +msgstr "" + +#: formal_vocabularies.php:329 +msgid "A logo representing some thing." +msgstr "" + +#: formal_vocabularies.php:333 +msgid "made" +msgstr "" + +#: formal_vocabularies.php:334 +msgid "Something that was made by this agent." +msgstr "" + +#: formal_vocabularies.php:338 +msgid "maker" +msgstr "" + +#: formal_vocabularies.php:339 +msgid "An agent that made this thing." +msgstr "" + +#: formal_vocabularies.php:343 +msgid "member" +msgstr "" + +#: formal_vocabularies.php:344 +msgid "Indicates a member of a Group." +msgstr "" + +#: formal_vocabularies.php:348 +msgid "page" +msgstr "" + +#: formal_vocabularies.php:349 +msgid "A page or document about this thing." +msgstr "" + +#: formal_vocabularies.php:353 +msgid "primary topic" +msgstr "" + +#: formal_vocabularies.php:354 +msgid "The primary topic of some page or document." +msgstr "" + +#: formal_vocabularies.php:358 +msgid "thumbnail" +msgstr "" + +#: formal_vocabularies.php:359 +msgid "A derived thumbnail image." +msgstr "" + +#: formal_vocabularies.php:365 +msgid "" +"Relations defined by the Functional Requirements for Bibliographic Records " +"(FRBR): http://vocab.org/frbr/core.html" +msgstr "" + +#: formal_vocabularies.php:371 +msgid "abridgement" +msgstr "" + +#: formal_vocabularies.php:372 +msgid "A property representing an abridgment of an expression." +msgstr "" + +#: formal_vocabularies.php:376 +msgid "abridgement of" +msgstr "" + +#: formal_vocabularies.php:377 +msgid "A property representing an expression that is abridged." +msgstr "" + +#: formal_vocabularies.php:381 +msgid "adaption" +msgstr "" + +#: formal_vocabularies.php:382 +msgid "A property representing an adaption of a work or expression." +msgstr "" + +#: formal_vocabularies.php:386 +msgid "adaption of" +msgstr "" + +#: formal_vocabularies.php:387 +msgid "A property representing a work or expression that is adapted." +msgstr "" + +#: formal_vocabularies.php:391 +msgid "alternate" +msgstr "" + +#: formal_vocabularies.php:392 +msgid "A property representing an alternative to a manifestation." +msgstr "" + +#: formal_vocabularies.php:396 +msgid "alternate of" +msgstr "" + +#: formal_vocabularies.php:397 +msgid "A property representing a manifestation that is alternated." +msgstr "" + +#: formal_vocabularies.php:401 +msgid "arrangement" +msgstr "" + +#: formal_vocabularies.php:402 +msgid "A property representing an arrangement of an expression." +msgstr "" + +#: formal_vocabularies.php:406 +msgid "arrangement of" +msgstr "" + +#: formal_vocabularies.php:407 +msgid "A property representing an expression that is arranged." +msgstr "" + +#: formal_vocabularies.php:411 +msgid "complement" +msgstr "" + +#: formal_vocabularies.php:412 +msgid "A property representing a complement to a work or expression." +msgstr "" + +#: formal_vocabularies.php:416 +msgid "complement of" +msgstr "" + +#: formal_vocabularies.php:417 +msgid "A property representing a work or expression that is complemented." +msgstr "" + +#: formal_vocabularies.php:421 +msgid "creator" +msgstr "" + +#: formal_vocabularies.php:422 +msgid "" +"A property representing an entity in some way responsible for the creation " +"of a work." +msgstr "" + +#: formal_vocabularies.php:426 +msgid "creator of" +msgstr "" + +#: formal_vocabularies.php:427 +msgid "" +"A property representing a work that was in some way created by of an entity." +msgstr "" + +#: formal_vocabularies.php:431 +msgid "embodiment" +msgstr "" + +#: formal_vocabularies.php:432 +msgid "A property representing a manifestation that embodies an expression." +msgstr "" + +#: formal_vocabularies.php:436 +msgid "embodiment of" +msgstr "" + +#: formal_vocabularies.php:437 +msgid "" +"A property representing an expression that is embodied by a manifestation." +msgstr "" + +#: formal_vocabularies.php:441 +msgid "exemplar" +msgstr "" + +#: formal_vocabularies.php:442 +msgid "A property representing an item that is an exemplar of a manifestation." +msgstr "" + +#: formal_vocabularies.php:446 +msgid "exemplar of" +msgstr "" + +#: formal_vocabularies.php:447 +msgid "" +"A property representing the manifestation that is exemplified by a item." +msgstr "" + +#: formal_vocabularies.php:451 +msgid "imitation" +msgstr "" + +#: formal_vocabularies.php:452 +msgid "A property representing an imitation of a work or expression." +msgstr "" + +#: formal_vocabularies.php:456 +msgid "imitation of" +msgstr "" + +#: formal_vocabularies.php:457 +msgid "A property representing a work or expression that is imitated." +msgstr "" + +#: formal_vocabularies.php:461 +msgid "owner" +msgstr "" + +#: formal_vocabularies.php:462 +msgid "A property representing an entity that owns an item." +msgstr "" + +#: formal_vocabularies.php:466 +msgid "owner of" +msgstr "" + +#: formal_vocabularies.php:467 +msgid "A property representing an item that is in some way owned an entity." +msgstr "" + +#: formal_vocabularies.php:471 +msgid "part" +msgstr "" + +#: formal_vocabularies.php:472 +msgid "A property representing a part of an endeavour." +msgstr "" + +#: formal_vocabularies.php:476 +msgid "part of" +msgstr "" + +#: formal_vocabularies.php:477 +msgid "A property representing an endeavour incorporating an endeavour." +msgstr "" + +#: formal_vocabularies.php:481 +msgid "producer" +msgstr "" + +#: formal_vocabularies.php:482 +msgid "" +"A property representing an entity in some way responsible for producing a " +"manifestation." +msgstr "" + +#: formal_vocabularies.php:486 +msgid "producer of" msgstr "" -#: ItemRelationsPlugin.php:363 item_relations_form.php:17 -#: views/shared/common/item-relations-advanced-search.php:17 -msgid "Object" +#: formal_vocabularies.php:487 +msgid "" +"A property representing a manifestation that was in some way produced an " +"entity." msgstr "" -#: ItemRelationsPlugin.php:368 -msgid "These Items" +#: formal_vocabularies.php:491 +msgid "realization" msgstr "" -#: ItemRelationsPlugin.php:371 item_relations_form.php:41 -msgid "Item ID" +#: formal_vocabularies.php:492 +msgid "" +"A property representing an expression that is an intellectual or artistic " +"realization of a work." msgstr "" -#: config_form.php:3 -msgid "Append to Public Items Show" +#: formal_vocabularies.php:496 +msgid "realization of" msgstr "" -#: config_form.php:8 +#: formal_vocabularies.php:497 msgid "" -"Check this if you want to display an item's relations on its public show " -"page." +"A property representing the work that has been realized by an expression." msgstr "" -#: config_form.php:17 -msgid "Relation Format" +#: formal_vocabularies.php:501 +msgid "realizer" msgstr "" -#: config_form.php:22 +#: formal_vocabularies.php:502 msgid "" -"Select the format of an item's relations that you would prefer to show. If " -"one is unavailable the other will be used." +"A property representing an entity in some way responsible for realizing an " +"expression." msgstr "" -#: controllers/VocabulariesController.php:50 -msgid "The vocabulary was successfully edited." +#: formal_vocabularies.php:506 +msgid "realizer of" msgstr "" -#: item_relations_form.php:4 views/admin/vocabularies/browse.php:1 -msgid "Browse Vocabularies" +#: formal_vocabularies.php:507 +msgid "" +"A property representing an expression that was in some way realized by an " +"entity." msgstr "" -#: item_relations_form.php:6 -#, php-format +#: formal_vocabularies.php:511 +msgid "reconfiguration" +msgstr "" + +#: formal_vocabularies.php:512 +msgid "A property representing a recongifuration of an item." +msgstr "" + +#: formal_vocabularies.php:516 +msgid "reconfiguration of" +msgstr "" + +#: formal_vocabularies.php:517 +msgid "A property representing an item that is reconfigured." +msgstr "" + +#: formal_vocabularies.php:521 +msgid "related endeavour" +msgstr "" + +#: formal_vocabularies.php:522 msgid "" -"Here you can relate this item to another item and delete existing relations. " -"For descriptions of the relations, see the %s page. Invalid item IDs will be " -"ignored." +"A property representing another endeavour that is related in some way to an " +"endeavour." msgstr "" -#: item_relations_form.php:24 item_relations_form.php:34 -#: item_relations_form.php:39 views/admin/common/item-relations-show.php:10 -#: views/admin/common/item-relations-show.php:19 -#: views/public/common/item-relations-show.php:9 -#: views/public/common/item-relations-show.php:18 -msgid "This Item" +#: formal_vocabularies.php:526 +msgid "reproduction" msgstr "" -#: item_relations_form.php:46 -msgid "Add a Relation" +#: formal_vocabularies.php:527 +msgid "A property representing a reproduction of a manifestation or item." +msgstr "" + +#: formal_vocabularies.php:531 +msgid "reproduction of" +msgstr "" + +#: formal_vocabularies.php:532 +msgid "A property representing a manifestation or item that is reproduced." +msgstr "" + +#: formal_vocabularies.php:536 +msgid "responsible entity" +msgstr "" + +#: formal_vocabularies.php:537 +msgid "" +"A property representing an entity in some way responsible for an endeavour." +msgstr "" + +#: formal_vocabularies.php:541 +msgid "responsible entity of" +msgstr "" + +#: formal_vocabularies.php:542 +msgid "" +"A property representing an endeavour that is the responsibility of an entity." +msgstr "" + +#: formal_vocabularies.php:546 +msgid "revision" +msgstr "" + +#: formal_vocabularies.php:547 +msgid "A property representing a revision of an expression." +msgstr "" + +#: formal_vocabularies.php:551 +msgid "revision of" +msgstr "" + +#: formal_vocabularies.php:552 +msgid "A property representing an expression that is revised." +msgstr "" + +#: formal_vocabularies.php:556 +msgid "successor" +msgstr "" + +#: formal_vocabularies.php:557 +msgid "A property representing a successor to a work or expression." +msgstr "" + +#: formal_vocabularies.php:561 +msgid "successor of" +msgstr "" + +#: formal_vocabularies.php:562 +msgid "A property representing a work or expression that is succeeded." +msgstr "" + +#: formal_vocabularies.php:566 +msgid "summarization" +msgstr "" + +#: formal_vocabularies.php:567 +msgid "A property representing a summarization of a work or expression." +msgstr "" + +#: formal_vocabularies.php:571 +msgid "summarization of" +msgstr "" + +#: formal_vocabularies.php:572 +msgid "A property representing a work or expression that is summarized." +msgstr "" + +#: formal_vocabularies.php:576 +msgid "supplement" +msgstr "" + +#: formal_vocabularies.php:577 +msgid "A property representing a supplement to a work or expression." +msgstr "" + +#: formal_vocabularies.php:581 +msgid "supplement of" +msgstr "" + +#: formal_vocabularies.php:582 +msgid "A property representing a work or expression that is supplemented." +msgstr "" + +#: formal_vocabularies.php:586 +msgid "transformation" +msgstr "" + +#: formal_vocabularies.php:587 +msgid "A property representing a transformation of a work or expression." +msgstr "" + +#: formal_vocabularies.php:591 +msgid "transformation of" +msgstr "" + +#: formal_vocabularies.php:592 +msgid "A property representing a work or expression that is transformed." +msgstr "" + +#: formal_vocabularies.php:596 +msgid "translation" +msgstr "" + +#: formal_vocabularies.php:597 +msgid "A property representing a translation of an expression." +msgstr "" + +#: formal_vocabularies.php:602 +msgid "A property representing an expression that is translated." msgstr "" #: models/ItemRelationsProperty.php:62 msgid "[unknown]" msgstr "" -#: views/admin/common/item-relations-show.php:5 -#: views/public/common/item-relations-show.php:4 +#: views/admin/common/item-relations-show.php:21 +#: views/public/common/item-relations-show.php:16 msgid "This item has no relations." msgstr "" -#: views/admin/vocabularies/browse.php:8 +#: views/admin/plugins/item-relations-config-form.php:1 +msgid "Input" +msgstr "" + +#: views/admin/plugins/item-relations-config-form.php:5 +msgid "Limit Relations to Vocabularies" +msgstr "" + +#: views/admin/plugins/item-relations-config-form.php:10 +msgid "Check the vocabularies that can be used to set relations." +msgstr "" + +#: views/admin/plugins/item-relations-config-form.php:11 +msgid "If none is checked, all vocabularies will be allowed." +msgstr "" + +#: views/admin/plugins/item-relations-config-form.php:41 +msgid "Provide comment field for relations" +msgstr "" + +#: views/admin/plugins/item-relations-config-form.php:46 +msgid "Check this if you want to be able to enter a comment to a relation." +msgstr "" + +#: views/admin/plugins/item-relations-config-form.php:54 +msgid "Display" +msgstr "" + +#: views/admin/plugins/item-relations-config-form.php:58 +msgid "Relation Format" +msgstr "" + +#: views/admin/plugins/item-relations-config-form.php:63 +msgid "" +"Select the format of an item's relations that you would prefer to show. If " +"one is unavailable the other will be used." +msgstr "" + +#: views/admin/plugins/item-relations-config-form.php:69 +msgid "prefix:localPart" +msgstr "" + +#: views/admin/plugins/item-relations-config-form.php:70 +msgid "label" +msgstr "" + +#: views/admin/plugins/item-relations-config-form.php:77 +msgid "Display position in admin view" +msgstr "" + +#: views/admin/plugins/item-relations-config-form.php:82 +msgid "" +"Select the position where you would prefer to display the relations in admin " +"view: In the side bar in the lower right (default) or underneath the regular " +"field values to the left." +msgstr "" + +#: views/admin/plugins/item-relations-config-form.php:88 +msgid "Side bar" +msgstr "" + +#: views/admin/plugins/item-relations-config-form.php:89 +msgid "Main content" +msgstr "" + +#: views/admin/plugins/item-relations-config-form.php:96 +msgid "Admin Display Mode" +msgstr "" + +#: views/admin/plugins/item-relations-config-form.php:101 +msgid "Set how to display the list of relations in the admin view." +msgstr "" + +#: views/admin/plugins/item-relations-config-form.php:102 +#: views/admin/plugins/item-relations-config-form.php:137 +msgid "Anyway, the view can be themed." +msgstr "" + +#: views/admin/plugins/item-relations-config-form.php:107 +#: views/admin/plugins/item-relations-config-form.php:142 +msgid "As a table" +msgstr "" + +#: views/admin/plugins/item-relations-config-form.php:108 +#: views/admin/plugins/item-relations-config-form.php:143 +msgid "As a list" +msgstr "" + +#: views/admin/plugins/item-relations-config-form.php:109 +#: views/admin/plugins/item-relations-config-form.php:144 +msgid "By item type" +msgstr "" + +#: views/admin/plugins/item-relations-config-form.php:116 +msgid "Append to Public Items Show" +msgstr "" + +#: views/admin/plugins/item-relations-config-form.php:121 +msgid "" +"Check this if you want to display an item's relations on its public show " +"page." +msgstr "" + +#: views/admin/plugins/item-relations-config-form.php:131 +msgid "Public Display Mode" +msgstr "" + +#: views/admin/plugins/item-relations-config-form.php:136 +msgid "Set how to display the list of relations in the public view." +msgstr "" + +#: views/admin/vocabularies/add.php:2 +msgid "Add New Vocabulary" +msgstr "" + +#: views/admin/vocabularies/add.php:6 +msgid "Vocabulary Name" +msgstr "" + +#: views/admin/vocabularies/add.php:9 +msgid "Vocabulary Description" +msgstr "" + +#: views/admin/vocabularies/add.php:11 views/admin/vocabularies/show.php:20 +msgid "Save Vocabulary" +msgstr "" + +#: views/admin/vocabularies/browse.php:3 +#: views/shared/common/item-relations-form.php:3 +msgid "Browse Vocabularies" +msgstr "" + +#: views/admin/vocabularies/browse.php:7 +msgid "Add Vocabulary" +msgstr "" + +#: views/admin/vocabularies/browse.php:12 +msgid "Allowed" +msgstr "" + +#: views/admin/vocabularies/browse.php:13 +msgid "Name" +msgstr "" + +#: views/admin/vocabularies/browse.php:15 msgid "Namespace Prefix" msgstr "" -#: views/admin/vocabularies/browse.php:9 +#: views/admin/vocabularies/browse.php:16 msgid "Namespace URI" msgstr "" +#: views/admin/vocabularies/browse.php:22 +msgid "Yes" +msgstr "" + +#: views/admin/vocabularies/browse.php:22 +msgid "No" +msgstr "" + +#: views/admin/vocabularies/delete.php:2 views/admin/vocabularies/show.php:23 +msgid "Delete Vocabulary" +msgstr "" + +#: views/admin/vocabularies/delete.php:18 +msgid "You have successfully deleted the vocabulary." +msgstr "" + +#: views/admin/vocabularies/delete.php:21 +msgid "The vocabulary name cannot be deleted" +msgstr "" + +#: views/admin/vocabularies/delete.php:29 +msgid "Back" +msgstr "" + #: views/admin/vocabularies/edit.php:1 msgid "Edit Custom Vocabulary" msgstr "" @@ -118,31 +1286,49 @@ msgid "" "exact relation you want them to convey." msgstr "" +#: views/admin/vocabularies/edit.php:17 views/admin/vocabularies/show.php:35 +msgid "Label" +msgstr "" + +#: views/admin/vocabularies/edit.php:19 +#: views/shared/common/item-relations-form.php:17 +msgid "Delete" +msgstr "" + #: views/admin/vocabularies/edit.php:37 msgid "Add a Property" msgstr "" +#: views/admin/vocabularies/edit.php:41 +msgid "Save Changes" +msgstr "" + #: views/admin/vocabularies/show.php:2 msgid "Vocabulary Properties" msgstr "" -#: views/admin/vocabularies/show.php:7 +#: views/admin/vocabularies/show.php:17 msgid "Edit Vocabulary" msgstr "" -#: views/admin/vocabularies/show.php:14 +#: views/admin/vocabularies/show.php:25 msgid "This vocabulary has no properties." msgstr "" -#: views/admin/vocabularies/show.php:16 +#: views/admin/vocabularies/show.php:27 msgid "Why don't you add some?" msgstr "" -#: views/admin/vocabularies/show.php:23 +#: views/admin/vocabularies/show.php:34 msgid "Local Part" msgstr "" -#: views/shared/common/item-relations-advanced-search.php:8 +#: views/helpers/ItemRelationsForm.php:33 +#: views/shared/common/item-relations-form.php:139 +msgid "[Search and Select Below]" +msgstr "" + +#: views/shared/common/item-relations-advanced-search.php:11 msgid "" "Filter this search for items with the selected relation. For example, when " "selecting \"Subject\" items with the \"hasPart\" relation, the search will " @@ -150,3 +1336,143 @@ msgid "" "same relation, the search will return all items that are parts of other " "items." msgstr "" + +#: views/shared/common/item-relations-advanced-search.php:22 +msgid "" +"Filter this search for items being \"Subject\" (or \"Object\", respectively) " +"in relations that contain a certain text portion in their comments." +msgstr "" + +#: views/shared/common/item-relations-advanced-search.php:31 +#: views/shared/common/item-relations-form.php:11 +msgid "Subject " +msgstr "" + +#: views/shared/common/item-relations-form.php:4 +msgid "" +"Here you can relate this item to another item and delete existing relations." +msgstr "" + +#: views/shared/common/item-relations-form.php:5 +#, php-format +msgid "For descriptions of the relations, see the %s page." +msgstr "" + +#: views/shared/common/item-relations-form.php:6 +msgid "Invalid item IDs will be ignored." +msgstr "" + +#: views/shared/common/item-relations-form.php:38 +#: views/shared/common/item-relations-form.php:59 +#: views/shared/common/item-relations-form.php:85 +#: views/shared/common/item-relations-show-list.php:16 +#: views/shared/common/item-relations-show-list.php:21 +#: views/shared/common/item-relations-show-table.php:30 +#: views/shared/common/item-relations-show-table.php:37 +msgid "This Item" +msgstr "" + +#: views/shared/common/item-relations-form.php:81 +msgid "New Relations" +msgstr "" + +#: views/shared/common/item-relations-form.php:103 +msgid "Delete now" +msgstr "" + +#: views/shared/common/item-relations-form.php:108 +msgid "Add a Relation" +msgstr "" + +#: views/shared/common/item-relations-form.php:113 +msgid "This Subject" +msgstr "" + +#: views/shared/common/item-relations-form.php:116 +msgid "[New]" +msgstr "" + +#: views/shared/common/item-relations-form.php:124 +msgid "Is Related By" +msgstr "" + +#: views/shared/common/item-relations-form.php:133 +msgid "With Object" +msgstr "" + +#: views/shared/common/item-relations-form.php:158 +msgid "Add this Relation" +msgstr "" + +#: views/shared/common/item-relations-form.php:162 +msgid "Cancel" +msgstr "" + +#: views/shared/common/item-relations-form.php:168 +msgid "Search and Select a Record" +msgstr "" + +#: views/shared/common/item-relations-form.php:172 +msgid "Create a new Item" +msgstr "" + +#: views/shared/common/item-relations-form.php:175 +msgid "Refresh" +msgstr "" + +#: views/shared/common/item-relations-form.php:180 +msgid "By Item Types" +msgstr "" + +#: views/shared/common/item-relations-form.php:189 +msgid "By Collection" +msgstr "" + +#: views/shared/common/item-relations-form.php:199 +msgid "By Partial Title" +msgstr "" + +#: views/shared/common/item-relations-form.php:206 +msgid "Limit Item IDs (“x” or “x-y”)" +msgstr "" + +#: views/shared/common/item-relations-form.php:216 +msgid "Sort By" +msgstr "" + +#: views/shared/common/item-relations-form.php:221 +msgid "Most recently updated" +msgstr "" + +#: views/shared/common/item-relations-form.php:225 +msgid "Alphabetically" +msgstr "" + +#: views/shared/common/item-relations-show-list-by-item-type.php:20 +msgid "Relation from this item" +msgstr "" + +#: views/shared/common/item-relations-show-list-by-item-type.php:22 +msgid "This item has no relation to other records." +msgstr "" + +#: views/shared/common/item-relations-show-list-by-item-type.php:27 +#: views/shared/common/item-relations-show-list-by-item-type.php:53 +msgid "No Item Type" +msgstr "" + +#: views/shared/common/item-relations-show-list-by-item-type.php:46 +msgid "Relations to this item" +msgstr "" + +#: views/shared/common/item-relations-show-list-by-item-type.php:48 +msgid "No record is related to this item." +msgstr "" + +#: views/shared/common/item-relations-show-table.php:5 +msgid "Show / Hide" +msgstr "" + +#: views/shared/common/item-relations-show-table.php:6 +msgid "Show / Hide All" +msgstr "" diff --git a/models/ItemRelationsRelation.php b/models/ItemRelationsRelation.php index 5727481..22d4322 100644 --- a/models/ItemRelationsRelation.php +++ b/models/ItemRelationsRelation.php @@ -30,6 +30,11 @@ class ItemRelationsRelation extends Omeka_Record_AbstractRecord */ public $object_item_id; + /** + * @var varchar + */ + public $relation_comment; + /** * Get a textual representation of the property for this relation. * diff --git a/models/Table/ItemRelationsProperty.php b/models/Table/ItemRelationsProperty.php index 09f22d9..c200a4c 100644 --- a/models/Table/ItemRelationsProperty.php +++ b/models/Table/ItemRelationsProperty.php @@ -31,7 +31,7 @@ public function getSelect() 'vocabulary_namespace_uri' => 'namespace_uri' ) ) - ->order('custom DESC'); + ->order('custom DESC')->order('name ASC')->order('label ASC'); } /** @@ -46,7 +46,7 @@ public function findByVocabularyId($id) $select->where('vocabulary_id = ?', (int) $id) ->reset(Zend_Db_Select::ORDER) - ->order('id'); + ->order('label'); return $this->fetchObjects($select); } diff --git a/models/Table/ItemRelationsRelation.php b/models/Table/ItemRelationsRelation.php index 859e50f..75cbe4b 100644 --- a/models/Table/ItemRelationsRelation.php +++ b/models/Table/ItemRelationsRelation.php @@ -20,7 +20,7 @@ class Table_ItemRelationsRelation extends Omeka_Db_Table */ public function getSelect() { - $db = $this->getDb(); + $db = $this->_db; return parent::getSelect() ->join( array('item_relations_properties' => $db->ItemRelationsProperty), @@ -41,27 +41,45 @@ public function getSelect() /** * Find item relations by subject item ID. - * + * + * @param integer $subjectItemId + * @param boolean $onlyExistingObjectItems * @return array */ - public function findBySubjectItemId($subjectItemId) + public function findBySubjectItemId($subjectItemId, $onlyExistingObjectItems = true) { $db = $this->getDb(); $select = $this->getSelect() ->where('item_relations_relations.subject_item_id = ?', (int) $subjectItemId); + if ($onlyExistingObjectItems) { + $select->join( + array('items' => $db->Item), + 'items.id = item_relations_relations.object_item_id', + array() + ); + } return $this->fetchObjects($select); } - + /** * Find item relations by object item ID. - * + * + * @param integer $objectItemId + * @param boolean $onlyExistingSubjectItems * @return array */ - public function findByObjectItemId($objectItemId) + public function findByObjectItemId($objectItemId, $onlyExistingSubjectItems = true) { $db = $this->getDb(); $select = $this->getSelect() ->where('item_relations_relations.object_item_id = ?', (int) $objectItemId); + if ($onlyExistingSubjectItems) { + $select->join( + array('items' => $db->Item), + 'items.id = item_relations_relations.subject_item_id', + array() + ); + } return $this->fetchObjects($select); } } diff --git a/models/Table/ItemRelationsVocabulary.php b/models/Table/ItemRelationsVocabulary.php index a345d28..9c2e21d 100644 --- a/models/Table/ItemRelationsVocabulary.php +++ b/models/Table/ItemRelationsVocabulary.php @@ -20,6 +20,6 @@ class Table_ItemRelationsVocabulary extends Omeka_Db_Table public function getSelect() { return parent::getSelect() - ->order('custom DESC'); + ->order('custom DESC')->order('name ASC'); } } diff --git a/plugin.ini b/plugin.ini index e193baf..de3d28d 100644 --- a/plugin.ini +++ b/plugin.ini @@ -2,10 +2,10 @@ name="Item Relations" author="Roy Rosenzweig Center for History and New Media" description="Allows administrators to define relations between items." -link="http://omeka.org/codex/Plugins/ItemRelations_2.0" -support_link="http://omeka.org/forums/forum/plugins" +link="https://omeka.org/codex/Plugins/ItemRelations_2.0" +support_link="https://omeka.org/forums/forum/plugins" license="GPLv3" omeka_minimum_version="2.0" -omeka_target_version="2.0" -version="2.0.2" +omeka_target_version="2.4" +version="2.0.2.2" tags="item,relation,rdf" diff --git a/views/admin/common/item-relations-show.php b/views/admin/common/item-relations-show.php index dabc302..94406fe 100644 --- a/views/admin/common/item-relations-show.php +++ b/views/admin/common/item-relations-show.php @@ -1,25 +1,31 @@ -
-

+ +
+ >>
- +

- -
    - -
  • - - - -
  • - - -
  • - - - -
  • - -
- + $item, + 'subjectRelations' => $subjectRelations, + 'objectRelations' => $objectRelations, + 'allRelations' => $allRelations, + )); + endif; ?>
diff --git a/views/admin/plugins/item-relations-config-form.php b/views/admin/plugins/item-relations-config-form.php new file mode 100644 index 0000000..b849ff3 --- /dev/null +++ b/views/admin/plugins/item-relations-config-form.php @@ -0,0 +1,148 @@ +
+
+
+ formLabel('item_relations_allow_vocabularies', + __('Limit Relations to Vocabularies')); ?> +
+
+

+ +

+
+ '; + foreach ($vocabularies as $vocabulary) { + echo '
  • '; + echo $this->formCheckbox('item_relations_allow_vocabularies[]', $vocabulary->name, + array('checked' => in_array($vocabulary->name, $currentVocabularies) ? 'checked' : '', + 'id' => 'item_relations_vocab_id_'.$vocabulary->id, + ) + ); + echo " " . + $this->formLabel('item_relations_vocab_id_'.$vocabulary->id, + $vocabulary->name, + array( "style" => "float:none;" ) + ); + echo '
  • '; + } + echo ''; + ?> +
    +
    +
    +
    +
    + formLabel('item_relations_provide_relation_comments', + __('Provide comment field for relations')); ?> +
    +
    +

    + +

    + formCheckbox('item_relations_provide_relation_comments', + null, array('checked' => get_option('item_relations_provide_relation_comments'))); ?> +
    +
    +
    +
    +
    +
    + formLabel('item_relations_relation_format', + __('Relation Format')); ?> +
    +
    +

    + +

    + formSelect('item_relations_relation_format', + get_option('item_relations_relation_format'), null, array( + 'prefix_local_part' => __('prefix:localPart'), + 'label' => __('label'), + )); ?> +
    +
    +
    +
    + formLabel('item_relations_admin_sidebar_or_maincontent', + __('Display position in admin view')); ?> +
    +
    +

    + +

    + formSelect('item_relations_admin_sidebar_or_maincontent', + get_option('item_relations_admin_sidebar_or_maincontent'), null, array( + 'sidebar' => __('Side bar'), + 'maincontent' => __('Main content'), + )); ?> +
    +
    +
    +
    + formLabel('item_relations_admin_display_mode', + __('Admin Display Mode')); ?> +
    +
    +

    + +

    + formSelect('item_relations_admin_display_mode', + get_option('item_relations_admin_display_mode'), null, array( + 'table' => __('As a table'), + 'list' => __('As a list'), + 'list-by-item-type' => __('By item type'), + )); ?> +
    +
    +
    +
    + formLabel('item_relations_public_append_to_items_show', + __('Append to Public Items Show')); ?> +
    +
    +

    + +

    + formCheckbox('item_relations_public_append_to_items_show', + null, array('checked' => get_option('item_relations_public_append_to_items_show'))); ?> +
    +
    +
    +
    + formLabel('item_relations_public_display_mode', + __('Public Display Mode')); ?> +
    +
    +

    + +

    + formSelect('item_relations_public_display_mode', + get_option('item_relations_public_display_mode'), null, array( + 'table' => __('As a table'), + 'list' => __('As a list'), + 'list-by-item-type' => __('By item type'), + )); ?> +
    +
    +
    diff --git a/views/admin/vocabularies/add.php b/views/admin/vocabularies/add.php new file mode 100644 index 0000000..8cc113b --- /dev/null +++ b/views/admin/vocabularies/add.php @@ -0,0 +1,13 @@ + __('Add New Vocabulary'))); +$vocabulary = $this->item_relations_vocabulary; +?> +
    +

    + formText("vocabulary_name", null , array('size' => 20)); ?> +

    +

    + formTextarea("vocabulary_description", null , array('cols' => 50, 'rows' => 2)); ?>

    + +
    + diff --git a/views/admin/vocabularies/browse.php b/views/admin/vocabularies/browse.php index 2620e71..8cadf9e 100644 --- a/views/admin/vocabularies/browse.php +++ b/views/admin/vocabularies/browse.php @@ -1,8 +1,15 @@ - __('Browse Vocabularies'))); ?> + __('Browse Vocabularies'))); +?> +
    + +
    + @@ -12,6 +19,7 @@ item_relations_vocabularies as $vocabulary): ?> + diff --git a/views/admin/vocabularies/delete.php b/views/admin/vocabularies/delete.php new file mode 100644 index 0000000..458bab8 --- /dev/null +++ b/views/admin/vocabularies/delete.php @@ -0,0 +1,32 @@ +$pageTitle)); +echo flash(); +$vocabularyId = null; +if (isset($_GET['vocabulary_id'])) { $vocabularyId = intval($_GET['vocabulary_id']); } + +?> +
    + +
    +
    +
    + +
    +
    + diff --git a/views/admin/vocabularies/edit.php b/views/admin/vocabularies/edit.php index f626d9e..6ecd94a 100644 --- a/views/admin/vocabularies/edit.php +++ b/views/admin/vocabularies/edit.php @@ -22,7 +22,7 @@ properties as $property): ?> - + diff --git a/views/admin/vocabularies/show.php b/views/admin/vocabularies/show.php index 97a8434..2e3b6d4 100644 --- a/views/admin/vocabularies/show.php +++ b/views/admin/vocabularies/show.php @@ -2,38 +2,51 @@ echo head(array('title' => __('Vocabulary Properties'))); $vocabulary = $this->item_relations_vocabulary; $properties = $vocabulary->getProperties(); +echo flash(); ?> -custom): ?> -id}")); ?>" class="edit"> - -

    name; ?>

    -

    description)); ?>

    - -

    - - custom): ?> - id}")); ?>"> - -

    - -
    name, $allowedVocabularies) ? __('Yes') : __('No'); ?> id}")); ?>">name; ?> description; ?> custom ? 'n/a' : $vocabulary->namespace_prefix; ?>
    label; ?>formTextarea("property_label[{$property->id}]",$property->label, array('cols' => 50, 'rows' => 2)); ?> formTextarea("property_description[{$property->id}]", $property->description, array('cols' => 50, 'rows' => 2)); ?> formCheckbox("property_delete[{$property->id}]") ?>
    - - - - - - - - - - - - - - - - -
    custom ? 'n/a' : $property->local_part; ?>label; ?>description; ?>
    - +
    + custom): ?> +

    formText("vocabulary_name", $vocabulary->name, array('size' => 20)); ?>

    +

    formTextarea("vocabulary_description", $vocabulary->description, array('cols' => 50, 'rows' => 2)); ?>

    + +

    name; ?>

    +

    description)); ?>

    + + custom): ?> + id}")); ?>" class="edit"> + + custom): ?> + + + + +

    + + custom): ?> + id}")); ?>"> + +

    + + + + + + + + + + + + + + + + + + +
    custom ? 'n/a' : $property->local_part; ?>label; ?>description; ?>
    + + +
    diff --git a/views/helpers/ItemRelationsForm.php b/views/helpers/ItemRelationsForm.php new file mode 100644 index 0000000..768347c --- /dev/null +++ b/views/helpers/ItemRelationsForm.php @@ -0,0 +1,39 @@ +view; + $db = get_db(); + + $html = $view->partial('common/item-relations-form.php', array( + 'item' => $item, + 'provideRelationComments' => get_option('item_relations_provide_relation_comments'), + 'formSelectProperties' => get_table_options('ItemRelationsProperty'), + 'allRelations' => ItemRelationsPlugin::prepareAllRelations($item), + )); + + if (!defined("LITYLOADED")) { + $html .= ''; + $html .= js_tag('lity.min', $dir = 'javascripts/lity'); + DEFINE("LITYLOADED", 1); + } + $html .= ''; + $html .= ''; + $html .= js_tag('item-relations'); + + return $html; + } +} diff --git a/views/public/common/item-relations-show.php b/views/public/common/item-relations-show.php index b7da36d..88e936e 100644 --- a/views/public/common/item-relations-show.php +++ b/views/public/common/item-relations-show.php @@ -1,23 +1,25 @@ +

    - +

    - - - - - - - - - - - - - - - - -
    Item:
    Item:
    - + $item, + 'subjectRelations' => $subjectRelations, + 'objectRelations' => $objectRelations, + 'allRelations' => $allRelations, + )); + endif; ?>
    diff --git a/views/shared/common/item-relations-advanced-search.php b/views/shared/common/item-relations-advanced-search.php index 701112a..8a7aaaa 100644 --- a/views/shared/common/item-relations-advanced-search.php +++ b/views/shared/common/item-relations-advanced-search.php @@ -1,21 +1,35 @@ +
    - formLabel('item_relations_item_relation', __('Item Relations')); ?> + formLabel('item_relations_property_id', __('Item Relations')); ?>

    + formSelect('item_relations_property_id', @$_GET['item_relations_property_id'], array(), $formSelectProperties); ?> + +

    + +

    +

    + formText('item_relations_comment', @$_GET['item_relations_comment'], array('size' => 8)); ?> +

    +

    - +

    - formSelect('item_relations_property_id', @$_GET['item_relations_property_id'], array(), $formSelectProperties); ?>
    diff --git a/views/shared/common/item-relations-form.php b/views/shared/common/item-relations-form.php new file mode 100644 index 0000000..5a9c0b0 --- /dev/null +++ b/views/shared/common/item-relations-form.php @@ -0,0 +1,255 @@ +

    ' + . __('Browse Vocabularies') . ''; + echo __('Here you can relate this item to another item and delete existing relations.'); + echo ' ' . __('For descriptions of the relations, see the %s page.', $link); + echo ' ' . __('Invalid item IDs will be ignored.'); +?>

    + + + + + + + + + + + + + + id; + $colspan = ($provideRelationComments ? 4 : 3); + $lastVocab = -1; + foreach ($allRelations as $relation) { ?> + + "; + $lastVocab = $relation['vocabulary_id']; + } + $subjectRelation = $relation['subject_item_id'] == $thisItemId; + $objectRelation = $relation['object_item_id'] == $thisItemId; + echo ''; + echo ''; + echo ''; + if ($provideRelationComments) { + echo ' + + + + + + + + + + + + + + +
    " + . "" + . $relation['vocabulary'] + . "
    ' + . ($subjectRelation + ? __('This Item') + : '' . $relation['subject_item_title'] . '' + ) + . ''; + if ($subjectRelation) { + echo $this->formSelect('item_relations_subject_property[' . $relation['item_relation_id'] . ']', + $relation['relation_property'], + array( + 'id' => 'item_relations_subject_property_' . $relation['item_relation_id'], + 'multiple' => false, + 'style' => 'width: 150px;', + ), + array_slice($formSelectProperties, 1)); + } + else { + echo '' . $relation['relation_text'] . ''; + } + echo '' + . ($objectRelation + ? __('This Item') + : '' . $relation['object_item_title'] . '' + ) + . ''; + if ($subjectRelation) { ?> + + '; + } ?> +
    + + +
    + + + +
    +
    +
    +
    + formLabel('new_relation_property_id', __('This Subject')); ?> +
    +
    + id) ? '' : 'data-subject-id="' . $item->id . '"'; ?>>id) ? __('[New]') : '#' . $item->id; ?> +
    +
    + id) ? '' : metadata('item', array('Dublin Core', 'Title')); ?> +
    +
    + +
    +
    + formLabel('new_relation_property_id', __('Is Related By')); ?> +
    +
    + formSelect('new_relation_property_id', + null, array('multiple' => false), $formSelectProperties); ?> +
    +
    + +
    +
    + formLabel('object_title', __('With Object')); ?> +
    +
    + +
    +
    + +
    +
    + + +
    +
    + formLabel('relation_comment', __('Comment')); ?> +
    +
    + formText('relation_comment', null); ?> +
    +
    + + + + +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +

    +
    +
    +
    + +
    +
    + +
    +
    +
    + +
    +
    + formLabel('new_relation_object_item_type_id', __('By Item Types')); ?> +
    +
    + formSelect('new_relation_object_item_type_id', + null, array('multiple' => false), array()); ?> +
    +
    + +
    +
    + formLabel('new_relation_object_collection_id', __('By Collection')); ?> +
    +
    + formSelect('new_relation_object_collection_id', + null, array('multiple' => false), array()); ?> +
    +
    + +
    +
    +
    + formLabel('partial_object_title', __('By Partial Title')); ?> +
    +
    + formText('partial_object_title', null, array('size' => 10, 'maxlength' => 60)); ?> +
    +
    + +
    +
    + formLabel('id_limit', __('Limit Item IDs (“x” or “x-y”)')); ?> +
    +
    + formText('id_limit', null, array('size' => 10, 'maxlength' => 60)); ?> +
    +
    +
    + +
    +
    + formLabel('new_relation_item_sort', __('Sort By')); ?> +
    +
    +
    + + +
    +
    + + +
    +
    +
    + +
    +
    +
      +
      + +
      +
      +
        +
      • <
      • +
      • >
      • +
      +
      +
      +
      +
      diff --git a/views/shared/common/item-relations-show-list-by-item-type.php b/views/shared/common/item-relations-show-list-by-item-type.php new file mode 100644 index 0000000..325d00f --- /dev/null +++ b/views/shared/common/item-relations-show-list-by-item-type.php @@ -0,0 +1,70 @@ +item_type_id; + $subjectRelationsByObjectType[$typeId][] = $subjectRelation; + } + $objectRelationsBySubjectType = array(); + foreach ($objectRelations as $objectRelation) { + $typeId = (integer) $objectRelation['subject_item']->item_type_id; + $objectRelationsBySubjectType[$typeId][] = $objectRelation; + } + // Prepare the list of types with one query. + $itemTypes = array(); + foreach (get_records('ItemType', array(), 0) as $itemType) { + $itemTypes[$itemType->id] = $itemType; + } +?> +

      + +

      + +
        + $relations): ?> +
      • name) : __('No Item Type'); ?> +
          + +
        • + + [] + +
        • + +
        +
      • + +
      + + +

      + +

      + +

        + $relations): ?> +
      • name) : __('No Item Type'); ?> +
          + +
        • + + [] + +
        • + +
        +
      • + +
      + diff --git a/views/shared/common/item-relations-show-list.php b/views/shared/common/item-relations-show-list.php new file mode 100644 index 0000000..5314b07 --- /dev/null +++ b/views/shared/common/item-relations-show-list.php @@ -0,0 +1,31 @@ +id; + + $lastVocab = -1; + foreach ($allRelations as $relation) { + if ($lastVocab != $relation["vocabulary_id"]) { + if ($lastVocab != -1) { echo ""; } + echo "
      " + ."" + .$relation["vocabulary"] + ."
        "; + $lastVocab = $relation["vocabulary_id"]; + } + echo "
      • "; + echo ( $relation['subject_item_id']==$thisItemId ? __('This Item') + : "". + $relation['subject_item_title'] . "" + ); + echo " " . $relation['relation_text'] . " "; + echo ( $relation['object_item_id']==$thisItemId ? __('This Item') + : "". + $relation['object_item_title'] . "" + ); + if ( ($provideRelationComments) and ($relation['relation_comment']) ) { + echo " (".$relation['relation_comment'].")"; + } + echo "
      • "; + } # foreach + echo "
      "; +?> diff --git a/views/shared/common/item-relations-show-table.php b/views/shared/common/item-relations-show-table.php new file mode 100644 index 0000000..c6ecf26 --- /dev/null +++ b/views/shared/common/item-relations-show-table.php @@ -0,0 +1,47 @@ + id; + +$relVocabShowHide = __("Show / Hide"); +$relVocabShowHideAll = __("Show / Hide All"); +?> + + + +"; + } + echo ""; + echo "'; + echo ""; + echo "'; + if ($provideRelationComments) { + echo ""; + } + echo ''; +} # foreach +?> +
      " + . "" + . $relation["vocabulary"] + . "
      " + . ($relation['subject_item_id'] == $thisItemId + ? __('This Item') + : "" . $relation['subject_item_title'] . "" + ) + . '" . $relation['relation_text'] . "" + . ($relation['object_item_id'] == $thisItemId + ? __('This Item') + : "" . $relation['object_item_title'] . "" + ) + . '(" . $relation['relation_comment'] . ")
      diff --git a/views/shared/css/item-relations.css b/views/shared/css/item-relations.css new file mode 100644 index 0000000..8270bfc --- /dev/null +++ b/views/shared/css/item-relations.css @@ -0,0 +1,33 @@ +.subject-id, +.object-id { + font-style: italic; +} +tr.new { + background-color: #f3f3e7; +} +.pg_disabled { + visibility: hidden; +} +.hidden { + display: none; +} +ul#lookup-results li { + cursor: pointer; +} +ul#lookup-results li:active { + background-color: #cccccc; +} +ul#lookup-results li:hover { + background-color: #f3f3e7; +} + +span.relListItemId { + display: inline-block; + text-align: right; + vertical-align: bottom; + overflow: hidden; + margin-right: 1em; + width: 4em; + font-size: 80%; + color: #aaa; +} diff --git a/views/shared/javascripts/item-relations-vocab-toggle.js b/views/shared/javascripts/item-relations-vocab-toggle.js new file mode 100644 index 0000000..eee580b --- /dev/null +++ b/views/shared/javascripts/item-relations-vocab-toggle.js @@ -0,0 +1,38 @@ +jQuery(document).ready(function () { + var $ = jQuery; + + $(".relVocabHead").each(function(element) { + var curVocab = $(this).data("vocab"); + var rowClass = "relVocab_"+curVocab; + var rowCount = $("."+rowClass).size(); + $("th", this).append( + " "+ + "["+relVocabShowHide +" ("+rowCount+")]"+ + "" + ); + // $("."+rowClass).toggle(); + }); + + $(".relVocabShowHideBtn").click(function(e) { + e.preventDefault(); + var curVocab = $(this).data("vocab"); + var rowClass = "relVocab_"+curVocab; + $("."+rowClass).toggle(); + }); + + var allShowHide = false; + $(".relVocabRow").hide(); + + var colspan = $(".relVocabHead th").first().attr('colSpan'); + $("#relVocabTable tbody").prepend( + ""+ + "["+relVocabShowHideAll+"]"+ + "" + ); + + $("#relVocabShowHideAllBtn").click(function(e){ + e.preventDefault(); + allShowHide = !allShowHide; + if (allShowHide) { $(".relVocabRow").show() } else { $(".relVocabRow").hide(); } + }); +}); diff --git a/views/shared/javascripts/item-relations.js b/views/shared/javascripts/item-relations.js new file mode 100644 index 0000000..405c536 --- /dev/null +++ b/views/shared/javascripts/item-relations.js @@ -0,0 +1,311 @@ +jQuery(document).ready(function () { + var $ = jQuery; + var options = {}; + + var updateTimer = null; + + init(); + + function init() { + resetOptions(); + + $('#new_relation_object_item_id').val(''); + $('#object_id').html(''); + $('#object_title').html('' + itemRelationsSearchAndSelect + ''); + $('#new_relation_property_id').val(''); + $('#relation_comment').val(''); + $('#new_relation_object_item_type_id').val(-1); + $('#new_relation_object_collection_id').val(''); + $('#partial_object_title').val(''); + $('#id_limit').val(''); + $('input[name=itemsListSort]:checked').val('timestamp'); + + updateChoices(); + updateAddButton(); + } + + function resetOptions() { + options = { + subject_id: $('#subject_id').attr('data-subject-id'), + partial: '', + id_limit: '', + item_type: -1, + collection: -1, + sort: 'mod_desc', + page: 0, + per_page: 15, + max_page: 0 + }; + } + + function updateChoices() { + if (updateTimer != null) { + clearTimeout(updateTimer); + } + updateTimer = setTimeout(updateChoicesCore, 1000); + } + + function updateChoicesCore() { + if (updateTimer != null) { + clearTimeout(updateTimer); + updateTimer = null; + } + + options['partial'] = $('#partial_object_title').val(); + options['id_limit'] = $('#id_limit').val(); + options['item_type'] = $('#new_relation_object_item_type_id').val(); + options['collection'] = $('#new_relation_object_collection_id').val(); + if ($('input[name=itemsListSort]:checked').val() === 'timestamp') { + options['sort'] = 'mod_desc'; + } + else { + options['sort'] = 'alpha_asc'; + } + if (options['page'] < 0) { + options['page'] = 0; + } + if (options['page'] > options['max_page']) { + options['page'] = options['max_page']; + } + $.ajax({ + url: url, + dataType: 'json', + data: options, + success: function (data) { + var i; + var items = []; + + /* options */ + $('#lookup-results').find('li').remove(); + for (i = 0; i < data['items'].length; ++i) { + // items.push('
    • ' + data['items'][i]['label'] + '
    • '); + items.push('
    • ' + + '#' + data['items'][i]['value'] + " " + + data['items'][i]['label'] + '
    • '); + } + $('#lookup-results').append(items.join('')); + + /* pagination */ + options['max_page'] = Math.floor(data['count'] / options['per_page']); + + if (0 < options['page']) { + $('#selector-previous-page').removeClass('pg_disabled'); + } + else { + $('#selector-previous-page').addClass('pg_disabled'); + } + + if (options['page'] < options['max_page']) { + $('#selector-next-page').removeClass('pg_disabled'); + } + else { + $('#selector-next-page').addClass('pg_disabled'); + } + } + }); + + // Update the list of item types. + $.ajax({ + url: url + 'list-item-types', + dataType: 'json', + success: function (data) { + _loadList('select#new_relation_object_item_type_id', data); + } + }); + + // Update the list of collections. + $.ajax({ + url: url + 'list-collections', + dataType: 'json', + success: function (data) { + _loadList('select#new_relation_object_collection_id', data); + } + }); + } + + function _loadList(element, data) { + var currentValue = $(element).val(); + $(element).empty(); + $.each(data['id'], function(i, id) { + $(element).append( + $('') + .val(id) + .html(data['label'][i])); + }); + $(element).val(currentValue); + } + + function updateAddButton() { + var addButton = $('#add-relation'); + if ($('#new_relation_property_id').val() && $('#new_relation_object_item_id').val()) { + addButton.removeProp('disabled'); + addButton.removeAttr('disabled'); + } + else { + addButton.prop('disabled', true); + addButton.attr('disabled', true); + } + } + + function updateNewRelationHiddenProperty() { + var entry = $(this).closest('tr.item-relations-entry'); + var hiddenInput = entry.find(".item-relations-hidden input[name='item_relations_property_id[]']"); + hiddenInput.val($(this).val()); + }; + + function updateNewRelationHiddenComment() { + var entry = $(this).closest('tr.item-relations-entry'); + var hiddenInput = entry.find(".item-relations-hidden input[name='item_relations_item_relation_relation_comment[]']"); + hiddenInput.val($(this).val()); + }; + + function deleteNewRelation() { + $(this).closest('tr.item-relations-entry').remove(); + return false; + }; + + /* Edit existing relations. */ + + $("select[id^='item_relations_subject_property_']").change(function(e) { + e.preventDefault(); + var id = this.id; + var suffix = this.id.match(/\d+/); + $("#item_relations_subject_property_" + suffix).siblings('span').remove(); + $("#item_relations_subject_property_" + suffix).parent().append('' + + '' + + ''); + }); + + $("input[id^='item_relations_subject_comment_']").change(function(e) { + e.preventDefault(); + var provideSubjectComments = ($("input[id^='item_relations_subject_comment_']").length > 0); + if (provideSubjectComments) { + var id = $(this).attr('id'); + var suffix = this.id.match(/\d+/); + $("#item_relations_subject_comment_" + suffix).siblings('span').remove(); + $("#item_relations_subject_comment_" + suffix).parent().append('' + + '' + + ''); + } + }); + + /* Add new relations. */ + + $('#add-relation').click(function () { + if ($('#add-relation').prop('disabled')) { + return false; + } + + // Set visible row. + var oldRow = $('.item-relations-entry').last(); + var newRow = oldRow.clone(); + var provideRelationComments = ($('#relation_comment').length > 0); + newRow.toggleClass('hidden'); + newRow.find("select[name='item_relations_subject_property[]']").val($('#new_relation_property_id').val()); + var new_url = newRow.find('.item-relations-object a').attr('href'); + newRow.find('.item-relations-object a').attr('href', new_url + $('#new_relation_object_item_id').val()); + newRow.find('.item-relations-object a').text($('#object_title').text()); + if (provideRelationComments) { + newRow.find("input[name='item_relations_subject_comment[]']").val($('#relation_comment').val()); + } + + // Set hidden row for data. + var hidden = _createHiddenNewRelation(); + newRow.find('.item-relations-hidden').html(hidden); + oldRow.before(newRow); + + $(".delete-new-relation").bind('click', deleteNewRelation); + $("select[name='item_relations_subject_property[]'").bind('change', updateNewRelationHiddenProperty); + $("input[name='item_relations_subject_comment[]'").bind('change', updateNewRelationHiddenComment); + + init(); + }); + + function _createHiddenNewRelation() { + var hidden = []; + hidden.push(''); + hidden.push(''); + if ($('#relation_comment').length > 0) { + hidden.push(''); + } + return hidden.join(''); + }; + + /* Search and select an object to create a new relation. */ + + $('#refresh-results').click(function (e) { + e.preventDefault(); + updateChoicesCore(); + }); + + $('#new_relation_object_item_type_id').change(function () { + updateChoices(); + }); + + $('#new_relation_object_collection_id').change(function () { + updateChoices(); + }); + + $('#new_selectObjectSortTimestamp').click(function () { + updateChoicesCore(); + }); + + $('#new_selectObjectSortName').click(function () { + updateChoicesCore(); + }); + + $('#partial_object_title').on('input', function () { + updateChoices(); + }); + + $('#id_limit').on('input', function () { + updateChoices(); + }); + + $('#selector-previous-page a').click(function (e) { + e.preventDefault(); + if (0 < options['page']) { + options['page']--; + updateChoicesCore(); + } + }); + + $('#selector-next-page a').click(function (e) { + e.preventDefault(); + if (options['page'] < options['max_page']) { + options['page']++; + updateChoicesCore(); + } + }); + + $('#lookup-results').on('click', 'li', function () { + $('#new_relation_object_item_id').val($(this).attr('data-value')); + $('#object_id').html( + '#' + + $(this).attr('data-value') + + '' + ); + var htmlSansSpan = $(this).html(); + htmlSansSpan = htmlSansSpan.substr(htmlSansSpan.indexOf("")+8); + $('#object_title').html( + '' + + htmlSansSpan + + '' + ); + updateAddButton(); + }); + + $('#new_relation_property_id').change(function () { + updateAddButton(); + }); + + $('#cancel-relation').click(function(e) { + e.preventDefault(); + }); +}); diff --git a/views/shared/javascripts/lity/lity.css b/views/shared/javascripts/lity/lity.css new file mode 100644 index 0000000..105b4af --- /dev/null +++ b/views/shared/javascripts/lity/lity.css @@ -0,0 +1,160 @@ +/*! Lity - v1.2.0 - 2015-05-15 +* http://sorgalla.com/lity/ +* Copyright (c) 2015 Jan Sorgalla; Licensed MIT */ +.lity { + z-index: 9990; + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + white-space: nowrap; + background: #0b0b0b; + background: rgba(0, 0, 0, 0.9); + outline: none !important; + opacity: 0; + -webkit-transition: opacity 0.2s ease; + -o-transition: opacity 0.2s ease; + transition: opacity 0.2s ease; +} +.lity.lity-opened { + opacity: 1; +} +.lity.lity-closed { + opacity: 0; +} +.lity * { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.lity-wrap { + z-index: 9990; + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + text-align: center; + outline: none !important; +} +.lity-wrap:before { + content: ''; + display: inline-block; + height: 100%; + vertical-align: middle; + margin-right: -0.25em; +} +.lity-loader { + z-index: 9991; + color: #fff; + position: absolute; + top: 50%; + margin-top: -0.8em; + width: 100%; + text-align: center; + font-size: 14px; + font-family: Arial, Helvetica, sans-serif; + opacity: 0; + -webkit-transition: opacity 0.2s ease; + -o-transition: opacity 0.2s ease; + transition: opacity 0.2s ease; +} +.lity-loading .lity-loader { + opacity: 1; +} +.lity-container { + z-index: 9992; + position: relative; + text-align: left; + vertical-align: middle; + display: inline-block; + white-space: normal; + max-width: 100%; + max-height: 100%; + outline: none !important; + opacity: 1; + -webkit-transition: opacity 0.2s ease; + -o-transition: opacity 0.2s ease; + transition: opacity 0.2s ease; +} +.lity-loading .lity-container { + opacity: 0; +} +.lity-container:after { + content: ''; + position: absolute; + left: 0; + top: 0; + bottom: 0; + display: block; + right: 0; + width: auto; + height: auto; + z-index: -1; + -webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.6); + box-shadow: 0 0 8px rgba(0, 0, 0, 0.6); +} +.lity-content { + z-index: 9993; + width: 100%; +} +.lity-close { + z-index: 9994; + width: 35px; + height: 35px; + line-height: 35px; + position: fixed; + right: 0; + top: 0; + text-decoration: none; + text-align: center; + padding: 0; + color: #fff; + font-style: normal; + font-size: 35px; + font-family: Arial, Baskerville, monospace; + text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.6); + border: 0; + background: transparent; + outline: none !important; + -webkit-box-shadow: none; + box-shadow: none; + -webkit-appearance: none; + cursor: pointer; +} +.lity-close:active { + top: 1px; +} +/* Image */ +.lity-image img { + max-width: 100%; + display: block; + line-height: 0; + border: 0; +} +/* iFrame */ +.lity-iframe .lity-container { + width: 100%; + max-width: 964px; +} +.lity-iframe-container { + width: 100%; + height: 0; + overflow: hidden; + padding-top: 56.25%; +} +.lity-iframe-container iframe { + position: absolute; + display: block; + top: 0; + left: 0; + width: 100%; + height: 100%; + -webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.6); + box-shadow: 0 0 8px rgba(0, 0, 0, 0.6); + background: #000; +} +.lity-hide { + display: none; +} diff --git a/views/shared/javascripts/lity/lity.js b/views/shared/javascripts/lity/lity.js new file mode 100644 index 0000000..aea33f7 --- /dev/null +++ b/views/shared/javascripts/lity/lity.js @@ -0,0 +1,373 @@ +/*! Lity - v1.2.0 - 2015-05-15 +* http://sorgalla.com/lity/ +* Copyright (c) 2015 Jan Sorgalla; Licensed MIT */ +(function(window, factory) { + if (typeof define === 'function' && define.amd) { + define(['jquery'], function($) { + return factory(window, $); + }); + } else if (typeof module === 'object' && typeof module.exports === 'object') { + module.exports = factory(window, require('jquery')); + } else { + window.lity = factory(window, window.jQuery || window.Zepto); + } +}(window, function(window, $) { + 'use strict'; + + var document = window.document; + + var _win = $(window); + + var _imageRegexp = /\.(png|jpg|jpeg|gif|tiff|bmp)(\?\S*)?$/i; + var _youtubeIdRegex = /v=([^&]+)/; + var _vimeoIdRegex = /\/([^\?&]+)$/; + + var _defaultHandlers = { + image: imageHandler, + inline: inlineHandler, + iframe: iframeHandler + }; + + var _defaultOptions = { + esc: true + }; + + var transitionEndEvent = (function() { + var el = document.createElement('div'); + + var transEndEventNames = { + WebkitTransition : 'webkitTransitionEnd', + MozTransition : 'transitionend', + OTransition : 'oTransitionEnd otransitionend', + transition : 'transitionend' + }; + + for (var name in transEndEventNames) { + if (el.style[name] !== undefined) { + return transEndEventNames[name]; + } + } + + return false; + })(); + + function transitionEnd(element) { + var deferred = $.Deferred(); + + if (!transitionEndEvent) { + deferred.resolve(); + } else { + element.one(transitionEndEvent, deferred.resolve); + setTimeout(deferred.reject, 500); + } + + return deferred.promise(); + } + + var _html = '\ +
      \ +
      \ +
      Loading...
      \ +
      \ +
      \ + \ +
      \ +
      \ +
      '; + + function settings(settings, key, value) { + if (arguments.length === 1) { + return $.extend({}, settings); + } + + if (typeof key === 'string') { + if (typeof value === 'undefined') { + return typeof settings[key] === 'undefined' ? + null : + settings[key]; + } + settings[key] = value; + } else { + $.extend(settings, key); + } + + return this; + } + + function protocol() { + return 'file:' === window.location.protocol ? 'http:' : ''; + } + + function error(msg) { + return $('').append(msg); + } + + function imageHandler(target) { + if (!_imageRegexp.test(target)) { + return false; + } + + var img = $(''); + var deferred = $.Deferred(); + var failed = function() { + deferred.reject(error('Failed loading image')); + }; + + img + .on('load', function() { + if (this.naturalWidth === 0) { + return failed(); + } + + deferred.resolve(img); + }) + .on('error', failed) + ; + + return deferred.promise(); + } + + function inlineHandler(target) { + try { + var el = $(target); + } catch (e) { + return false; + } + + var placeholder = $(''); + + return el + .after(placeholder) + .on('lity:ready', function(e, instance) { + instance.one('lity:close', function() { + placeholder + .before(el.addClass('lity-hide')) + .remove() + ; + }); + }) + ; + } + + function iframeHandler(target) { + var id; + + if (target.indexOf('youtube.') > -1 && target.indexOf('/embed') < 0) { + id = _youtubeIdRegex.exec(target)[1]; + target = protocol() + '//www.youtube.com/embed/' + id + '?autoplay=1'; + } + + if (target.indexOf('vimeo.') > -1 && target.indexOf('player.vimeo.') < 0) { + id = _vimeoIdRegex.exec(target.split('//')[1])[1]; + target = protocol() + '//player.vimeo.com/video/' + id + '?autoplay=1'; + } + + if (target.indexOf('//maps.google.') > -1 && target.indexOf('output=embed') < 0) { + target += '&output=embed'; + } + + return '
      '; + } + + function lity(options) { + var _options = $.extend({}, _defaultOptions), + _handlers = $.extend({}, _defaultHandlers), + _instance, + _content, + _ready = $.Deferred().resolve(); + + function keyup(e) { + if (e.keyCode === 27) { + close() + } + } + + function resize() { + var height = document.documentElement.clientHeight ? document.documentElement.clientHeight : Math.round(_win.height()); + + _content + .css('max-height', Math.floor(height) + 'px') + .trigger('lity:resize', [_instance, popup]) + ; + } + + function ready(content) { + if (!_instance) { + return; + } + + _content = $(content); + + _win.on('resize', resize); + resize(); + + _instance + .find('.lity-loader') + .each(function() { + var el = $(this); + transitionEnd(el).always(function() { + el.remove(); + }); + }) + ; + + _instance + .removeClass('lity-loading') + .find('.lity-content') + .empty() + .append(_content) + ; + + _content + .removeClass('lity-hide') + .trigger('lity:ready', [_instance, popup]) + ; + + _ready.resolve(); + } + + function init(handler, content, options) { + _instance = $(_html).appendTo('body'); + + if (!!options.esc) { + _win.one('keyup', keyup); + } + + setTimeout(function() { + _instance + .addClass('lity-opened lity-' + handler) + .on('click', '[data-lity-close]', function(e) { + $(e.target).is('[data-lity-close]') && close(); + }) + .trigger('lity:open', [_instance, popup]) + ; + + $.when(content).always(ready); + }, 0); + } + + function open(target, options) { + var handler, content; + + if (options.handler && _handlers[options.handler]) { + content = _handlers[options.handler](target, instance, popup); + handler = options.handler; + } else { + var handlers = $.extend({}, _handlers), lateHandlers = {}; + + // Run inline and iframe handlers after all other handlers + $.each(['inline', 'iframe'], function(i, name) { + if (handlers[name]) { + lateHandlers[name] = handlers[name]; + } + + delete handlers[name]; + }); + + var call = function(name, callback) { + // Handler might be "removed" by setting callback to null + if (!callback) { + return true; + } + + content = callback(target, popup); + + if (!!content) { + handler = name; + return false; + } + }; + + $.each(handlers, call); + !handler && $.each(lateHandlers, call); + } + + if (content) { + _ready = $.Deferred(); + $.when(close()).done($.proxy(init, null, handler, content, options)); + } + + return !!content; + } + + function close() { + if (!_instance) { + return; + } + + var deferred = $.Deferred(); + + _ready.done(function() { + _win + .off('resize', resize) + .off('keyup', keyup) + ; + + _content && _content + .trigger('lity:close', [_instance, popup]) + ; + + _instance + .removeClass('lity-opened') + .addClass('lity-closed') + ; + + var instance = _instance; + _instance = null; + _content = null; + + transitionEnd(instance).always(function() { + instance.remove(); + deferred.resolve(); + }); + }); + + return deferred.promise(); + } + + function popup(event) { + // If not an event, act as alias of popup.open + if (!event.preventDefault) { + return popup.open(event); + } + + var el = $(this); + var target = el.data('lity-target') || el.attr('href') || el.attr('src'); + + if (!target) { + return; + } + + var options = $.extend( + {}, + _options, + el.data('lity-options') || el.data('lity') + ); + + open(target, options) && event.preventDefault(); + } + + popup.handlers = $.proxy(settings, popup, _handlers); + popup.options = $.proxy(settings, popup, _options); + + popup.open = function(target) { + open(target, _options); + return popup; + }; + + popup.close = function() { + close(); + return popup; + }; + + return popup.options(options); + } + + lity.version = '1.2.0'; + lity.handlers = $.proxy(settings, lity, _defaultHandlers); + lity.options = $.proxy(settings, lity, _defaultOptions); + + $(document).on('click', '[data-lity]', lity()); + + return lity; +})); diff --git a/views/shared/javascripts/lity/lity.min.css b/views/shared/javascripts/lity/lity.min.css new file mode 100644 index 0000000..bd8aeeb --- /dev/null +++ b/views/shared/javascripts/lity/lity.min.css @@ -0,0 +1,3 @@ +/*! Lity - v1.2.0 - 2015-05-15 +* http://sorgalla.com/lity/ +* Copyright (c) 2015 Jan Sorgalla; Licensed MIT */.lity{z-index:9990;position:fixed;top:0;right:0;bottom:0;left:0;white-space:nowrap;background:#0b0b0b;background:rgba(0,0,0,0.9);outline:none !important;opacity:0;-webkit-transition:opacity .2s ease;-o-transition:opacity .2s ease;transition:opacity .2s ease}.lity.lity-opened{opacity:1}.lity.lity-closed{opacity:0}.lity *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.lity-wrap{z-index:9990;position:fixed;top:0;right:0;bottom:0;left:0;text-align:center;outline:none !important}.lity-wrap:before{content:'';display:inline-block;height:100%;vertical-align:middle;margin-right:-0.25em}.lity-loader{z-index:9991;color:#fff;position:absolute;top:50%;margin-top:-0.8em;width:100%;text-align:center;font-size:14px;font-family:Arial,Helvetica,sans-serif;opacity:0;-webkit-transition:opacity .2s ease;-o-transition:opacity .2s ease;transition:opacity .2s ease}.lity-loading .lity-loader{opacity:1}.lity-container{z-index:9992;position:relative;text-align:left;vertical-align:middle;display:inline-block;white-space:normal;max-width:100%;max-height:100%;outline:none !important;opacity:1;-webkit-transition:opacity .2s ease;-o-transition:opacity .2s ease;transition:opacity .2s ease}.lity-loading .lity-container{opacity:0}.lity-container:after{content:'';position:absolute;left:0;top:0;bottom:0;display:block;right:0;width:auto;height:auto;z-index:-1;-webkit-box-shadow:0 0 8px rgba(0,0,0,0.6);box-shadow:0 0 8px rgba(0,0,0,0.6)}.lity-content{z-index:9993;width:100%}.lity-close{z-index:9994;width:35px;height:35px;line-height:35px;position:fixed;right:0;top:0;text-decoration:none;text-align:center;padding:0;color:#fff;font-style:normal;font-size:35px;font-family:Arial,Baskerville,monospace;text-shadow:0 1px 2px rgba(0,0,0,0.6);border:0;background:transparent;outline:none !important;-webkit-box-shadow:none;box-shadow:none;-webkit-appearance:none;cursor:pointer}.lity-close:active{top:1px}.lity-image img{max-width:100%;display:block;line-height:0;border:0}.lity-iframe .lity-container{width:100%;max-width:964px}.lity-iframe-container{width:100%;height:0;overflow:hidden;padding-top:56.25%}.lity-iframe-container iframe{position:absolute;display:block;top:0;left:0;width:100%;height:100%;-webkit-box-shadow:0 0 8px rgba(0,0,0,0.6);box-shadow:0 0 8px rgba(0,0,0,0.6);background:#000}.lity-hide{display:none} \ No newline at end of file diff --git a/views/shared/javascripts/lity/lity.min.js b/views/shared/javascripts/lity/lity.min.js new file mode 100644 index 0000000..30eb307 --- /dev/null +++ b/views/shared/javascripts/lity/lity.min.js @@ -0,0 +1,4 @@ +/*! Lity - v1.2.0 - 2015-05-15 +* http://sorgalla.com/lity/ +* Copyright (c) 2015 Jan Sorgalla; Licensed MIT */ +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(c){return b(a,c)}):"object"==typeof module&&"object"==typeof module.exports?module.exports=b(a,require("jquery")):a.lity=b(a,a.jQuery||a.Zepto)}(window,function(a,b){"use strict";function c(a){var c=b.Deferred();return r?(a.one(r,c.resolve),setTimeout(c.reject,500)):c.resolve(),c.promise()}function d(a,c,d){if(1===arguments.length)return b.extend({},a);if("string"==typeof c){if("undefined"==typeof d)return"undefined"==typeof a[c]?null:a[c];a[c]=d}else b.extend(a,c);return this}function e(){return"file:"===a.location.protocol?"http:":""}function f(a){return b('').append(a)}function g(a){if(!m.test(a))return!1;var c=b(''),d=b.Deferred(),e=function(){d.reject(f("Failed loading image"))};return c.on("load",function(){return 0===this.naturalWidth?e():void d.resolve(c)}).on("error",e),d.promise()}function h(a){try{var c=b(a)}catch(d){return!1}var e=b('');return c.after(e).on("lity:ready",function(a,b){b.one("lity:close",function(){e.before(c.addClass("lity-hide")).remove()})})}function i(a){var b;return a.indexOf("youtube.")>-1&&a.indexOf("/embed")<0&&(b=n.exec(a)[1],a=e()+"//www.youtube.com/embed/"+b+"?autoplay=1"),a.indexOf("vimeo.")>-1&&a.indexOf("player.vimeo.")<0&&(b=o.exec(a.split("//")[1])[1],a=e()+"//player.vimeo.com/video/"+b+"?autoplay=1"),a.indexOf("//maps.google.")>-1&&a.indexOf("output=embed")<0&&(a+="&output=embed"),'
      '}function j(a){function e(a){27===a.keyCode&&j()}function f(){var a=k.documentElement.clientHeight?k.documentElement.clientHeight:Math.round(l.height());o.css("max-height",Math.floor(a)+"px").trigger("lity:resize",[n,m])}function g(a){n&&(o=b(a),l.on("resize",f),f(),n.find(".lity-loader").each(function(){var a=b(this);c(a).always(function(){a.remove()})}),n.removeClass("lity-loading").find(".lity-content").empty().append(o),o.removeClass("lity-hide").trigger("lity:ready",[n,m]),u.resolve())}function h(a,c,d){n=b(s).appendTo("body"),d.esc&&l.one("keyup",e),setTimeout(function(){n.addClass("lity-opened lity-"+a).on("click","[data-lity-close]",function(a){b(a.target).is("[data-lity-close]")&&j()}).trigger("lity:open",[n,m]),b.when(c).always(g)},0)}function i(a,c){var d,e;if(c.handler&&t[c.handler])e=t[c.handler](a,instance,m),d=c.handler;else{var f=b.extend({},t),g={};b.each(["inline","iframe"],function(a,b){f[b]&&(g[b]=f[b]),delete f[b]});var i=function(b,c){return c?(e=c(a,m),e?(d=b,!1):void 0):!0};b.each(f,i),!d&&b.each(g,i)}return e&&(u=b.Deferred(),b.when(j()).done(b.proxy(h,null,d,e,c))),!!e}function j(){if(n){var a=b.Deferred();return u.done(function(){l.off("resize",f).off("keyup",e),o&&o.trigger("lity:close",[n,m]),n.removeClass("lity-opened").addClass("lity-closed");var b=n;n=null,o=null,c(b).always(function(){b.remove(),a.resolve()})}),a.promise()}}function m(a){if(!a.preventDefault)return m.open(a);var c=b(this),d=c.data("lity-target")||c.attr("href")||c.attr("src");if(d){var e=b.extend({},r,c.data("lity-options")||c.data("lity"));i(d,e)&&a.preventDefault()}}var n,o,r=b.extend({},q),t=b.extend({},p),u=b.Deferred().resolve();return m.handlers=b.proxy(d,m,t),m.options=b.proxy(d,m,r),m.open=function(a){return i(a,r),m},m.close=function(){return j(),m},m.options(a)}var k=a.document,l=b(a),m=/\.(png|jpg|jpeg|gif|tiff|bmp)(\?\S*)?$/i,n=/v=([^&]+)/,o=/\/([^\?&]+)$/,p={image:g,inline:h,iframe:i},q={esc:!0},r=function(){var a=k.createElement("div"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return b[c];return!1}(),s='
      Loading...
      ';return j.version="1.2.0",j.handlers=b.proxy(d,j,p),j.options=b.proxy(d,j,q),b(k).on("click","[data-lity]",j()),j}); \ No newline at end of file