<div id="inforightbtns">
    <span class="dialog_make_btn16 edit mobile_big24 smallbtns ui-corner-all"
          onclick="whatiswhere.open({$wiw->id}, false, '');"
          title="{$i.basic_edit}"></span>
    <span class="dialog_make_btn16 delete smallbtns ui-corner-all"
          onclick="whatiswhere.delete_entry({$wiw->id});"
          title="{$i.basic_delete}"></span>

    <ul class="functionmenu">
        <li class="ui-corner-all"><span class="ui-widget-header ui-corner-all">{$i.basic_functions}</span>
            {include file="Whatiswhere/function_menu.tpl"}
        </li>
    </ul>
    
</div>

<div id="inforight" class="below">
    <table class="col2btn">
        <tr>
            <td>{$i.whatiswhere_article_fulltitle}</td>
            <td>{$wiw->article_fulltitle}</td>
        </tr>
        <tr>
            <td>{$i.whatiswhere_title}</td>
            <td>{$wiw->title}</td>
        </tr>
        <tr>
            <td>{$i.whatiswhere_author}</td>
            <td>{$wiw->author}</td>
        </tr>
        <tr>
            <td>{$i.whatiswhere_page}</td>
            <td>{$wiw->page}</td>
        </tr>
        <tr>
            <td>{$i.whatiswhere_note}</td>
            <td>{$wiw->note}</td>
        </tr>
        <tr>
            <td>{$i.whatiswhere_room}</td>
            <td>{$wiw->room_title}</td>
        </tr>
        <tr>
            <td>{$i.whatiswhere_rack}</td>
            <td>{$wiw->rack_title}</td>
        </tr>
        <tr>
            <td>{$i.whatiswhere_tray}</td>
            <td>{$wiw->tray_title}</td>
        </tr>
        <tr>
            <td>{$i.whatiswhere_filing}</td>
            <td>{$wiw->filing_title}</td>
        </tr>
        <tr>
            <td>{$i.whatiswhere_file}</td>
            <td>{filelink value=$wiw->file}</td>
        </tr>

        <tr>
            <td class="">{$i.whatiswhere_theme_names}</td>
            <td>
                <div class="many">
                    {foreach from=$wiw->themes item=theme}
                        <p class="category infobluerow" title="{$theme->name}">{$theme->name|truncate:35:"..."}</p>
                    {foreachelse}
                        &nbsp;
                    {/foreach}
                </div>
            </td>
        </tr>

        <tr>
            <td>{$i.whatiswhere_project_names}</td>
            <td>
                <div class="many">
                    {foreach from=$wiw->project_names item=project}
                        <p class="category" title="{$project->project}">{$project->project|truncate:35:"..."}</p>
                    {foreachelse}
                        &nbsp;
                    {/foreach}
                </div>
            </td>
        </tr>
        
    {foreach from=$wiw->addi_fields item=field}
        <tr>
            {if $field->type eq US_exmodel::T_BLOCK}
                <th colspan="2" style="text-align:center; {if isset($field->color)}background:{$field->color}{/if}">{$field->name}</th>
            {else}
                <td style="{if isset($field->color)}background:{$field->color}{/if}">{$field->name}</td>
                <td>
                    {assign var='field_id' value=$field->field}
                    {addiview field=$field value=$wiw->$field_id item=$wiw}
                </td>
            {/if}
        </tr>
    {/foreach}        
        
    </table>

    {if $wiw->address_id!=0}
        <h3 style="padding-top:10px;">
            <a href="{site_url url="start/open/addressesandcontacts/index/`$xjxcookie`/view/`$opentask->address_id`"}" onclick="usComm.windowOpen(this.href);
                    return false;">
                {$i.whatiswhere_address}
            </a>
        </h3>
        {portlet file='addresses_right' id=$wiw->address_id}
    {else}
        <h3 style="padding-top:10px;">{$i.whatiswhere_address}</h3>
        {boolview value=FALSE}
    {/if}

</div>