<table width="100%" id="settings_room">
  <tr>
    <td id="rooms_menu" valign="top">
      <div class="order_show">
      <button type="button" id="rooms_menu_show">
        <i class="fas fa-bars"></i>
        Управление залами
      </button>
      </div>
      <check if="{{@base_settings['multikassa']}}">
      <button type="button" class="show_window" href='/rooms/synchronization'>
        Синхронизировать
      </button>
      </check>
      <button type="button" class="show_window" href='/rooms/add'>
        <i class="fas fa-plus"></i>
        Добавить зал
      </button>
      <div class="rooms_list" href="/settings/rooms">
        <div class="reload">
          <repeat group="{{@rooms}}" value="{{@r}}">
          <button type="button" class="room_item" href='/settings/rooms?id={{@r["id"]}}'>
            {{@r['title']}}
          </button>
          </repeat>
        </div>
      </div>
    </td>
    <td align="left" class="select_room_td" valign="top">
      <div id="select_room">
      <div class="reload">
        <div class="room_div">
          <div class="close_button"><i class="fa fa-times" aria-hidden="true"></i></div>
          <h1>Переместите стол в нужную ячейку</h1>
          <div class="mobile_scroll">
            <table class="room">
              <loop from="{{@y=0}}" to="{{@y<@room['l']}}" step="{{@y++}}">
              <tr>
                <loop from="{{@x=0}}" to="{{@x<@room['w']}}" step="{{@x++}}">
                <td class="room_ceil">
                  <div class="dinner_table {{isset(@tables[@x][@y])?'dinner_table_show':''}}">
                    {~@table_id=0~}
                    {~if(isset(@tables[@x][@y]))@table_id=@tables[@x][@y]['id']~}
                    <input type="checkbox" id="{{@room['id'].'-'.@x.'-'.@y}}" name="table[]" value="{{@room['id'].'-'.@x.'-'.@y.'-'.@table_id}}" {{isset(@tables[@x][@y])?'checked="checked"':''}}>
                  </div>
                  <div class="dinner_table_title">{{@tables[@x][@y]['title']}}</div>
                </td>
                </loop>
              </loop>
              </tr>
            </table>
          </div>
        </div>
      </div>
      </div>
    </td>
  </tr>
</table>
<script type="text/javascript" src="/ui/scripts/rooms.js?v={{@site_version}}"></script>
