# This patch file was generated by NetBeans IDE
# This patch can be applied using context Tools: Apply Diff Patch action on respective folder.
# It uses platform neutral UTF-8 encoding.
# Above lines and this line are ignored by the patching process.
Index: contributions/modules/millennium/millennium.admin.inc
--- contributions/modules/millennium/millennium.admin.inc Base (1.1.4.4)
+++ contributions/modules/millennium/millennium.admin.inc Locally Modified (Based On 1.1.4.4)
@@ -302,6 +302,18 @@
     '#default_value' => variable_get('millennium_coverimage_baseurl', ''),
     '#description' => t('Use the placeholder !id in the URL where the ISBN or ISBN will be placed. You can also specify: !type (Biblio Type number), !tit (Title), !aut (Author(s))') .' '. t('For example') .': http://example.com/getimage?isbn=!id&type=!type',
   );
+  $form['general']['millennium_display_hold_link'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Show link to place "request item" page at source OPAC'),
+    '#description' => t('This link will take the user to the originating OPAC.'),
+    '#default_value' => variable_get('millennium_display_hold_link', 1),
+  );
+  $form['general']['millennium_display_original_record_link'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Show link to the original record at source OPAC'),
+    '#description' => t('This link will take the user to the originating OPAC.'),
+    '#default_value' => variable_get('millennium_display_original_record_link', 1),
+  );
 
   $form['holdings'] = array(
     '#type' => 'fieldset',
Index: contributions/modules/millennium/millennium.install
--- contributions/modules/millennium/millennium.install Base (1.1.2.5.4.3)
+++ contributions/modules/millennium/millennium.install Locally Modified (Based On 1.1.2.5.4.3)
@@ -283,4 +283,7 @@
   variable_del('millennium_map_available_only');
   variable_del('millennium_availability_strings');
   variable_del('millennium_opacname_vid');
+  variable_del('millennium_display_hold_link');
+  variable_del('millennium_display_original_record_link');
+  variable_del('millennium_display_biblio_data');
 }
Index: contributions/modules/millennium/millennium.module
--- contributions/modules/millennium/millennium.module Base (1.13.2.34.2.4)
+++ contributions/modules/millennium/millennium.module Locally Modified (Based On 1.13.2.34.2.4)
@@ -33,14 +33,15 @@
   drupal_add_css( drupal_get_path('module', 'millennium') .'/millennium.css');
 
   $_millennium_field_labels = array(
-    'title' => t('Title'),
     'type' => t('Item type'),
+    'title' => t('Title'),
     'alternate_title' => t('Alternate title'),
     'short_title' => t('Short title'),
     'translated_title' => t('Translated title'),
     'authors' => t('Author(s)'),
     'corp_author' => t('Corporate author'),
     'secondary_authors' => t('Secondary author(s)'),
+    'series' => t('Series'),
     'edition' => t('Edition'),
     'imprint' => t('Imprint'),
     'imprint_name' => t('Publisher'),
@@ -54,7 +55,6 @@
     'notes' => t('Notes'),
     'item_description' => t('Physical description'),
     'links' => t('Related links'),
-    'series' => t('Series'),
     'other_number' => t('Other number'),
   );
 
@@ -888,6 +888,7 @@
   }
 
   $base_url = db_result(db_query("SELECT base_url FROM {millennium_node_bib} WHERE nid=%d", $nid));
+  if (variable_get('millennium_display_hold_link', 1)) {
   $hold_url = millennium_permalink($bib_recnum, $base_url, "hold");
   $links["millennium_holds"] = array(
     'title' => t('Place hold or request delivery'),
@@ -899,6 +900,20 @@
       'rel' => 'nofollow',
     ),
   );
+  }
+  if (variable_get('millennium_display_hold_link', 1)) {
+    $record_url = millennium_permalink($bib_recnum, $base_url);
+    $links["millennium_record"] = array(
+      'title' => t('View source record'),
+      'href' => $record_url,
+      'attributes' => array(
+        'title' => t('View the source record at the library catalog'),
+        'id' => 'millennium-record-nid-'. $nid,
+        'class' => 'millennium record',
+        'rel' => 'nofollow',
+      ),
+    );
+  }
   return $links;
 }
 
@@ -1785,10 +1800,10 @@
   // Define subfield regexp for special cases
   // biblio field name => regexp
   $biblio_subfields = array(
-    "title" => "[abp]",
-    "title_head" => "[a]",
-    "title_remainder" => "[b]",
-    "title_author" => "[c]",
+    "title" => "[abp]",         // Full, concatenated title
+    "title_head" => "[a]",      // First part of multipart title
+    "title_remainder" => "[b]", // Rest of multipart title
+    "title_author" => "[c]",    // Statement of responsibility
     "corp_author" => "[ab]",
     "alternate_title" => "[apb]",
     "translated_title" => "[apb]",
@@ -1797,7 +1812,7 @@
 
   // Define repeatable fields
   $biblio_repeatable = array(
-    'isbn', 'issn', 'authors', 'corp_author'
+    'isbn', 'issn', 'authors', 'corp_author', 'alternate_title', 'series'
   );
 
   foreach ($tags as $fieldname => $tag) {
@@ -2410,6 +2425,7 @@
   $show = "recordlink";
   $msg = t("Show availability and holdings");
   $base_url = db_result(db_query("SELECT base_url FROM {millennium_node_bib} WHERE nid=%d", $nid));
+  $show = false;
   if (!$page) {
     // We are in teaser view
     switch ($option) {
@@ -2422,7 +2438,7 @@
         break;
 
       default:
-        $show = "recordlink";
+        break;
     }
   }
   else {
@@ -2434,7 +2450,7 @@
         break;
 
       default:
-        $show = "recordlink";
\ No newline at end of file
+        break;
\ No newline at end of file
     }
   }
 
