Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
frontend:colltab [2012/05/04 11:25]
giancarlo
frontend:colltab [2012/05/29 10:41]
giancarlo
Line 1: Line 1:
-====== Custom Collection tab title ======+====== Custom Collection tab title and info======
  
 Edit ''CollectionClass.inc'' in islandora module and change '''#title''' value: Edit ''CollectionClass.inc'' in islandora module and change '''#title''' value:
Line 16: Line 16:
     }     }
     $results = $this->getRelatedItems($this->pid, $query);     $results = $this->getRelatedItems($this->pid, $query);
- +</code> 
-    $collection_items = $this->renderCollection($results, $this->pid, NULL, NULL, $page_number); +<wrap tip>Tip</wrap> 
-    $collection_item = new Fedora_Item($this->pid); +<WRAP prewrap center caution> 
-    // Check the form post to see if we are in the middle of an ingest operation. +<code php> 
-    $show_ingest_tab = (!empty($_POST['form_id']) && $_POST['form_id'] == 'fedora_repository_ingest_form$ +        $colleinfo = NULL; 
-    $add_to_collection = $this->getIngestInterface(); +        if ($item->exists() && array_key_exists('INFO', $item->datastreams)) { 
-    if (!$show_ingest_tab) { +            $colleinfo = $item->get_datastream_dissemination('INFO'); 
-      $view_selected = true; +        } 
-    +        $collection_items = $this->renderCollection($results, $this->pid, NULL, NULL, $page_number); 
-    drupal_set_message(); +        $collection_item = new Fedora_Item($this->pid); 
-     +        // Check the form post to see if we are in the middle of an ingest operation. 
-    $tabset['view_tab'] = array( +        $show_ingest_tab = (!empty($_POST['form_id']) && $_POST['form_id'] == 'fedora_repository_ingest_form'); 
-      '#type' => 'tabpage', +        $add_to_collection = $this->getIngestInterface(); 
-//      '#title' => 'View', +        $view_selected = true; 
-//******************** +        $coll_selected = false; 
-      '#title' => $collection_item->objectProfile->objLabel, +        $qstring = $_GET['q']; 
-//******************** +        $qparts = explode('/', $qstring); 
-      '#selected' => $view_selected, +        $tail = end($qparts); 
-      '#content' => $collection_items +        if ($tail == 'info') { 
-    );+            $view_selected = false; 
 +            $coll_selected = true; 
 +        
 +        drupal_set_message(); 
 +        $tabset['1'] = array('#type' => 'tabpage', '#title' => $collection_item->objectProfile->objLabel, '#selected' => $view_selected, '#content' => $collection_items, '#weight' => '1'); 
 +        if ($colleinfo != NULL) { 
 +            $tabset['2'] = array('#type' => 'tabpage', '#title' => 'Collection info', '#selected' => $coll_selected, '#content' => $colleinfo, '#weight' => '2'); 
 +        } 
 +</code> 
 +</WRAP> 
 +<code php>
 //    $tabset['add_tab'] = array( //    $tabset['add_tab'] = array(
       // #type and #title are the minimum requirements.       // #type and #title are the minimum requirements.
 
 
frontend/colltab.txt · Last modified: 2012/05/29 10:41 by giancarlo

Developers: CNR IRCrES IT Office and Library
Giancarlo Birello (giancarlo.birello _@_ ircres.cnr.it) and Anna Perin (anna.perin _@_ ircres.cnr.it)
DigiBess is licensed under: Creative Commons License
Recent changes RSS feed Creative Commons License Valid XHTML 1.0 Valid CSS Driven by DokuWiki
Drupal Garland Theme for Dokuwiki