From eed2747b38f517c361ece55c64f08f4cf9877285 Mon Sep 17 00:00:00 2001 From: wangjr Date: Tue, 18 Jan 2022 08:49:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- options/locale/locale_en-US.ini | 2 ++ templates/org/course_list.tmpl | 6 ++-- templates/org/home_courses.tmpl | 60 ++++++++++++++++++++++----------- templates/repo/view_list.tmpl | 9 ++--- 4 files changed, 52 insertions(+), 25 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index d1dac2d3a..d289df75f 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -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 Read access to all repositories: members can view and clone repositories. teams.all_repositories_write_permission_desc = This team grants Write access to all repositories: members can read from and push to repositories. teams.all_repositories_admin_permission_desc = This team grants Admin access to all repositories: members can read from, push to and add collaborators to repositories. +teams.join_teams=Join the organization [admin] dashboard = Dashboard diff --git a/templates/org/course_list.tmpl b/templates/org/course_list.tmpl index a371ec4ff..ab0076783 100644 --- a/templates/org/course_list.tmpl +++ b/templates/org/course_list.tmpl @@ -121,8 +121,10 @@
-

- {{$.i18n.Tr "org.repo_updated"}}{{.CreatedUnix.FormatShort}} {{TimeSinceUnix .UpdatedUnix $.i18n.Lang}} +

+ {{.RelAvatarLink}} + + {{$.i18n.Tr "org.repo_updated"}} :  {{.CreatedUnix.FormatShort}} diff --git a/templates/org/home_courses.tmpl b/templates/org/home_courses.tmpl index e48a3db2c..4c7ac7285 100644 --- a/templates/org/home_courses.tmpl +++ b/templates/org/home_courses.tmpl @@ -194,23 +194,27 @@

- {{range $i, $v := .RecommendCourses}} - - {{if gt $i 0}} -
- {{end}} -
- -
- {{.Alias}} -

- 贡献者:{{.Creator.Name}} -

-
-
- - {{end}} - + {{ range .tags}} + {{if eq .TagName "精选项目"}} + {{.RepoList}} + {{range $i, $v := .RepoList}} + {{if gt $i 0}} +
+ {{end}} +
+ +
+ {{.Alias}} +

+ {{.Creator}} + 贡献者:{{.Creator}} +

+
+
+ + {{end}} + {{end}} + {{end}}
@@ -233,7 +237,7 @@ {{end}}
- {{.i18n.Tr "org.teams.join_teams"}} + {{.i18n.Tr "org.teams.join_teams"}}
@@ -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("加入失败") + } + } + }); + } \ No newline at end of file diff --git a/templates/repo/view_list.tmpl b/templates/repo/view_list.tmpl index 3640ff133..456ec1365 100644 --- a/templates/repo/view_list.tmpl +++ b/templates/repo/view_list.tmpl @@ -73,7 +73,7 @@ {{else}} - + {{if $entry.IsDir}} {{$subJumpablePathName := $entry.GetSubJumpablePathName}} @@ -93,12 +93,13 @@ {{end}} - + + + {{TimeSince $commit.Committer.When $.Lang}} {{end}}