Both sides previous revision
Previous revision
Next revision
|
Previous revision
Last revision
Both sides next revision
|
frontend:searchres [2012/05/16 10:03] giancarlo |
frontend:searchres [2013/09/05 11:36] giancarlo |
<code php> | <code php> |
function islandora_solr_custom_preprocess_islandora_solr_custom(&$variables) { | function islandora_solr_custom_preprocess_islandora_solr_custom(&$variables) { |
| ... |
| </code> |
| <wrap tip>Tip</wrap> |
| <WRAP prewrap center caution> |
| <code php> |
| // $variables['field_order'] = _islandora_solr_custom_solrconfig(); // not sure if this is really needed, but I'll keep it in for now. |
| </code> |
| </WRAP> |
| <code php> |
... | ... |
if ($field=="PID") { | if ($field=="PID") { |
| |
<?php if ($style == 'div'): ?> | <?php if ($style == 'div'): ?> |
| |
| |
<?php elseif ($style == 'table'): ?> | <?php elseif ($style == 'table'): ?> |
| |
<tr class="islandora_solr_result"> | <tr class="islandora_solr_result"> |
<td class="label" rowspan="2"> | <td class="label" rowspan="2"> |
<?php print "<img src=\"".base_path()."fedora/repository/".$result['PID']['value']."/TN\"></img>"; ?> | <?php print "<a href=\"".base_path()."fedora/repository/".substr($result['PID']['value'],0,-5)."\"><img src=\"".base_path()."fedora/repository/".substr($result['PID']['value'], 0, -5)."/TN\"></img></a>"; ?> |
</td> | </td> |
<td class="value"> | <td class="value"> |
<?php print "<a href=\"".base_path()."fedora/repository/".$result['PID']['value']."\"><b>".$result['dc.title']['value']."</b></a>"; ?><br><br> | <?php print "<b>".substr($result['dc.title']['value'],0,-12)."</b>"; ?><br><br> |
<i><?php print $result['dc.creator']['value']; ?></i><br> | <i><?php print $result['dc.creator']['value']; ?></i><br> |
<i><?php print $result['dc.publisher']['value']; ?></i><br> | <i><?php print $result['dc.publisher']['value']; ?></i><br> |
<i><?php print $result['dc.description']['value']; ?></i><br> | <i><?php print $result['dc.description']['value']; ?></i><br> |
| </td> |
| <td class="plabel" rowspan="2"> |
| <?php print "<a href=\"".base_path()."fedora/repository/".$result['PID']['value']."\"><img height=\"150\" src=\"".base_path()."fedora/repository/".$result['PID']['value']."/TN\"></img></a>"; ?> |
| <?php print "<br><b>".substr($result['dc.title']['value'],-9)."</b>"; ?> |
</td> | </td> |
</tr> | </tr> |
<tr class="islandora_solr_result"> | <tr class="islandora_solr_result"> |
<td class="label"> | <td class="label"> |
<?php print "<img src=\"".base_path()."fedora/repository/".$result['PID']['value']."/TN\"></img>"; ?> | <?php print "<a href=\"".base_path()."fedora/repository/".$result['PID']['value']."\"><img src=\"".base_path()."fedora/repository/".$result['PID']['value']."/TN\"></img></a>"; ?> |
</td> | </td> |
<td class="value"> | <td class="value"> |
<?php print "<a href=\"".base_path()."fedora/repository/".$result['PID']['value']."\"><b>".$result['dc.title']['value']."</b></a>"; ?><br><br> | <?php print "<b>".$result['dc.title']['value']."</b>"; ?><br><br> |
<i><?php print $result['dc.creator']['value']; ?></i><br> | <i><?php print $result['dc.creator']['value']; ?></i><br> |
<i><?php print $result['dc.publisher']['value']; ?></i><br> | <i><?php print $result['dc.publisher']['value']; ?></i><br> |
<code css> | <code css> |
/* css markup for template */ | /* css markup for template */ |
| |
| |
.islandora_solr_result | .islandora_solr_result |
{ | { |
/* float: left; */ | |
margin-bottom: 25px; | margin-bottom: 25px; |
border: 10px solid #fff; | border: 10px solid #fff; |
.islandora_solr_result .label | .islandora_solr_result .label |
{ | { |
width: 20%; | width: 180px; |
padding: 10px 10px 0px 0px; | padding: 10px 10px 0px 0px; |
vertical-align: top; | vertical-align: top; |
text-align: right; | text-align: right; |
background: #fff; | background: #fff; |
| } |
| |
| .islandora_solr_result .plabel |
| { |
| width: 110px; |
| padding: 0px 0px 0px 5px; |
| vertical-align: bottom; |
| text-align: left; |
} | } |
| |
.islandora_solr_result .value | .islandora_solr_result .value |
{ | { |
width: 80%; | |
padding: 10px 0px 0px 2px; | padding: 10px 0px 0px 2px; |
vertical-align: top; | vertical-align: top; |
text-align: left; | text-align: left; |
/* background: #f0f0f0;*/ | |
} | } |
| |
.islandora_solr_result .ocrvalue | .islandora_solr_result .ocrvalue |
{ | { |
width: 80%; | padding: 0px 5px 0px 5px; |
padding: 0px 0px 0px 5px; | |
vertical-align: top; | vertical-align: top; |
text-align: left; | text-align: right; |
font-size:0.875em; | font-size:0.82em; |
background: #fff; | background: #fff; |
} | } |