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
e42d11c9
Commit
e42d11c9
authored
4 weeks ago
by
Dasan Ibrahim
Browse files
Options
Downloads
Patches
Plain Diff
Export TXT und Export JSON Buttons hinzugefügt.
parent
68219179
No related branches found
No related tags found
1 merge request
!4
merge dev to main
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
templates/project/_detail.go.html
+55
-3
55 additions, 3 deletions
templates/project/_detail.go.html
with
55 additions
and
3 deletions
templates/project/_detail.go.html
+
55
−
3
View file @
e42d11c9
...
...
@@ -33,15 +33,28 @@
onclick=
"showDeleteConfirmation('{{ .Data.Project.Name }}', '{{ .Data.Project.ID.Hex }}')"
>
🗑️ Löschen
</button>
<!-- Export TXT button -->
<button
class=
"btn btn-outline-success"
onclick=
"exportProject('{{ .Data.Project.ID.Hex }}', 'txt')"
>
📄 Export TXT
</button>
<!-- Export JSON button -->
<button
class=
"btn btn-outline-info"
onclick=
"exportProject('{{ .Data.Project.ID.Hex }}', 'json')"
>
📄 Export JSON
</button>
<!-- Dropdown toggle for additional actions -->
<button
class=
"btn btn-outline-secondary dropdown-toggle dropdown-toggle-split"
data-bs-toggle=
"dropdown"
>
<span
class=
"visually-hidden"
>
Toggle Dropdown
</span>
</button>
<!-- Dropdown menu with
export
options -->
<!-- Dropdown menu with
additional
options -->
<ul
class=
"dropdown-menu"
>
<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=
"#"
onclick=
"exportProject('{{ .Data.Project.ID.Hex }}', 'txt')"
>
📄 Export als TXT
</a></li>
<li><a
class=
"dropdown-item"
href=
"#"
onclick=
"exportProject('{{ .Data.Project.ID.Hex }}', 'json')"
>
📄 Export als JSON
</a></li>
<li><hr
class=
"dropdown-divider"
></li>
<li><a
class=
"dropdown-item"
href=
"#"
>
📊 Statistiken anzeigen
</a></li>
<li><a
class=
"dropdown-item"
href=
"#"
>
🔄 Projekt duplizieren
</a></li>
</ul>
</div>
</div>
...
...
@@ -109,6 +122,20 @@
</div>
</div>
<!-- Export Progress Modal -->
<div
class=
"modal fade"
id=
"exportProgressModal"
tabindex=
"-1"
aria-labelledby=
"exportProgressModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog modal-sm"
>
<div
class=
"modal-content"
>
<div
class=
"modal-body text-center"
>
<div
class=
"spinner-border text-primary mb-3"
role=
"status"
>
<span
class=
"visually-hidden"
>
Loading...
</span>
</div>
<p
class=
"mb-0"
>
Export wird vorbereitet...
</p>
</div>
</div>
</div>
</div>
<script>
function
showDeleteConfirmation
(
projectName
,
projectId
)
{
// Set project name in modal
...
...
@@ -131,6 +158,31 @@
// Show modal
new
bootstrap
.
Modal
(
document
.
getElementById
(
'
deleteConfirmModal
'
)).
show
();
}
function
exportProject
(
projectId
,
format
)
{
// Show progress modal
const
progressModal
=
new
bootstrap
.
Modal
(
document
.
getElementById
(
'
exportProgressModal
'
));
progressModal
.
show
();
// Create export URL
const
exportUrl
=
`/project/
${
projectId
}
/export?format=
${
format
}
`
;
// Create a temporary link element for download
const
link
=
document
.
createElement
(
'
a
'
);
link
.
href
=
exportUrl
;
link
.
download
=
`project_
${
projectId
}
.
${
format
}
`
;
link
.
style
.
display
=
'
none
'
;
// Add to DOM, click, and remove
document
.
body
.
appendChild
(
link
);
link
.
click
();
document
.
body
.
removeChild
(
link
);
// Hide progress modal after a short delay
setTimeout
(()
=>
{
progressModal
.
hide
();
},
1000
);
}
</script>
{{ end }}
...
...
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