Browse Source

fix-81

pull/136/head
lewis 3 years ago
parent
commit
7b637e9fa0
3 changed files with 20 additions and 14 deletions
  1. +1
    -0
      options/locale/locale_zh-CN.ini
  2. +1
    -0
      routers/org/home.go
  3. +18
    -14
      templates/org/navber.tmpl

+ 1
- 0
options/locale/locale_zh-CN.ini View File

@@ -1819,6 +1819,7 @@ org_full_name_holder=组织全名
org_name_helper=组织名字应该简单明了。 org_name_helper=组织名字应该简单明了。
create_org=创建组织 create_org=创建组织
repo_updated=最后更新于 repo_updated=最后更新于
home=组织主页
people=组织成员 people=组织成员
teams=组织团队 teams=组织团队
lower_members=名成员 lower_members=名成员


+ 1
- 0
routers/org/home.go View File

@@ -20,6 +20,7 @@ const (
// Home show organization home page // Home show organization home page
func Home(ctx *context.Context) { func Home(ctx *context.Context) {
ctx.SetParams(":org", ctx.Params(":username")) ctx.SetParams(":org", ctx.Params(":username"))
ctx.Data["PageIsOrgHome"] = true
context.HandleOrgAssignment(ctx) context.HandleOrgAssignment(ctx)
if ctx.Written() { if ctx.Written() {
return return


+ 18
- 14
templates/org/navber.tmpl View File

@@ -1,14 +1,16 @@
<div class="tablet only mobile only sixteen wide mobile sixteen wide tablet column row"> <div class="tablet only mobile only sixteen wide mobile sixteen wide tablet column row">
<div class="ui secondary pointing tabular top attached borderless menu navbar"> <div class="ui secondary pointing tabular top attached borderless menu navbar">
<a class="{{if $.PageIsOrgHome}}active{{end}} item" href="{{.HomeLink}}"> <a class="{{if $.PageIsOrgHome}}active{{end}} item" href="{{.HomeLink}}">
{{svg "octicon-home" 16}}&nbsp;{{$.i18n.Tr "org.组织主页"}}
</a>
<a class="{{if $.PageIsOrgMembers}}active{{end}} item" href="{{$.OrgLink}}/members">
{{svg "octicon-organization" 16}}&nbsp;{{$.i18n.Tr "org.people"}}
</a>
<a class="{{if $.PageIsOrgTeams}}active{{end}} item" href="{{$.OrgLink}}/teams">
{{svg "octicon-jersey" 16}}&nbsp;{{$.i18n.Tr "org.teams"}}
{{svg "octicon-home" 16}}&nbsp;{{$.i18n.Tr "org.home"}}
</a> </a>
{{if or ($.IsOrganizationMember) ($.IsOrganizationOwner)}}
<a class="{{if $.PageIsOrgMembers}}active{{end}} item" href="{{$.OrgLink}}/members">
{{svg "octicon-organization" 16}}&nbsp;{{$.i18n.Tr "org.people"}}
</a>
<a class="{{if $.PageIsOrgTeams}}active{{end}} item" href="{{$.OrgLink}}/teams">
{{svg "octicon-jersey" 16}}&nbsp;{{$.i18n.Tr "org.teams"}}
</a>
{{end}}
</div> </div>
</div> </div>
<!--平板、移动端--> <!--平板、移动端-->
@@ -18,15 +20,17 @@
<div class="sixteen wide column ui secondary sticky pointing tabular vertical menu"> <div class="sixteen wide column ui secondary sticky pointing tabular vertical menu">
{{with .Org}} {{with .Org}}
<a class="{{if $.PageIsOrgHome}}active{{end}} item" href="{{.HomeLink}}"> <a class="{{if $.PageIsOrgHome}}active{{end}} item" href="{{.HomeLink}}">
{{svg "octicon-home" 16}}&nbsp;{{$.i18n.Tr "org.主页"}}
{{svg "octicon-home" 16}}&nbsp;{{$.i18n.Tr "org.home"}}
</a> </a>
{{end}} {{end}}
<a class="{{if $.PageIsOrgMembers}}active{{end}} item" href="{{$.OrgLink}}/members">
{{svg "octicon-organization" 16}}&nbsp;{{$.i18n.Tr "org.people"}}
</a>
<a class="{{if $.PageIsOrgTeams}}active{{end}} item" href="{{$.OrgLink}}/teams">
{{svg "octicon-jersey" 16}}&nbsp;{{$.i18n.Tr "org.teams"}}
</a>
{{if or ($.IsOrganizationMember) ($.IsOrganizationOwner)}}
<a class="{{if $.PageIsOrgMembers}}active{{end}} item" href="{{$.OrgLink}}/members">
{{svg "octicon-organization" 16}}&nbsp;{{$.i18n.Tr "org.people"}}
</a>
<a class="{{if $.PageIsOrgTeams}}active{{end}} item" href="{{$.OrgLink}}/teams">
{{svg "octicon-jersey" 16}}&nbsp;{{$.i18n.Tr "org.teams"}}
</a>
{{end}}
</div> </div>
</div> </div>
</div> </div>

Loading…
Cancel
Save