<input tabindex="3" type="hidden" name="auto_fullscreen" value="{{@base_settings.auto_fullscreen}}">
<div id="select_room">
  <div class="reload" data-room="{{@room['id']}}">
    <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_select {{@move?'move':''}}">
          <div class="dinner_table {{isset(@tables[@x][@y])?'dinner_table_show':''}} receipts_count_{{min(4, @tables[@x][@y]['receipts_count'])}}">
            {~@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>
      </tr>
      </loop>
    </table>
  </div>
</div>
<div class="select_table_left mobile_scroll {{count(@rooms)<2?'hide':''}}">
  <div class="select_rooms">
    <repeat group="{{@rooms}}" value="{{@r}}">
    <a class="room_item" href='/?room_id={{@r["id"]}}'><button type="button">{{@r['title']}}</button></a>
    </repeat>
  </div>
</div>
<check if="{{empty(@room)}}">
  <true>
<h1>Ошибка!</h1>
<p align="center" class="false">Не было создано ни одного зала!</p>
  </true>
  <false>
    <check if="{{empty(@tables)}}">
<h1>Ошибка!</h1>
<p align="center" class="false">Не было создано ни одного стола в этом зале!</p>
    </check>
  </false>
</check>
<script type="text/javascript" src="/ui/scripts/rooms.js?v={{@site_version}}"></script>
