Move profile-related templates to sub-folder

This commit is contained in:
Hypolite Petovan 2019-10-27 10:09:00 -04:00
parent 0d1befdf2d
commit 9803c96db4
12 changed files with 4 additions and 16 deletions

View file

@ -527,7 +527,7 @@ class Profile
$p['url'] = Contact::magicLink(($p['url'] ?? '') ?: $profile_url); $p['url'] = Contact::magicLink(($p['url'] ?? '') ?: $profile_url);
$tpl = Renderer::getMarkupTemplate('profile_vcard.tpl'); $tpl = Renderer::getMarkupTemplate('profile/vcard.tpl');
$o .= Renderer::replaceMacros($tpl, [ $o .= Renderer::replaceMacros($tpl, [
'$profile' => $p, '$profile' => $p,
'$xmpp' => $xmpp, '$xmpp' => $xmpp,
@ -747,8 +747,6 @@ class Profile
$uid = intval($a->profile['uid']); $uid = intval($a->profile['uid']);
if ($a->profile['name']) { if ($a->profile['name']) {
$tpl = Renderer::getMarkupTemplate('profile_advanced.tpl');
$profile = []; $profile = [];
$profile['fullname'] = [DI::l10n()->t('Full Name:'), $a->profile['name']]; $profile['fullname'] = [DI::l10n()->t('Full Name:'), $a->profile['name']];
@ -875,6 +873,7 @@ class Profile
$profile['edit'] = [DI::baseUrl() . '/profiles/' . $a->profile['id'], DI::l10n()->t('Edit profile'), '', DI::l10n()->t('Edit profile')]; $profile['edit'] = [DI::baseUrl() . '/profiles/' . $a->profile['id'], DI::l10n()->t('Edit profile'), '', DI::l10n()->t('Edit profile')];
} }
$tpl = Renderer::getMarkupTemplate('profile/advanced.tpl');
return Renderer::replaceMacros($tpl, [ return Renderer::replaceMacros($tpl, [
'$title' => DI::l10n()->t('Profile'), '$title' => DI::l10n()->t('Profile'),
'$basic' => DI::l10n()->t('Basic'), '$basic' => DI::l10n()->t('Basic'),

View file

@ -87,7 +87,7 @@ class Register extends BaseModule
if (DI::config()->get('system', 'publish_all')) { if (DI::config()->get('system', 'publish_all')) {
$profile_publish = '<input type="hidden" name="profile_publish_reg" value="1" />'; $profile_publish = '<input type="hidden" name="profile_publish_reg" value="1" />';
} else { } else {
$publish_tpl = Renderer::getMarkupTemplate('profile_publish.tpl'); $publish_tpl = Renderer::getMarkupTemplate('profile/publish.tpl');
$profile_publish = Renderer::replaceMacros($publish_tpl, [ $profile_publish = Renderer::replaceMacros($publish_tpl, [
'$instance' => 'reg', '$instance' => 'reg',
'$pubdesc' => DI::l10n()->t('Include your profile in member directory?'), '$pubdesc' => DI::l10n()->t('Include your profile in member directory?'),

View file

@ -6,21 +6,10 @@
<div class="action"> <div class="action">
<a class="icon s16 edit ttright" href="#" rel="#profiles-menu" title="{{$profile.edit.3}}"><span>{{$profile.edit.1}}</span></a> <a class="icon s16 edit ttright" href="#" rel="#profiles-menu" title="{{$profile.edit.3}}"><span>{{$profile.edit.1}}</span></a>
<ul id="profiles-menu" class="menu-popup"> <ul id="profiles-menu" class="menu-popup">
{{if $profile.menu.entries}}
{{foreach $profile.menu.entries as $e}}
<li>
<a href="profiles/{{$e.id}}"><img src='{{$e.photo}}'>{{$e.profile_name}}</a>
</li>
{{/foreach}}
{{else}}
<li> <li>
<a href="{{$profile.edit.0}}">{{$profile.edit.1}}</a> <a href="{{$profile.edit.0}}">{{$profile.edit.1}}</a>
</li> </li>
{{/if}} <li><a href="settings/profile/photo" >{{$profile.menu.chg_photo}}</a></li>
<li><a href="profile_photo" >{{$profile.menu.chg_photo}}</a></li>
{{if $profile.menu.cr_new }}
<li><a href="profiles/new" id="profile-listing-new-link">{{$profile.menu.cr_new}}</a></li>
{{/if}}
</ul> </ul>
</div> </div>
{{/if}} {{/if}}