Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if($display_form) { ?>
- <div class="grid_6 suffix_3 prefix_3">
- <?php
- echo $this->Form->create('Outlet', array('action' => 'search', $this->params['pass'], 'class' => 'formee'));
- if($show_validation_msg){
- ?>
- <div class="formee-msg-error">
- <ul>
- <?php
- echo $this->Form->error('Outlet.postcode', 'Please enter a valid postcode', array('wrap' => 'li', 'class' => ''));
- ?>
- </ul>
- </div>
- <?php
- }
- ?>
- <div class="grid-12-12">
- <?php
- echo $this->Form->input('name', array('label' => 'Name'));
- ?>
- </div>
- <div class="grid-12-12">
- <?php
- echo $this->Form->input('cuisine', array('label' => 'Cuisine', 'options' => array(
- '' => 'Please select...',
- 'Indian' => 'Indian',
- 'Turkish' => 'Turkish',
- 'Fast Food' => 'Fast Food',
- 'Mediterranean' => 'Mediterranean',
- 'Cafe' => 'Cafe',
- 'Dessert Parlour' => 'Dessert Parlour',
- 'Steakhouse' => 'Steakhouse'
- )));
- ?>
- </div>
- <div class="grid-12-12">
- <?php
- echo $this->Form->input('postcode', array('label' => 'Postcode', 'error' => false));
- ?>
- </div>
- <div class="grid-12-12">
- <?php
- echo $this->Form->end(array('label' => 'Go', 'div' => array('class' => 'search-outlet-submit-button')));
- ?>
- </div>
- <?php
- } else {
- // echo '<pre>';
- // print_r($outlets);
- // echo '</pre>';
- ?>
- <div class="grid_3 prefix_1">
- <h2>Search Results</h2>
- </div>
- <div class="grid_5 prefix_2 suffix_1">
- <h2 style="text-align:right;">Sorting Options: <?php echo $this->Paginator->sort('name'); ?> <?php echo (!empty($outlets[0]['Outlet']['distance'])) ? $this->Paginator->sort('distance') : '' ?><!-- Sorting Options: By name By date By rating --></h2>
- </div>
- <div class="clear"></div>
- <?php foreach ($outlets as $outlet): ?>
- <div class="grid_10 prefix_1 suffix_1">
- <div style="float:left; margin-bottom:20px;">
- <?php echo $this->Html->image('thumbnail-placeholder.png', array('alt' => 'Outlet Image'))?>
- </div>
- <div style="float:left; margin-left:20px; width:620px;">
- <h3><?php echo $this->Html->link($outlet['Outlet']['name'], array('controller' => 'outlets', 'action' => 'view', $outlet['Outlet']['id'])); ?>
- <?php echo (!empty($outlet['Outlet']['distance'])) ? '('.sprintf("%0.2f", $outlet['Outlet']['distance']).' miles)' : '' ?></h3>
- <p>
- <?php echo (!empty($outlet['Outlet']['number'])) ? $outlet['Outlet']['number'] : '' ;
- echo (!empty($outlet['Outlet']['building_name'])) ? $outlet['Outlet']['building_name'].',<br />' : '' ; ?>
- <?php echo $outlet['Outlet']['road']; ?><br />
- <?php echo $outlet['Outlet']['town']; ?><br />
- <?php echo $outlet['Outlet']['postcode']; ?><br />
- <?php echo (!empty($outlet['Outlet']['telephone'])) ? $outlet['Outlet']['telephone'] : ''; ?>
- </p>
- <h3 style="text-align: right;">Rating [TODO]: *****</h3>
- </div>
- </div>
- <div class="clear"></div>
- <?php endforeach; ?>
- <div class="grid_10 prefix_1 suffix_1">
- <p>
- <?php
- echo $this->Paginator->counter(array(
- 'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%' , true)
- ));
- ?>
- </p>
- <p>
- <?php
- echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class'=>'disabled'));?> | <?php echo $this->Paginator->numbers();?> | <?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled'));
- ?>
- <div class="clear"></div>
- </p>
- <?php } ?>
- </div><!-- end grid_10 prefix_1 suffix_1 -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement