<tr id="{{model.IdObject}}">
    {{#unless hideControlColumns}}
    {{#if hasSDsForDetailsView}}
    {{#if hasRangeDetails}}
    <td {{action 'toggleRow'}} style="cursor: pointer;">
        <div class="{{toggleClassName}}"></div>
    </td>
    {{else}}
    <td></td>
    {{/if}}
    {{/if}}
    <td class="validationColumn" title="{{validationErrorExplanation}}" {{action 'toggleRowValidation'}}>
        {{#if allValid}}
        <span class="material-icons md-24 valid">done</span>
        {{else}}
        <span class="material-icons md-24 no-valid">close</span>
        {{/if}}
    </td>
    {{/unless}}
    <td style="width: 20rem; white-space: nowrap;" title="{{PersonNameTooltip}}" {{action 'toggleRow'}}>
        {{PersonFullname}}
    </td>
    {{#if scale}}
    {{#if isReadOnly}}
    <td style="width: 20rem; white-space: nowrap;" title="{{gradeDesignation}}" class="{{unless columnVisibility.grade.isVisible 'hide-column' '' }}">{{gradeDesignation}}</td>
    {{#if scale.CommentsAllowed}}
    <td title="{{Comment}}" class="{{unless columnVisibility.comment.isVisible 'hide-column' ''}}">{{Comment}}</td>
    {{/if}}
    {{else}}
    <td style="width: 20rem" class="gradeInput {{unless columnVisibility.grade.isVisible 'hide-column' ''}}">
        {{#if scale.FreeGrading}}
        {{number-textbox classBinding=':freeGradingInput item.isValid::validationError' number=model.GradeValue minValue=scale.MinGrade maxValue=scale.MaxGrade}}
        {{else}}
        {{combo-box source=scale.Grades keyName="Id" valueName="Designation" value=IdGrade}}
        {{/if}}
    </td>
    {{#if scale.CommentsAllowed}}
    <td style="width: 20rem" class="{{unless columnVisibility.comment.isVisible 'hide-column' ''}}">{{textarea maxlength="(constant 'inputSizes.gradeRemark')" value=Comment rows='2'}}</td>
    {{/if}}
    {{/if}}
    {{/if}}
    {{#each columnDetails as |contentColumn|}} 
    <td class="{{unless contentColumn.isVisible 'hide-column' ''}} ">
        {{subscription-detail overrideControlId=(concat contentColumn.IdObject '_col') model=contentColumn save='saveSD' hiddenSubscriptionDetails=hiddenSubscriptionDetails showLabel=false validated='sdValidated' setReadOnly=isReadOnly}}
    </td>
    {{/each}}
</tr>
{{#if isExpanded}}
{{#blend-element tagName='tr' blendType='slideDown'}}
<td class="hide-on-mobile" colspan="2"></td>

<td class="mobile" colspan="4">
    <div>
        {{#each rangeDetails as |detail|}}
        <div class="formRow">
            {{subscription-detail overrideControlId=(concat detail.IdObject '_rangeMobile') model=detail save='saveSD' hiddenSubscriptionDetails=hiddenSubscriptionDetails validated='sdValidated' setReadOnly=isReadOnly}}
        </div>
        {{else}}
        {{translate 'noData'}}
        {{/each}}
    </div>
</td>

<td class="not-mobile" colspan="{{colCount}}">
    <div>
        {{#each rangeDetails as |detail|}}
        <div class="formRow">
            {{subscription-detail overrideControlId=(concat detail.IdObject '_range') model=detail save='saveSD' hiddenSubscriptionDetails=hiddenSubscriptionDetails validated='sdValidated' setReadOnly=isReadOnly}}
        </div>
        {{else}}
        {{translate 'noData'}}
        {{/each}}
    </div>
</td>
{{/blend-element}}
{{/if}}
