116 lines
6.0 KiB
HTML
116 lines
6.0 KiB
HTML
<div class="cng-wiz__documents" tabindex="0" role="section">
|
|
<form name="documents" class="full-height">
|
|
<div ng-class="editMode ? 'change-profile__documents-panel':'cng-wiz__documents-panel'">
|
|
<div class="cng-wiz__documents-panel_header">
|
|
<h3 class="cng-wiz__documents-grid_panel-caption">{{'common.labels.addDocs' | i18n}}</h3>
|
|
|
|
<div class="cng-wiz__documents_selection-list-control">
|
|
<h3>
|
|
<span ng-if="!state.documentsSelected">{{'create.change.wizard.documents.selectDocuments.label' | i18n}}</span>
|
|
<span ng-if="state.documentsSelected">{{'create.change.wizard.documents.selectDocumentsCounter.label' | i18n:selectedDocumentTypes.length}}</span>
|
|
</h3>
|
|
|
|
<button type="button" role="button" aria-disabled="{{(!state.documentsSelected && docTypesPicked <= 0)}}" tabindex="0"
|
|
ng-class="state.documentsSelected ? 'btn_secondary' : 'btn_primary'"
|
|
ng-disabled="!state.documentsSelected && docTypesPicked <= 0"
|
|
ng-click="handleDocumentsControlButtonClick()"
|
|
ng-enter="handleDocumentsControlButtonClick()"
|
|
ng-if="!editMode || (editMode && !state.documentsSelected)">
|
|
|
|
{{(state.documentsSelected ? 'create.change.wizard.documents.addMoreDocuments.label':'create.change.continue') | i18n}}
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="cng-wiz__documents_selection" ng-if="!state.documentsSelected">
|
|
<div class="{{state.allDocumentsSelected ? 'cng-wiz__documents_selection-item-selected' : 'cng-wiz__documents_selection-item'}}" role="menuitemcheckbox" aria-checked="{{state.allDocumentsSelected}}" ng-click="selectAllDocuments()">
|
|
{{'create.change.wizard.tabs.documents' | i18n}}
|
|
</div>
|
|
<div ng-class="{'cng-wiz__documents_selection-list': !editMode, 'change-profile__documents-selection-list': editMode}">
|
|
<div ng-hide="docType.invisible" class="{{docType.active ? 'cng-wiz__documents_selection-item-selected' : 'cng-wiz__documents_selection-item'}}"
|
|
role="menuitemcheckbox" aria-checked="{{docType.active}}" tabindex="0"
|
|
aria-label="{{docType.label}}"
|
|
ng-repeat="docType in defaultDocumentTypes"
|
|
ng-click="toggleDocumentBlock(docType)"
|
|
ng-keydown="handleKeydown($event, docType)" >
|
|
{{docType.label}}
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="cng-wiz__documents-grid" ng-if="state.documentsSelected" role="grid">
|
|
|
|
<div class="cng-wiz__documents-grid-row" ng-repeat="docsChunk in documentsChunked" role="row">
|
|
<div class="cng-wiz__documents-grid-item" ng-repeat="doc in docsChunk" role='gridcell'>
|
|
<input type="hidden" name="plan_input_{{doc.index+'_'+$index}}" ng-required="true" ng-model="plan.desc" ng-repeat="plan in doc.plans"/>
|
|
<h2 class="required">{{doc.label}}</h2>
|
|
<span ng-if="!doc.isLocked" class="icon-cross cng-wiz__documents-item_plan-remove-trigger"
|
|
ng-click="removeActivePlanTab(doc)" ng-enter="removeActivePlanTab(doc)" tabindex="0" role="button" aria-label="Remove Document"></span>
|
|
<edit-summary
|
|
ng-repeat="plan in doc.plans"
|
|
ng-show="($index == doc.activePlanIndex)"
|
|
is-desc-required="false"
|
|
text-area-name="plan_{{doc.index+'_'+$index}}"
|
|
ticket="plan"
|
|
context="plan.workNote.locked? 'readonly': 'create'"
|
|
attachment="{{plan.workNote.locked? 'false': 'true'}}"
|
|
attachment-limit="{{attachmentLimit}}"
|
|
dropable="plan.workNote.locked? false: true"
|
|
textplaceholder="('common.placeholder.typeDescription' | i18n)"
|
|
type="context.type"
|
|
edit-mode="editMode">
|
|
</edit-summary>
|
|
<div class="cng-wiz__documents-item_plan-switcher">
|
|
<div class="cng-wiz__documents-item_plan-tabs" ng-if="doc.plans.length > 1">
|
|
<div tabindex="0" role="link"
|
|
ng-class="{'cng-wiz__documents-item_plan-tab': doc.plans[doc.activePlanIndex] != plan, 'cng-wiz__documents-item_plan-tab-active': doc.plans[doc.activePlanIndex] == plan}"
|
|
ng-repeat="plan in doc.plans"
|
|
ng-click="changeDocumentTab(doc,plan)"
|
|
ng-enter="changeDocumentTab(doc,plan)">
|
|
<span>{{$index + 1}}</span>
|
|
</div>
|
|
</div>
|
|
<div class="cng-wiz__documents-item_add-plan" tabindex="0" role="link"
|
|
ng-click="addSameTypePlan(doc)"
|
|
ng-enter="addSameTypePlan(doc)">
|
|
<i title="{{'common.labels.attach' | i18n}}" class="icon-plus"></i>
|
|
{{'create.change.wizard.documents.addPlanButton.label' | i18n:doc.label}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<button type="button" role="button" aria-disabled="{{(!state.documentsSelected && docTypesPicked <= 0)}}" tabindex="0"
|
|
ng-class="state.documentsSelected ? 'btn_secondary' : 'btn_primary'"
|
|
ng-disabled="!state.documentsSelected && docTypesPicked <= 0"
|
|
ng-click="handleDocumentsControlButtonClick('docSelect')"
|
|
ng-enter="handleDocumentsControlButtonClick('docSelect')"
|
|
ng-if="editMode && state.documentsSelected">
|
|
{{'create.change.wizard.documents.addMoreDocuments.label'| i18n}}
|
|
</button>
|
|
</div>
|
|
<div class="cng-wiz__documents_side-info" ng-if="!editMode" tabindex="0">
|
|
<h4 class="cng-wiz__document-templates-caption" ng-class="{'required__label': isNoteRequired}"
|
|
data-required="{{'common.label.required.bracketed' | i18n}}">
|
|
{{"timeline.note.addNote.placeholder" | i18n}}
|
|
</h4>
|
|
|
|
<div class="cng-wiz__document_notes" ng-if="documentsTab.currentNote">
|
|
<input type="hidden" ng-model="addNote.inputText" ng-required="isNoteRequired" />
|
|
<div ng-if="context.accessMappings.timelineEditAllowed" feed-comment-thread="" savenote="addNote(noteData)"
|
|
input-text="addNote.inputText" threads="" nesting-level="0"
|
|
type="context.type" is-draft="true">
|
|
<div ng-if="!state.noteFormIsActive" class="timeline-widget__add-note">
|
|
<input type="text" title="{{'timeline.note.addNote.placeholder' | i18n}}" class="timeline-widget__add-note-input" placeholder="{{'timeline.note.addNote.placeholder' | i18n}}" tabindex="0">
|
|
</div>
|
|
</div>
|
|
<!--<div class="cng-wiz__document_add-note" ng-click="">
|
|
<span class="icon-plus"></span>
|
|
{{'create.change.wizard.documents.addNoteButton.label' | i18n}}
|
|
</div>-->
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div> |