Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OP#41290] Add ui for delete an link between work-package and file #87

Merged
merged 9 commits into from
Apr 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions css/tab.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ span.icon-openproject {

#tab-open-project {
height: 100%;
padding: 0;
}
4 changes: 4 additions & 0 deletions src/components/tab/SearchInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@ export default {
}
</script>
<style scoped lang="scss">
#searchBar {
padding: 10px;
}

.searchInput {
width: 100%;
}
Expand Down
8 changes: 6 additions & 2 deletions src/components/tab/WorkPackage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default {
<style scoped lang="scss">
.workpackage {
width: 100%;
padding: 10px 6px 0 6px;
padding: 15px 6px 0 10px;

.row {
display: flex;
Expand All @@ -76,10 +76,10 @@ export default {
margin-right: 4px;

&__title {
mix-blend-mode: multiply;
font-size: 0.75rem;
line-height: 14px;
text-align: center;
filter: contrast(0) brightness(0);
}
}

Expand Down Expand Up @@ -123,4 +123,8 @@ export default {
}
}
}

.workpackage div {
cursor: pointer;
}
</style>
47 changes: 43 additions & 4 deletions src/views/ProjectsTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,15 @@
<div class="existing-relations">
{{ t('integration_openproject', 'Existing relations:') }}
</div>
<WorkPackage v-for="(workpackage, index) in workpackages"
<div v-for="(workpackage, index) in workpackages"
:key="workpackage.id"
:workpackage="workpackage"
:class="{ 'workpackage-seperator': index !== workpackages.length-1 }" />
class="linked-workpackages">
<div class="linked-workpackages--workpackage">
<WorkPackage :workpackage="workpackage" />
<div class="linked-workpackages--workpackage--unlink icon-noConnection" />
</div>
<div :class="{ 'workpackage-seperator': index !== workpackages.length-1 }" />
</div>
</div>
<EmptyContent v-else
id="openproject-empty-content"
Expand Down Expand Up @@ -70,6 +75,9 @@ export default {
isLoading() {
return this.state === 'loading'
},
unlinkSvg() {
return require('../../img/noConnection.svg')
},
},
methods: {
/**
Expand Down Expand Up @@ -159,8 +167,39 @@ export default {
top: 140%;
}

.workpackage-seperator{
.linked-workpackages--workpackage{
display: flex;
position: relative;
width: 100%;
&--unlink{
position: absolute;
top: 12px;
right: 14px;
height: 15px;
width: 18px;
align-items: center;
filter: contrast(0) brightness(0);
kiranparajuli589 marked this conversation as resolved.
Show resolved Hide resolved
visibility: hidden;
}
}

.linked-workpackages:hover {
background-color: var(--color-background-dark);
}

.linked-workpackages:hover .linked-workpackages--workpackage--unlink {
visibility: visible;
cursor: pointer;
}

.workpackage-seperator {
height: 0;
margin: 0px 10px;
border-bottom: 1px solid rgb(237 237 237);
}
}

body.theme--dark .linked-workpackages--workpackage--unlink{
filter: invert(100%);
}
</style>
Loading