android:layout_centerHorizontal="true"
android:layout_marginTop="60dp"
android:text="@string/retry_label"
- android:visibility="gone"
+ android:paddingLeft="25sp"
+ android:paddingRight="25sp"
+ android:visibility="visible"
/>
<ProgressBar
>
<include android:id="@+id/header_actionbar" layout="@layout/simple_actionbar"/>
-
- <LinearLayout android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="2dip"
- android:orientation="horizontal"
- >
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/checkout_item_txt"
- />
- <TextView
- android:id="@+id/checkout_items_number"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textStyle="bold"
- android:textSize="16sp"
- />
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/checkout_overdue_items"
- />
- <TextView
- android:id="@+id/checkout_items_overdue"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textColor="@color/red"
- android:textStyle="bold"
- android:textSize="16sp"
- />
-
- </LinearLayout>
-
- <ListView
+
+ <TableLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:paddingLeft="5dip"
+ android:paddingRight="5dip"
+ android:stretchColumns="2">
+ <TableRow
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ >
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/checkout_item_txt"
+ />
+ <TextView
+ android:id="@+id/checkout_items_number"
+ android:layout_width="32sp"
+ android:layout_height="wrap_content"
+ android:textStyle="bold"
+ android:textSize="16sp"
+ />
+ <TextView
+ android:layout_width="16dip"
+ />
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/checkout_overdue_items"
+ />
+ <TextView
+ android:id="@+id/checkout_items_overdue"
+ android:layout_width="32sp"
+ android:layout_height="wrap_content"
+ android:textStyle="bold"
+ android:textSize="16sp"
+ />
+ </TableRow>
+ </TableLayout>
+
+ <ListView
android:id="@+id/checkout_items_list"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:divider="@drawable/list_view_separator"
- android:dividerHeight="1dp"
>
</ListView>
android:id="@+id/header"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:background="@drawable/one_header_rounded_corner"
+ android:background="@drawable/header_rounded_corners"
android:orientation="horizontal"
android:paddingTop="3dip"
android:paddingBottom="2dip"
<string name="title_holds">Holds</string>
<string name="title_fines">Fines</string>
<string name="title_book_bags">Bookbags</string>
- <string name="renew_button">renew</string>
+ <string name="renew_button">Renew</string>
+ <string name="item_renewed">Item renewed</string>
<string name="record_of">Record %1$d of %2$d</string>
<!-- Search Details View -->
<string name="hold_items">Items on hold: </string>
<!-- Checkout items -->
- <string name="checkout_item_txt">Total items out: </string>
- <string name="checkout_overdue_items">/ Overdue items: </string>
+ <string name="checkout_item_txt">Total items checked out:</string>
+ <string name="checkout_overdue_items">Overdue:</string>
+ <string name="due">due</string>
<!-- Fines Activity -->
<string name="total_owned">Total Owned </string>
<item quantity="other">%d items</item>
</plurals>
- <string name="title_activity_junk">JunkActivity</string>
<string name="action_settings">Settings</string>
- <string name="hello_world">Hello world!</string>
<string name="retry_label">Retry</string>
</resources>
}
}
- // TODO are we using this too? In the opac they are not used
- /*
+ /* Other fields returned by the request; apparently not used in OPAC
resp_map.get("claims_returned");
resp_map.get("long_overdue")
resp_map.get("lost");
return lhs.getDueDate().compareTo(rhs.getDueDate());
}
});
+
return circRecords;
}
import java.util.Date;
import java.util.List;
+import android.opengl.Visibility;
import org.evergreen.android.R;
import org.evergreen.android.accountAccess.AccountAccess;
import org.evergreen.android.accountAccess.MaxRenewalsException;
}
// Get reference to TextView - title
- recordTitle = (TextView) row
- .findViewById(R.id.checkout_record_title);
+ recordTitle = (TextView) row.findViewById(R.id.checkout_record_title);
// Get reference to TextView - author
- recordAuthor = (TextView) row
- .findViewById(R.id.checkout_record_author);
+ recordAuthor = (TextView) row.findViewById(R.id.checkout_record_author);
// Get reference to TextView - record Publisher date+publisher
- recordDueDate = (TextView) row
- .findViewById(R.id.checkout_due_date);
+ recordDueDate = (TextView) row.findViewById(R.id.checkout_due_date);
renewButton = (TextView) row.findViewById(R.id.renew_button);
-
- renewButton.setText("renew : " + record.getRenewals());
-
+ final boolean renewable = record.getRenewals() > 0;
+ renewButton.setVisibility(renewable ? View.VISIBLE : View.GONE);
+ renewButton.setEnabled(renewable);
renewButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
+ if (!renewable)
+ return;
Thread renew = new Thread(new Runnable() {
@Override
Log.d(TAG, "Exception in reauth", eauth);
}
}
+ runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ Toast.makeText(context, getString(R.string.item_renewed), Toast.LENGTH_SHORT).show();
+ }
+ });
if (refresh) {
try {
// set text
recordTitle.setText(record.getTitle());
recordAuthor.setText(record.getAuthor());
- recordDueDate.setText(record.getDueDate());
+ recordDueDate.setText(getString(R.string.due) + ": " + record.getDueDate());
Log.d(TAG, "title: " + record.getTitle());
Log.d(TAG, "author: " + record.getAuthor());
Log.d(TAG, "due: " + record.getDueDate());
</retrieve>
</actions>
</permacrud>
+ </class><class id='bmp' controller='open-ils.cstore open-ils.pcrud' oils_obj:fieldmapper='biblio::monograph_part' oils_persist:tablename='biblio.monograph_part' reporter:label='Monograph Parts' oils_persist:field_safe='true'>
+ <fields oils_persist:primary='id' oils_persist:sequence='biblio.monograph_part_id_seq'>
+ <field name='id' reporter:datatype='id'></field>
+ <field name='record' reporter:datatype='link'></field>
+ <field name='label' reporter:datatype='text'></field>
+ <field name='label_sortkey' reporter:datatype='text'></field>
+ </fields>
+ <links>
+ <link field='record' reltype='has_a' key='id' map='' class='bre'></link>
+ </links>
+ <permacrud xmlns='http://open-ils.org/spec/opensrf/IDL/permacrud/v1'>
+ <actions>
+ <create permission='CREATE_MONOGRAPH_PART' global_required='true'></create>
+ <retrieve></retrieve>
+ <update permission='UPDATE_MONOGRAPH_PART' global_required='true'></update>
+ <delete permission='DELETE_MONOGRAPH_PART' global_required='true'></delete>
+ </actions>
+ </permacrud>
</class><class id='au' controller='open-ils.cstore open-ils.pcrud' oils_obj:fieldmapper='actor::user' oils_persist:tablename='actor.usr' reporter:core='true' reporter:label='ILS User'>
<fields oils_persist:primary='id' oils_persist:sequence='actor.usr_id_seq'>
<field reporter:label='All Addresses' name='addresses' oils_persist:virtual='true' reporter:datatype='link'></field>
#!/bin/sh
-curl -o assets/fm_IDL.xml 'http://bark.cwmars.org/reports/fm_IDL.xml?class=acn&class=acp&class=ahr&class=ahtc&class=au&class=cbreb&class=cbrebi&class=cbrebin&class=cbrebn&class=ccs&class=circ&class=ex&class=mbt&class=mbts&class=mous&class=mus&class=mvr&class=perm_ex'
+root=http://bark.cwmars.org
+curl -o assets/fm_IDL.xml "$root/reports/fm_IDL.xml?class=acn&class=acp&class=ahr&class=ahtc&class=au&class=bmp&class=cbreb&class=cbrebi&class=cbrebin&class=cbrebn&class=ccs&class=circ&class=ex&class=mbt&class=mbts&class=mous&class=mus&class=mvr&class=perm_ex"
#!/bin/sh
-curl -o assets/fm_IDL.xml 'http://demo.evergreencatalog.com/reports/fm_IDL.xml?class=acn&class=acp&class=ahr&class=ahtc&class=au&class=cbreb&class=cbrebi&class=cbrebin&class=cbrebn&class=ccs&class=circ&class=ex&class=mbt&class=mbts&class=mous&class=mus&class=mvr&class=perm_ex'
+root=http://demo.evergreencatalog.com
+curl -o assets/fm_IDL.xml "$root/reports/fm_IDL.xml?class=acn&class=acp&class=ahr&class=ahtc&class=au&class=bmp&class=cbreb&class=cbrebi&class=cbrebin&class=cbrebn&class=ccs&class=circ&class=ex&class=mbt&class=mbts&class=mous&class=mus&class=mvr&class=perm_ex"