Rev 15590 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 15590 | Rev 18604 | ||
---|---|---|---|
Line 28... | Line 28... | ||
28 | ititle=!char 1 to $title_limit of $ititle |
28 | ititle=!char 1 to $title_limit of $ititle |
29 | tmp=!checkallpar $ititle |
29 | tmp=!checkallpar $ititle |
30 | !if $tmp=no |
30 | !if $tmp=no |
31 | ititle=!translate internal (){}[] to ------ in $ititle |
31 | ititle=!translate internal (){}[] to ------ in $ititle |
32 | !endif |
32 | !endif |
- | 33 | ||
- | 34 | !!! glose content calculation |
|
- | 35 | !set test_type=!getdef gl_type in wimshome/public_html/scripts/data/glossary/$iniparm |
|
- | 36 | !if $test_type!=dynamic |
|
- | 37 | !set aa_cnt=!recordcnt wimshome/public_html/scripts/data/glossary/$iniparm |
|
- | 38 | !for aa_i=4 to $aa_cnt |
|
- | 39 | !set aa_tmp=!record $aa_i of wimshome/public_html/scripts/data/glossary/$iniparm |
|
- | 40 | !if $aa_tmp!=$empty |
|
- | 41 | !set aa_list=!append item $[$aa_i-3] to $aa_list |
|
- | 42 | !endif |
|
- | 43 | !next aa_i |
|
- | 44 | !set add_content=|content=[$aa_list] |
|
- | 45 | !else |
|
- | 46 | !set add_content= |
|
- | 47 | !endif |
|
- | 48 | ||
33 | !if $pickglossary=$[$glossarytot+1] |
49 | !if $pickglossary=$[$glossarytot+1] |
- | 50 | !!!! add glose to a new glossary !!! |
|
34 | !set iglosstitle=!singlespace $new_glossary |
51 | !set iglosstitle=!singlespace $new_glossary |
35 | !set idesc=!singlespace $new_glossarydesc |
52 | !set idesc=!singlespace $new_glossarydesc |
36 | !appendfile $gloss_dir/.glossary$pickglossary : |
53 | !appendfile $gloss_dir/.glossary$pickglossary :$iniparm$add_content\ |
37 | $ititle |
54 | $ititle |
38 | !appendfile $gloss_dir/.glossaryindex :0\ |
55 | !appendfile $gloss_dir/.glossaryindex :0\ |
39 | $iglosstitle\ |
56 | $iglosstitle\ |
40 | $idesc |
57 | $idesc |
41 | !else |
58 | !else |
- | 59 | !!!! add glose to an existing glossary |
|
42 | !!!! FIXME mettre dans l'ordre alphabetique des titres. Cela évitera |
60 | !!!! FIXME mettre dans l'ordre alphabetique des titres. Cela évitera |
43 | !!!! de proposer de changer l'ordre ! |
61 | !!!! de proposer de changer l'ordre ! |
44 | !!! on peut supposer qu'ils le sont quand on en ajoute un |
62 | !!! on peut supposer qu'ils le sont quand on en ajoute un |
45 | !!! mais pas quand on modifie |
63 | !!! mais pas quand on modifie |
46 | sh=!record $pickglossary of wimshome/log/classes/$wims_class/tool/.glossaryindex |
64 | sh=!record $pickglossary of wimshome/log/classes/$wims_class/tool/.glossaryindex |
47 | glosscnt=!recordcnt $gloss_dir/.glossary$pickglossary |
65 | glosscnt=!recordcnt $gloss_dir/.glossary$pickglossary |
48 | !if $glosscnt>=$max_glossary |
66 | !if $glosscnt>=$max_glossary |
49 | error=too_many_gloss |
67 | error=too_many_gloss |
50 | !exit |
68 | !exit |
51 | !endif |
69 | !endif |
- | 70 | !!! checks if glose added is already in this glossary !!! |
|
52 | !for i=1 to $glosscnt |
71 | !for i=1 to $glosscnt |
53 | e=!record $i of $gloss_dir/.glossary$pickglossary |
72 | e=!record $i of $gloss_dir/.glossary$pickglossary |
54 | !distribute lines $e into wdi,win |
73 | !distribute lines $e into wdi,win |
55 | !if |
74 | !if $wdi=$iniparm$add_content |
56 | test=$pickglossary |
75 | test=$pickglossary |
57 | error=already_exist |
76 | error=already_exist |
58 | !exit |
77 | !exit |
59 | !endif |
78 | !endif |
60 | !next i |
79 | !next i |
61 | !appendfile $gloss_dir/.glossary$pickglossary : |
80 | !appendfile $gloss_dir/.glossary$pickglossary :$iniparm$add_content\ |
62 | $ititle |
81 | $ititle |
63 | !endif |
82 | !endif |
64 | 83 | ||
65 | wims_module_log=class $class: add No$glosscnt to glossary $pickglossary |
84 | wims_module_log=class $class: add No$glosscnt to glossary $pickglossary |
66 | !endif |
85 | !endif |