|
|
|
@@ -8,21 +8,56 @@ |
|
|
|
<img class="ui image" src="{{.SizedRelAvatarLink 100}}"> |
|
|
|
<span class="text thin grey"><a href="{{.HomeLink}}">{{.DisplayName}}</a></span> |
|
|
|
{{end}} |
|
|
|
|
|
|
|
{{if .IsOrganizationOwner}} |
|
|
|
<div class="ui right"> |
|
|
|
<a class="ui green button" href="{{.OrgLink}}/teams/new">{{svg "octicon-plus" 16}} {{.i18n.Tr "org.create_new_team"}}</a> |
|
|
|
</div> |
|
|
|
{{end}} |
|
|
|
{{if .CanCreateOrgRepo}} |
|
|
|
<div class="ui right"> |
|
|
|
<a class="ui green button" href="{{AppSubUrl}}/repo/create?org={{.Org.ID}}">{{svg "octicon-plus" 16}} {{.i18n.Tr "new_repo"}}</a> |
|
|
|
</div> |
|
|
|
{{end}} |
|
|
|
{{if .IsCourse}} |
|
|
|
{{if .CanCreateOrgRepo}} |
|
|
|
<div class="ui right"> |
|
|
|
<a class="ui green button" onclick="jion_course_team()">{{svg "octicon-plus" 16}} {{.i18n.Tr "org.teams.join_teams"}}</a> |
|
|
|
</div> |
|
|
|
{{end}} |
|
|
|
{{else}} |
|
|
|
{{if .IsOrganizationOwner}} |
|
|
|
<div class="ui right"> |
|
|
|
<a class="ui green button" href="{{.OrgLink}}/teams/new">{{svg "octicon-plus" 16}} {{.i18n.Tr "org.create_new_team"}}</a> |
|
|
|
</div> |
|
|
|
{{end}} |
|
|
|
{{if .CanCreateOrgRepo}} |
|
|
|
<div class="ui right"> |
|
|
|
<a class="ui green button" href="{{AppSubUrl}}/repo/create?org={{.Org.ID}}">{{svg "octicon-plus" 16}} {{.i18n.Tr "new_repo"}}</a> |
|
|
|
</div> |
|
|
|
{{end}} |
|
|
|
{{end}} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<script> |
|
|
|
|
|
|
|
function jion_course_team(){ |
|
|
|
$.ajax({ |
|
|
|
type:"GET", |
|
|
|
url:"/course/addOrg", |
|
|
|
dataType:"json", |
|
|
|
async:false, |
|
|
|
success:function(json){ |
|
|
|
data = json; |
|
|
|
if (data.code==0) { |
|
|
|
$('.alert').html('{{.i18n.Tr "repo.computing.success"}}').removeClass('alert-danger').addClass('alert-success').show().delay(1500).fadeOut(); |
|
|
|
} else { |
|
|
|
$('.alert').html(data.error_msg).removeClass('alert-success').addClass('alert-danger').show().delay(5000).fadeOut(); |
|
|
|
} |
|
|
|
location.reload() |
|
|
|
// if(data.code==0){ |
|
|
|
// alert("Join success") |
|
|
|
// location.reload() |
|
|
|
|
|
|
|
// }else{ |
|
|
|
// alert("Join failure") |
|
|
|
// } |
|
|
|
}, |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
</script> |
|
|
|
|