readifood.git
11 years agoPrint formatting for the main page.
Iain Patterson [Mon, 13 May 2013 08:39:05 +0000 (04:39 -0400)]
Print formatting for the main page.

Show some headings on the main page only for hardcopies, making the
printout more meaningful.

11 years agoUse formatting classes on all cities link.
Iain Patterson [Mon, 13 May 2013 08:37:35 +0000 (04:37 -0400)]
Use formatting classes on all cities link.

The link to show all Cities behaves like a form so is given the same
noprint and standout formatting classes.

11 years agoMake delete links non-printing.
Iain Patterson [Mon, 13 May 2013 08:35:56 +0000 (04:35 -0400)]
Make delete links non-printing.

Delete links don't need to be shown in hardcopies.

11 years agoTidy up forms.
Iain Patterson [Mon, 13 May 2013 08:33:23 +0000 (04:33 -0400)]
Tidy up forms.

Use form() and end_form() where appropriate.
Use standout and noprint classes to emphasise forms and to hide those
which don't show any information.
Ensure that all appropriate forms are shown once.  Not never; not twice.

11 years agoUse get_small_link().
Iain Patterson [Mon, 13 May 2013 08:29:19 +0000 (04:29 -0400)]
Use get_small_link().

Tidy up links from summary lines with get_small_link().

11 years agoSmall link functions.
Iain Patterson [Fri, 10 May 2013 16:10:00 +0000 (12:10 -0400)]
Small link functions.

get_small_link() generates HTML for a small font link.
small_link() outputs the link directly.

11 years agoVarious stylesheet changes.
Iain Patterson [Fri, 10 May 2013 16:08:47 +0000 (12:08 -0400)]
Various stylesheet changes.

Print media section.  noprint class which is never printed.  printonly
class which is shown only when printed.
Various prettiness improvements.

11 years agoFix Area in City redirect.
Iain Patterson [Wed, 1 May 2013 14:13:15 +0000 (10:13 -0400)]
Fix Area in City redirect.

Use the new URI format when redirecting to a descriptive URI from a from
submission.

11 years agoTypo.
Iain Patterson [Wed, 1 May 2013 14:09:53 +0000 (10:09 -0400)]
Typo.

The correct method name is getId() not getID().

11 years agoStandardise URI for showing Areas in a City.
Iain Patterson [Wed, 1 May 2013 13:37:47 +0000 (09:37 -0400)]
Standardise URI for showing Areas in a City.

Other entities such as Contacts and Donations use URIs of the form
/contact/in/city/<name> to show entities associated with a particular City.
Areas, however, were using /area/in/<name>.  Change links and parameter
handling for consistency.

11 years agoFixed link to City's Areas.
Iain Patterson [Wed, 1 May 2013 13:09:45 +0000 (09:09 -0400)]
Fixed link to City's Areas.

A typo prevented the link to Areas in a City from working.

11 years agoShow deliveries on arbitrary dates.
Iain Patterson [Tue, 30 Apr 2013 16:44:39 +0000 (12:44 -0400)]
Show deliveries on arbitrary dates.

Allow showing drivers and deliveries scheduled on dates other than today.

11 years agoUse implode() instead of join().
Iain Patterson [Mon, 29 Apr 2013 16:21:49 +0000 (12:21 -0400)]
Use implode() instead of join().

Be consistent with use of implode()/explode().

11 years agoAdded form() and end_form().
Iain Patterson [Mon, 29 Apr 2013 16:20:57 +0000 (12:20 -0400)]
Added form() and end_form().

Functions to start and end a form with optional classes and action URL.

11 years agoShow outstanding orders in contact view.
Iain Patterson [Mon, 22 Apr 2013 20:40:09 +0000 (16:40 -0400)]
Show outstanding orders in contact view.

List any orders which are not delivered or cancelled when viewing a
beneficiary.

11 years agoAdded get_order_ids_by_state().
Iain Patterson [Mon, 22 Apr 2013 20:39:16 +0000 (16:39 -0400)]
Added get_order_ids_by_state().

Function to find orders in a given state.

11 years agoShow dates in the past.
Iain Patterson [Mon, 22 Apr 2013 20:08:53 +0000 (16:08 -0400)]
Show dates in the past.

Show dates up to two months in the past as well as the future when
creating a date dropdown.

11 years agoFixed changing area in existing address.
Iain Patterson [Mon, 22 Apr 2013 19:57:51 +0000 (15:57 -0400)]
Fixed changing area in existing address.

Searching for an existing address was using the old area ID rather than
any new one specified by the user.

