Difference between revisions of "Bundles"

From CollectiveAccess Documentation
Jump to: navigation, search
(User interface Settings)
(User interface Settings)
Line 43: Line 43:
 
|-
 
|-
 
|Special (hierarchy_location and hierarchy_navigation only)||open_hierarchy||If checked hierarchy browser will be open when form loads.||1 (open)||0 or 1
 
|Special (hierarchy_location and hierarchy_navigation only)||open_hierarchy||If checked hierarchy browser will be open when form loads.||1 (open)||0 or 1
 +
|-
 +
|Relationship (ca_list_items only)||restrict_to_lists||Restricts display to items from the specified list(s). Leave all unselected for no restriction.||||list code
 +
|-
 +
|Relationship (ca_list_items, ca_storage_locations, ca_places only)||useHierarchicalBrowser||If set a hierarchy browser will be used to select the related item rather than an auto-completing text field.||0||0 or 1
 +
|-
 +
|Relationship (ca_list_items, ca_storage_locations, ca_places only)||hierarchicalBrowserHeight||The height of the hierarchical browser displayed when the ''useHierarchicalBrowser'' option is set.||200px||A pixel dimension ending with 'px' (eg. 500px)
 +
|-
 +
|Relationship (ca_objects)||restrictToTermsRelatedToCollection||Will restrict checklist to those terms applied to related collections.||0||0 or 1
 +
|-
 +
|Relationship (ca_objects)||restrictToTermsOnCollectionWithRelationshipType||Will restrict checklist to terms related to collections with the specified relationship type. Leave all unselected for no restriction.||||type code
 +
|-
 +
|Relationship (ca_objects)||restrictToTermsOnCollectionUseRelationshipType||Specified the relationship used to relate collection-restricted terms to this object.||||type code
 
|-
 
|-
 
|Relationship||restrict_to_relationship_types||Restricts display to items related using the specified relationship type(s). Leave all unselected for no restriction.||||type code
 
|Relationship||restrict_to_relationship_types||Restricts display to items related using the specified relationship type(s). Leave all unselected for no restriction.||||type code
Line 50: Line 62:
 
|Relationship||dont_include_subtypes_in_type_restriction||Normally restricting to type(s) automatically includes all sub-(child) types. If this option is checked then the lookup results will include items with the selected type(s) only||0||0 or 1
 
|Relationship||dont_include_subtypes_in_type_restriction||Normally restricting to type(s) automatically includes all sub-(child) types. If this option is checked then the lookup results will include items with the selected type(s) only||0||0 or 1
 
|-
 
|-
|Relationship (ca_list_items only)||restrict_to_lists||Restricts display to items from the specified list(s). Leave all unselected for no restriction.||||list code
+
|Relationship||list_format||Format of relationship list.||bubbles||bubbles or list
 
|-
 
|-
|Relationship (ca_list_items, ca_storage_locations, ca_places only)||useHierarchicalBrowser||If set a hierarchy browser will be used to select the related item rather than an auto-completing text field.||0||0 or 1
+
|Relationship||dontShowDeleteButton||If checked the delete relationship control will not be provided.||0||0 or 1
 
|-
 
|-
|Relationship (ca_list_items, ca_storage_locations, ca_places only)||hierarchicalBrowserHeight||The height of the hierarchical browser displayed when the ''useHierarchicalBrowser'' option is set.||200px||A pixel dimension ending with 'px' (eg. 500px)
+
|Relationship||display_template||Layout for relationship when displayed in list (can include HTML). Element code tags prefixed with the ^ character can be used to represent the value in the template. For example: ''^my_element_code''.||^preferred_labels||Uses the [[Bundle_Display_Templates|bundle display template syntax]]
|-
 
|Relationship||list_format||Format of relationship list.||bubbles||bubbles or list
 
 
|-
 
|-
 
|Relationship or Attribute||sort||Method used to sort related items.||||
 
|Relationship or Attribute||sort||Method used to sort related items.||||
 
|-
 
|-
 
|Relationship or Attribute||sortDirection||Direction of sort, when not in a user-specified order.||ASC||ASC or DESC
 
|Relationship or Attribute||sortDirection||Direction of sort, when not in a user-specified order.||ASC||ASC or DESC
 +
|-
 +
|Attribute||usewysiwygeditor||Check this option if you want to use a word-processor like editor with this text field. If you expect users to enter rich text (italic, bold, underline) then you might want to enable this.||null||0 or 1
 
|-
 
|-
 
|Relationship||colorFirstItem||If set first item in list will use this color.||||
 
|Relationship||colorFirstItem||If set first item in list will use this color.||||
 
|-
 
|-
 
|Relationship||colorLastItem||If set last item in list will use this color.||||
 
|Relationship||colorLastItem||If set last item in list will use this color.||||
|-
 
|Relationship||dontShowDeleteButton||If checked the delete relationship control will not be provided.||0||0 or 1
 
|-
 
|Relationship||display_template||Layout for relationship when displayed in list (can include HTML). Element code tags prefixed with the ^ character can be used to represent the value in the template. For example: ''^my_element_code''.||^preferred_labels||Uses the [[Bundle_Display_Templates|bundle display template syntax]]
 
 
|}
 
|}
  

Revision as of 17:05, 10 April 2013

Bundles

Bundles are elements that can be placed on UI screens, included in search forms or displays. They can be attributes of a specific element set or database fields intrinsic to a specific item type. Bundles can be functional elements that allow cataloguers to establish relationships between items, add and remove items from sets and manage an item’s location in a larger hierarchy. Bundles are so named because they are essentially black-boxes that encapsulate various functionality.


