File tree Expand file tree Collapse file tree 4 files changed +8
-25
lines changed Expand file tree Collapse file tree 4 files changed +8
-25
lines changed Original file line number Diff line number Diff line change @@ -1661,7 +1661,7 @@ function initDashboardSearch() {
1661
1661
repos : [ ] ,
1662
1662
searchQuery : '' ,
1663
1663
suburl : document . querySelector ( 'meta[name=_suburl]' ) . content ,
1664
- uid : document . querySelector ( 'meta[name=_uid ]' ) . content
1664
+ uid : document . querySelector ( 'meta[name=_context_uid ]' ) . content
1665
1665
} ,
1666
1666
1667
1667
mounted : function ( ) {
@@ -1698,7 +1698,7 @@ function initDashboardSearch() {
1698
1698
} else if ( repo . mirror ) {
1699
1699
return 'octicon octicon-repo-clone' ;
1700
1700
} else if ( repo . private ) {
1701
- return 'octicon octicon-repo-forked ' ;
1701
+ return 'octicon octicon-lock ' ;
1702
1702
} else {
1703
1703
return 'octicon octicon-repo' ;
1704
1704
}
Original file line number Diff line number Diff line change @@ -33,6 +33,9 @@ func Search(ctx *context.APIContext) {
33
33
OwnerID : ctx .QueryInt64 ("uid" ),
34
34
PageSize : convert .ToCorrectPageSize (ctx .QueryInt ("limit" )),
35
35
}
36
+ if ctx .User != nil && ctx .User .ID == opts .OwnerID {
37
+ opts .Searcher = ctx .User
38
+ }
36
39
37
40
// Check visibility.
38
41
if ctx .IsSigned && opts .OwnerID > 0 {
Original file line number Diff line number Diff line change 14
14
{{if .IsSigned}}
15
15
<meta name="_uid" content="{{.SignedUser.ID}}" />
16
16
{{end}}
17
+ {{if .ContextUser}}
18
+ <meta name="_context_uid" content="{{.ContextUser.ID}}" />
19
+ {{end}}
17
20
{{if .GoGetImport}}
18
21
<meta name="go-import" content="{{.GoGetImport}} git {{.CloneLink.HTTPS}}">
19
22
<meta name="go-source" content="{{.GoGetImport}} _ {{.GoDocDirectory}} {{.GoDocFile}}">
Original file line number Diff line number Diff line change 46
46
{{end}}
47
47
</ul>
48
48
</div>
49
-
50
- {{if not .ContextUser.IsOrganization}}
51
- <h4 class="ui top attached header">
52
- {{.i18n.Tr "home.collaborative_repos"}}
53
- </h4>
54
- <div class="ui attached table segment">
55
- <ul id="collaborative-repo-list">
56
- {{range .CollaborativeRepos}}
57
- <li {{if .IsPrivate}}class="private"{{end}}>
58
- <a href="{{AppSubUrl}}/{{.Owner.Name}}/{{.Name}}">
59
- <i class="octicon octicon-{{if .IsPrivate}}lock{{else if .IsFork}}repo-forked{{else if .IsMirror}}repo-clone{{else}}repo{{end}}"></i>
60
- <span class="text truncate owner-and-repo">
61
- <span class="text truncate owner-name">{{.Owner.Name}}</span> / <strong>{{.Name}}</strong>
62
- </span>
63
- <span class="ui right text light grey">
64
- {{.NumStars}} <i class="octicon octicon-star rear"></i>
65
- </span>
66
- </a>
67
- </li>
68
- {{end}}
69
- </ul>
70
- </div>
71
- {{end}}
72
49
</div>
73
50
74
51
{{if not .ContextUser.IsOrganization}}
You can’t perform that action at this time.
0 commit comments