loans.xml 1.62 KB
Newer Older
Laurent's avatar
Laurent committed
1 2
<GridLayout colums="auto" row="auto" xmlns:lv="nativescript-ui-listview">
  <Label visibility="{{ loans.length || busy == 'on' ? 'collapsed' : 'visible'  }}" style="text-align: center; height: 100dip" text="{{ L('no_loans') }}"/>
Patrick Barroca's avatar
Patrick Barroca committed
3
  
Laurent's avatar
Laurent committed
4 5 6 7 8 9 10 11 12 13 14
  <lv:RadListView col="0" row="0"
                  items="{{ loans }}"
                  id="loans"
                  itemTap="{{ onLoanTap }}"
                  separatorColor="transparent"
                  pullToRefresh="true"
                  pullToRefreshInitiated="{{ refreshLoansAndHoldsAction }}">
    <lv:RadListView.itemTemplate>
      <StackLayout class="list-item">
        <GridLayout  columns="100, *" rows="auto,auto,auto,auto,auto" class="{{ 'loan' + (isLate() ? ' late' : '')}}">
          <Label text="{{ getTitle() }}" class="title" textWrap="true" col="0" row="0" colSpan="3"/>
Laurent's avatar
Laurent committed
15

Laurent's avatar
Laurent committed
16 17 18 19 20 21 22 23 24 25 26 27
          <Image src="{{ getRecordThumbnail() }}" visibility="{{ getRecordThumbnail().length ? 'visible' : 'collapsed'  }}" col="0" row="1" stretch="aspectFill" rowSpan="4"/>
          
          <Label text="{{ L('author') + ':'}}" col="{{ getRecordThumbnail().length ? '1' : '0'  }}" row="1" class="form_label"/>
          <Label text="{{ getAuthor() }}" textWrap="true" col="1" row="{{ getRecordThumbnail().length ? '2' : '1'  }}"/>
          
          <Label text="{{ L('date_due') + ':'}}" col="{{ getRecordThumbnail().length ? '1' : '0'  }}" row="3" class="form_label"/>
          <Label text="{{ formattedDateDue() }}" col="1" row="{{ getRecordThumbnail().length ? '4' : '3'  }}" class="date_due"/>
        </GridLayout>
      </StackLayout>
    </lv:RadListView.itemTemplate>
  </lv:RadListView>
</GridLayout>
Laurent's avatar
Laurent committed
28