Subversion Repositories wimsdev

Rev

Rev 16026 | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. !! see scripts/docu/primitives/glossary.phtml
  2. !if $wims_read_parm!=$empty
  3.   !set parms=$wims_read_parm
  4. !else
  5.   !if $parms=$empty
  6.     !exit
  7.   !endif
  8. !endif
  9. !set option=!item 2 of $parms
  10. !set tooltip=!getopt tooltip in $option
  11. !if $tooltip!=$empty
  12.   !set tooltip=!declosing $tooltip
  13.   !set width=$(tooltip[2])
  14.   !set text=$(tooltip[1])
  15.   !if $text!=$empty
  16.     !set tooltip=yes
  17.   !endif
  18. !endif
  19. !set optrecord=!getopt content in $option
  20. !set optrecord=!declosing $optrecord
  21. !set parms=!item 1 of $parms
  22. !set data_dir=data/glossary
  23. !set data=$data_dir/$parms
  24.  
  25. !if $optrecord=abstract
  26.   !set optrecord=1
  27. !else
  28.   !if $optrecord=$empty
  29.     !set recordcnt=!recordcnt $data
  30.     !set optrecord=!values x for x=4 to $[$recordcnt]
  31.   !else
  32.     !set optrecord=!values (x-1)+4 for x in $optrecord
  33.   !endif
  34. !endif
  35. !set gl_title=!getdef gl_title in $data
  36. !set gl_keywords=!getdef gl_keywords in $data
  37. !set gl_author=!getdef gl_author in $data
  38. !set gl_type=!getdef gl_type in $data
  39. !set tmp=!replace internal / by , in $data
  40. !default gl_title=!lookup $(tmp[-1]) in bases/sys/domain/domain.$(tmp[-2])
  41. !if $tooltip=yes
  42.   !default width=400px
  43.   <div class="wims_tooltip">$text
  44.     <div class="wims_tooltiptext" style="width:$width">
  45. !endif
  46. <div class="wims_glossary">
  47. !if $gl_type!=dynamic
  48.   !for j in $optrecord
  49.     !if $[$j%2]=0
  50.       !record $j of $data
  51.     !else
  52.       !set tmp=!record $j of $data
  53.       !read $data_dir/$tmp
  54.     !endif
  55.   !next
  56. !else
  57.   !read $data
  58. !endif
  59. </div>
  60. !if $tooltip=yes
  61.   </div></div>
  62. !endif
  63. !reset parms text option tooltip
  64.