Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Use same HTML structure for full and detail view back button. Thereby cleanup the structure and sass

Henriette Dinger1bdd9499baf8
diff --git a/app/assets/stylesheets/content/work_packages/single_view/_single_view.sass b/app/assets/stylesheets/content/work_packages/single_view/_single_view.sass
index 557d1b8a475..830ab22b0a6 100644
--- a/app/assets/stylesheets/content/work_packages/single_view/_single_view.sass
+++ b/app/assets/stylesheets/content/work_packages/single_view/_single_view.sass
@@ -30,8 +30,19 @@
@include grid-visible-overflow
padding: 0
+
+// -------------------- Header row --------------------
+.wp-show--header-container
+ display: flex
+
+ .subject-header
+ flex-grow: 1
+
+ .inline-edit--display-field
+ white-space: normal
+ word-break: break-all
+
// Subject field
-.subject-header,
.wp-new--subject-wrapper
.inline-edit--active-field.subject
.inline-edit--field
@@ -39,17 +50,6 @@
font-size: 16px
line-height: 1
-.work-packages--info-row
- font-size: 12px
- padding-top: 1px
-
-.work-packages--details--title
- @include grid-block
- @include details-pane--form-field
- align-items: center
- font-size: 1.125rem
- font-weight: bold
-
.work-packages--details--subject
@include grid-content
@@ -95,7 +95,7 @@ i
vertical-align: -2px
padding: 0 0 0 4px
-// TABS row styling
+// -------------------- TABS row styling --------------------
#tabs
position: relative
width: 100%
@@ -109,6 +109,7 @@ i
&:before
@include varprop(color, body-font-color)
+// -------------------- Attribute groups --------------------
// Special styling for project context area
.attributes-group.-project-context
background: rgba(227, 245, 255, 0.3)
@@ -168,6 +169,11 @@ i
*:focus
outline: 1px solid $gray
+// -------------------- Info row --------------------
+.work-packages--info-row
+ font-size: 12px
+ padding-top: 1px
+
.wp-info-wrapper
display: flex
flex-wrap: wrap
diff --git a/app/assets/stylesheets/layout/work_packages/_full_view.sass b/app/assets/stylesheets/layout/work_packages/_full_view.sass
index 2fd8e1e55a5..73c3acd0673 100644
--- a/app/assets/stylesheets/layout/work_packages/_full_view.sass
+++ b/app/assets/stylesheets/layout/work_packages/_full_view.sass
@@ -58,13 +58,7 @@
ul li
float: none
- ul.subject-header
- list-style-type: none
-
- li
- margin: 0
- padding: 0
-
+ .subject-header
button
margin-right: 0
@@ -169,21 +163,9 @@
@media only screen and (max-width: 679px)
width: 100%
@media only screen and (min-width: 679px)
- display: flex
flex: 1 1 auto
- margin-bottom: 6px
.subject-header
- width: 100%
- margin: 0
-
- .inline-edit--display-field
- white-space: normal
- word-break: break-all
-
- li.inline-edit
- width: 100%
-
.work-packages--subject-element,
.work-packages--details--subject .inline-edit--field
font-size: 20px
@@ -204,6 +186,7 @@
> .toolbar-container
margin: 10px 0 5px 0
+
.work-packages--subject-type-row
display: flex
position: relative
@@ -219,10 +202,3 @@
@media only screen and (min-width: 679px)
.inline-edit--container.-active
width: 130px
-
-.edit-all-mode
- .subject-header .work-packages--details--subject .inplace-edit--text-field
- padding-left: 0.375rem
-
- .work-packages--details--title, .work-packages--details--description
- margin-left: 0
diff --git a/app/assets/stylesheets/layout/work_packages/_mobile.sass b/app/assets/stylesheets/layout/work_packages/_mobile.sass
index f8c87d43f21..c54bcbe2249 100644
--- a/app/assets/stylesheets/layout/work_packages/_mobile.sass
+++ b/app/assets/stylesheets/layout/work_packages/_mobile.sass
@@ -42,10 +42,6 @@
.work-packages--show-view
- &.edit-all-mode
- .work-packages-full-view--split-right
- display: none
-
ul#toolbar-items li .wp-create-button .dropdown
left: 0 !important
diff --git a/frontend/src/app/modules/common/back-routing/back-button.component.ts b/frontend/src/app/modules/common/back-routing/back-button.component.ts
index cecb7c61dd3..6a3eeeaa5d9 100644
--- a/frontend/src/app/modules/common/back-routing/back-button.component.ts
+++ b/frontend/src/app/modules/common/back-routing/back-button.component.ts
@@ -34,7 +34,7 @@ import {I18nService} from "core-app/modules/common/i18n/i18n.service";
template: `
<div class="wp-show--back-button hide-when-print">
<accessible-by-keyboard (execute)="goBack()"
- [linkClass]="linkClass + ' button'"
+ [linkClass]="classes()"
[linkAriaLabel]="text.goBack"
[linkTitle]="text.goBack">
<op-icon icon-classes="button--icon icon-back-up"></op-icon>
@@ -53,7 +53,7 @@ export class BackButtonComponent {
};
constructor(readonly backRoutingService:BackRoutingService,
- readonly I18n:I18nService,) {
+ readonly I18n:I18nService) {
}
public goBack() {
@@ -63,4 +63,11 @@ export class BackButtonComponent {
this.backRoutingService.goBack();
}
}
+
+ public classes():string {
+ let classes = 'button ';
+ classes += this.linkClass ? this.linkClass : '';
+
+ return classes;
+ }
}
diff --git a/frontend/src/app/modules/work_packages/routing/wp-full-view/wp-full-view.component.ts b/frontend/src/app/modules/work_packages/routing/wp-full-view/wp-full-view.component.ts
index 5d547e986ff..4555bcf92f6 100644
--- a/frontend/src/app/modules/work_packages/routing/wp-full-view/wp-full-view.component.ts
+++ b/frontend/src/app/modules/work_packages/routing/wp-full-view/wp-full-view.component.ts
@@ -45,11 +45,6 @@ export class WorkPackagesFullViewComponent extends WorkPackageSingleViewBase imp
public displayWatchButton:boolean;
public watchers:any;
- // More menu
- public permittedActions:any;
- public actionsAvailable:any;
- public triggerMoreMenuAction:Function;
-
stateName$ = of('work-packages.new');
constructor(public injector:Injector,
diff --git a/frontend/src/app/modules/work_packages/routing/wp-full-view/wp-full-view.html b/frontend/src/app/modules/work_packages/routing/wp-full-view/wp-full-view.html
index 906a131fcc0..f54647594c9 100644
--- a/frontend/src/app/modules/work_packages/routing/wp-full-view/wp-full-view.html
+++ b/frontend/src/app/modules/work_packages/routing/wp-full-view/wp-full-view.html
@@ -11,11 +11,9 @@
<back-button linkClass="work-packages-back-button"></back-button>
- <ul class="subject-header">
- <li class="subject-header-inner">
- <wp-subject></wp-subject>
- </li>
- </ul>
+ <div class="subject-header">
+ <wp-subject></wp-subject>
+ </div>
</div>
<ul id="toolbar-items" class="toolbar-items hide-when-print">
<li class="toolbar-item hidden-for-mobile">
diff --git a/frontend/src/app/modules/work_packages/routing/wp-split-view/wp-split-view.component.ts b/frontend/src/app/modules/work_packages/routing/wp-split-view/wp-split-view.component.ts
index 4e33a15ecda..b92f15d9009 100644
--- a/frontend/src/app/modules/work_packages/routing/wp-split-view/wp-split-view.component.ts
+++ b/frontend/src/app/modules/work_packages/routing/wp-split-view/wp-split-view.component.ts
@@ -107,6 +107,10 @@ export class WorkPackageSplitViewComponent extends WorkPackageSingleViewBase imp
return this.$state.params.focus === true;
}
+ public showBackButton():boolean {
+ return this.baseRoute.includes('bim');
+ }
+
protected initializeTexts() {
super.initializeTexts();
this.text.closeDetailsView = this.I18n.t('js.button_close_details');
diff --git a/frontend/src/app/modules/work_packages/routing/wp-split-view/wp-split-view.html b/frontend/src/app/modules/work_packages/routing/wp-split-view/wp-split-view.html
index f664979d9cb..158b7b36e6c 100644
--- a/frontend/src/app/modules/work_packages/routing/wp-split-view/wp-split-view.html
+++ b/frontend/src/app/modules/work_packages/routing/wp-split-view/wp-split-view.html
@@ -49,7 +49,14 @@
<wp-breadcrumb [workPackage]="workPackage"></wp-breadcrumb>
<edit-form [resource]="workPackage">
- <wp-subject></wp-subject>
+ <div class="wp-show--header-container">
+ <back-button *ngIf="showBackButton()"></back-button>
+
+ <div class="subject-header">
+ <wp-subject></wp-subject>
+ </div>
+ </div>
+
<div class="work-package-details-tab" ui-view></div>
</edit-form>
</div>