Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Master Project Assignment Software
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Odin Johan Vatne
Master Project Assignment Software
Commits
a98a41a0
Commit
a98a41a0
authored
3 years ago
by
Odin Johan Vatne
Browse files
Options
Downloads
Patches
Plain Diff
Add button for 'create and start another' project
parent
ec06b5b8
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
pasapp/templates/pasapp/pages/copy_project.html
+9
-1
9 additions, 1 deletion
pasapp/templates/pasapp/pages/copy_project.html
pasapp/templates/pasapp/pages/create_project.html
+9
-1
9 additions, 1 deletion
pasapp/templates/pasapp/pages/create_project.html
with
18 additions
and
2 deletions
pasapp/templates/pasapp/pages/copy_project.html
+
9
−
1
View file @
a98a41a0
...
...
@@ -13,11 +13,18 @@
<script>
initialStatus
=
"
Open
"
;
</script>
<script>
function
redirectSelf
()
{
const
form
=
document
.
getElementById
(
'
copy-project-form
'
);
form
.
action
=
'
/project/create/?next=/project/{{project.id}}/copy/
'
;
form
.
submit
();
}
</script>
{% endblock %}
{% block title %} Copying {{project.title}} {% endblock %}
{% block onload %} setInitialStatus() {% endblock %}
{% block content %}
<form
action=
"/project/create/?next=/projects/mine/"
method=
"post"
>
<form
action=
"/project/create/?next=/projects/mine/"
method=
"post"
id=
"copy-project-form"
>
{% csrf_token %} {{ form.as_p }}
{% load html_components %}
...
...
@@ -28,5 +35,6 @@
{% tagbox_categorized projectTags True %}
<br>
<input
type=
"submit"
value=
"Create Copy"
/>
<input
type=
"button"
value=
"Create and start another"
onclick=
"redirectSelf()"
/>
</form>
{% endblock %}
This diff is collapsed.
Click to expand it.
pasapp/templates/pasapp/pages/create_project.html
+
9
−
1
View file @
a98a41a0
...
...
@@ -5,11 +5,18 @@
{% block imports %}
<script
src=
"{% static 'pasapp/js/tag_edit.js' %}"
></script>
<script
src=
"{% static 'pasapp/js/project_status_edit.js' %}"
></script>
<script>
function
redirectSelf
()
{
const
form
=
document
.
getElementById
(
'
new-project-form
'
);
form
.
action
=
'
/project/create/?next=/project/create/
'
;
form
.
submit
();
}
</script>
{% endblock %}
{% block title %} New Project {% endblock %}
{% block content %}
{% load html_components %}
<form
action=
"/project/create/?next={{next}}"
method=
"post"
>
<form
action=
"/project/create/?next={{next}}"
method=
"post"
id=
"new-project-form"
>
{% csrf_token %} {{ form.as_p }}
<p>
{% status_select %}
</p>
...
...
@@ -19,5 +26,6 @@
{% tagbox_categorized onclick=True %}
<br>
<input
type=
"submit"
value=
"Create Project"
/>
<input
type=
"button"
value=
"Create and start another"
onclick=
"redirectSelf()"
/>
</form>
{% endblock %}
This diff is collapsed.
Click to expand it.
Odin Johan Vatne
@odinjv
mentioned in commit
7a56b280
·
2 years ago
mentioned in commit
7a56b280
mentioned in commit 7a56b280edd270d435860760afa7c5a323c68170
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment