2018-11-12 03:08:33 +01:00
|
|
|
<?php
|
|
|
|
$parts = [];
|
|
|
|
if (!empty($profile['locality'])) {
|
2020-06-13 19:21:18 +02:00
|
|
|
$parts[] = $this->escapeHtml($profile['locality']) . ' <a href="' . $this->escapeHtmlAttr($this->r('search', [], ['field' => 'locality', 'q' => $profile['locality']])) . '">
|
2018-11-16 06:00:03 +01:00
|
|
|
<span class="fa fa-filter" title="' . $this->__('Filter by locality') . '" aria-hidden="true"></span>
|
|
|
|
</a>';
|
2018-11-12 03:08:33 +01:00
|
|
|
}
|
|
|
|
if (!empty($profile['region'])
|
|
|
|
&& strtolower($profile['locality']) != strtolower($profile['region'])) {
|
2020-06-13 19:21:18 +02:00
|
|
|
$parts[] = $this->escapeHtml($profile['region']) . ' <a href="' . $this->escapeHtmlAttr($this->r('search', [], ['field' => 'region', 'q' => $profile['region']])) . '">
|
2018-11-16 06:00:03 +01:00
|
|
|
<span class="fa fa-filter" title="' . $this->__('Filter by region') . '" aria-hidden="true"></span>
|
|
|
|
</a>';
|
2018-11-12 03:08:33 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if (!empty($profile['country'])) {
|
2020-06-13 19:21:18 +02:00
|
|
|
$parts[] = $this->escapeHtml($profile['country']) . ' <a href="' . $this->escapeHtmlAttr($this->r('search', [], ['field' => 'country', 'q' => $profile['country']])) . '">
|
2018-11-16 06:00:03 +01:00
|
|
|
<span class="fa fa-filter" title="' . $this->__('Filter by country') . '" aria-hidden="true"></span>
|
|
|
|
</a>';
|
2018-11-12 03:08:33 +01:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
|
|
|
|
<figure id="profile-<?php echo $this->escapeHtmlAttr($profile['id']) ?>" class="bg-light p-3 rounded">
|
|
|
|
<div class="media">
|
2020-06-13 19:21:18 +02:00
|
|
|
<a href="<?php echo $this->escapeHtmlAttr($this->u($profile['profile_url'])) ?>">
|
2018-11-16 06:00:03 +01:00
|
|
|
<img class="mr-3 rounded" src="photo/<?php echo $profile['id'] ?>.jpg">
|
|
|
|
</a>
|
2018-11-12 03:08:33 +01:00
|
|
|
<div class="media-body">
|
|
|
|
<h5 class="name">
|
2022-04-26 03:39:38 +02:00
|
|
|
<?php if ($profile['dfrn_request']): ?>
|
2020-06-13 19:21:18 +02:00
|
|
|
<a href="<?php echo $this->escapeHtmlAttr($this->u($profile['dfrn_request'])); ?>" class="card-link btn btn-primary float-right">
|
2018-11-16 06:00:03 +01:00
|
|
|
<i class="fa fa-external-link-alt"></i> <?php echo $this->p__('verb', 'Follow')?>
|
|
|
|
</a>
|
2022-04-26 03:39:38 +02:00
|
|
|
<?php endif; ?>
|
|
|
|
<?php if ($profile['follow']): ?>
|
|
|
|
<a href="<?php echo $this->escapeHtmlAttr($profile['follow']); ?>" class="card-link btn btn-primary float-right" target="_blank" rel="noopener noreferrer">
|
|
|
|
<i class="fa fa-external-link-alt"></i> <?php echo $this->p__('verb', 'Follow')?>
|
|
|
|
</a>
|
|
|
|
<?php endif; ?>
|
|
|
|
<a href="<?php echo $this->escapeHtmlAttr($profile['profile_url']) ?>">
|
|
|
|
<?php echo $this->escapeHtml($profile['name']) ?>
|
|
|
|
</a>
|
2018-11-12 03:08:33 +01:00
|
|
|
</h5>
|
2018-11-16 06:00:03 +01:00
|
|
|
<p class="url">
|
2020-06-13 19:21:18 +02:00
|
|
|
<a href="<?php echo $this->escapeHtmlAttr($this->u($profile['profile_url'])) ?>">
|
2018-11-16 06:00:03 +01:00
|
|
|
<?php echo $this->escapeHtml($profile['addr']) ?>
|
|
|
|
</a>
|
2018-11-12 03:08:33 +01:00
|
|
|
</p>
|
|
|
|
<p class="description d-none d-md-block"><?php echo $this->escapeHtml($profile['pdesc']) ?></p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<p class="description d-md-none"><?php echo $this->escapeHtml($profile['pdesc']) ?></p>
|
2022-04-26 03:39:38 +02:00
|
|
|
<?php if ($profile['language']):?>
|
2018-11-16 06:00:03 +01:00
|
|
|
<div class="language">
|
|
|
|
<i class="fa fa-language" alt="<?php echo $this->__('Language')?>" title="<?php echo $this->__('Language')?>"></i>
|
2018-11-18 16:38:17 +01:00
|
|
|
<?php echo $this->e(Friendica\Directory\Utils\L10n::localeToLanguageString($profile['language'])) ?>
|
2020-06-13 19:21:18 +02:00
|
|
|
<a href="<?php echo $this->escapeHtmlAttr($this->r('search', [], ['field' => 'language', 'q' => $profile['language']])) ?>">
|
2018-11-16 06:00:03 +01:00
|
|
|
<i class="fa fa-filter" title="<?php echo $this->__('Filter by language')?>"></i>
|
|
|
|
</a>
|
|
|
|
</div>
|
2022-04-26 03:39:38 +02:00
|
|
|
<?php endif;?>
|
2018-11-12 03:08:33 +01:00
|
|
|
<div class="location">
|
2022-04-26 03:39:38 +02:00
|
|
|
<?php if (count($parts)): ?>
|
2018-11-16 06:00:03 +01:00
|
|
|
<i class="fa fa-globe" alt="<?php echo $this->__('Location')?>" title="<?php echo $this->__('Location')?>"></i>
|
2022-04-26 03:39:38 +02:00
|
|
|
<?php echo implode(', ', $parts); ?>
|
|
|
|
<?php endif ?>
|
2018-11-12 03:08:33 +01:00
|
|
|
</div>
|
|
|
|
|
2022-04-26 03:39:38 +02:00
|
|
|
<?php if ($profile['tags']): ?>
|
2018-11-12 03:08:33 +01:00
|
|
|
<div class="tags">
|
2022-04-26 03:39:38 +02:00
|
|
|
<?php
|
|
|
|
$tags = array_map('trim', explode(' ', $profile['tags']));
|
|
|
|
foreach ($tags as $tag):?>
|
2018-11-16 06:00:03 +01:00
|
|
|
<span class="badge">
|
|
|
|
<?php echo $this->escapeHtml($tag) ?>
|
2020-06-13 19:21:18 +02:00
|
|
|
<a href="<?php echo $this->escapeHtmlAttr($this->r('search', [], ['q' => $tag])) ?>">
|
2018-11-16 06:00:03 +01:00
|
|
|
<i class="fa fa-tag" title="<?php echo $this->__('Search Tag')?>"></i>
|
|
|
|
</a>
|
|
|
|
</span>
|
2022-04-26 03:39:38 +02:00
|
|
|
<?php endforeach; ?>
|
2018-11-12 03:08:33 +01:00
|
|
|
</div>
|
2022-04-26 03:39:38 +02:00
|
|
|
<?php endif; ?>
|
2018-11-12 03:08:33 +01:00
|
|
|
</figure>
|