<div class="searchHomeContent"> 
<h3>Welcome to The Pipe Files | Alaska Gas Line</h3>
  <div class="searchHomeForm">
    {include file="Search/searchbox.tpl"}
  </div>

<div> <ul><h3>Reports by category</h3>
<li><a href="http://scratch.arlis.org/vufind/Search/Results?lookfor=akgov&type=AllFields&submit=Find">Alaska government</a></li>
<li><a href="http://scratch.arlis.org/vufind/Search/Results?lookfor=cangov&type=AllFields&submit=Find">Canada government</a></li>
<li><a href="http://scratch.arlis.org/vufind/Search/Results?lookfor=cons&type=AllFields&submit=Find">Construction</a></li>
<li><a href="http://scratch.arlis.org/vufind/Search/Results?lookfor=econ&type=AllFields&submit=Find">Economics</a></li>
<li><a href="http://scratch.arlis.org/vufind/Search/Results?lookfor=envi&type=AllFields&submit=Find">Environmental review</a></li>
<li><a href="http://scratch.arlis.org/vufind/Search/Results?lookfor=hist&type=AllFields&submit=Find">History</a></li>
<li><a href="http://scratch.arlis.org/vufind/Search/Results?lookfor=proj&type=AllFields&submit=Find">Project Proposals</a></li>
<li><a href="http://scratch.arlis.org/vufind/Search/Results?lookfor=usres&type=AllFields&submit=Find">U.S. government research</a></li>
<li><a href="http://scratch.arlis.org/vufind/Search/Results?lookfor=usproj&type=AllFields&submit=Find">U.S. government projects</a></li>
</ul>
</div>
<div>
</div>

{if $facetList}
<div class="searchHomeBrowse">
  {assign var=columns value=0}
  {foreach from=$facetList item=details key=field}
    {assign var=list value=$details.sortedList}
    {if $field == 'callnumber-first'}{assign var=currentSize value=10}{else}{assign var=currentSize value=5}{/if}
    {assign var=columns value=$columns+$currentSize}
    <h2 class="span-{$currentSize}">{translate text="home_browse"} {translate text=$details.label}</h2> 
  {/foreach}
  {if $columns > 0 && $columns < 24}
    <div class="span-{math equation="24 - x" x=$columns} last"><!-- pad out header row --></div>
  {/if}
  {foreach from=$facetList item=details key=field}
    {assign var=list value=$details.sortedList}
    <ul class="span-5">
      {* Special case: two columns for LC call numbers... *}
      {if $field == "callnumber-first"}
        {foreach from=$list item=url key=value name="callLoop"}
          <li><a href="{$url|escape}">{$value|escape}</a></li>
          {if $smarty.foreach.callLoop.iteration == 10}
            </ul>
            <ul class="span-5">
          {/if}
        {/foreach}
      {else}
        {assign var=break value=false}
        {foreach from=$list item=url key=value name="listLoop"}
          {if $smarty.foreach.listLoop.iteration > 12}
            {if !$break}
              <li><a href="{$path}/Search/Advanced"><strong>{translate text="More options"}...</strong></a></li>
              {assign var=break value=true}
            {/if}
          {else}
            <li><a href="{$url|escape}">{$value|escape}</a></li>
          {/if}
        {/foreach}
      {/if}

<div></div>

    </ul>
  {/foreach}
  <div class="clear"></div>
</div>
{/if}