11 years agoFixed check for quantity in order.
Iain Patterson [Mon, 22 Apr 2013 19:49:48 +0000 (15:49 -0400)]
Fixed check for quantity in order.

We were still checking for a valid quantity even though the field has
been removed.

11 years agoTypo. 2013-04-19
Iain Patterson [Fri, 19 Apr 2013 08:27:29 +0000 (04:27 -0400)]
Typo.

Incorrect bitshift caused $PARCEL_SINGLE to be ignored.

To fix in the database, run

  update Contact set parcel=parcel|1 where parcel>0 and not (parcel & 7);
  update FoodOrder set parcel=parcel|1 where parcel>0 and not (parcel & 7);

11 years agoSuggest parcel from contact details.
Iain Patterson [Thu, 18 Apr 2013 16:11:46 +0000 (12:11 -0400)]
Suggest parcel from contact details.

Prepopulate the parcel size and contents field of new orders to a named
contact.

11 years agoRecord contacts' preferred parcel type.
Iain Patterson [Thu, 18 Apr 2013 16:10:25 +0000 (12:10 -0400)]
Record contacts' preferred parcel type.

Specify family unit and dietary requirements for a contact by reusing
parcel flags.

11 years agoRemoved order quantity.
Iain Patterson [Thu, 18 Apr 2013 16:09:36 +0000 (12:09 -0400)]
Removed order quantity.

Orders refer to parcel size and contents.  Quantity isn't used.

11 years agoLink directly to order from contact view.
Iain Patterson [Thu, 18 Apr 2013 14:46:26 +0000 (10:46 -0400)]
Link directly to order from contact view.

Added a link from the contacts page which will create a new order with
the beneficiary selected.

11 years agoDescribe parcels with more detail. 2013-04-10 live-2013-04-10 uat-2013-04-10
Iain Patterson [Wed, 10 Apr 2013 21:52:25 +0000 (17:52 -0400)]
Describe parcels with more detail.

Specify family unit size and allow multiple types of parcel contents.

11 years agoFix driver display in order form.
Iain Patterson [Wed, 10 Apr 2013 21:39:37 +0000 (17:39 -0400)]
Fix driver display in order form.

Drivers were being correctly recorded but not always correctly displayed
when viewing existing orders.

11 years agoRecord donations in grams.
Iain Patterson [Wed, 10 Apr 2013 20:55:40 +0000 (16:55 -0400)]
Record donations in grams.

Donations are entered as kilograms to two decimal places but are stored
internally as integers.
Convert the donation to grams so we can save an integer value to the
database.

11 years agoAdded contact registration date.
Iain Patterson [Wed, 10 Apr 2013 20:50:41 +0000 (16:50 -0400)]
Added contact registration date.

Record date a contact was registered on the system.

11 years agoFix foreign key constraints.
Iain Patterson [Wed, 10 Apr 2013 16:41:41 +0000 (12:41 -0400)]
Fix foreign key constraints.

OrderState references a contact ID rather than a user.
Foreign keys must be explicitly set as NULL from Propel.

11 years agoAllow placing recurring orders.
Iain Patterson [Wed, 10 Apr 2013 16:40:58 +0000 (12:40 -0400)]
Allow placing recurring orders.

New orders can be assigned a recurrence of up to 3 weekly iterations.

11 years agoAdded contact notes field.
Iain Patterson [Wed, 10 Apr 2013 08:20:18 +0000 (04:20 -0400)]
Added contact notes field.

Allow freeform notes for a contact, for instance for quickly noting the
family makeup and dietary requirements during a phone call so that more
details attributes can be specified when time pressure is relaxed.

11 years agoStandardise contact and hub display.
Iain Patterson [Tue, 9 Apr 2013 22:27:17 +0000 (18:27 -0400)]
Standardise contact and hub display.

Contacts and hubs are very similar, having roles, addresses and
entity-specific attributes.  Use similar functions and layout when
showing them both.

11 years agoSplit hub roles.
Iain Patterson [Tue, 9 Apr 2013 22:26:57 +0000 (18:26 -0400)]
Split hub roles.

Differentiate between hubs which take donations (ROLE_COLLECTION) and
those which receive orders on behalf of beneficiaries
(ROLE_DISTRIBUTION).

11 years agoRequester => Referrer.
Iain Patterson [Tue, 9 Apr 2013 19:30:17 +0000 (15:30 -0400)]
Requester => Referrer.

The preferred terminology for someone requesting an order is Referrer
rather than Requester.

11 years agoGo live.
Iain Patterson [Tue, 9 Apr 2013 15:44:41 +0000 (11:44 -0400)]
Go live.