Subversion Repositories wimsdev

Rev

Rev 18594 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
18212 gmarbeuf 1
!! About window for a glose of data/tool/glossary
2
 
17376 bpr 3
!set ad=!getopt gloss_item in $module_init_parm
18212 gmarbeuf 4
!if $ad=
5
  !goto exit
6
!else
7
  !goto about
8
!endif
17376 bpr 9
 
18212 gmarbeuf 10
:about
11
!read lang/names.$lang
12
 
13
!set embedabble_height= 600
14
!set embedabble_width= 100%
15
 
18202 bpr 16
!set about_author=!getdef gl_author in $data_dir/$ad
18594 gmarbeuf 17
!distribute items $about_author into about_firstname,about_lastname
18
!set about_firstname=!trim $about_firstname
19
!set about_lastname=!trim $about_lastname
20
!set about_author=$about_firstname $about_lastname
18212 gmarbeuf 21
 
18594 gmarbeuf 22
!set about_email=!getdef gl_email in $data_dir/$ad
23
!set about_list_auth=euler academie de versailles\
24
bernadette perrin-riou\
25
sophie lemaire\
26
jacques vileo\
27
marina cazzola
28
 
29
!set about_list_email=euler.wims@ac-versailles.fr\
30
bernadette.m.riou@orange.fr\
31
sophie.lemaire@universite-paris-saclay.fr\
32
jacques.vileo@wanadoo.fr\
33
marina.cazzola@unimib.it
34
 
35
!if $about_email=$empty
36
  !set about_authornet=!lower $about_author
37
  !set about_authornet=!deaccent $about_authornet
38
  !set about_pos=!positionof row $about_authornet in $about_list_auth
39
  !if $about_pos!=$empty
40
    !set about_email=$(about_list_email[$about_pos;])
41
  !endif
42
!endif
43
 
18212 gmarbeuf 44
!set about_title=!getdef gl_title in $data_dir/$ad
45
 
46
!set about_type=!getdef gl_type in $data_dir/$ad
18594 gmarbeuf 47
!set notion_dir=!replace internal / by , in $ad
48
!set about_lang=$(notion_dir[-2])
49
!set about_dom=!lookup $(notion_dir[2]) in bases/sys/domain/domain.$about_lang
18212 gmarbeuf 50
!if $about_type != $empty
51
  !set about_tmp=$(notion_dir[-1])
52
  !set about_tmp=!replace internal _ by , in $about_tmp
53
  !set about_tmp=$(about_tmp[1..-2])
54
  !set about_tmp=!replace internal , by _ in $about_tmp
55
  !set about_tmp=!nospace $about_tmp
56
  !set notion_dir=$(notion_dir[1..-2]),$about_tmp
57
  !set notion_dir=!replace internal , by / in $notion_dir
58
  !set notion_dir=!nospace $notion_dir
59
  !set about_level=!getdef gl_level in $data_dir/$notion_dir
60
  !set notion_title=!getdef gl_title in $data_dir/$notion_dir
61
  !set glose_job=$about_type
62
!else
63
  !set about_level=!getdef gl_level in $data_dir/$ad
64
  !set glose_job=main
18367 gmarbeuf 65
  !set about_cnt=!recordcnt $data_dir/$ad
66
  !for about_i=4 to $about_cnt
67
    !set about_tmp=!record $about_i of $data_dir/$ad
68
    !if $about_tmp!=$empty
69
      !set about_list=!append item $[$about_i-3] to $about_list
70
    !endif
71
  !next
18212 gmarbeuf 72
!endif
73
 
18367 gmarbeuf 74
!if $about_type != $empty or $about_cnt<=4
75
  !set ad_docoef=$ad
76
  !set gloselink=$wims_ref_name?module=$module&amp;+special_parm=$ad&amp;+job=$glose_job
77
  !set lightlink=$wims_ref_name?module=adm/raw&amp;job=lightpopup&amp;option=noabout&amp;emod=$module&amp;parm=job=$glose_job;special_parm=$ad
78
  !set gloseiframe=$gloselink
79
  !set lightiframe=$lightlink
80
!else
81
  !set ad_docoef=$ad,content=[$about_list]
82
  !set gloselink=$wims_ref_name?module=$module&amp;+special_parm=$ad|content=[$about_list]&amp;+job=$glose_job
83
  !set lightlink=$wims_ref_name?module=adm/raw&amp;job=lightpopup&amp;option=noabout&amp;emod=$module&amp;parm=job=$glose_job;special_parm=$ad|content=[$about_list]
84
  !set gloseiframe=$wims_ref_name?module=$module&amp;+special_parm=$ad%7Ccontent=%5B$about_list%5D&amp;+job=$glose_job
85
  !set lightiframe=$wims_ref_name?module=adm/raw&amp;job=lightpopup&amp;option=noabout&amp;emod=$module&amp;parm=job=$glose_job;special_parm=$ad%7Ccontent=%5B$about_list%5D
86
!endif
87
 
18212 gmarbeuf 88
!set about_keywords=!getdef gl_keywords in $data_dir/$ad
89
 
90
!read ./tabletheme
91
!reset table_center
92
$table_header
93
  <caption>
94
  !if $about_type != $empty
95
    $name_example_infos
96
  !else
97
    $name_glose_infos
98
  !endif
99
  </caption>
100
  <tbody>
101
        $table_tr
102
          <th>$wims_name_title</th>
103
          <td>$about_title
104
            !if $about_type != $empty
105
          <br><em>$name_example_dyna <strong>$notion_title</strong></em>.
