Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HARMONY-experimental-branch
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue analytics
Insights
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
Robin Korfmann
HARMONY-experimental-branch
Commits
68219179
Commit
68219179
authored
1 month ago
by
Dasan Ibrahim
Browse files
Options
Downloads
Patches
Plain Diff
Löschen Button hinzugefügt.
parent
c2bbb593
No related branches found
No related tags found
1 merge request
!4
merge dev to main
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/app/template/web/service.go
+3
-2
3 additions, 2 deletions
src/app/template/web/service.go
templates/project/_detail.go.html
+55
-3
55 additions, 3 deletions
templates/project/_detail.go.html
with
58 additions
and
5 deletions
src/app/template/web/service.go
+
3
−
2
View file @
68219179
...
@@ -4,6 +4,9 @@ import (
...
@@ -4,6 +4,9 @@ import (
"context"
"context"
"encoding/json"
"encoding/json"
"errors"
"errors"
"os"
"path/filepath"
"github.com/google/uuid"
"github.com/google/uuid"
"github.com/org-harmony/harmony/src/app/template"
"github.com/org-harmony/harmony/src/app/template"
"github.com/org-harmony/harmony/src/app/user"
"github.com/org-harmony/harmony/src/app/user"
...
@@ -12,8 +15,6 @@ import (
...
@@ -12,8 +15,6 @@ import (
"github.com/org-harmony/harmony/src/core/trace"
"github.com/org-harmony/harmony/src/core/trace"
"github.com/org-harmony/harmony/src/core/validation"
"github.com/org-harmony/harmony/src/core/validation"
"github.com/org-harmony/harmony/src/core/web"
"github.com/org-harmony/harmony/src/core/web"
"os"
"path/filepath"
)
)
var
(
var
(
...
...
This diff is collapsed.
Click to expand it.
templates/project/_detail.go.html
+
55
−
3
View file @
68219179
...
@@ -28,17 +28,20 @@
...
@@ -28,17 +28,20 @@
class=
"btn btn-outline-primary"
>
class=
"btn btn-outline-primary"
>
✏️ Bearbeiten
✏️ Bearbeiten
</a>
</a>
<!-- Delete button with custom confirmation modal -->
<button
class=
"btn btn-outline-danger"
onclick=
"showDeleteConfirmation('{{ .Data.Project.Name }}', '{{ .Data.Project.ID.Hex }}')"
>
🗑️ Löschen
</button>
<!-- Dropdown toggle for additional actions -->
<!-- Dropdown toggle for additional actions -->
<button
class=
"btn btn-outline-secondary dropdown-toggle dropdown-toggle-split"
<button
class=
"btn btn-outline-secondary dropdown-toggle dropdown-toggle-split"
data-bs-toggle=
"dropdown"
>
data-bs-toggle=
"dropdown"
>
<span
class=
"visually-hidden"
>
Toggle Dropdown
</span>
<span
class=
"visually-hidden"
>
Toggle Dropdown
</span>
</button>
</button>
<!-- Dropdown menu with export
and delete
options -->
<!-- Dropdown menu with export options -->
<ul
class=
"dropdown-menu"
>
<ul
class=
"dropdown-menu"
>
<li><a
class=
"dropdown-item"
href=
"#"
>
📄 Export als JSON
</a></li>
<li><a
class=
"dropdown-item"
href=
"#"
>
📄 Export als JSON
</a></li>
<li><a
class=
"dropdown-item"
href=
"#"
>
📄 Export als TXT
</a></li>
<li><a
class=
"dropdown-item"
href=
"#"
>
📄 Export als TXT
</a></li>
<li><hr
class=
"dropdown-divider"
></li>
<li><a
class=
"dropdown-item text-danger"
href=
"#"
>
🗑️ Projekt löschen
</a></li>
</ul>
</ul>
</div>
</div>
</div>
</div>
...
@@ -80,6 +83,55 @@
...
@@ -80,6 +83,55 @@
{{ end }}
{{ end }}
</div>
</div>
</div>
</div>
<!-- Delete Confirmation Modal -->
<div
class=
"modal fade"
id=
"deleteConfirmModal"
tabindex=
"-1"
aria-labelledby=
"deleteConfirmModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<h5
class=
"modal-title"
id=
"deleteConfirmModalLabel"
>
Projekt löschen
</h5>
<button
type=
"button"
class=
"btn-close"
data-bs-dismiss=
"modal"
aria-label=
"Close"
></button>
</div>
<div
class=
"modal-body"
>
<p>
Möchten Sie das Projekt
<strong
id=
"projectNameToDelete"
></strong>
wirklich löschen?
</p>
<div
class=
"alert alert-warning d-flex align-items-center"
role=
"alert"
>
<div
class=
"me-2"
>
⚠️
</div>
<div>
<strong>
Achtung:
</strong>
Alle zugehörigen Anforderungen werden ebenfalls gelöscht!
</div>
</div>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-secondary"
data-bs-dismiss=
"modal"
>
Abbrechen
</button>
<button
type=
"button"
class=
"btn btn-danger"
id=
"confirmDeleteBtn"
>
Projekt löschen
</button>
</div>
</div>
</div>
</div>
<script>
function
showDeleteConfirmation
(
projectName
,
projectId
)
{
// Set project name in modal
document
.
getElementById
(
'
projectNameToDelete
'
).
textContent
=
'
"
'
+
projectName
+
'
"
'
;
// Set up confirm button
const
confirmBtn
=
document
.
getElementById
(
'
confirmDeleteBtn
'
);
confirmBtn
.
onclick
=
function
()
{
// Execute HTMX delete request
htmx
.
ajax
(
'
DELETE
'
,
'
/project/
'
+
projectId
,
{
target
:
'
body
'
,
headers
:
{
'
HX-Push-Url
'
:
'
/projects
'
}
});
// Close modal
bootstrap
.
Modal
.
getInstance
(
document
.
getElementById
(
'
deleteConfirmModal
'
)).
hide
();
};
// Show modal
new
bootstrap
.
Modal
(
document
.
getElementById
(
'
deleteConfirmModal
'
)).
show
();
}
</script>
{{ end }}
{{ end }}
<!-- General Tab Template: Detailed project information display -->
<!-- General Tab Template: Detailed project information display -->
...
...
This diff is collapsed.
Click to expand it.
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