{* Smarty *}

{literal}
<script type="text/javascript">
//<![CDATA[
$(function() {
  tableToGrid("table[id^='TableToGrid']", {
//    colModel: [
//      {sortable: false},
//      {sortable: false}
//    ],
    width:"auto",
    height:"auto"
  });
});
//]]>
</script>
{/literal}

<div style="float: left; width: 50%;">
      <table id="TableToGridMain">
        <thead>
          <tr>
            <th id="ThToGridMain1"></th>
            <th id="ThToGridMain2"></th>
          </tr>
        </thead>
        <tbody>
        <tr><td><label>Наименование сет.:</label></td><td>{$ArrSvt.svt_name}</td></tr>
        {if isset($ArrIp) && is_array($ArrIp) && 1 <= count($ArrIp)}
        <tr>
          <td><label>IP адрес(а):</label></td>
          <td>
            {foreach $ArrIp as $val}
              {$val.ip_name}<br />
            {/foreach}
          </td>
        </tr>
        {/if}
        <tr><td><label>Наименование бух.:</label></td><td>{$ArrSvt.svt_buxname}</td></tr>
        <tr><td><label>Тип СВТ:</label></td><td>{$ArrSvt.svttype_name}</td></tr>
        <tr><td><label>Инв. номер:</label></td><td>{$ArrSvt.svt_invnum}</td></tr>
        <tr><td><label>Сер. номер:</label></td><td>{$ArrSvt.svt_serialnum}</td></tr>
        <tr><td><label>Подразделение:</label></td><td>{$ArrSvt.structureorganization_title}</td></tr>
        <tr><td><label>Пользователь:</label></td><td>{$ArrSvt.users_fio}</td></tr>
        <tr><td><label>Поставщик:</label></td><td>{$ArrSvt.organiz_name}</td></tr>
        <tr><td><label>Дата поставки:</label></td><td>{$ArrSvt.svt_date|date_format:"%d.%m.%Y"}</td></tr>
        <tr><td><label>Гарантия:</label></td><td>{if '0000-00-00 00:00:00' eq $ArrSvt.svt_garant_date}Не определена{else}{$ArrSvt.svt_garant_date|date_format:"%d.%m.%Y"}{/if}</td></tr>
        <tr><td><label>Примечание:</label></td><td>{$ArrSvt.svt_note}</td></tr>
        </tbody>
      </table>
      <br />
      <table id="TableToGridStatus">
        <thead>
          <tr>
            <th id="ThToGridStatus1">Статус</th>
            <th id="ThToGridStatus2">Состояние</th>
          </tr>
        </thead>
        <tbody>
        {foreach $ArrSvtStatus as $val}
          <tr>
            <td>{$val.svtstatus_name}</td>
            <td>{if 0 < $val.svtstatusval_id} &or;{else} &minus;{/if}</td>
          </tr>
        {/foreach}
        </tbody>
      </table>
</div>
    {if isset($ArrSvtAddit) && is_array($ArrSvtAddit)}
<div style="margin-left: 50%;">
      {foreach $ArrSvtAddit as $ValSvtAddit}
        {if $ValSvtAddit@first}
          {literal}
      <script type="text/javascript">
        //<![CDATA[
        $(function() {
          $("#SvtAddit").accordion({
            heightStyle: "content",
            fillSpace: true,
            collapsible: true
          });
        });
        //]]>
      </script>
          {/literal}

        <div id="SvtAddit">
        {/if}
          <h3>{$ValSvtAddit@key}</h3>
          <div>
            {foreach $ValSvtAddit as $ValValSvtAdditArr}
              {if $ValValSvtAdditArr@first}
                <table id="TableToGrid_{{$ValSvtAddit@iteration}}">
                  <thead>
                    <tr>
                      <th></th>
                      <th></th>
                    </tr>
                  </thead>
                  <tbody>
              {/if}
                  <tr>
                    <td>{$ValValSvtAdditArr@key}</td>
                    <td>{$ValValSvtAdditArr}</td>
                  </tr>
              {if $ValValSvtAdditArr@last}
                  </tbody>
                </table>
              {/if}
            {/foreach}
          </div>
        {if $ValSvtAddit@last}
        </div>
        {/if}
      {/foreach}
    </td>
  {/if}
</div>
<div class="MsClearFloat"></div>
<div style="margin-top: 10px;">{$VarSvtMove}</div>