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 {
181
181
}
182
182
183
183
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
+ } ) ;
188
196
}
189
197
190
198
getUsername ( ) {
@@ -406,7 +414,9 @@ class Collection extends React.Component {
406
414
}
407
415
408
416
render ( ) {
409
- const title = this . hasCollection ( ) ? this . getCollectionName ( ) : null ;
417
+ const title = this . hasCollection ( )
418
+ ? this . getCollectionName ( )
419
+ : this . getCollectionOwner ( ) ;
410
420
const isOwner = this . isOwner ( ) ;
411
421
412
422
return (
You can’t perform that action at this time.
0 commit comments