SmartIT_Extensions/BMC/smart-it-full/views/resource/rs-ka-attachments.html

50 lines
2.7 KiB
HTML

<div class="rs-group" aria-labelledby="rs-group__ka-attachments-header" role="region">
<h3 class="rs-group__header" id="rs-group__ka-attachments-header" tabindex="0">
{{'resourceSlice.article.relatedAttachments.label' | i18n}}
</h3>
<div class="rs-group__searching" ng-if="state.loadingAttachments || state.uploadingAttachments">
<div loading-spinner if="true"></div>
<span class="rs-group__searching-label">{{'common.labels.loading' | i18n}}</span>
</div>
<div ng-if="!state.loadingAttachments">
<div class='rs-group-list-item_empty' ng-if="!attachments.length && !state.uploadingAttachments" tabindex="0">
{{"resourceSlice.article.emptyList.relatedAttachments.label" | i18n}}
</div>
</div>
<div ng-if="!state.uploadingAttachments && !state.loadingAttachments">
<label ng-if="(attachments.length < context.attachmentLimit) && context.accessMappings.attachmentsEditAllowed"
class="label_control-wrap">
<div class="btn_no-fill rs-group__attachment-btn">
<input type="file" name="file" onchange="angular.element(this).scope().handleFileChange(this)" ie-activate-by-enter
class="rs-group__attachment-file-input" aria-label="{{'common.button.add.new' | i18n}} {{'common.labels.attachment' | i18n}}" />
<span class="rs-group__attachment-btn-text"><i class="icon-plus"></i>{{'common.button.add.new' | i18n}}</span>
</div>
</label>
<div class="rs-group__list rs-group__list_attachment" ng-if="attachments.length">
<div class="rs-group-list-item rs-group-list-item_attachment" ng-click="getAttachment(attachment)"
ng-enter="getAttachment(attachment)" role="link" tabindex="0"
ng-repeat='attachment in attachments | limitTo: itemsLimit.articleAttachments' title="{{attachment.name}}">
<div class="rs-group-list-item__attachment-icon" ng-if="attachment.fileGenericIconClass && !attachment.thumbnail"
ng-class="attachment.fileGenericIconClass"></div>
<img class="rs-group-list-item__attachment-icon" ng-if="attachment.thumbnail"
ng-src="{{attachment.thumbnail}}" alt="{{attachment.name}}" />
<div class="rs-group-list-item__info">
<div class="rs-group-list-item__description">{{attachment.name}}</div>
<span class="rs-group-list-item__text">{{'resourceSlice.article.attachmentSize.label' | i18n}}: {{attachment.size}}B</span>
</div>
<i ng-if="!printMode && context.accessMappings.attachmentsEditAllowed" class="icon-cross rs-group-list-item__attachment-remove-icon" ng-click="removeAttachment(attachment, $event)" role="link"
ng-enter="removeAttachment(attachment, $event)" tabindex="0" title="{{'common.button.remove' | i18n}} {{attachment.name}}"></i>
</div>
</div>
</div>
<show-more-less limit="itemsLimit.articleAttachments" size="{{attachments.length}}"></show-more-less>
</div>