echo CHClient::string('select_rate'); ?> </div> <div class="ch-available-rates uk-form"> <?php foreach ($this->available->rates as $rate) { $board_dispay = true; $first_board = false; foreach ($rate->rate as $board => $value) { $board_icon = $board == 'bb' ? 'coffee' : ($board != 'ro' ? 'cutlery' : 'bed'); $hidden = $board_dispay ? '' : 'uk-hidden'; $checked = $this->first_rate ? ' checked="checked" ' : ''; $first_board = $first_board ? $first_board : $board; $amount = CHLibDisplay::money($rate->currency->amount->{$board}, $currency); echo '<label class="uk-text-small ch-available-rate ' . $hidden . '">'; echo '<input name="rate-unit-' . $unit . '" type="radio" ' . $checked . ' data-ch-rate' . ' data-ch-rate-unit="' . $unit . '"' . ' data-ch-rate-room="' . $this->room->id . '"' . ' data-ch-rate-room-title="' . $this->room->title . '"' . ' data-ch-rate-rate="' . $rate->rate_id . '"' . ' data-ch-rate-rate-title="' . $rate->rate_id . '"' . ' data-ch-rate-board="' . $board . '"' . ' data-ch-rate-board-title="' . CHClient::string('board_' . $board) . '"' . ' data-ch-rate-type="' . CHClientDisplay::rateType($rate->conditions) . '"' . ' data-ch-rate-type-title="' . CHClient::string(CHClientDisplay::rateType($rate->conditions)) . '"' . ' data-ch-rate-amount="' . $amount . '"' . ' value="unit-' . $unit . '-rate-' . $rate->rate_id . '-board-' . $board . '">'; if ($rate->discount->{$board}) { $tip = '<strong>' . CHClient::numstring(count($rate->discounts), 'offer_found') . '</strong>'; foreach ($rate->discounts as $discount) { if ($discount->currency->{$board}) { $tip .= '<br>' . $discount->title . ' (-' . CHLibDisplay::money($discount->currency->{$board}, $currency) . ')'; } } echo '<i class="uk-icon-thumbs-o-up"></i> <span class="ch-text-offer" data-uk-tooltip title="' . $tip . '">' . CHLibDisplay::money($rate->currency->rate->{$board}, $currency) . '</span> '; } echo '<span class="ch-text-green">' . $amount . '</span>'; echo '<br><span class="ch-text-block"><i class="uk-icon-' . $board_icon . '"></i> ' . CHClient::string('board_' . $board) . '</span>'; if ($rate->free_cancellation) { echo '<br><span class="ch-text-block ch-text-green">' . CHClient::string('free_cancellation') . '</span>'; if ($rate->conditions == 'pay_at_hotel') { echo '<br><span class="ch-text-block ch-text-green">' . CHClient::string('pay_later') . '</span>';