Browse Source

修改代码

tags/v1.22.1.3^2
wangjr 3 years ago
parent
commit
eed2747b38
4 changed files with 52 additions and 25 deletions
  1. +2
    -0
      options/locale/locale_en-US.ini
  2. +4
    -2
      templates/org/course_list.tmpl
  3. +41
    -19
      templates/org/home_courses.tmpl
  4. +5
    -4
      templates/repo/view_list.tmpl

+ 2
- 0
options/locale/locale_en-US.ini View File

@@ -2041,6 +2041,7 @@ team_access_desc = Repository access
team_permission_desc = Permission
team_unit_desc = Allow Access to Repository Sections
team_unit_disabled = (Disabled)
selected_couse=Selected course

form.name_reserved = The organization name '%s' is reserved.
form.name_pattern_not_allowed = The pattern '%s' is not allowed in an organization name.
@@ -2126,6 +2127,7 @@ teams.all_repositories_helper = Team has access to all repositories. Selecting t
teams.all_repositories_read_permission_desc = This team grants <strong>Read</strong> access to <strong>all repositories</strong>: members can view and clone repositories.
teams.all_repositories_write_permission_desc = This team grants <strong>Write</strong> access to <strong>all repositories</strong>: members can read from and push to repositories.
teams.all_repositories_admin_permission_desc = This team grants <strong>Admin</strong> access to <strong>all repositories</strong>: members can read from, push to and add collaborators to repositories.
teams.join_teams=Join the organization

[admin]
dashboard = Dashboard


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

@@ -121,8 +121,10 @@
</div>
<div class=" extra " style="color:#888888;border-top: none !important">
<p class="time">
{{$.i18n.Tr "org.repo_updated"}}{{.CreatedUnix.FormatShort}} {{TimeSinceUnix .UpdatedUnix $.i18n.Lang}}
<p class="time" style="font-size: 14px;">
{{.RelAvatarLink}}
<img class="ui avatar" src="{{.RelAvatarLink}}">
{{$.i18n.Tr "org.repo_updated"}}&nbsp;: &nbsp;{{.CreatedUnix.FormatShort}}
<!-- {{if .PrimaryLanguage }}
<span class="text grey"><i class="color-icon" style="background-color: {{.PrimaryLanguage.Color}}"></i>{{ .PrimaryLanguage.Language }}</span>
{{end}} -->


+ 41
- 19
templates/org/home_courses.tmpl View File

@@ -194,23 +194,27 @@
</h4>
<div class="ui attached table segment course items">
{{range $i, $v := .RecommendCourses}}
{{if gt $i 0}}
<div class="ui divider" style="margin-bottom:10px;"></div>
{{end}}
<div class="item">
<i class="ri-bookmark-3-line course_color" ></i>
<div class="content" style="margin-left: 10px;">
<a href="{{$.OrgLink}}/teams/{{.LowerName}}"><strong class="team-name">{{.Alias}}</strong></a>
<p class="text grey">
贡献者:{{.Creator.Name}}
</p>
</div>
</div>
<!-- <div class="ui divider"></div> -->
{{end}}
{{ range .tags}}
{{if eq .TagName "精选项目"}}
{{.RepoList}}
{{range $i, $v := .RepoList}}
{{if gt $i 0}}
<div class="ui divider" style="margin-bottom:10px;"></div>
{{end}}
<div class="item">
<i class="ri-bookmark-3-line course_color" ></i>
<div class="content" style="margin-left: 10px;">
<a href="{{$.OrgLink}}/teams/{{.LowerName}}"><strong class="team-name">{{.Alias}}</strong></a>
<p class="text grey">
{{.Creator}}
贡献者:{{.Creator}}
</p>
</div>
</div>

{{end}}
{{end}}
{{end}}
</div>

@@ -233,7 +237,7 @@
{{end}}

<div style="text-align: center;margin-top: 5px;">
<a class="ui blue basic button" href="{{.OrgLink}}/teams/new"> <i class="ri-user-add-line"></i> {{.i18n.Tr "org.teams.join_teams"}}</a>
<a class="ui blue basic button" onclick="jion_course_team()"> <i class="ri-user-add-line"></i> {{.i18n.Tr "org.teams.join_teams"}}</a>
</div>
</div>

@@ -465,6 +469,7 @@
if(num>9){
document.getElementById(id).checked=false
alert("选择超过9个,请重新选择!")
return
}
}
@@ -475,5 +480,22 @@
document.getElementById("recommend").innerHTML="还能推荐"+show_num+"个"

}

function jion_course_team(){
$.ajax({
type:"GET",
url:"/course/addOrg",
dataType:"json",
async:false,
success:function(json){
data = json;
if(data.code==0){
alert("加入成功")
location.reload()

}else{
alert("加入失败")
}
}
});
}
</script>

+ 5
- 4
templates/repo/view_list.tmpl View File

@@ -73,7 +73,7 @@
</span>
</td>
{{else}}
<td class="name four wide">
<td class="name thirteen wide">
<span class="truncate">
{{if $entry.IsDir}}
{{$subJumpablePathName := $entry.GetSubJumpablePathName}}
@@ -93,12 +93,13 @@
</span>
</td>
{{end}}
<td class="message nine wide">
<!-- <td class="message nine wide">
<span class="truncate">
<a href="{{$.RepoLink}}/commit/{{$commit.ID}}" title="{{$commit.Summary}}">{{$commit.Summary | RenderEmoji}}</a>
</span>
</td>
<td class="text right age three wide">{{TimeSince $commit.Committer.When $.Lang}}</td>
</td> -->
<td class="text right age one wide" style="text-align: right;">{{TimeSince $commit.Committer.When $.Lang}}</td>
</tr>
{{end}}
</tbody>


Loading…
Cancel
Save