always provide a profile edit entry in the nav usermenu
This commit is contained in:
parent
1a6973a670
commit
5dcd0654d4
@ -34,6 +34,10 @@ EOT;
|
||||
if(local_user()) {
|
||||
$channel = $a->get_channel();
|
||||
$observer = $a->get_observer();
|
||||
$prof = q("select id from profile where uid = %d and is_default = 1",
|
||||
intval($channel['channel_id'])
|
||||
);
|
||||
|
||||
}
|
||||
elseif(remote_user())
|
||||
$observer = $a->get_observer();
|
||||
@ -81,6 +85,9 @@ EOT;
|
||||
$nav['usermenu'][] = Array('profile/' . $channel['channel_address'], t('View Profile'), "", t('Your profile page'));
|
||||
if(feature_enabled(local_user(),'multi_profiles'))
|
||||
$nav['usermenu'][] = Array('profiles', t('Edit Profiles'),"", t('Manage/Edit profiles'));
|
||||
else
|
||||
$nav['usermenu'][] = Array('profiles/' . $prof[0]['id'], t('Edit Profile'),"", t('Edit your profile'));
|
||||
|
||||
$nav['usermenu'][] = Array('photos/' . $channel['channel_address'], t('Photos'), "", t('Your photos'));
|
||||
$nav['usermenu'][] = Array('cloud/' . $channel['channel_address'],t('Files'),"",t('Your files'));
|
||||
|
||||
|
@ -201,18 +201,27 @@ function directory_content(&$a) {
|
||||
|
||||
// logger('mod_directory: entries: ' . print_r($entries,true), LOGGER_DATA);
|
||||
|
||||
$o .= replace_macros($tpl, array(
|
||||
'$search' => $search,
|
||||
'$desc' => t('Find'),
|
||||
'$finddsc' => t('Finding:'),
|
||||
'$safetxt' => htmlspecialchars($search,ENT_QUOTES,'UTF-8'),
|
||||
'$entries' => $entries,
|
||||
'$dirlbl' => t('Directory'),
|
||||
'$submit' => t('Find')
|
||||
));
|
||||
|
||||
if($dynamic) {
|
||||
|
||||
|
||||
$o .= alt_pager($a,$j['records'], t('next page'), t('previous page'));
|
||||
}
|
||||
else {
|
||||
|
||||
$o .= "<script> var page_query_args = '" . $a->query_string . "'; </script>";
|
||||
$o .= replace_macros($tpl, array(
|
||||
'$search' => $search,
|
||||
'$desc' => t('Find'),
|
||||
'$finddsc' => t('Finding:'),
|
||||
'$safetxt' => htmlspecialchars($search,ENT_QUOTES,'UTF-8'),
|
||||
'$entries' => $entries,
|
||||
'$dirlbl' => t('Directory'),
|
||||
'$submit' => t('Find')
|
||||
));
|
||||
|
||||
$o .= alt_pager($a,$j['records'], t('next page'), t('previous page'));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
|
@ -505,8 +505,8 @@ function profiles_content(&$a) {
|
||||
$o .= replace_macros($tpl,array(
|
||||
|
||||
'$form_security_token' => get_form_security_token("profile_edit"),
|
||||
'$profile_clone_link' => 'profiles/clone/' . $r[0]['id'] . '?t='
|
||||
. get_form_security_token("profile_clone"),
|
||||
'$profile_clone_link' => ((feature_enabled(local_user(),'multi_profiles')) ? 'profiles/clone/' . $r[0]['id'] . '?t='
|
||||
. get_form_security_token("profile_clone") : ''),
|
||||
'$profile_drop_link' => 'profiles/drop/' . $r[0]['id'] . '?t='
|
||||
. get_form_security_token("profile_drop"),
|
||||
|
||||
|
@ -6,9 +6,9 @@
|
||||
<ul>
|
||||
<li><a href="profile_photo" id="profile-photo_upload-link" title="{{$profpic}}">{{$profpic}}</a></li>
|
||||
<li><a href="profile/{{$profile_id}}/view" id="profile-edit-view-link" title="{{$viewprof}}">{{$viewprof}}</a></li>
|
||||
<li><a href="{{$profile_clone_link}}" id="profile-edit-clone-link" title="{{$cr_prof}}">{{$cl_prof}}</a></li>
|
||||
{{if $profile_clone_link}}<li><a href="{{$profile_clone_link}}" id="profile-edit-clone-link" title="{{$cr_prof}}">{{$cl_prof}}</a></li>{{/if}}
|
||||
<li></li>
|
||||
<li><a href="{{$profile_drop_link}}" id="profile-edit-drop-link" title="{{$del_prof}}" {{$disabled}} >{{$del_prof}}</a></li>
|
||||
{{if ! $default}}<li><a href="{{$profile_drop_link}}" id="profile-edit-drop-link" title="{{$del_prof}}" {{$disabled}} >{{$del_prof}}</a></li>{{/if}}
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user