Esempio n. 1
0
    <? // Document description ?>
    <? if ($params->show_document_description || $params->show_document_image): ?>
    <div class="docman_description">
        <? if ($params->show_document_image && $document->image): ?>
            <?= helper('behavior.thumbnail_modal'); ?>
            <a class="docman_thumbnail thumbnail" href="<?= $document->image_download_path ?>">
                <img itemprop="thumbnailUrl" src="<?= $document->image_path ?>" />
            </a>
        <? endif ?>

        <? if ($params->show_document_description):
            $field = 'description_'.(isset($description) ? $description : 'full');
        ?>
            <div itemprop="description">
            <?= prepareText($document->$field); ?>
            </div>
        <? endif; ?>
    </div>
    <? endif ?>


    <? // After display - content plugin event ?>
    <?= helper('event.trigger', array(
        'name'       => 'onContentAfterDisplay',
        'attributes' => array($event_context, &$document, &$params, 0)
    )); ?>


    <? // Edit area | Import partial template from document view ?>
    <?= import('com://site/docman.document.manage.html', array('document' => $document)) ?>
Esempio n. 2
0
                    </span>
                <? endif; ?>
            </h3>

            <? // Category image ?>
            <? if ($params->show_image && $category->image): ?>
                <?= helper('behavior.thumbnail_modal'); ?>
                <a class="docman_thumbnail thumbnail" href="<?= $category->image_path ?>">
                    <img src="<?= $category->image_path ?>" />
                </a>
            <? endif ?>

            <? // Category description full ?>
            <? if ($category->description_full && $params->show_description): ?>
                <div class="docman_description">
                    <?= prepareText($category->description_full); ?>
                </div>
            <? endif; ?>
        </div>
    <? endif; ?>

    <? // Tables ?>
    <form action="" method="get" class="-koowa-grid koowa_table_list">

    <? // Category table ?>
    <? if ($params->show_subcategories && count($subcategories)): ?>

        <? // Category header ?>
        <? if ($category->id && $params->show_categories_header): ?>
            <div class="docman_block docman_block--top_margin">
                <h4 class="koowa_header"><?= translate('Categories') ?></h4>
     }
     $f_question_text = prepareText('<b>' . $i_strData . '</b>');
     $i_nAnswerCount1 = 0;
     $i_nAnswerCount2 = 0;
     $i_nQuestion++;
     break;
 case 2:
     break;
 case 3:
     break;
 case 8:
     break;
 case 4:
     $i_nAnswerCount1++;
     $i_nField = $i_nAnswerCount1;
     $f_answer_text[$i_nField] = prepareText($i_strData);
     break;
 case 5:
     ImportApplyAnswer($i_strData);
     break;
 case 6:
     $i_strData = str_replace("\n", '', $i_strData);
     $i_strData = str_replace("\r", '', $i_strData);
     $i_strData = str_replace(' ', '', $i_strData);
     $i_nData = (int) $i_strData;
     if ($i_nData < 0) {
         $i_nData = 1;
     }
     $f_question_points = $i_nData;
     break;
 case 7:
Esempio n. 4
0
function createSubTree($parent, $termTree, $parentname)
{
    global $dtTerms, $ind_label, $datatype;
    if (!is_array($termTree) || count($termTree) < 1) {
        return 0;
    }
    $termLookup = $dtTerms['termsByDomainLookup'][$datatype];
    $ind_label = $dtTerms['fieldNamesToIndex']['trm_Label'];
    $ind_descr = $dtTerms['fieldNamesToIndex']['trm_Description'];
    $ind_ccode = $dtTerms['fieldNamesToIndex']['trm_ConceptID'];
    $ind_tcode = $dtTerms['fieldNamesToIndex']['trm_Code'];
    $is_all_codes_numeric = true;
    $cnt_withcodes = 0;
    //first loop need to order by code (numeric or alphanumeric)  or by name (alphanumeric)
    foreach ($termTree as $termid => $child_terms) {
        $termName = @$termLookup[$termid][$ind_label];
        if ($termName) {
            $termCode = @$termLookup[$termid][$ind_tcode];
            if ($termCode) {
                $is_all_codes_numeric = $is_all_codes_numeric && is_numeric($termCode);
                $cnt_withcodes++;
            } else {
                $is_all_codes_numeric = false;
            }
        }
    }
    $fsort = 'sortByName';
    if ($cnt_withcodes > count($termTree) * 0.89) {
        if ($is_all_codes_numeric) {
            $fsort = 'sortByCodeNum';
        } else {
            $fsort = 'sortByCodeAlpha';
        }
    }
    uksort($termTree, $fsort);
    $cnt = 0;
    foreach ($termTree as $termid => $child_terms) {
        $termName = @$termLookup[$termid][$ind_label];
        if ($termName) {
            $termDescr = @$termLookup[$termid][$ind_descr];
            $termCcode = @$termLookup[$termid][$ind_ccode];
            //concept code
            $termCode = @$termLookup[$termid][$ind_tcode];
            if ($termCode) {
                //$termCode = "[".$termCode."]";
            } else {
                $termCode = "";
            }
            if (strpos($termCcode, '-') === false) {
                $termCcode = '0-' . $termid;
            }
            $term = $parent->addChild('term', getResStrA16n(prepareText($termName)));
            $term->addAttribute('HeuristID', $termCcode);
            $term->addAttribute('StandardCode', $termCode);
            //$term->addAttribute('pictureURL', '');
            //$term->addAttribute('semanticMapURL', '');
            $term->addChild('description', $termDescr ? prepareText($termDescr) : "");
            $cnt++;
            $cnt = $cnt + createSubTree($term, $child_terms, $parentname . $termName . "-");
        }
    }
    return $cnt;
}
Esempio n. 5
0
function mergeString($eng, $other, $name)
{
    global $mb;
    if (empty($other)) {
        $newText = $eng;
    } else {
        $newText = $other;
    }
    $prepareText = prepareText($newText);
    $prepareText = makeXHTML($prepareText);
    echo "\${$name} = {$prepareText};\n";
}
Esempio n. 6
0
            <? endif ?>

            <? // Header title ?>
            <span class="koowa_header__item">
                <span class="koowa_wrapped_content">
                    <span class="whitespace_preserver">
                        <a class="koowa_header__link" href="<?= helper('route.category', array('entity' => $category)) ?>">
                            <?= escape($category->title) ?>
                        </a>
                    </span>
                </span>
            </span>
        </h4>

        <? if ($params->show_image && $category->image): ?>
            <?= helper('behavior.thumbnail_modal'); ?>
            <a class="docman_thumbnail thumbnail" href="<?= $category->image_path ?>">
                <img src="<?= $category->image_path ?>" />
            </a>
        <? endif ?>

        <? // Category description summary ?>
        <? if ($params->show_description && $category->description_summary): ?>
        <div class="docman_description">
            <?= prepareText($category->description_summary); ?>
        </div>
        <? endif ?>

	</div>
    <? endforeach; ?>
</div>