~ubuntu-branches/ubuntu/trusty/lifelines/trusty

« back to all changes in this revision

Viewing changes to reports/pedigree_html.ll

  • Committer: Bazaar Package Importer
  • Author(s): Felipe Augusto van de Wiel (faw)
  • Date: 2007-05-23 23:49:53 UTC
  • mfrom: (3.1.3 edgy)
  • Revision ID: james.westby@ubuntu.com-20070523234953-ogno9rnbmth61i7p
Tags: 3.0.50-2etch1
* Changing docs/ll-reportmanual.xml and docs/ll-userguide.xml to fix
  documentation build problems (Closes: #418347).

* lifelines-reports
  - Adding a dependency to lifelines >= 3.0.50 to prevent file conflict.
    (Closes: #405500).

* Updating French translation. Thanks to Bernard Adrian. (Closes: #356671).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * @progname       pedigree_html.ll
 
3
 * @version        1.3
 
4
 * @author         Scott McGee (smcgee@microware.com)
 
5
 * @category       
 
6
 * @output         HTML
 
7
 * @description
 
8
 *
 
9
 *   Select and produce an ancestor report for the person selected.
 
10
 *
 
11
 *   @(#)pedigree_html.ll       1.3 10/4/95
 
12
 *
 
13
 *   By Scott McGee (smcgee@microware.com)
 
14
 *   Based on pedigreel by Tom Wetmore, ttw@cbnewsl.att.com
 
15
 *   And Cliff Manis
 
16
 */
 
17
 
 
18
include("cgi_html.li")
 
19
 
 
20
 
 
21
proc main () {
 
22
  call set_cgi_html_globals()
 
23
 
 
24
  set (nl,nl())
 
25
  getindi(indi)
 
26
 
 
27
  call do_chart_head(indi, "Pedigree")
 
28
  "<PRE>\n"
 
29
  call pedigree(0, indi)
 
30
  "</PRE>\n"
 
31
  call do_tail(indi)
 
32
}
 
33
 
 
34
proc pedigree (level, indi) {
 
35
  set(has_parent, or(father(indi), mother(indi)))
 
36
  if(and(lt(level, 4), has_parent)) {
 
37
    set(par, father(indi))
 
38
    call pedigree(add(1,level), par)
 
39
  }
 
40
  if(indi) {
 
41
    col(mul(4,level))
 
42
    href(indi, "Pedigree")
 
43
    if (evt, birth(indi)) {
 
44
      ", b. "
 
45
      if(gt(level, 3)) {
 
46
        short(evt)
 
47
      }
 
48
      else {
 
49
        long(evt)
 
50
      }
 
51
    }
 
52
    nl()
 
53
  }
 
54
  else {
 
55
        col(mul(4,level))
 
56
        "(Spouse not known)"
 
57
    nl()
 
58
  }
 
59
  if(and(lt(level, 4), has_parent)) {
 
60
    set(par, mother(indi))
 
61
    call pedigree(add(1,level), par)
 
62
  }
 
63
}