aboutsummaryrefslogtreecommitdiffstats
path: root/templates/projects/new.tmpl
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2023-01-20 19:42:33 +0800
committerGitHub <noreply@github.com>2023-01-20 19:42:33 +0800
commit6fe3c8b3980f850c9789f9fa62bdfee7b2708ff0 (patch)
tree5e11864dd63c60564080506291ca93e465c19940 /templates/projects/new.tmpl
parent0c048e554ba42d99bd66c07447de5f35cf6c981b (diff)
downloadgitea-6fe3c8b3980f850c9789f9fa62bdfee7b2708ff0.tar.gz
gitea-6fe3c8b3980f850c9789f9fa62bdfee7b2708ff0.zip
Support org/user level projects (#22235)
Fix #13405 <img width="1151" alt="image" src="https://user-images.githubusercontent.com/81045/209442911-7baa3924-c389-47b6-b63b-a740803e640e.png"> Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'templates/projects/new.tmpl')
-rw-r--r--templates/projects/new.tmpl66
1 files changed, 66 insertions, 0 deletions
diff --git a/templates/projects/new.tmpl b/templates/projects/new.tmpl
new file mode 100644
index 0000000000..1069102792
--- /dev/null
+++ b/templates/projects/new.tmpl
@@ -0,0 +1,66 @@
+<div class="page-content repository projects edit-project new milestone">
+ <div class="ui container">
+ <div class="navbar">
+ {{if and .CanWriteProjects .PageIsEditProject}}
+ <div class="ui right floated secondary menu">
+ <a class="ui green button" href="{{$.HomeLink}}/-/projects/new">{{.locale.Tr "repo.milestones.new"}}</a>
+ </div>
+ {{end}}
+ </div>
+ <div class="ui divider"></div>
+ <h2 class="ui dividing header">
+ {{if .PageIsEditProjects}}
+ {{.locale.Tr "repo.projects.edit"}}
+ <div class="sub header">{{.locale.Tr "repo.projects.edit_subheader"}}</div>
+ {{else}}
+ {{.locale.Tr "repo.projects.new"}}
+ <div class="sub header">{{.locale.Tr "repo.projects.new_subheader"}}</div>
+ {{end}}
+ </h2>
+ {{template "base/alert" .}}
+ <form class="ui form grid" action="{{.Link}}" method="post">
+ {{.CsrfTokenHtml}}
+ <div class="eleven wide column">
+ <div class="field {{if .Err_Title}}error{{end}}">
+ <label>{{.locale.Tr "repo.projects.title"}}</label>
+ <input name="title" placeholder="{{.locale.Tr "repo.projects.title"}}" value="{{.title}}" autofocus required>
+ </div>
+ <div class="field">
+ <label>{{.locale.Tr "repo.projects.description"}}</label>
+ <textarea name="content" placeholder="{{.locale.Tr "repo.projects.description_placeholder"}}">{{.content}}</textarea>
+ </div>
+
+ {{if not .PageIsEditProjects}}
+ <label>{{.locale.Tr "repo.projects.template.desc"}}</label>
+ <div class="ui selection dropdown">
+ <input type="hidden" name="board_type" value="{{.type}}">
+ <div class="default text">{{.locale.Tr "repo.projects.template.desc_helper"}}</div>
+ <div class="menu">
+ {{range $element := .ProjectTypes}}
+ <div class="item" data-id="{{$element.BoardType}}" data-value="{{$element.BoardType}}">{{$.locale.Tr $element.Translation}}</div>
+ {{end}}
+ </div>
+ </div>
+ {{end}}
+ </div>
+ <div class="ui container">
+ <div class="ui divider"></div>
+ <div class="ui left">
+ {{if .PageIsEditProjects}}
+ <a class="ui primary basic button" href="{{.RepoLink}}/projects">
+ {{.locale.Tr "repo.milestones.cancel"}}
+ </a>
+ <button class="ui green button">
+ {{.locale.Tr "repo.projects.modify"}}
+ </button>
+ {{else}}
+ <button class="ui green button">
+ {{.locale.Tr "repo.projects.create"}}
+ </button>
+ {{end}}
+ </div>
+ </div>
+
+ </form>
+ </div>
+</div>