<ul class="sabai-wordpress-widget-entries"> <?php foreach ($content as $entry):?> <?php if (is_array($entry)):?> <?php if (isset($entry['image'])):?> <li class="sabai-wordpress-widget-entry-with-image"><div class="sabai-wordpress-widget-image"><?php echo $entry['image'];?></div> <?php else:?> <li> <?php endif;?> <div class="sabai-wordpress-widget-main"> <?php if (isset($entry['title_html'])):?> <?php echo $entry['title_html'];?> <?php else:?> <a title="<?php Sabai::_h($entry['title']);?>" href="<?php echo $this->Url($entry['url']);?>"><?php Sabai::_h($entry['title']);?></a> <?php endif;?> <?php if (isset($entry['summary'])):?> <p><?php Sabai::_h($entry['summary']);?></p> <?php endif;?> <?php if (!empty($entry['meta'])):?> <ul><li><?php echo implode('</li><li>', $entry['meta']);?></li></ul> <?php endif;?> </div> <?php else:?> <?php echo $entry;?> <?php endif;?> </li> <?php endforeach;?> </ul> <?php else:?> <?php echo $content;?> <?php endif;?> </div>
<div id="<?php echo $id;?>" class="<?php echo $class;?> sabai-clearfix sabai-row-fluid"> <div class="sabai-directory-photobox sabai-span7"> <div class="sabai-directory-photo"> <a href="<?php echo $this->Directory_PhotoUrl($entity, 'large');?>" rel="prettyPhoto" title="<?php Sabai::_h($entity->getTitle());?>"> <img src="<?php echo $this->Directory_PhotoUrl($entity, 'large');?>" alt="" /> </a> </div> <div class="sabai-directory-photo-title"> <strong><?php echo $this->Content_RenderTitle($entity, false, null, null, '', $entity->getTitle());?></strong> <span><?php echo $this->Directory_RenderPhotoMeta($entity, !empty($link_to_listing));?></span> </div> <div class="sabai-directory-photo-stats"> <?php if (!empty($entity->voting_helpful[0]['sum'])):?> <span><i class="sabai-icon-thumbs-up"></i> <?php echo $entity->voting_helpful[0]['sum'];?></span> <?php endif;?> <?php if (!empty($entity->data['comment_count'])):?> <span><i class="sabai-icon-comment"></i> <?php echo $entity->data['comment_count'];?></span> <?php endif;?> </div> <div class="sabai-directory-photo-actions sabai-btn-group"> <?php echo $this->ButtonLinks($links);?> </div> </div> <div class="sabai-directory-comments sabai-span5" id="<?php echo $id;?>-comments"> <?php echo $this->Comment_RenderComments($entity, $id . '-comments', true);?> </div> </div>
<div class="sabai-directory-title"> <?php echo $this->Content_RenderTitle($entity);?> </div> <?php endif;?> <div class="sabai-directory-main"> <?php if (!empty($entity->voting_rating['']['count'])):?> <div class="sabai-directory-rating"> <?php echo $this->Voting_RenderRating($entity);?> <span class="sabai-directory-rating-average"><?php echo number_format($entity->voting_rating['']['average'], 2);?></span> <span class="sabai-directory-rating-count"><?php printf(_n('(%d review)', '(%d reviews)', $entity->voting_rating['']['count'], 'sabai-directory'), $entity->voting_rating['']['count']);?></span> </div> <?php endif;?> <?php if ($entity->directory_category):?> <div class="sabai-directory-taxonomy"> <?php foreach ($entity->directory_category as $category):?> <?php echo $this->Entity_Permalink($category, array('bullet-icon' => 'folder-open'));?> <?php endforeach;?> </div> <?php endif;?> <div class="sabai-directory-info sabai-clearfix"> <div class="sabai-directory-address"> <?php Sabai::_h($entity->directory_location[0]['address']);?> </div> <?php if (!empty($entity->directory_contact[0]['phone'])):?> <div class="sabai-directory-phone"> <?php Sabai::_h($entity->directory_contact[0]['phone']);?> </div> <?php endif;?> </div> </div> </div>
<?php foreach (array_keys($directories) as $category_bundle):?> <div> <h2><a href="<?php echo $directories[$category_bundle]['url'];?>"><?php Sabai::_h($directories[$category_bundle]['title']);?></a></h2> <?php if (!empty($entities[$category_bundle])):?> <?php $this->renderTemplate('directory_categories', array('entities' => $entities[$category_bundle], 'column_count' => $column_count));?> <?php endif;?> </div> <?php endforeach;?>
<?php foreach ($errors as $error):?> <p><strong><?php Sabai::_h($error);?></strong></p> <?php endforeach;?> </div> <?php endif;?> <form class="sabai-form" <?php echo $form_arr['attributes'];?>> <div id="poststuff"> <?php wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false);?> <?php wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false); ?> <div id="post-body" class="metabox-holder columns-2"> <?php if ($has_title || $has_body):?> <div id="post-body-content"> <?php if ($has_title):?> <div id="titlediv"> <div id="titlewrap"> <input type="text" name="content_post_title[0]" size="30" tabindex="1" value="<?php Sabai::_h($title);?>" id="title" autocomplete="off" placeholder="<?php Sabai::_h(__('Enter title here'));?>" /> </div> <div class="inside"> <?php if (isset($entity) && $entity->getId() && isset($bundle->info['permalink_path'])):?> <div id="edit-slug-box"> <?php include dirname(__FILE__) . '/wordpress_permalink.html.php';?> </div> <?php endif;?> </div> <input type="hidden" id="samplepermalinknonce" name="samplepermalinknonce" value="<?php echo $this->Token('wordpress_permalink');?>"> </div> <?php endif;?> <?php if ($has_body):?> <div id="postdivrich" class="postarea"> <?php wp_editor($body, 'content', array('textarea_name' => 'content_body[0]', 'textarea_rows' => $body_rows));?>
<div class="sabai-field-label"><?php Sabai::_h($field['title']);?></div> <div class="sabai-field-value"> <?php switch ($field['type']):?> <?php case 'string':?> <?php case 'number':?> <?php echo implode(', ', array_map(array('Sabai', 'h'), $field['values']));?> <?php break;?> <?php case 'choice': $choices = array();?> <?php foreach ($field['values'] as $value) if (isset($field['settings']['options']['options'][$value])) $choices[] = Sabai::h($field['settings']['options']['options'][$value]);?> <?php echo implode(', ', $choices);?> <?php break;?> <?php case 'text':?> <?php foreach ($field['values'] as $value):?> <p><?php Sabai::_h($value);?></p> <?php endforeach;?> <?php break;?> <?php case 'date_timestamp': $dates = array();?> <?php foreach ($field['values'] as $value) $dates[] = $this->DateTime($value);?> <?php echo implode(', ', $dates);?> <?php break;?> <?php case 'boolean':?> <?php if (!empty($field['values'][0])):?> <?php echo __('Yes', 'sabai');?> <?php else:?> <?php echo __('No', 'sabai');?> <?php endif;?> <?php break;?>
<table class="sabai-table sabai-paidlistings-order"> <thead> <tr> <th><?php echo __('Field', 'sabai-directory');?></th> <th><?php echo __('Value', 'sabai-directory');?></th> </tr> </thead> <tbody> <tr> <td><strong><?php echo __('Order ID', 'sabai-directory');?></strong></td> <td><?php Sabai::_h($order->getLabel());?></td> </tr> <tr> <td><strong><?php echo __('Order Date', 'sabai-directory');?></strong></td> <td><?php echo $this->Date($order->created);?></td> </tr> <tr> <td><strong><?php echo __('Plan', 'sabai-directory');?></strong></td> <td><?php printf(__('%s (%s)', 'sabai-directory'), $order->Plan ? Sabai::h($order->Plan->name) : __('Unknown', 'sabai-directory'), $plan_types[$order->plan_type]['label']);?></td> </tr> <tr> <td><strong><?php echo $this->Entity_BundleLabel($this->Entity_Bundle($order->Entity), true);?></strong></td> <td><?php if ($order->Entity):?><?php echo $order->Entity->isPublished() ? $this->LinkTo($order->Entity->getTitle(), $this->Entity_Bundle($order->Entity)->getPath() . '/' . $order->Entity->getId()) : Sabai::h($order->Entity->getTitle());?><?php endif;?> <tr> <td><strong><?php echo __('User', 'sabai-directory');?></strong></td> <td><?php echo $this->UserIdentityLinkWithThumbnailSmall($order->User);?></td> </tr> <tr> <td><strong><?php echo __('Price', 'sabai-directory');?></strong></td> <td><?php echo $this->PayPal_MoneyFormat($order->price, $order->currency);?></td> </tr>
<?php echo $this->UserIdentityThumbnailMedium($identity);?> </div> <div class="sabai-system-user-info"> <h3><?php Sabai::_h($identity->name);?></h3> <ul> <?php if ($identity->url):?> <li><a rel="nofollow" href="<?php Sabai::_h($identity->url);?>"><?php Sabai::_h($identity->url);?></a></li> <?php endif;?> </ul> </div> </div> <?php if (!empty($activities)):?> <div class="sabai-system-user-activities"> <?php if (count($activities) > 1):?> <?php foreach ($activities as $activity):?> <h4><?php Sabai::_h($activity['title']);?></h4> <ul class="sabai-system-user-activity sabai-clearfix"> <?php foreach ($activity['stats'] as $stat):?> <?php if (isset($stat['url'])):?> <li><a href="<?php echo $stat['url'];?>"><?php echo $stat['formatted'];?></a></li> <?php else:?> <li><span><?php echo $stat['formatted'];?></span></li> <?php endif;?> <?php endforeach;?> </ul> <?php endforeach;?> <?php else: $activity = array_shift($activities);?> <ul class="sabai-system-user-activity sabai-clearfix"> <?php foreach ($activity['stats'] as $stat):?> <?php if (isset($stat['url'])):?> <li><a href="<?php echo $stat['url'];?>"><?php echo $stat['formatted'];?></a></li>
<div class="sabai-span4 sabai-directory-search-keyword"><input name="keywords" type="text" value="<?php Sabai::_h($keywords);?>" placeholder="<?php Sabai::_h(__('Search for', 'sabai-directory'));?>" /></div> <div class="sabai-span4 sabai-directory-search-location"><input name="address" type="text" value="<?php Sabai::_h($address);?>" placeholder="<?php echo __('Enter a location', 'sabai-directory');?>" /></div> <div class="sabai-span3 sabai-directory-search-category"><?php echo $category_select;?></div> <div class="sabai-span1 sabai-directory-search-btn"><button class="sabai-btn sabai-btn-small sabai-btn-primary sabai-directory-search-submit"><i class="sabai-icon-search"></i></button></div> <?php else:?> <div class="sabai-span5 sabai-directory-search-keyword"><input name="keywords" type="text" value="<?php Sabai::_h($keywords);?>" placeholder="<?php Sabai::_h(__('Search for', 'sabai-directory'));?>" /></div> <div class="sabai-span5 sabai-directory-search-location"><input name="address" type="text" value="<?php Sabai::_h($address);?>" placeholder="<?php echo __('Enter a location', 'sabai-directory');?>" /></div> <div class="sabai-span2 sabai-directory-search-btn"><button class="sabai-btn sabai-btn-small sabai-btn-primary sabai-directory-search-submit"><i class="sabai-icon-search"></i></button></div> <?php endif;?> </form> </div> <?php if (!isset($action_url)):?> <script type="text/javascript"> jQuery(document).ready(function($) { jQuery(".sabai-directory-search-submit").click(function(e){ var $this = jQuery(this), form = $this.closest("form"), formData = form.find(":input[value][value!='<?php Sabai::_h(__('Search for', 'sabai-directory'));?>']").serialize(); SABAI.ajax({ trigger: $this, type: form.attr("method"), target: "#sabai-directory-listings", scrollTo: "#sabai-directory-listings", url: form.attr("action"), data: "<?php echo http_build_query($url_params);?>&" + formData + "&<?php echo Sabai_Request::PARAM_AJAX;?>=" + encodeURIComponent("#sabai-directory-listings") }); e.preventDefault(); }); }); </script> <?php endif;?>
<?php if (!empty($entity->directory_contact[0]['phone'])):?> <div class="sabai-directory-phone" itemprop="telephone"><?php Sabai::_h($entity->directory_contact[0]['phone']);?></div> <?php endif;?> <?php if (!empty($entity->directory_contact[0]['website'])):?> <div class="sabai-directory-website"><a href="<?php Sabai::_h($entity->directory_contact[0]['website']);?>" target="_blank" rel="nofollow external"><?php Sabai::_h($entity->directory_contact[0]['website']);?></a></div> <?php endif;?> <?php if (!empty($entity->directory_social[0])):?> <div class="sabai-directory-social"> <?php if ($entity->directory_social[0]['twitter']):?> <a class="sabai-directory-social-twitter" target="_blank" rel="nofollow external" href="http://twitter.com/<?php Sabai::_h($entity->directory_social[0]['twitter']);?>"><i class="sabai-icon-twitter-sign"></i></a> <?php endif;?> <?php if ($entity->directory_social[0]['facebook']):?> <a class="sabai-directory-social-facebook" target="_blank" rel="nofollow external" href="<?php Sabai::_h($entity->directory_social[0]['facebook']);?>"><i class="sabai-icon-facebook-sign"></i></a> <?php endif;?> <?php if ($entity->directory_social[0]['googleplus']):?> <a class="sabai-directory-social-googleplus" target="_blank" rel="nofollow external" href="<?php Sabai::_h($entity->directory_social[0]['googleplus']);?>"><i class="sabai-icon-google-plus-sign"></i></a> <?php endif;?> </div> <?php endif;?> </div> <?php if ($listing_body = $this->Content_RenderBody($entity)):?> <div class="sabai-directory-body" itemprop="description"> <?php echo $listing_body;?> </div> <?php endif;?> <div class="sabai-directory-custom-fields"> <?php $this->renderTemplate('directory_custom_fields', array('entity' => $entity));?> </div> </div> </div> <div class="sabai-entity-links sabai-btn-group">
} ?> <div class="sabai-btn-toolbar sabai-clearfix"> <div class="sabai-btn-group sabai-pull-left"><?php echo implode(PHP_EOL, $buttons);?></div> <?php if (!empty($links)):?> <div class="sabai-btn-group sabai-pull-right"><?php echo implode(' ', $links);?></div> <?php endif;?> </div> <?php if (!empty($form->settings['#filters'])): uasort($form->settings['#filters'], create_function('$a,$b','return $a["order"] < $b["order"] ? -1 : 1;'));?> <div class="sabai-entity-filters sabai-clearfix"> <?php $this->FormTag('get', $CURRENT_ROUTE, $url_params, array(), true);?> <?php foreach ($form->settings['#filters'] as $filter_name => $filter):?> <select name="<?php Sabai::_h($filter_name);?>"> <option value="0"><?php Sabai::_h($filter['default_option_label']);?></option> <?php foreach ($filter['options'] as $filter_option_value => $filter_option_label):?> <option value="<?php Sabai::_h($filter_option_value);?>"<?php if (isset($url_params[$filter_name]) && $url_params[$filter_name] == $filter_option_value):?> selected="selected"<?php endif;?>><?php Sabai::_h($filter_option_label);?></option> <?php endforeach;?> </select> <?php endforeach;?> <?php foreach (array_diff_key($url_params, $form->settings['#filters']) as $url_param_k => $url_param_v):?> <input type="hidden" name="<?php Sabai::_h($url_param_k);?>" value="<?php Sabai::_h($url_param_v);?>" /> <?php endforeach;?> <button type="submit" class="sabai-btn sabai-btn-small"><?php echo __('Filter', 'sabai');?></button> </form> </div><?php endif;?> <?php echo $this->Form_Render($form, $form_js);?> <?php if ($pager && $pager->count()):?> <div class="sabai-pagination sabai-pagination-centered"> <?php echo $this->PageNav($CURRENT_CONTAINER, $pager, $this->Url($CURRENT_ROUTE, $url_params));?> </div> <?php endif;?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"> <channel> <title><?php Sabai::_h($title);?> - <?php Sabai::_h($SITE_NAME);?></title> <description><?php Sabai::_h($description);?></description> <link><?php Sabai::_h($link);?></link> <lastBuildDate><?php echo date(DATE_RFC822, $build_date);?></lastBuildDate> <atom:link href="<?php echo $this->Url($CURRENT_ROUTE);?>.xml" rel="self" type="application/rss+xml" /> <?php foreach ($items as $item):?> <item> <title><?php Sabai::_h($item['title']);?></title> <description><![CDATA[<?php echo $item['content'];?>]]></description> <content:encoded><![CDATA[<?php echo $item['content'];?>]]></content:encoded> <link><?php Sabai::_h($item['link']);?></link> <guid><?php Sabai::_h($item['guid']);?></guid> <dc:creator><?php Sabai::_h($item['author']);?></dc:creator> <pubDate><?php echo date(DATE_RFC822, $item['pub_date']);?></pubDate> </item> <?php endforeach;?> </channel> </rss>
<meta itemprop="worstRating" content="0" /> <meta itemprop="bestRating" content="5" /> <span class="sabai-rating sabai-rating-<?php echo $entity->directory_rating[0] * 10;?>" title="<?php printf(__('%.1f out of 5 stars', 'sabai-directory'), $entity->directory_rating[0]);?>"></span> <span class="sabai-directory-rating-average" itemprop="ratingValue"><?php echo number_format($entity->directory_rating[0], 1);?></span> </div> <div class="sabai-directory-activity sabai-directory-activity-inline"> <?php echo $this->Content_RenderActivity($entity, array('action_label' => __('%s reviewed %s', 'sabai-directory'), 'permalink' => true, 'show_last_active' => false, 'show_last_edited' => true));?> </div> </div> <?php if (!empty($entity->data['directory_photos'])): $i = 0;?> <div class="sabai-directory-review-photos"> <?php while ($photos = array_slice($entity->data['directory_photos'], $i * 6, 6)):?> <div class="sabai-row-fluid"> <?php foreach ($photos as $photo):?> <div class="sabai-span2 sabai-directory-thumbnail"> <a href="<?php echo $this->Entity_Url($parent_entity, '/photos', array('photo_id' => $photo->getId()));?>" title="<?php Sabai::_h($photo->getTitle());?>"><img src="<?php echo $this->Directory_PhotoUrl($photo, 'thumbnail');?>" alt="" /></a> </div> <?php endforeach; ++$i;?> </div> <?php endwhile;?> </div> <?php endif;?> <div class="sabai-directory-body" itemprop="description"> <?php echo $this->Content_RenderBody($entity);?> </div> <div class="sabai-directory-custom-fields"> <?php $this->renderTemplate(array('directory_listing_review_custom_fields', 'directory_custom_fields'), array('entity' => $entity));?> </div> <div class="sabai-directory-review-helpful-yesno"> <?php echo $this->Voting_RenderYesno($entity,'.sabai-directory-review-helpful-yesno', array('format' => __('<span>Was this review helpful to you?</span> %s %s', 'sabai-directory')));?> </div>
.script("<?php echo $this->JsUrl('autocomplete.js', 'sabai-directory');?>").wait(function(){ SABAI.GoogleMaps.directionMap( "#sabai-directory-map", <?php echo ($lat = $entity->getSingleFieldValue('directory_location', 'lat')) ? $lat : 'null';?>, <?php echo ($lng = $entity->getSingleFieldValue('directory_location', 'lng')) ? $lng : 'null';?>, <?php echo isset($map_settings['listing_default_zoom']) ? intval($map_settings['listing_default_zoom']) : 15;?>, "#sabai-directory-map-directions .sabai-directory-search-btn button", "#sabai-directory-map-directions .sabai-directory-direction-location input", "#sabai-directory-map-directions .sabai-directory-direction-mode select", <?php echo json_encode($content);?>, '<?php echo $this->Directory_ListingMapMarkerUrl($entity);?>', <?php if ($map_settings['style']):?><?php echo json_encode($this->GoogleMaps_Style($map_settings['style']));?><?php else:?>null<?php endif;?>, <?php echo json_encode(array('scrollwheel' => (bool)$this->Config('Directory', 'map', 'options', 'scrollwheel')));?> ); SABAI.GoogleMaps.autocomplete(".sabai-directory-direction-location input"); }); }}); </script> <div id="sabai-directory-map-directions" class="sabai-row-fluid sabai-directory-search"> <div class="sabai-span6 sabai-directory-direction-location"><input type="text" value="" placeholder="<?php Sabai::_h(__('Enter a Location', 'sabai-directory'));?>" /></div> <div class="sabai-span3 sabai-directory-direction-mode"> <select> <option value="DRIVING"><?php echo __('By car', 'sabai-directory');?></option> <option value="TRANSIT"><?php echo __('By public transit', 'sabai-directory');?></option> <option value="WALKING"><?php echo __('Walking', 'sabai-directory');?></option> <option value="BICYCLING"><?php echo __('Bicycling', 'sabai-directory');?></option> </select> </div> <div class="sabai-span3 sabai-directory-search-btn"><button class="sabai-btn sabai-btn-small sabai-btn-primary sabai-directory-search-submit"><?php echo __('Get Directions', 'sabai-directory');?></button></div> </div> <div id="sabai-directory-map" class="sabai-googlemaps-map" style="height:400px;"></div>
</div> <?php echo $this->TokenHtml('entity_admin_submit_fields');?> <div style="clear:both;"></div> </div> </div> <div id="sabai-fieldui-available-wrap"> <div class="sabai-fieldui-available"> <div class="sabai-fieldui-title"> <div class="sabai-fieldui-control"> <a href="#" class="sabai-fieldui-toggle"><i class="sabai-icon-caret-up"></i></a> </div> <div class="sabai-fieldui-label"><?php echo __('Available Fields', 'sabai');?></div> </div> <div class="sabai-fieldui-fields sabai-clearfix"> <?php foreach ($field_types as $field_type): if (!$field_type['creatable']) continue;?> <a href="<?php echo $form_create_field_url;?>" data-field-type="<?php echo $field_type['type'];?>" class="sabai-btn"><?php Sabai::_h($field_type['label']);?></a> <?php endforeach;?> </div> </div> </div> </div> </form> <div class="sabai-fieldui-field" id="sabai-fieldui-field" style="display:none;"> <div class="sabai-fieldui-field-info"> <div class="sabai-fieldui-field-control"> <a href="<?php echo $form_edit_field_url;?>" class="sabai-fieldui-field-edit" data-modal-title="" title="<?php echo __('Edit field', 'sabai');?>"><i class="sabai-icon-cog"></i>Edit</a> · <a href="#" class="sabai-fieldui-field-delete" title="<?php echo __('Delete field', 'sabai');?>"><i class="sabai-icon-trash"></i>Delete</a> </div> <div class="sabai-fieldui-field-title"></div> </div> <div class="sabai-fieldui-field-preview"></div> <div class="sabai-fieldui-field-form"></div>