Create /profile/{nickname}/photos route
- Create new Profile\Photos\Index module class - Update most references of the legacy /photos/{nickname} route
This commit is contained in:
parent
6dcc964ed8
commit
77e87da441
16 changed files with 225 additions and 88 deletions
|
@ -2,7 +2,7 @@
|
|||
<div class="pull-left">
|
||||
<h3>{{$title}}</h3>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="pull-right">
|
||||
{{if $can_post}}
|
||||
<div class="photos-upload-link">
|
||||
|
@ -15,14 +15,14 @@
|
|||
|
||||
<ul role="menubar" class="sidebar-photos-albums-ul clear">
|
||||
<li role="menuitem" class="sidebar-photos-albums-li">
|
||||
<a href="{{$baseurl}}/photos/{{$nick}}" class="sidebar-photos-albums-element" title="{{$title}}">{{$recent}}</a>
|
||||
<a href="profile/{{$nick}}/photos" class="sidebar-photos-albums-element" title="{{$title}}">{{$recent}}</a>
|
||||
</li>
|
||||
|
||||
{{if $albums}}
|
||||
{{foreach $albums as $al}}
|
||||
{{if $al.text}}
|
||||
<li role="menuitem" class="sidebar-photos-albums-li">
|
||||
<a href="{{$baseurl}}/photos/{{$nick}}/album/{{$al.bin2hex}}" class="sidebar-photos-albums-element">
|
||||
<a href="photos/{{$nick}}/album/{{$al.bin2hex}}" class="sidebar-photos-albums-element">
|
||||
<span class="badge pull-right">{{$al.total}}</span>{{$al.text}}
|
||||
</a>
|
||||
</li>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<div id="photos-usage-message">{{$usage}}</div>
|
||||
|
||||
<form action="photos/{{$nickname}}" enctype="multipart/form-data" method="post" name="photos-upload-form" id="photos-upload-form">
|
||||
<form action="profile/{{$nickname}}/photos" enctype="multipart/form-data" method="post" name="photos-upload-form" id="photos-upload-form">
|
||||
<div id="photos-upload-div" class="form-group">
|
||||
<label id="photos-upload-text" for="photos-upload-newalbum">{{$newalbum}}</label>
|
||||
|
||||
|
@ -40,7 +40,7 @@
|
|||
<div class="photos-upload-wrapper">
|
||||
<div id="photos-upload-perms" class="btn-group pull-right">
|
||||
<button class="btn btn-default" data-toggle="modal" data-target="#aclModal" onclick="return false;">
|
||||
<i id="jot-perms-icon" class="fa {{$lockstate}}"></i>
|
||||
<i id="jot-perms-icon" class="fa {{$lockstate}}"></i>
|
||||
</button>
|
||||
|
||||
{{$default_upload_submit nofilter}}
|
||||
|
|
|
@ -236,6 +236,9 @@ function frio_remote_nav(App $a, array &$nav_info)
|
|||
// user menu
|
||||
$nav_info['nav']['usermenu'][] = [$server_url . '/profile/' . $remoteUser['nick'], DI::l10n()->t('Status'), '', DI::l10n()->t('Your posts and conversations')];
|
||||
$nav_info['nav']['usermenu'][] = [$server_url . '/profile/' . $remoteUser['nick'] . '/profile', DI::l10n()->t('Profile'), '', DI::l10n()->t('Your profile page')];
|
||||
// Kept for backwards-compatibility reasons, the remote server may not have updated to version 2022.12 yet
|
||||
// @TODO Switch with the new routes by version 2023.12
|
||||
//$nav_info['nav']['usermenu'][] = [$server_url . '/profile/' . $remoteUser['nick'] . '/photos', DI::l10n()->t('Photos'), '', DI::l10n()->t('Your photos')];
|
||||
$nav_info['nav']['usermenu'][] = [$server_url . '/photos/' . $remoteUser['nick'], DI::l10n()->t('Photos'), '', DI::l10n()->t('Your photos')];
|
||||
$nav_info['nav']['usermenu'][] = [$server_url . '/profile/' . $remoteUser['nick'] . '/media', DI::l10n()->t('Media'), '', DI::l10n()->t('Your postings with media')];
|
||||
$nav_info['nav']['usermenu'][] = [$server_url . '/calendar/', DI::l10n()->t('Calendar'), '', DI::l10n()->t('Your calendar')];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue