<?php
/**
 * @copyright (c) Kufer Software GmbH, Loisachstrasse 4, D-84453 Mühldorf
 */


class TabKursDetailsJournal extends TabPageDefault
{
  protected $_sightId;

  public function __construct($pTabName, $pData, $pSightId)
  {
    parent::__construct($pTabName, $pData);
    $this->_sightId = $pSightId;
    $this->setScroll(true);
  }

  
  public function _getContent()
  {
    $sicht = new JournalSight4Tab();
    $sicht->tableId = 'tab_kjournalId';
    $sicht->tableClass = 'tab_kjournal';
    $sicht->belegid = $this->_data->id;
    $sicht->sightid = $this->_sightId;
    $sicht->userid = SessionOperations::getCurrentWebToolsUser()->id;

    $sicht->createSight();
    $result = $sicht->sight;

    
    if (count($sicht->dataary) != 0) {
      $result .= '<div id="kdetails_journalControlDiv">' . "\n";
      $result .= '  <a href="#" id="kdetails_journalLinkFilter"><img src="layout/button_main_search_filter.gif" id="kdetails_journalImgFilter" alt="Filter" title="Filter &ouml;ffnen"></a>' . "\n";
      $result .= '  <a href="#" id="kdetails_journalAllFilterDelLnk" style="visibility:hidden"><img src="layout/button_clear_search.gif" alt="Filter löschen" title="Filter leeren" id="kdetails_journalAllFilterDeleteImg"></a>' . "\n";
      
      $result .= '  <span id="kdetails_journalSubControlSpan">' . "\n";
      $result .= '    <input type="radio" name="journalAnsicht" id="tnJournalAnsichtKomplettRadio" value="komplett" checked="checked">' . "\n";
      $result .= '    <label for="tnJournalAnsichtKomplettRadio" id="tnJournalAnsichtKomplettLabel">ausführlich</label>' . "\n";
      $result .= '    <input type="radio" name="journalAnsicht" id="tnJournalAnsichtKomprimiertRadio" value="komprimiert">' . "\n";
      $result .= '    <label for="tnJournalAnsichtKomprimiertRadio" id="tnJournalAnsichtKomprimiertLabel">komprimiert</label>' . "\n";
      $result .= '  </span>' . "\n";
      $result .= '</div>' . "\n";
    }

    return $result . "\n";
  }

  
  public function getSpecialJS()
  {
    
    
    return array('../jquery/plugins/jquery.dataTables.min.js', 'js/kursdetails.js', 'js/filter.js');
  }

  
  public function getSpecialCSS()
  {
    return array('css/tntoolJournal.css');
  }
}