thinko
[Evergreen.git] / Evergreen / circ_rules / circ_main.rules
1 [%
2
3
4         # ------------------------------------------------------------------
5         # Macros for simpler syntax
6         # ------------------------------------------------------------------
7         MACRO jump(n)           PROCESS "$n";
8
9         MACRO ret(status,text) PROCESS ret_block s=status t=text;
10
11         BLOCK ret_block;
12                 result.0 = s;
13                 result.1 = t;
14                 "Template Result: "; result.0; " "; result.1; 
15                 STOP;
16         END;
17
18
19         # ------------------------------------------------------------------
20         # These are passed in to every script
21         # ------------------------------------------------------------------
22         #       Objects         : Methods  
23         # -------------------
24         #       patron          :
25         #       copy                    : 
26         #       circlib         : 
27         #       standings       : 
28         #       title                   :
29         # ------------------------------------------------------------------
30
31         # ------------------------------------------------------------------
32         # Constants
33         # ------------------------------------------------------------------
34         OK                                                              = 0;
35         COPY_ISREF                                      = 2;
36         COPY_NOCIRC                                     = 3;
37         COPY_UNAVAIL                            = 4;
38         COPY_LOCATION                           = 5;
39         NOT_HOLD_USER                           = 6; 
40         NO_COPY                                         = 100; # used by container code
41
42
43         PATRON_STANDING                 = 10;
44         PATRON_FINE                                     = 11;
45         PATRON_CHECKOUT_COUNT   = 12;
46
47         LOW                                                     = 1;
48         NORMAL                                          = 2;
49         HIGH                                                    = 3;
50
51         SHORT                                                   = 1;
52         NORMAL                                          = 2; 
53         EXTENDED                                                = 3;
54
55
56
57         # ------------------------------------------------------------------
58         # Run the rules files
59         # ------------------------------------------------------------------
60         PROCESS "$run_block"
61                 patron                  = circ_objects.patron 
62                 copy                            = circ_objects.copy
63                 circlib                 = circ_objects.copy.circ_lib() 
64                 title                           = circ_objects.title
65                 standings               = circ_objects.standings
66                 patron_copies   = circ_objects.patron_copies
67                 patron_fines    = circ_objects.patron_fines;
68
69 %]
70
71