You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

120 lines
4.1 KiB

{{template "base/head" .}}
<div class="user settings repositories">
<div class="ui container">
<div class="ui grid">
{{template "user/settings/navbar" .}}
<div class="twelve wide column content">
{{template "base/alert" .}}
<h4 class="ui top attached header">
{{.i18n.Tr "settings.repos"}}
</h4>
<div class="ui attached segment repos">
<div class="ui middle aligned divided list">
{{range .Repos}}
<div class="item">
<span class="text light grey">
{{if .IsPrivate}}
<span class="text gold"><i class="octicon octicon-lock"></i></span>
{{else if .IsFork}}
<i class="octicon octicon-repo-forked"></i>
{{else if .IsMirror}}
<i class="octicon octicon-repo-clone"></i>
{{else}}
<i class="octicon octicon-repo"></i>
{{end}}
</span>
<a href="{{AppSubURL}}/{{.Owner.Name}}/{{.Name}}">
{{.Owner.Name}}/{{.Name}}
</a>
<span class="ui text light grey">{{.Size | FileSize}}</span>
{{if not (eq .OwnerID $.LoggedUserID)}}
<div class="right floated">
<a class="ui red tiny basic button inline delete-button" href="" data-url="{{$.Link}}/leave" data-id="{{.ID}}">{{$.i18n.Tr "settings.repos.leave"}}</a>
</div>
{{end}}
</div>
{{end}}
</div>
</div>
<h4 class="ui top attached header">
{{.i18n.Tr "settings.repoLabels"}}
<div class="ui right">
<div class="ui blue tiny new-label button">{{.i18n.Tr "settings.add_repo_label"}}</div>
</div>
</h4>
<div class="ui segment attached repo-labels">
<div class="ui list">
{{range .RepoLabels}}
<div class="item">
<span class="column">
<span class="ui label" style="background-color: {{.Color}}; color: {{.ForegroundColor}}">
{{.Name}}
</span>
<div class="ui right">
<a class="ui right delete-label-button" href="#" data-url="{{$.Link}}/labels/delete" data-id="{{.ID}}"><i class="octicon octicon-trashcan"></i> {{$.i18n.Tr "repo.label_delete"}}</a>
<a class="ui right edit-label-button" href="#" data-id={{.ID}} data-name={{.Name}} data-color={{.Color}}><i class="octicon octicon-pencil"></i> {{$.i18n.Tr "repo.issues.label_edit"}}</a>
<a class="ui right repositories" href="/issues?labels={{.ID}}"><i class="octicon octicon-repo"></i> {{$.i18n.Tr "repo.repositories" .NumRepo}}</a>
</div>
</span>
</div>
{{end}}
</div>
</div>
</div>
</div>
</div>
</div>
<div class="ui small add-edit-label modal">
<div class="header" data-createText="{{.i18n.Tr "repo.issues.label_create"}}" data-editText="{{.i18n.Tr "repo.issues.label_modify"}}">
</div>
<div class="content">
<form class="ui form" action="{{$.Link}}/labels" method="post">
{{.CSRFTokenHTML}}
<input name="id" type="hidden" class="label-id">
<div class="ui grid">
<div class="five wide column">
<div class="ui small input">
<input class="label-name" name="name" placeholder="{{.i18n.Tr "repo.issues.new_label_placeholder"}}" autofocus required>
</div>
</div>
<div class="color picker column">
<input class="color-picker" name="color" value="#70c24a" required>
</div>
<div class="column precolors">
{{template "repo/issue/label_precolors"}}
</div>
</div>
</form>
</div>
<div class="actions">
<div class="ui negative button">{{.i18n.Tr "modal.no"}}</div>
<div class="ui positive right submit labeled icon button">
{{.i18n.Tr "modal.send"}}
<i class="checkmark icon"></i>
</div>
</div>
</div>
<div class="ui small basic delete-label modal">
<div class="ui icon header">
{{.i18n.Tr "settings.repos.delete_label_header"}}
</div>
<div class="content">
<p>{{.i18n.Tr "settings.repos.delete_label_content"}}</p>
</div>
{{template "base/delete_modal_actions" .}}
</div>
<div class="ui small basic delete modal">
<div class="ui icon header">
{{.i18n.Tr "settings.repos.leave_title"}}
</div>
<div class="content">
<p>{{.i18n.Tr "settings.repos.leave_desc"}}</p>
</div>
{{template "base/delete_modal_actions" .}}
</div>
{{template "base/footer" .}}