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

2.9 KB
Raw Blame
<div
  class="spot-modal"
  data-indicator-name="modal"
  id="wp_destroy_modal"
  >
  <div id="spotModalTitle" class="spot-modal--header">{{text.title}}</div>

  <div class="spot-modal--body spot-container">
    @if (singleWorkPackage) {
      <p>
        <span [textContent]="text.single_text"></span>
        <strong> {{ singleWorkPackage.subject }} #{{ singleWorkPackage.id }}</strong>
        <span>?</span>
      </p>
      @if (singleWorkPackageChildren && singleWorkPackageChildren.length > 0) {
        <div>
          <p class="danger-zone--warning">
            <span class="icon-context icon-error"></span>
            <strong [textContent]="text.warning"></strong>:
            <span [textContent]="text.hasChildren(singleWorkPackage)"></span>
          </p>
          <ul>
            @for (child of singleWorkPackageChildren; track child) {
              <li class="spot-list--item">
                <div class="spot-list--item-title">
                  #<span [textContent]="child.id"></span>
                  <span [textContent]="child.subject || ''"></span>
                </div>
              </li>
            }
          </ul>
          <p>
            <span [textContent]="text.deletesChildren"></span>
          </p>
        </div>
      }
    }
    @if (workPackages.length > 1) {
      <p class="danger-zone--warning">
        <span class="icon-context icon-error"></span>
        <strong [textContent]="text.bulk_text"></strong>
      </p>
      <ul>
        @for (wp of workPackages; track wp) {
          <li class="spot-list--item">
            <div class="spot-list--item-title">
              #<span [textContent]="wp.id"></span>
              <span [textContent]="wp.subject"></span>
              @if (children(wp).length > 0) {
                <strong>(+ {{ text.childCount(wp) }})</strong>
              }
            </div>
          </li>
        }
      </ul>
    }
    @if (mustConfirmChildren) {
      <div>
        <label class="form--label-with-check-box -no-ellipsis">
          <div class="form--check-box-container">
            <input type="checkbox"
              name="confirm-children-deletion"
              id="confirm-children-deletion"
              [(ngModel)]="childrenDeletionConfirmed"
              class="form--check-box"/>
          </div>
          {{ text.label_confirm_children_deletion }}
        </label>
      </div>
    }
  </div>

  <div class="spot-action-bar">
    <div class="spot-action-bar--right">
      <button
        class="button button_no-margin spot-modal--cancel-button spot-action-bar--action"
        [textContent]="text.cancel"
        (click)="closeMe($event)"
      ></button>
      <button
        class="button button_no-margin -danger spot-action-bar--action"
        [attr.disabled]="busy || blockedDueToUnconfirmedChildren || undefined"
        (click)="confirmDeletion($event)">
        <svg trash-icon size="small" />
        {{ text.confirm }}
      </button>
    </div>
  </div>
</div>