File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed
client/modules/User/components Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -181,10 +181,18 @@ class Collection extends React.Component {
181181 }
182182
183183 getTitle ( ) {
184- const collectionTitle = this . props . t ( 'Collection.Title' ) ;
185- const titleSplits = collectionTitle . split ( '|' ) ;
186- const title = titleSplits [ 0 ] . concat ( '| ' ) ;
187- return title ;
184+ const title = this . props . t ( 'Common.SiteName' ) ;
185+ const collectionTitle = title . concat ( ' | ' ) ;
186+ return collectionTitle ;
187+ }
188+
189+ getCollectionOwner ( ) {
190+ if ( this . props . username === this . props . user . username ) {
191+ return this . props . t ( 'Collection.Title' ) ;
192+ }
193+ return this . props . t ( 'Collection.AnothersTitle' , {
194+ anotheruser : this . props . username
195+ } ) ;
188196 }
189197
190198 getUsername ( ) {
@@ -406,7 +414,9 @@ class Collection extends React.Component {
406414 }
407415
408416 render ( ) {
409- const title = this . hasCollection ( ) ? this . getCollectionName ( ) : null ;
417+ const title = this . hasCollection ( )
418+ ? this . getCollectionName ( )
419+ : this . getCollectionOwner ( ) ;
410420 const isOwner = this . isOwner ( ) ;
411421
412422 return (
You can’t perform that action at this time.
0 commit comments