summaryrefslogtreecommitdiffstats
path: root/templates/org/team/repositories.tmpl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-10-11 10:27:00 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-10-11 10:27:00 +0000
commit65aa53fc52ff15efe54df4147564828d535837f8 (patch)
tree31c51dad04fdcca80e6d3043c8bd49d2f1a51f83 /templates/org/team/repositories.tmpl
parentInitial commit. (diff)
downloadforgejo-debian.tar.xz
forgejo-debian.zip
Adding upstream version 8.0.3.HEADupstream/8.0.3upstreamdebian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'templates/org/team/repositories.tmpl')
-rw-r--r--templates/org/team/repositories.tmpl61
1 files changed, 61 insertions, 0 deletions
diff --git a/templates/org/team/repositories.tmpl b/templates/org/team/repositories.tmpl
new file mode 100644
index 00000000..f5d68ce4
--- /dev/null
+++ b/templates/org/team/repositories.tmpl
@@ -0,0 +1,61 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content organization teams">
+ {{template "org/header" .}}
+ <div class="ui container">
+ {{template "base/alert" .}}
+ <div class="ui stackable grid">
+ {{template "org/team/sidebar" .}}
+ <div class="ui ten wide column">
+ {{template "org/team/navbar" .}}
+ {{$canAddRemove := and $.IsOrganizationOwner (not $.Team.IncludesAllRepositories)}}
+ {{if $canAddRemove}}
+ <div class="ui attached segment tw-flex tw-flex-wrap tw-gap-2">
+ <form class="ui form ignore-dirty tw-flex-1 tw-flex" action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/add" method="post">
+ {{.CsrfTokenHtml}}
+ <div id="search-repo-box" data-uid="{{.Org.ID}}" class="ui search">
+ <div class="ui input">
+ <input class="prompt" name="repo_name" placeholder="{{ctx.Locale.Tr "search.repo_kind"}}" autocomplete="off" required>
+ </div>
+ </div>
+ <button class="ui primary button tw-ml-2">{{ctx.Locale.Tr "add"}}</button>
+ </form>
+ <div class="tw-inline-block">
+ <button class="ui primary button link-action" data-modal-confirm="{{ctx.Locale.Tr "org.teams.add_all_repos_desc"}}" data-url="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/addall">{{ctx.Locale.Tr "add_all"}}</button>
+ <button class="ui red button link-action" data-modal-confirm="{{ctx.Locale.Tr "org.teams.remove_all_repos_desc"}}" data-url="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/removeall">{{ctx.Locale.Tr "remove_all"}}</button>
+ </div>
+ </div>
+ {{end}}
+ <div class="ui attached segment">
+ <div class="flex-list">
+ {{range .Team.Repos}}
+ <div class="flex-item tw-items-center">
+ <div class="flex-item-leading">
+ {{template "repo/icon" .}}
+ </div>
+ <div class="flex-item-main">
+ <a class="flex-item-title text primary" href="{{$.Org.HomeLink}}/{{.Name | PathEscape}}">
+ {{$.Org.Name}}/{{.Name}}
+ </a>
+ </div>
+ <div class="flex-item-trailing">
+ {{if $canAddRemove}}
+ <form method="post" action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/remove">
+ {{$.CsrfTokenHtml}}
+ <button type="submit" class="ui red small button" name="repoid" value="{{.ID}}">{{ctx.Locale.Tr "remove"}}</button>
+ </form>
+ {{end}}
+ </div>
+ </div>
+ {{else}}
+ <div class="flex-item">
+ <span class="text grey tw-italic">{{ctx.Locale.Tr "org.teams.repos.none"}}</span>
+ </div>
+ {{end}}
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+
+{{template "base/footer" .}}