aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-03-06 20:57:57 +0800
committerRunxi Yu <me@runxiyu.org>2025-03-06 20:57:57 +0800
commitd9bd153b75997815fe1efc5f3d0aabfe99a23e00 (patch)
tree6273220c98ca77fba357e4ea67f95c341eed142d
parentsql: Create user too in the test script (diff)
downloadforge-d9bd153b75997815fe1efc5f3d0aabfe99a23e00.tar.gz
forge-d9bd153b75997815fe1efc5f3d0aabfe99a23e00.tar.zst
forge-d9bd153b75997815fe1efc5f3d0aabfe99a23e00.zip
group/index: Add create repo form
-rw-r--r--templates/group.tmpl37
1 files changed, 37 insertions, 0 deletions
diff --git a/templates/group.tmpl b/templates/group.tmpl
index 5ddae0f..00752c7 100644
--- a/templates/group.tmpl
+++ b/templates/group.tmpl
@@ -17,8 +17,45 @@
{{ if .description }}
<p>{{ .description }}</p>
{{ end }}
+
{{ template "group_view" . }}
</div>
+ {{ if .direct_access }}
+ <div class="padding-wrapper">
+ <form method="POST" enctype="application/x-www-form-urlencoded">
+ <table>
+ <thead>
+ <tr>
+ <th class="title-row" colspan="2">
+ Create repo
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <th scope="row">Repo name</th>
+ <td class="tdinput">
+ <input id="repo-name-input" name="repo_name" type="text" />
+ </td>
+ </tr>
+ </tbody>
+ <tfoot>
+ <tr>
+ <td class="th-like" colspan="2">
+ <div class="flex-justify">
+ <div class="left">
+ </div>
+ <div class="right">
+ <input class="btn-primary" type="submit" value="Create" />
+ </div>
+ </div>
+ </td>
+ </tr>
+ </tfoot>
+ </table>
+ </form>
+ </div>
+ {{ end }}
<footer>
{{ template "footer" . }}
</footer>