Browse Source

Merge pull request '#603 组织成员太多时显示不全' (#728) from fix-603 into V20211115

Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/728
tags/v1.21.12.1
A00老虎 4 years ago
parent
commit
c252c3c3d4
4 changed files with 18 additions and 12 deletions
  1. +0
    -0
      routers/org/members.go
  2. +6
    -1
      routers/routes/routes.go
  3. +6
    -5
      templates/org/home.tmpl
  4. +6
    -6
      templates/org/navber.tmpl

+ 0
- 0
routers/org/members.go View File


+ 6
- 1
routers/routes/routes.go View File

@@ -615,6 +615,11 @@ func RegisterRoutes(m *macaron.Macaron) {
//reqRepoBlockChainWriter := context.RequireRepoWriter(models.UnitTypeBlockChain)

// ***** START: Organization *****
m.Group("/org", func() {
m.Group("/:org", func() {
m.Get("/members", org.Members)
}, context.OrgAssignment())
})
m.Group("/org", func() {
m.Group("", func() {
m.Get("/create", org.Create)
@@ -625,7 +630,7 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Get("/dashboard", user.Dashboard)
m.Get("/^:type(issues|pulls)$", user.Issues)
m.Get("/milestones", reqMilestonesDashboardPageEnabled, user.Milestones)
m.Get("/members", org.Members)
//m.Get("/members", org.Members)
m.Post("/members/action/:action", org.MembersAction)

m.Get("/teams", org.Teams)


+ 6
- 5
templates/org/home.tmpl View File

@@ -38,11 +38,12 @@
<div class="ui sixteen wide mobile six wide tablet five wide computer column">
<h4 class="ui top attached header">
<strong>{{.i18n.Tr "org.people"}}</strong>
{{if .IsOrganizationMember}}
<div class="ui right">
<a class="text grey" href="{{.OrgLink}}/members">{{.Org.NumMembers}} {{svg "octicon-chevron-right" 16}}</a>
</div>
{{end}}
<div class="ui right">
<a class="text grey" href="{{.OrgLink}}/members">{{.Org.NumMembers}} {{svg "octicon-chevron-right" 16}}</a>
</div>
<!-- {{if .IsOrganizationMember}} -->
<!-- {{end}} -->
</h4>
<div class="ui attached segment members">
{{$isMember := .IsOrganizationMember}}


+ 6
- 6
templates/org/navber.tmpl View File

@@ -3,10 +3,10 @@
<a class="{{if $.PageIsOrgHome}}active{{end}} item" href="{{.HomeLink}}">
{{svg "octicon-home" 16}}&nbsp;{{$.i18n.Tr "org.home"}}
</a>
<a class="{{if $.PageIsOrgMembers}}active{{end}} item" href="{{$.OrgLink}}/members">
{{svg "octicon-organization" 16}}&nbsp;{{$.i18n.Tr "org.people"}}
</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>
@@ -23,10 +23,10 @@
{{svg "octicon-home" 16}}&nbsp;{{$.i18n.Tr "org.home"}}
</a>
{{end}}
<a class="{{if $.PageIsOrgMembers}}active{{end}} item" href="{{$.OrgLink}}/members">
{{svg "octicon-organization" 16}}&nbsp;{{$.i18n.Tr "org.people"}}
</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>


Loading…
Cancel
Save