Commit 63f64fc5 authored by Laurent's avatar Laurent
Browse files

Display site info on account popup

parent 71b41167
...@@ -80,9 +80,12 @@ export class AccountsController extends Controller { ...@@ -80,9 +80,12 @@ export class AccountsController extends Controller {
{ {
title: account.label, title: account.label,
cancelButtonText: L('cancel'), cancelButtonText: L('cancel'),
actions: [L('delete'), L('account_parameters')] actions: [L('about'), L('delete'), L('account_parameters')]
}) })
.then( (result) => { .then( (result) => {
if (result == L('about'))
return this.displayAccountInfo(account)
if (result == L('account_parameters')) if (result == L('account_parameters'))
return this.editAccount(account) return this.editAccount(account)
...@@ -154,6 +157,11 @@ export class AccountsController extends Controller { ...@@ -154,6 +157,11 @@ export class AccountsController extends Controller {
public displayAccountInfoAction(event) { public displayAccountInfoAction(event) {
let account = event.object.bindingContext let account = event.object.bindingContext
this.displayAccountInfo(account)
}
public displayAccountInfo(account: Account) {
this.navigate( { this.navigate( {
moduleName: "views/library/account_info", moduleName: "views/library/account_info",
bindingContext: (new LibraryController(account, this._manager)).showAccountInfo() bindingContext: (new LibraryController(account, this._manager)).showAccountInfo()
......
<GridLayout colums="auto" row="auto" xmlns:lv="nativescript-ui-listview"> <GridLayout colums="auto" row="auto" xmlns:lv="nativescript-ui-listview">
<Label visibility="{{ holds.length || busy == 'on' ? 'collapsed' : 'visible' }}" style="text-align: center; height: 100dip" text="{{ L('no_holds') }}"/>
<lv:RadListView col="0" row="0" <lv:RadListView col="0" row="0"
items="{{ holds }}" items="{{ holds }}"
id="holds" id="holds"
...@@ -39,4 +37,6 @@ ...@@ -39,4 +37,6 @@
</StackLayout> </StackLayout>
</lv:RadListView.itemTemplate> </lv:RadListView.itemTemplate>
</lv:RadListView> </lv:RadListView>
<Label visibility="{{ holds.length || busy == 'on' ? 'collapsed' : 'visible' }}" style="text-align: center; height: 100dip" text="{{ L('no_holds') }}"/>
</GridLayout> </GridLayout>
<GridLayout colums="auto" row="auto" xmlns:lv="nativescript-ui-listview"> <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') }}"/>
<lv:RadListView col="0" row="0" <lv:RadListView col="0" row="0"
items="{{ loans }}" items="{{ loans }}"
...@@ -46,4 +46,6 @@ ...@@ -46,4 +46,6 @@
</StackLayout> </StackLayout>
</lv:RadListView.itemTemplate> </lv:RadListView.itemTemplate>
</lv:RadListView> </lv:RadListView>
<Label visibility="{{ loans.length || busy == 'on' ? 'collapsed' : 'visible' }}" style="text-align: center; height: 100dip" text="{{ L('no_loans') }}" col="0" row="0"/>
</GridLayout> </GridLayout>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment