Browse Source

修复bug

pull/1425/head
ychao_1983 3 years ago
parent
commit
df75bcc71c
3 changed files with 8 additions and 4 deletions
  1. +1
    -0
      routers/org/home.go
  2. +3
    -4
      templates/org/course_list.tmpl
  3. +4
    -0
      templates/org/home_courses.tmpl

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

@@ -158,6 +158,7 @@ func Home(ctx *context.Context) {
for _, tag := range tags { for _, tag := range tags {
for _, repo := range tag.RepoList { for _, repo := range tag.RepoList {
repo.GetCreator() repo.GetCreator()
repo.GetOwner()
} }
} }




+ 3
- 4
templates/org/course_list.tmpl View File

@@ -128,11 +128,10 @@
<!-- <img class="ui avatar" style="width: 22px;height:22px;display:flex;vertical-align: middle;" src="{{.Creator.RelAvatarLink}}"> --> <!-- <img class="ui avatar" style="width: 22px;height:22px;display:flex;vertical-align: middle;" src="{{.Creator.RelAvatarLink}}"> -->
<div class="left aligned author"> <div class="left aligned author">
<!-- <span > --> <!-- <span > -->
<!-- {{.Creator}} -->
{{if .Creator}}
<img class="ui avatar image" style="width: 22px;height:22px;margin-top:-2px" src="{{.Creator.RelAvatarLink}}">
{{if ne .CreatorID 0}}
<img class="ui avatar image" style="width: 22px;height:22px;margin-top:-2px" src="{{.Creator.RelAvatarLink}}">
{{else}} {{else}}
<img class="ui avatar image" style="width: 22px;height:22px;margin-top:-2px" src="{{.Owner.RelAvatarLink}}">
<img class="ui avatar image" style="width: 22px;height:22px;margin-top:-2px" src="{{.Owner.RelAvatarLink}}">
{{end}} {{end}}


{{$.i18n.Tr "org.repo_updated"}}&nbsp;: &nbsp; {{TimeSinceUnixShort .UpdatedUnix}} {{$.i18n.Tr "org.repo_updated"}}&nbsp;: &nbsp; {{TimeSinceUnixShort .UpdatedUnix}}


+ 4
- 0
templates/org/home_courses.tmpl View File

@@ -208,7 +208,11 @@
<div class="content" style="margin-left: 10px;"> <div class="content" style="margin-left: 10px;">
<a href="{{.Link}}"><strong class="team-name">{{.Alias}}</strong></a> <a href="{{.Link}}"><strong class="team-name">{{.Alias}}</strong></a>
<p class="text grey"> <p class="text grey">
{{if ne .CreatorID 0}}
贡献者:{{.Creator.Name}} 贡献者:{{.Creator.Name}}
{{else}}
贡献者:{{.Owner.Name}}
{{end}}
</p> </p>
</div> </div>
</div> </div>


Loading…
Cancel
Save