From 0623956cd809648ad13ca672db75667421f56934 Mon Sep 17 00:00:00 2001 From: wangjr Date: Mon, 24 Jan 2022 16:00:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9#1446,=E7=BB=84=E7=BB=87?= =?UTF-8?q?=E6=88=90=E5=91=98=E4=BF=AE=E6=94=B9=E7=BB=84=E7=BB=87=E6=88=90?= =?UTF-8?q?=E5=91=98=E4=B8=BA=E6=96=B0=E5=BB=BA=E7=BB=84=E7=BB=87=EF=BC=8C?= =?UTF-8?q?=E7=BB=84=E7=BB=87=E5=9B=A2=E9=98=9F=E4=B8=BA=E6=96=B0=E5=BB=BA?= =?UTF-8?q?=E5=9B=A2=E9=98=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/org/header.tmpl | 57 +++++++++++++++++++----- templates/org/header_course.tmpl | 32 +++++++++++++ templates/org/member/course_members.tmpl | 2 + templates/org/team/courseTeams.tmpl | 2 +- templates/repo/createCourse.tmpl | 2 +- 5 files changed, 82 insertions(+), 13 deletions(-) create mode 100644 templates/org/header_course.tmpl diff --git a/templates/org/header.tmpl b/templates/org/header.tmpl index 01d15a4cd..13d0b0511 100644 --- a/templates/org/header.tmpl +++ b/templates/org/header.tmpl @@ -8,21 +8,56 @@ {{.DisplayName}} {{end}} - - {{if .IsOrganizationOwner}} -
- {{svg "octicon-plus" 16}} {{.i18n.Tr "org.create_new_team"}} -
- {{end}} - {{if .CanCreateOrgRepo}} -
- {{svg "octicon-plus" 16}} {{.i18n.Tr "new_repo"}} -
- {{end}} + {{if .IsCourse}} + {{if .CanCreateOrgRepo}} +
+ {{svg "octicon-plus" 16}} {{.i18n.Tr "org.teams.join_teams"}} +
+ {{end}} + {{else}} + {{if .IsOrganizationOwner}} +
+ {{svg "octicon-plus" 16}} {{.i18n.Tr "org.create_new_team"}} +
+ {{end}} + {{if .CanCreateOrgRepo}} +
+ {{svg "octicon-plus" 16}} {{.i18n.Tr "new_repo"}} +
+ {{end}} + {{end}} + diff --git a/templates/org/header_course.tmpl b/templates/org/header_course.tmpl new file mode 100644 index 000000000..776d550b2 --- /dev/null +++ b/templates/org/header_course.tmpl @@ -0,0 +1,32 @@ +
+
+
+
+
+ {{with .Org}} + + {{.DisplayName}} + {{end}} + {{if .IsCourse}} + {{if .CanCreateOrgRepo}} + + {{end}} + {{else}} + {{if .IsOrganizationOwner}} + + {{end}} + {{if .CanCreateOrgRepo}} + + {{end}} + {{end}} +
+
+
+
+
\ No newline at end of file diff --git a/templates/org/member/course_members.tmpl b/templates/org/member/course_members.tmpl index 40f933e32..83018739f 100644 --- a/templates/org/member/course_members.tmpl +++ b/templates/org/member/course_members.tmpl @@ -45,6 +45,8 @@ {{template "base/head" .}} + +
{{template "org/header" .}} {{template "org/navber_course" .}} diff --git a/templates/org/team/courseTeams.tmpl b/templates/org/team/courseTeams.tmpl index 13557888c..d4c5acd62 100644 --- a/templates/org/team/courseTeams.tmpl +++ b/templates/org/team/courseTeams.tmpl @@ -6,7 +6,7 @@ {{template "base/head" .}}
- {{template "org/header" .}} + {{template "org/header_course" .}} {{template "org/navber_course" .}}
diff --git a/templates/repo/createCourse.tmpl b/templates/repo/createCourse.tmpl index 5214c41c3..9247d8ece 100644 --- a/templates/repo/createCourse.tmpl +++ b/templates/repo/createCourse.tmpl @@ -65,7 +65,7 @@ - {{.i18n.Tr "cancel"}} + {{.i18n.Tr "cancel"}}