106
            !endif
107
          </td>
108
    </tr>
109
    !if $about_level != $empty
110
          $table_tr
111
                <th>$wims_name_level</th>
112
                <td>
113
                !set levelcnt=!itemcnt $about_level
114
            !for ll=1 to $levelcnt
115
              !set level__=!words2items $(about_level[$ll])
116
              !read adm/levelname.phtml
117
              $(name_wims_level_$(level__[1])) $(level__[2..-1])
118
              !if $ll<$levelcnt
119
                ;
120
              !endif
121
            !next
122
                </td>
123
          </tr>
124
        !endif
125
    $table_tr
126
          <th>$wims_name_Author</th>
18590 gmarbeuf 127
          <td>
18597 gmarbeuf 128
    !set mail_subject=!replace internal ' by %27 in $about_title
18594 gmarbeuf 129
    !set mail_subject=[$wims_name_Glossary - $about_dom - $mail_subject]
18590 gmarbeuf 130
    !if $about_email!=$empty
131
      !mailurl $about_email $about_author\
132
$mail_subject
133
    !else
18594 gmarbeuf 134
      $about_author <br>
135
      $name_contact:
136
      !mailurl euler.wims@ac-versailles.fr euler.wims@ac-versailles.fr\
137
$mail_subject
18590 gmarbeuf 138
    !endif
139
    </td>
18212 gmarbeuf 140
    </tr>
141
    $table_tr
142
      <th>$wims_name_Address</th>
143
      <td>$ad</td>
144
    </tr>
145
    !if $about_keywords!=$empty
146
      $table_tr
147
        <th>$wims_name_Keywords</th>
148
        <td>$about_keywords</td>
149
      </tr>
150
    !endif
151
    $table_tr
152
      <th>$wims_name_permalink</th>
153
      <td>$wims_name_permalink_desc
18367 gmarbeuf 154
        <p><strong>$name_link_glose:&nbsp;</strong>
18212 gmarbeuf 155
                <a href="$gloselink">$gloselink</a>
156
              </p>
157
              <p><strong>$name_linklight_glose:&nbsp;</strong>
158
                <a href="$lightlink">$lightlink</a>
159
              </p>
160
      </td>
161
    </tr>
162
    $table_tr
163
      <th>$wims_name_embeddable</th>
164
      <td>
165
        <p>$wims_name_copy_and_paste $wims_name_the_code $wims_name_on_your_site</p>
166
        <p>
167
          <label for="embed_glose">
168
          <strong>$wims_name_display
169
          !if $about_type != $empty
170
            $name_this_exple
171
          !else
172
            $name_this_glose
173
          !endif
174
          $wims_name_on_your_site&nbsp;:</strong></label><br>
175
          <textarea id="embed_glose" class="copy_text" rows="5" cols="50"
18367 gmarbeuf 176
          readonly="readonly">&lt;iframe src="$gloseiframe&amp;embededwindow=true" width="$embedabble_width" height="$embedabble_height" style="border:none"&gt;&lt;/iframe&gt;
177
          </textarea>
18212 gmarbeuf 178
        </p>
179
        <p>
180
          <label for="embed_setup_light">
181
          <strong>$wims_name_display
182
          !if $about_type != $empty
183
            $name_this_exple
184
          !else
185
            $name_this_glose
186
          !endif
187
          $wims_name_on_your_site ("light" version)&nbsp;:</strong></label><br>
188
          <textarea id="embed_setup_light" class="copy_text" rows="5" cols="50"
18367 gmarbeuf 189
          readonly="readonly">&lt;iframe src="$lightiframe" width="$embedabble_width" height="$embedabble_height" style="border:none"&gt;&lt;/iframe&gt;
190
        </textarea>
18212 gmarbeuf 191
        </p>
192
      </td>
193
    </tr>
194
    $table_tr
195
      <th>$name_doc_insert</th>
196
      <td>
197
        <p><label for="link_glose">
198
        <strong>$wims_name_copy_and_paste $wims_name_the_code
199
        !if $about_type != $empty
200
          $name_exple_in_doc
201
        !else
202
          $name_glose_in_doc
203
        !endif
204
        </strong></label><br>
205
        <textarea id="link_glose" class="copy_text" rows="2" cols="50"
18367 gmarbeuf 206
        readonly="readonly">\glossary{$ad_docoef}</textarea>
18212 gmarbeuf 207
        </p>
208
      </td>
209
    </tr>
210
    $table_tr
211
      <th>$name_oef_insert</th>
212
      <td>
18367 gmarbeuf 213
        <p><label for="link_glose2">
18212 gmarbeuf 214
        <strong>$wims_name_copy_and_paste $wims_name_the_code
215
        !if $about_type != $empty
216
          $name_exple_in_oef
217
        !else
218
          $name_glose_in_oef
219
        !endif
220
        </strong></label><br>
18367 gmarbeuf 221
        <textarea id="link_glose2" class="copy_text" rows="2" cols="50"
222
        readonly="readonly">\special{glossary $ad_docoef}</textarea>
18212 gmarbeuf 223
      </p>
224
      </td>
225
    </tr>
18367 gmarbeuf 226
    !if $about_type = $empty and $about_cnt>4
227
      $table_tr
228
        <th>$wims_name_rmq</th>
229
        <td>
230
          <p><strong>$name_glose2 $about_list $name_grains</strong></p>
231
        </td>
232
      </tr>
233
    !endif
18212 gmarbeuf 234
  </tbody>
235
$table_end
236
 
237
:exit