Skip to content
Permalink
Browse files

remplacement des alt par title, correction bug date, suppression redi…

…mentionnement d'images ...
  • Loading branch information...
fablhx committed Oct 3, 2011
1 parent 2bbdef5 commit feeb2ceb94cf1c56c96630ae63753a078c5f8c24
Showing with 46 additions and 44 deletions.
  1. +0 −11 LICENSE
  2. +1 −1 src/Makefile
  3. +9 −14 src/birthDeath.ml
  4. +3 −3 src/dag.ml
  5. +3 −1 src/date.ml
  6. +1 −1 src/gwd.ml
  7. +8 −7 src/hutil.ml
  8. +7 −0 src/name.ml
  9. +2 −0 src/name.mli
  10. +6 −0 src/perso.ml
  11. +1 −1 src/request.ml
  12. +4 −4 src/some.ml
  13. +1 −1 src/version.ml
11 LICENSE
@@ -1,14 +1,3 @@
Note: this copyright does not cover genealogic databases generated by
GeneWeb, nor the use of GeneWeb as Web site server or CGI - this is
merely considered normal use of GeneWeb, and does not fall under the
the heading of "derived work". Also note that the GPL below is
copyrighted by the Free Software Foundation, but the instance of code
that it refers to (the software GeneWeb) is copyrighted by INRIA.

Daniel de Rauglaudre, INRIA

-------------

GNU GENERAL PUBLIC LICENSE
Version 2, June 1991

@@ -62,7 +62,7 @@ compilation.ml: always
> compilation.ml
echo "open Def;" >> compilation.ml
echo "value (wd, d, h) = ($$(date "+%u, {day=%d;month=%m;year=%Y;prec=Sure;delta=0}, \"%T %Z\""));" >> compilation.ml
echo "value ct conf = Printf.sprintf \" (%s %4d-%02d-%02d %s)\" (Util.transl conf \"version\") d.year d.month d.day h;" >> compilation.ml
echo "value ct conf = Printf.sprintf \" (%4d-%02d-%02d %s)\" d.year d.month d.day h;" >> compilation.ml
echo "Util.compilation_time_hook.val := ct;" >> compilation.ml

