Skip to content

Latest commit

 

History

History
194 lines (126 loc) · 4.87 KB

README.rst

File metadata and controls

194 lines (126 loc) · 4.87 KB

A booking product for Plone to reserve time slots throughout the week.

This product is an extension that customizes rg.prenotazioni

This package provides an extender to add the fields:

  1. required_booking_fields
  2. same_day_booking_disallowed

The field "required_booking_fields" allows to specify which of the fields:

  • email
  • mobile
  • phone
  • subject
  • agency

should be mandatory for a booking request to be accepted. In any case at least one between email, mobile and phone should be given at booking time.

The field "same_day_booking_disallowed" has 3 possible states:

  1. Yes
  2. No
  3. No, just for today

If 1. is selected the default behavior of rg.prenotazioni is maintained: users cannot reserve a booking today.

Options 2. and 3. instead allow the reservation.

Extends the rg.prenotazioni homonymous view in order to override the minimum date since when it is possible to reserve a booking.

Extends the rg.prenotazioni homonymous view in order to override the attribute add_view. If a parameter called form.add_view is passed, it will be used as the add form for a booking object.

We use this in combination with an apache rewrite rule that injects in the request the parameter with the value prenotazioni_add_ro:

RewriteCond %{QUERY_STRING} !((.*)form_add_view=(.*))
RewriteRule ^/path_to_enable_custom_form/(.*) /notheme/$1?form.add_view=prenotazione_add_ro [QSA]

The product overrides the mail action defined by collective.contentrules.mailfromfield, providing additional markers dedicate to the booking product:

  • ${gate}
  • ${date}
  • ${time}
  • ${type}

There is a view called prenotazione_print_pdf that uses reportlab to create a high quality PDF file with the details of the booking.

Since version 1.5.0, the logo is optional and configurable.

The logo can be customized adding to the instance part of your buildout this snippet:

zope-conf-additional +=
  <product-config pd.prenotazioni>
      logo file://${buildout:directory}/resources/logo-print-pdf.png
  </product-config>

the value for the logo property should be a valid URL, e.g.:

The product registers, optionally, some events to an external logfile:

  • booking creation
  • booking workflow state modification
  • booking date/time modification

In order to track modification the product adds the booking content type to the reposository tool.

The custom event log has to be enabled setting a custom property logfile, adding to the instance part of your buildout this snippet:

zope-conf-additional +=
  <product-config pd.prenotazioni>
      logfile ${buildout:directory}/var/log/prenotazioni.log
  </product-config>

The logged events can also be viewed online using thew booking_stats form.

The form displays to the user the data of the agendas he can manage contained under the context path.

Calling this view on the root of the Plone site return data from all the manageable agendas.

The view displays data in a table and provides a link and an action for downloading the logged events in a csv file.

There is also a view, called booking_stats_delete, that will delete all the log entry inserted before the specified date.

Searchable text for booking objects is customized in order to add the modification comments to the index.

The product removes from the booking searchable text those fields:

  • gate
  • subject
  • location

The product adds to the agenda some pop-ups using the library tooltipster

Developed with the support of Comune di Padova; Comune di Padova supports the PloneGov initiative.

Comune di Padova's logo

This product was developed by RedTurtle Technology team.

RedTurtle Technology Site :target: http://www.redturtle.it/