Browse Source

check if this account is admin when get navbar

pull/4940/head
glenn 7 years ago
parent
commit
8290b73664
  1. 2
      templates/explore/navbar.tmpl

2
templates/explore/navbar.tmpl

@ -4,11 +4,13 @@
<a class="{{if .PageIsExploreRepositories}}active{{end}} item" href="{{AppSubURL}}/explore/repos"> <a class="{{if .PageIsExploreRepositories}}active{{end}} item" href="{{AppSubURL}}/explore/repos">
<span class="octicon octicon-repo"></span> {{.i18n.Tr "explore.repos"}} <span class="octicon octicon-repo"></span> {{.i18n.Tr "explore.repos"}}
</a> </a>
{{if .IsAdmin}}
<a class="{{if .PageIsExploreUsers}}active{{end}} item" href="{{AppSubURL}}/explore/users"> <a class="{{if .PageIsExploreUsers}}active{{end}} item" href="{{AppSubURL}}/explore/users">
<span class="octicon octicon-person"></span> {{.i18n.Tr "explore.users"}} <span class="octicon octicon-person"></span> {{.i18n.Tr "explore.users"}}
</a> </a>
<a class="{{if .PageIsExploreOrganizations}}active{{end}} item" href="{{AppSubURL}}/explore/organizations"> <a class="{{if .PageIsExploreOrganizations}}active{{end}} item" href="{{AppSubURL}}/explore/organizations">
<span class="octicon octicon-organization"></span> {{.i18n.Tr "explore.organizations"}} <span class="octicon octicon-organization"></span> {{.i18n.Tr "explore.organizations"}}
</a> </a>
{{end}}
</div> </div>
</div> </div>

Loading…
Cancel
Save