Below is a break down of the bundle classes and the properties that are particular to each type.

Bundle type Also known as Description Example
Basic bundle Administrative bundle, Intrinsic bundle Always present regardless of configuration. Single data entry; does not repeat. access
Relationship bundle Related table Bundles that create relationships between items. ca_objects
Label bundles Name or Title bundle Human-readable short descriptions used for display to identify a record. preferred_labels
Attribute bundles Metadata element Any field created by a user. ca_attribute_elementcode
Special bundles Bundles that allow a cataloger to manage an item's locations in, for example, sets and hierarchies hierarchy_location

User interface Settings

There are several settings that can be used to configure all bundles, regardless of type, when they are placed on a user interface screen.

Settings Description Default Values
label Custom label text to use for this placement of this bundle.
add_label Custom text to use for the add button for the placement of this bundle.
description Descriptive text to use for help for bundle. Will override descriptive text set for underlying metadata element, if set.
readonly If checked, field will not be editable. 0 (not read only) 0 or 1


However, there are type-specific settings as well, outlined below.

Bundle type Settings Description Default Values
Special (hierarchy_location and hierarchy_navigation only) open_hierarchy If checked hierarchy browser will be open when form loads. 1 (open) 0 or 1
Relationship (ca_list_items only) restrict_to_lists Restricts display to items from the specified list(s). Leave all unselected for no restriction. list code
Relationship (ca_list_items, ca_storage_locations, ca_places only) useHierarchicalBrowser If set a hierarchy browser will be used to select the related item rather than an auto-completing text field. 0 0 or 1
Relationship (ca_list_items, ca_storage_locations, ca_places only) hierarchicalBrowserHeight The height of the hierarchical browser displayed when the useHierarchicalBrowser option is set. 200px A pixel dimension ending with 'px' (eg. 500px)
Relationship (ca_objects) restrictToTermsRelatedToCollection Will restrict checklist to those terms applied to related collections. 0 0 or 1
Relationship (ca_objects) restrictToTermsOnCollectionWithRelationshipType Will restrict checklist to terms related to collections with the specified relationship type. Leave all unselected for no restriction. type code
Relationship (ca_objects) restrictToTermsOnCollectionUseRelationshipType Specified the relationship used to relate collection-restricted terms to this object. type code
Relationship restrict_to_relationship_types Restricts display to items related using the specified relationship type(s). Leave all unselected for no restriction. type code
Relationship restrict_to_types Restricts display to items of the specified type(s). Leave all unselected for no restriction. type code
Relationship dont_include_subtypes_in_type_restriction Normally restricting to type(s) automatically includes all sub-(child) types. If this option is checked then the lookup results will include items with the selected type(s) only 0 0 or 1
Relationship list_format Format of relationship list. bubbles bubbles or list
Relationship dontShowDeleteButton If checked the delete relationship control will not be provided. 0 0 or 1
Relationship display_template Layout for relationship when displayed in list (can include HTML). Element code tags prefixed with the ^ character can be used to represent the value in the template. For example: ^my_element_code. ^preferred_labels Uses the bundle display template syntax
Relationship or Attribute sort Method used to sort related items.
Relationship or Attribute sortDirection Direction of sort, when not in a user-specified order. ASC ASC or DESC
Attribute usewysiwygeditor Check this option if you want to use a word-processor like editor with this text field. If you expect users to enter rich text (italic, bold, underline) then you might want to enable this. null 0 or 1
Relationship colorFirstItem If set first item in list will use this color.
Relationship colorLastItem If set last item in list will use this color.


Here's an example of how some of the settings above would look at the code-level in and xml profile:

           <placement code="ca_film">
             <bundle>ca_objects</bundle>
             <settings>
               <setting name="restrict_to_types">film</setting>
               <setting name="label" locale="en_US">Related films</setting>
               <setting name="add_label" locale="en_US">Add film</setting>
             </settings>
           </placement>

Display Settings

Global display settings:

Settings Description Default Values
show_empty_values If checked all values will be displayed, whether there is content for them or not. 1 0 or 1


Bundle display settings for all types:

Settings Description Default Values
label Custom label text to use for this placement of this bundle. Text


Type-specific bundle display settings:

Bundle type Settings Description Default Values
Label, Attribute, Relationship delimiter Text to place in-between repeating values.
Label, Attribute format Template used to format output.
Label, Attribute maximum_length Maximum length, in characters, of displayed information. 100 Characters
Relationship makeEditorLink If set name of related item will be displayed as a link to edit the item. 0 (not a link) 0 or 1
Relationship restrict_to_relationship_types Restricts display to items related using the specified relationship type(s). Leave all unselected for no restriction. type code
Relationship restrict_to_types Restricts display to items of the specified type(s). Leave all unselected for no restriction. type code
Relationship show_hierarchy If checked the full hierarchical path will be shown. 1 (full hierarchy shown) 0 or 1
Relationship remove_first_items If set to a non-zero value, the specified number of items at the top of the hierarchy will be omitted. For example, if set to 2, the root and first child of the hierarchy will be omitted. 0 Integers zero or greater based on hierarchy
Relationship hierarchy_order Determines order in which hierarchy is displayed. ASC (top first) DESC (bottom first)


Search Form Settings

Regardless of type, bundles can take the follow setting when they are used in search forms.

Settings Description Default Values
label Custom label text to use for this placement of this bundle. Text
width Width, in pixels, of search form elements. 100px A pixel dimension ending with 'px' (eg. 500px)
Namespaces

Variants
Actions
Navigation
Tools
User
Personal tools