From: Konrad Rosenbaum Date: Mon, 2 Dec 2013 17:13:25 +0000 (+0100) Subject: draft for seat plans X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=554209c9a5716947558b78884d8ccc5a55bb3187;p=web%2Fkonrad%2Fsmoke.git draft for seat plans --- diff --git a/doc/seatplans.txt b/doc/seatplans.txt new file mode 100644 index 0000000..42eaa0d --- /dev/null +++ b/doc/seatplans.txt @@ -0,0 +1,187 @@ +Seat-Plans +=========== + +Server Side Minimum: +--------------------- + + + + + + +In this simplest form there are two kinds of seats: "Premium" and "Cheapo". +In both cases seats are unnumbered (i.e. audience members can chose freely). + + defines the complete plan + version - version number of this spec, it is generally assumed that newer + versions are backwards compatible + defines one group of seats + capacity - specifies how many seats there are in this group + id - automatically generated ID for groups, must only contain letters and + digits, max. 8 chars, no spaces + name - human readable name for the group + numbered - "yes": the seats have numbers, "no" audience members can freely chose + price - space separated list of pricecategory IDs for price levels that can be + sold in this group, if missing: all categories of the event + + +To number seats by row add Row-elements to the Group tag: + + + + + + + + + + + + + + + + +In this case the Premium Group consists of rows 2..6, with row 2 numbered 2..24 +and rows 3..6 numbered 1..25 each. The capacity attribute of the Group tag must +match the sum of row capacities. + + defines a single row of seats inside this group + id - a free form ID for the row, must only contain letters and digits, + may be empty, but no spaces + capacity - number of seats in this row + first - a number if counting does not start at 1 + +If two rows have identical IDs then the seat numbers in those rows must be unique. +E.g. above: in the Expensive group above both rows use the empty ID, one of them +has seats 1..25, the other 26..50. If both had for example a seat 25, then only one +of those two seats could be sold, the other would be inaccessible. + +Rows are ignored for unnumbered groups, they may exist to generate graphical +seat plans (see below). + +Groups may exist several times with different rows/seats. If this happens the +group id, name, and numbering attributes must be identical on all instances. +Graphical information may differ. Seats inside those instances must be +unique (different row id and/or seat number). + +Seat Numbering +---------------- + +Seat numbers are stored as strings (max. 32 chars). They are constructed from: + * the group ID + * the row ID, or an empty string if there are no rows defined + * the seat number within the row or group + * fields are separated by colons + +E.g.: + "pr:2:13" - group "pr" (Premium above), row "2", seat number 13 + "ex::42" - group "ex", row with empty ID, seat number "42" + "ch::" - group "ch", no numbering + + +Graphical Seat Plans +--------------------- + +This part is never evaluated by the server, only by displays: + + + + + + + + + + + + + + + +New Attributes: + SeatPlan/size - relative canvas size, the actual canvas will be scaled to fit the display + Group/geo - geometry relative to the canvas, coordinates are: x-left, y-top, x-right, y-bottom + Row/geo - geometry relative to the Group + bgcolor - (Group/Row) background color + fgcolor - (Group/Row) foreground color + Group/angle - rotate the group (value in degrees) + Row/curve - row curvature, see below + +Colors: all web colors can be used by name, numeric values can be specified in hex +either as "#rgb" or "#rrggbb". + +Curvature of Rows: a series of points at which to align seats... ? + +TODO: define trapezes(?), curved rows, etc. + +Additional Graphics +-------------------- + +The background of the seat plan can be defined in an additional element: + + + + + + + + + + + + + + +Attributes: + bgcolor - background or fill color (not for Text) + fgcolor - foreground (Text) or outline color + geo - full size of the shape + angle - rotation in degree + Text/fontsize - font size in relative points of the seat plan, automatically scaled + Text/content - textual content + +Specifying Seats in Orders +--------------------------- + +No seat specified in cart order: +1) The system tries to find a group that matches the price category, +2) if the category does not have enough seats: continue search at 1 +3) if the category is unnumbered: use it, done +4) if the category is numbered: try to find continuous seats in the same row +5) not enough continuous seats: continue searching at 1 +6) if there are no more categories, repeat the search, but allow non-continuous seats + +Separately specified rows with the same ID are assumed to be continuous in the order +of seat numbers. E.Ä¡. if seats 1 and 2 of row "1" are specified in a different group than +seats 3..23, then the algorithm still considers seats 2 and 3 to be side by side. + +Specified seats: +The seat property contains a list of seat numbers (see above), separated by spaces, there must be +exactly as many seats specified as there are tickets in this line item of the order. + +Wildcards: +Seats can be specified with wildcards: + "ex" - chose any row and seat from group "ex" + "ex:2" - chose any seat from the row "2" in "ex" + "ex:2|3|4" - chose any seat from rows "2", "3" or "4" in "ex" + "ex|pr" - chose any seats from groups ex or pr + "ex|pr:2" - chose any seats on row "2" that are in group ex or pr + "ex|pr:2|3:4" - chose any seat with the number 4 if it is in ex or pr and on rows 2 or 3 + "ex:2:4|6" - chose seat 4 or 6 from row 2 in group ex + "ex:2:4-16" - chose between seats 4 through 16 on row 2 in group ex + "*:*:4-16" - chose between seats 4 through 16 on any row in any group +The algorithm used to select seats is the same as the one for specifying no seats at all, +except that choices are limited to seats matching the pattern. In fact specifying no seats +is equivalent to the most unspecific pattern: "" or "*:*:*". + +Pattern grouping: "group:row:seat" with "group:row" being equivalent to "group:row:*" and +"group" equivalent to "group:*" or "group:*:*". The empty pattern "" is equivalent to "*:*:*". + +Pattern syntax: + "string" - match exactly string + "*" - match any value + "" - match the empty value only! + "s1|s2" - match s1 or s2 + "1-3" - match any value between 1 and 3 (including), only allowed for seat numbers \ No newline at end of file diff --git a/pack b/pack index de50ef2..e06319c 160000 --- a/pack +++ b/pack @@ -1 +1 @@ -Subproject commit de50ef2ddfebf8bf0dc96540d03c51de0213d2a8 +Subproject commit e06319c7261d4189e8bcef16ed50b9739e6e13a5 diff --git a/wob/classes/event.wolf b/wob/classes/event.wolf index 4549075..b9371c3 100644 --- a/wob/classes/event.wolf +++ b/wob/classes/event.wolf @@ -89,7 +89,28 @@ - + + + + + + + + + + + + + + + + This class is the transport for seat plans when communicating over the wire + + + + + + @@ -151,17 +172,4 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/wob/classes/order.wolf b/wob/classes/order.wolf index 5def7fb..fc24b32 100644 --- a/wob/classes/order.wolf +++ b/wob/classes/order.wolf @@ -38,6 +38,7 @@ + @@ -46,6 +47,7 @@ + diff --git a/wob/classes/seatplan.wolf b/wob/classes/seatplan.wolf new file mode 100644 index 0000000..57fd30d --- /dev/null +++ b/wob/classes/seatplan.wolf @@ -0,0 +1,47 @@ + + + + + This is a helper for parsing seat plans: it defines a row of seats + the ID of this group, if multiple row elements with the same ID exist, they refer to different sections of the same row + amount of seats in this (part of the) row + GUI: geometry information for the row + GUI: background color for seats + GUI: foreground color, the one the seat number is rendered in + number of the first seat in this row + + + This is a helper for parsing seat plans: it defines a group of rows of seats. + the ID of this group, if multiple group elements with the same ID exist, they refer to different sections of the same group + amount of seats in this (part of the) group + human readable name of the group + defines whether the group contains numbered seats + GUI: geometry information for the group + GUI: background color + GUI: foreground color, the one the group name is rendered in + GUI: rotation of the group rectangle + definition of rows in this group + + + + Type of background element, e.g. "circle", "rect", ... + GUI: geometry information for the group + GUI: background or fill color + GUI: foreground, outline or text color + GUI: rotation of the group rectangle + GUI: font size for text elements + GUI: textual content + + + + This class is used to parse seat plans on either side. + + + + diff --git a/wob/db/cart.wolf b/wob/db/cart.wolf index f5687fe..40aa618 100644 --- a/wob/db/cart.wolf +++ b/wob/db/cart.wolf @@ -36,7 +36,7 @@ the event the ticket is for the price category of the ticket amount of tickets of this type in the cart - + web interface: stores vouchers in the cart diff --git a/wob/db/db.wolf b/wob/db/db.wolf index 9276c4b..930d993 100644 --- a/wob/db/db.wolf +++ b/wob/db/db.wolf @@ -1,12 +1,12 @@ - + Time at which the change was made. diff --git a/wob/magicsmoke.wolf b/wob/magicsmoke.wolf index 5728acb..5f482d9 100644 --- a/wob/magicsmoke.wolf +++ b/wob/magicsmoke.wolf @@ -13,7 +13,7 @@ - + @@ -40,6 +40,7 @@ +