clean::
@@ -631,19 +631,14 @@ value print_population_pyramid conf base = do {
let print_image doit sex iname =
stagn "td" begin
if doit then
let wid_hei =
match Util.image_size (Util.image_file_name iname) with
[ Some (wid, hei) ->
Printf.sprintf " width=\"%d\" height=\"%d\"" wid hei
| None -> "" ]
in
xtag "img" "src=\"%s/%s\"%s alt=\"%s\""
(Util.image_prefix conf) iname wid_hei (transl_nth conf "M/F" sex)
xtag "img" "src=\"%s/%s\" title=\"%s\""
(Util.image_prefix conf) iname (transl_nth conf "M/F" sex)
else Wserver.wprint " ";
end
in
Wserver.wrap_string.val := Util.xml_pretty_print;
Hutil.header conf title;
print_link_to_welcome conf True;
let max_hum =
let max_men = Array.fold_left max 0 men in
let max_wom = Array.fold_left max 0 wom in
@@ -666,7 +661,7 @@ value print_population_pyramid conf base = do {
let nb_men = men.(i) in
let nb_wom = wom.(i) in
tag "tr" begin
stagn "td" "style=\"font-size:60%%; font-style:italic\"" begin
stagn "td" "style=\"font-style:italic\"" begin
Wserver.wprint "%d" (at_year - i * interval);
end;
stagn "td" begin Wserver.wprint " "; end;
@@ -675,12 +670,12 @@ value print_population_pyramid conf base = do {
tag "td" "align=\"right\"" begin
tag "table" "%s" c begin
tag "tr" begin
stagn "td" "style=\"font-size:70%%; font-style: italic\""
stagn "td" "style=\"font-style: italic\""
begin
if nb_men <> 0 then Wserver.wprint "%d" nb_men else ();
Wserver.wprint "&nbsp;";
end;
stagn "td" "style=\"background: blue\"" begin
stagn "td" "style=\"background: #0c4460\"" begin
if nb_men = 0 then ()
else
let n = max 1 (band_size nb_men) in
@@ -696,13 +691,13 @@ value print_population_pyramid conf base = do {
tag "td" "align=\"left\"" begin
tag "table" "%s" c begin
tag "tr" begin
stagn "td" "style=\"background: red\"" begin
stagn "td" "style=\"background: #e45484\"" begin
if nb_wom = 0 then ()
else
let n = max 1 (band_size nb_wom) in
for j = 1 to n do { Wserver.wprint "&nbsp;"; };
end;
stagn "td" "style=\"font-size:70%%; font-style: italic\""
stagn "td" "style=\"font-style: italic\""
begin
Wserver.wprint "&nbsp;";
if nb_wom <> 0 then Wserver.wprint "%d" nb_wom else ();
@@ -713,7 +708,7 @@ value print_population_pyramid conf base = do {
stagn "td" begin Wserver.wprint "&nbsp;"; end;
print_image (i = 0) 1 "female.png";
stagn "td" begin Wserver.wprint "&nbsp;"; end;
stagn "td" "style=\"font-size:60%%; font-style:italic\"" begin
stagn "td" "style=\"font-style:italic\"" begin
Wserver.wprint "%d" (at_year - i * interval);
end;
end;
@@ -191,7 +191,7 @@ value image_normal_txt conf base p fname width height =
let k = default_image_name base p in
let r =
sprintf "\
<img src=\"%sm=IM;d=%d;%s;k=/%s\"%s%s border=\"0\" alt=\"%s\">"
<img src=\"%sm=IM;d=%d;%s;k=/%s\"%s%s border=\"0\" title=\"%s\">"
(commd conf)
(int_of_float (mod_float s.Unix.st_mtime (float_of_int max_int))) b k
(if width = 0 then "" else " width=\"" ^ string_of_int width ^ "\"")
@@ -205,15 +205,15 @@ value image_normal_txt conf base p fname width height =
value image_url_txt conf base url height =
let image_txt = capitale (transl_nth conf "image/images" 0) in
sprintf "<a href=\"%s\">" url ^
sprintf "<img src=\"%s\"\nheight=%d border=\"0\" alt=\"%s\">" url height
sprintf "<img src=\"%s\"\nheight=%d border=\"0\" title=\"%s\">" url height
image_txt ^
"</a>\n"
;

value image_url_txt_with_size conf base url width height =
let image_txt = capitale (transl_nth conf "image/images" 0) in
sprintf "<a href=\"%s\">" url ^
sprintf "<img src=\"%s\"\nwidth=%d height=\"%d\" border=\"0\" alt=\"%s\">"
sprintf "<img src=\"%s\"\nwidth=%d height=\"%d\" border=\"0\" title=\"%s\">"
url width height image_txt ^
"</a>\n"
;
@@ -17,7 +17,9 @@ value get_wday conf d =
let jd = match d with
[ Dgreg d _ ->
match d.prec with
[ Sure -> Calendar.sdn_of_gregorian d
[ Sure ->
if (d.day <> 0 && d.month <> 0) then Calendar.sdn_of_gregorian d
else -1
| _ -> -1 ]
| _ -> -1 ]
in
@@ -718,7 +718,7 @@ value print_request_failure cgi msg =
Wserver.wprint "<head><title>Request failure</title></head>\n";
Wserver.wprint "\
<body bgcolor=\"white\">
<h1 align=\"center\"><font color=\"red\">Request failure</font></h1>
<h1 class=\"error\" align=\"center\">Request failure</h1>
The request could not be completed.<p>\n";
Wserver.wprint "<em><font size=\"-1\">Internal message: %s</font></em>\n"
msg;
@@ -27,7 +27,7 @@ value link_to_referer conf =
string_of_int hei ^ "\""
| None -> "" ]
in
sprintf "<a href=\"%s\"><img src=\"%s/%s\"%s style=\"border: 0\" alt=\"&lt;&lt;\"%s></a>\n"
sprintf "<a href=\"%s\"><img src=\"%s/%s\"%s style=\"border: 0\" title=\"&lt;&lt;\"%s></a>\n"
referer (Util.image_prefix conf) fname wid_hei conf.xhs
else ""
;
@@ -50,7 +50,7 @@ value gen_print_link_to_welcome f conf right_aligned =
let str = link_to_referer conf in
if str = "" then () else Wserver.wprint "%s" str;
Wserver.wprint "<a href=\"%s\">" (commd_no_params conf);
Wserver.wprint "<img src=\"%s/%s\"%s style=\"border: 0\" alt=\"^^\"%s>"
Wserver.wprint "<img src=\"%s/%s\"%s style=\"border: 0\" title=\"^^\"%s>"
(Util.image_prefix conf) fname wid_hei conf.xhs;
Wserver.wprint "</a>\n";
if right_aligned then Wserver.wprint "</div>\n"
@@ -74,6 +74,8 @@ value header_without_http conf title = do {
Wserver.wprint
" <meta http-equiv=\"Content-Style-Type\" content=\"text/css\"%s>\n"
conf.xhs;
Wserver.wprint
" <link rel=\"shortcut icon\" href=\"images/favicon_gwd.png\" />\n" ;
Wserver.wprint
" <link rel=\"stylesheet\" type=\"text/css\" href=\"css/%s\" />\n"
(Util.css_prop conf);
@@ -120,20 +122,19 @@ value red_color = "red";

value rheader conf title = do {
header_without_page_title conf title;
Wserver.wprint "<center><h1><font color=%s>" red_color;
Wserver.wprint "<center><h1 class=\"error\">";
title False;
Wserver.wprint "</font></h1></center>\n";
Wserver.wprint "</h1></center>\n";
};

value gen_trailer with_logo conf = do {
if not with_logo then ()
else Wserver.wprint "</body>\n" ;
Wserver.wprint "<br />\n";
Wserver.wprint "<div id=\"footer\">\n" ;
Wserver.wprint "<hr />\n";
Templ.print_copyright conf;
Wserver.wprint "</div>\n" ;
Templ.include_hed_trl conf None "trl";
Wserver.wprint "</html>\n";
Wserver.wprint "</body>\n</html>\n";
};

value trailer = gen_trailer True;
@@ -420,6 +420,13 @@ value strip s =
else copy (i + 1) (Buff.store len s.[i])
;

value strip_c s c =
copy 0 0 where rec copy i len =
if i = String.length s then Buff.get len
else if s.[i] = c then copy (i + 1) len
else copy (i + 1) (Buff.store len s.[i])
;

(* Name.crush *)

value roman_number s i =
@@ -12,6 +12,8 @@ value abbrev : string -> string;
(* Name.abbrev: suppress lowercase particles, shorten "saint" into "st" *)
value strip : string -> string;
(* Name.strip = name without spaces *)
value strip_c : string -> char -> string;
(* Name.strip_c = name without the charater c given as parameter *)
value crush : string -> string;
(* Name.crush:
- no spaces
@@ -2066,6 +2066,9 @@ and eval_str_person_field conf base env ((p, p_auth) as ep) =
| "first_name_key_val" ->
if (is_hide_names conf p) && not p_auth then ""
else Name.lower (p_first_name base p)
| "first_name_key_strip" ->
if (is_hide_names conf p) && not p_auth then ""
else Name.lower (Name.strip_c (p_surname base p) '"')
| "image" -> if not p_auth then "" else sou base (get_image p)
| "image_html_url" -> string_of_image_url conf base env ep True
| "image_size" -> string_of_image_size conf base env ep
@@ -2285,6 +2288,9 @@ and eval_str_person_field conf base env ((p, p_auth) as ep) =
| "surname_key_val" ->
if (is_hide_names conf p) && not p_auth then ""
else Name.lower (p_surname base p)
| "surname_key_strip" ->
if (is_hide_names conf p) && not p_auth then ""
else Name.lower (Name.strip_c (p_surname base p) '"')
| "title" -> person_title conf base p
| _ -> raise Not_found ]
and eval_witness_relation_var conf base env
@@ -259,7 +259,7 @@ value specify conf base n pl =
tag "li" begin
let sosa_num = Perso.p_sosa conf base p in
if Num.gt sosa_num Num.zero then
Wserver.wprint "<img src=\"%s/%s\" alt=\"sosa\"/> "
Wserver.wprint "<img src=\"%s/%s\" title=\"sosa\"/> "
(Util.image_prefix conf) "sosa.png"
else () ;
match tl with
@@ -85,7 +85,7 @@ value print_elem conf base is_surname (p, xl) =
if not first then Wserver.wprint "</li>\n<li>\n " else ();
let sosa_num = Perso.p_sosa conf base x in
if Num.gt sosa_num Num.zero then
Wserver.wprint "<img src=\"%s/%s\" alt=\"sosa\"/> "
Wserver.wprint "<img src=\"%s/%s\" title=\"sosa\"/> "
(Util.image_prefix conf) "sosa.png"
else ();
Wserver.wprint "<a href=\"%s%s\">" (commd conf) (acces conf base x);
@@ -338,7 +338,7 @@ value print_branch conf base psn name =
print_selection_bullet conf first_select;
let sosa_num = Perso.p_sosa conf base p in
if Num.gt sosa_num Num.zero then
Wserver.wprint "<img src=\"%s/%s\" alt=\"sosa\"/> "
Wserver.wprint "<img src=\"%s/%s\" title=\"sosa\"/> "
(Util.image_prefix conf) "sosa.png"
else ();
stag "strong" begin
@@ -363,7 +363,7 @@ value print_branch conf base psn name =
print_selection_bullet conf select;
let sosa_num = Perso.p_sosa conf base p in
if Num.gt sosa_num Num.zero then
Wserver.wprint "<img src=\"%s/%s\" alt=\"sosa\"/> "
Wserver.wprint "<img src=\"%s/%s\" title=\"sosa\"/> "
(Util.image_prefix conf) "sosa.png"
else ();
stag "em" begin
@@ -383,7 +383,7 @@ value print_branch conf base psn name =
(Date.short_marriage_date_text conf base fam p c);
let sosa_num = Perso.p_sosa conf base c in
if Num.gt sosa_num Num.zero then
Wserver.wprint "<img src=\"%s/%s\" alt=\"sosa\"/> "
Wserver.wprint "<img src=\"%s/%s\" title=\"sosa\"/> "
(Util.image_prefix conf) "sosa.png"
else ();
stag "strong" begin
@@ -1,7 +1,7 @@
(* $Id: version.ml,v 5.8 2011-01-06 09:59:58 ddr Exp $ *)
(* Copyright (c) 1998-2007 INRIA *)

value txt = "5.03-exp";
value txt = "6.00";

value available_languages =
["af"; "bg"; "br"; "ca"; "cs"; "da"; "de"; "en"; "es"; "eo"; "et"; "fi";

0 comments on commit feeb2ce

Please sign in to comment.
You can’t perform that action at this time.