view solr-search-result.tpl.php @ 0:a2b4f67e73dc default tip

initial
author Dirk Wintergruen <dwinter@mpiwg-berlin.mpg.de>
date Mon, 08 Jun 2015 10:21:54 +0200
parents
children
line wrap: on
line source

<?php

/**
 * @file
 * Default theme implementation for displaying a single search result.

 * @see template_preprocess()
 * @see template_preprocess_search_result()
 * @see template_process()
 *
 * @ingroup themeable
 */
?>

<?php if ($doc_type == "indexMeta"):?>
<div class="single-result indexmeta <?php print $classes; ?>" <?php print $attributes; ?>>
    <div class="thumbnail">
       <?php if ($access_type !="free"):?>
            <a href="<?php print $url; ?>">
                <img src="<?php print $thumburl; ?>"/>
                <p class="solrsearch_internal">internal</p>
            </a>
        <?php else: ;?>
            <img src="<?php print $thumburl; ?>"/>
        <?php endif;?>
    </div>
    <div class="search-result-meta">
        <div class="search-result-author">
            <?php print $author; ?>
        </div>
        <div class="search-result-title">  
            <a href="<?php print $url; ?>">
            <?php print $title; ?>
            <?php if (isset ($signature)):?>
                <?php print $signature; ?>
            <?php endif;?>
            </a>
        </div>
        <div class="search-result-date">
            <?php if (isset ($date)):?>
                <?php print $date; ?>
            <?php else: ?>
                <?php print $year; ?>
            <?php endif;?>
        </div>
        <div class="search-result-dataSource">
            <?php if (isset ($dataSource)):?>
                <?php print $dataSource; ?>
            <?php else: ?>
                <?php print $dataSource; ?>
            <?php endif;?>
        </div>



    </div>
<!--</div> closing div is in solrsearch.pages.inc line 174-->
<?php elseif ($doc_type == "external"):?>
<div class="single-result indexmeta <?php print $classes; ?>" <?php print $attributes; ?>>
    <div class="thumbnail">
   <?php if ($external_image!=""): ?>
            <img src="<?php print $external_image; ?>"/>
        <?php endif;?>
    </div>

    <div class="search-result-meta">
        <div class="search-result-author">
            <?php print $author; ?>
        </div>
        <div class="search-result-title">  
        <?php if ($external_url!=""): ?>
            <a href="<?php print $external_url; ?>">
        <?php endif; ?> 
            <?php print $title; ?>
            <?php if (isset ($signature)):?>
                <?php print $signature; ?>
            <?php endif;?>
            </a>
        </div>
        <div class="search-result-date">
            <?php if (isset ($date)):?>
                <?php print $date; ?>
            <?php else: ?>
                <?php print $year; ?>
            <?php endif;?>
        </div>

   <div class="search-result-provider">
            <?php if (isset ($provider)):?>
                <?php print $provider; ?>
            <?php else: ?>
                <?php print $provider; ?>
            <?php endif;?>
        </div>
    
   <div class="search-result-dataSource">
            <?php if (isset ($dataSource)):?>
   provided by: <?php print $dataSource; ?>
            <?php else: ?>
                <?php print $dataSource; ?>
            <?php endif;?>
        </div>

    </div>



<?php elseif ($doc_type == "institutesLibrary"): ?>
<div class="single-result institutesLibrary <?php print $classes; ?>"<?php print $attributes; ?>>
    <div class="thumbnail">
    &nbsp;
    </div>
    <div class="search-result-meta">
        <div class="libraryfield">
            <?php if (isset ($signature)):?>
                <span class="signatureLabel">Signature Institute's Library:</span>
                <span class="signature"><?php print $signature; ?></span>
            <?php endif;?>
        </div>
        <div class="search-result-author">
            <?php print $author; ?>
        </div>
        <div class="search-result-title">
            <a target="_blank" href="<?php print $librarySearchPath; ?>">
                <?php print $title; ?>
            </a>
        </div>
        <div class="search-result-date">
            <?php if (isset ($date)):?>
                <?php print $date; ?>
            <?php else: ?>
                <?php print $year; ?>
            <?php endif;?>
        </div>
    </div>
<!--</div> closing div is in solrsearch.pages.inc line 174-->
<?php else: ?>
<div class="single-result collection <?php print $classes; ?>" <?php print $attributes; ?>>
    <div class="thumbnail">
    &nbsp;
    </div>
    <div class="search-result-meta">
        <div class="search-result-author">
            <?php print $author; ?>
        </div>
        <div class="search-result-title">
            <span class="collectionLabel">Collection:</span>
            <a href="<?php print $collectionPath; ?>">
                <?php print $title; ?>
            </a>
        </div>
        <div class="search-result-date">
            <?php if (isset ($date)):?>
                <?php print $date; ?>
            <?php else: ?>
                <?php print $year; ?>
            <?php endif;?>
        </div>
        <div class="collection-content">
            <div><?php print $content?></div>
        </div>
    </div>
<!--</div> closing div is in solrsearch.pages.inc line 174-->
<?php endif;?>


<!--  <tr class="line">
<td>&nbsp;</td>
 <td  colspan="4">
<div class="search-snippet-info">
    <?php if ($snippet): ?>
      <p class="search-snippet"<?php print $content_attributes; ?>><?php print $snippet; ?></p>
    <?php endif; ?>
  </div>
  </td>
  </tr>-->