Ejemplo n.º 1
0
    /** {@inheritdoc} */
    public function getTabContent()
    {
        global $controller, $WT_TREE;
        ob_start();
        ?>
		<table class="facts_table">
			<tr>
				<td colspan="2" class="descriptionbox rela">
				<input id="checkbox_sour2" type="checkbox" <?php 
        echo $WT_TREE->getPreference('SHOW_LEVEL2_NOTES') ? 'checked' : '';
        ?>
 onclick="jQuery('tr.row_sour2').toggle();">
				<label for="checkbox_sour2"><?php 
        echo I18N::translate('Show all sources');
        ?>
</label>
				</td>
			</tr>
			<?php 
        foreach ($this->getFactsWithSources() as $fact) {
            if ($fact->getTag() == 'SOUR') {
                FunctionsPrintFacts::printMainSources($fact, 1);
            } else {
                FunctionsPrintFacts::printMainSources($fact, 2);
            }
        }
        if (!$this->getFactsWithSources()) {
            echo '<tr><td id="no_tab4" colspan="2" class="facts_value">', I18N::translate('There are no source citations for this individual.'), '</td></tr>';
        }
        // New Source Link
        if ($controller->record->canEdit()) {
            ?>
				<tr>
					<td class="facts_label">
						<?php 
            echo GedcomTag::getLabel('SOUR');
            ?>
					</td>
					<td class="facts_value">
						<a href="#" onclick="add_new_record('<?php 
            echo $controller->record->getXref();
            ?>
','SOUR'); return false;">
							<?php 
            echo I18N::translate('Add a new source citation');
            ?>
						</a>
					</td>
				</tr>
			<?php 
        }
        ?>
		</table>
		<?php 
        if (!$WT_TREE->getPreference('SHOW_LEVEL2_NOTES')) {
            echo '<script>jQuery("tr.row_sour2").toggle();</script>';
        }
        return '<div id="' . $this->getName() . '_content">' . ob_get_clean() . '</div>';
    }
Ejemplo n.º 2
0
    /** {@inheritdoc} */
    public function getTabContent()
    {
        global $controller;
        ob_start();
        ?>
		<table class="facts_table">
			<tr class="noprint">
				<td colspan="2" class="descriptionbox rela">
					<label>
						<input id="show-level-2-sources" type="checkbox">
						<?php 
        echo I18N::translate('Show all sources');
        ?>
					</label>
				</td>
			</tr>
			<?php 
        foreach ($this->getFactsWithSources() as $fact) {
            if ($fact->getTag() == 'SOUR') {
                FunctionsPrintFacts::printMainSources($fact, 1);
            } else {
                FunctionsPrintFacts::printMainSources($fact, 2);
            }
        }
        if (!$this->getFactsWithSources()) {
            echo '<tr><td id="no_tab4" colspan="2" class="facts_value">', I18N::translate('There are no source citations for this individual.'), '</td></tr>';
        }
        // New Source Link
        if ($controller->record->canEdit()) {
            ?>
				<tr class="noprint">
					<td class="facts_label">
						<?php 
            echo GedcomTag::getLabel('SOUR');
            ?>
					</td>
					<td class="facts_value">
						<a href="#" onclick="add_new_record('<?php 
            echo $controller->record->getXref();
            ?>
','SOUR'); return false;">
							<?php 
            echo I18N::translate('Add a source citation');
            ?>
						</a>
					</td>
				</tr>
			<?php 
        }
        ?>
		</table>
		<script>
			persistent_toggle("show-level-2-sources", ".row_sour2");
		</script>
		<?php 
        return '<div id="' . $this->getName() . '_content">' . ob_get_clean() . '</div>';
    }