mirror of
https://github.com/go-gitea/gitea
synced 2024-12-22 16:44:26 +00:00
make sure the drop down appears only when criteria are met
This commit is contained in:
parent
35b45fb3a6
commit
54593db38c
@ -5,10 +5,10 @@ package org
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
html_template "html/template"
|
||||
"net/http"
|
||||
"path"
|
||||
"strings"
|
||||
html_template "html/template"
|
||||
|
||||
"code.gitea.io/gitea/models/db"
|
||||
"code.gitea.io/gitea/models/organization"
|
||||
@ -131,6 +131,12 @@ func home(ctx *context.Context, viewRepositories bool) {
|
||||
ctx.Data["PageIsViewRepositories"] = true
|
||||
}
|
||||
|
||||
err = shared_user.RenderOrgHeader(ctx)
|
||||
if err != nil {
|
||||
ctx.ServerError("RenderOrgHeader", err)
|
||||
return
|
||||
}
|
||||
|
||||
var (
|
||||
repos []*repo_model.Repository
|
||||
count int64
|
||||
|
@ -5,16 +5,18 @@
|
||||
<div class="ui container">
|
||||
<div class="ui mobile reversed stackable grid">
|
||||
<div class="ui {{if .ShowMemberAndTeamTab}}eleven wide{{end}} column">
|
||||
{{if and .ShowMemberAndTeamTab .HasPublicProfileReadme .HasPrivateProfileReadme}}
|
||||
<div class="item ui small dropdown jump">
|
||||
<span class="text">view as</span>
|
||||
<span class="text">view as: {{if not .IsViewerMember}}Public{{else}}Member{{end}}</span>
|
||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||
<div class="menu">
|
||||
<a href="{{$.Org.HomeLink}}?{{.QueryForPublic}}" class="{{if not .IsViewerMember}}active {{end}}item"><input hidden type="radio" {{if not .IsViewerMember}}checked{{end}}> Public</a>
|
||||
<a href="{{$.Org.HomeLink}}?{{.QueryForMember}}" class="{{if .IsViewerMember}}active {{end}}item"><input hidden type="radio" {{if .IsViewerMember}}checked{{end}}> Member</a>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if .IsViewerMember}}
|
||||
{{if .PrivateProfileReadme}}
|
||||
{{if and .ShowMemberAndTeamTab .PrivateProfileReadme}}
|
||||
<div id="readme_profile" class="markup">{{.PrivateProfileReadme}}</div>
|
||||
{{end}}
|
||||
{{else}}
|
||||
|
Loading…
Reference in New Issue
Block a user