Browse Source

set activity tab style according to filter value

tags/v1.21.12.1
Gitea 4 years ago
parent
commit
2dcd50fb15
2 changed files with 3 additions and 2 deletions
  1. +1
    -0
      routers/user/profile.go
  2. +2
    -2
      templates/user/profile.tmpl

+ 1
- 0
routers/user/profile.go View File

@@ -179,6 +179,7 @@ func Profile(ctx *context.Context) {
total = ctxUser.NumFollowing
case "activity":
typeQuery := ctx.Query("type")
ctx.Data["ActTabName"] = typeQuery
onlyPerformedBy := true
if typeQuery == "all" {
onlyPerformedBy = false


+ 2
- 2
templates/user/profile.tmpl View File

@@ -118,9 +118,9 @@
<div class="ui divider"></div>
{{end}}
<div class="ui secondary stackable pointing menu">
<a class='item' href="{{.Owner.HomeLink}}?tab=activity&type=own">
<a class='{{if eq .ActTabName "own"}}active{{end}} item' href="{{.Owner.HomeLink}}?tab=activity&type=own">
{{svg "octicon-person" 16}} {{.i18n.Tr "user.own"}}</a>
<a class='item' href="{{.Owner.HomeLink}}?tab=activity&type=all">
<a class='{{if eq .ActTabName "all"}}active{{end}} item' href="{{.Owner.HomeLink}}?tab=activity&type=all">
{{svg "octicon-organization" 16}} {{.i18n.Tr "user.all"}}</a>
</div>
<div class="feeds">


Loading…
Cancel
Save