Subversion Repositories wimsdev

Rev

Rev 11244 | Rev 11469 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1.  
  2. !!************** headmenu.phtml  ****************
  3.  
  4. !! This File creates a set of 1 to 11 links, to put in the head menu of Wims, for anonymous users.
  5.  
  6. !! **********************************************
  7. !if robot isin $session or $wims_mode=popup or _check isin $session or $module=help/main.$lang
  8.  !exit
  9. !endif
  10.  
  11. !! la variable window=embeded est utilisee dans le cadre d'un appel depuis le lecteur exportable
  12. !! window=embeded is used for embedded players
  13. !if embededwindow isin $module_init_parm
  14.         !set window=embeded
  15. !endif
  16. !! Don't succeed to use script/language for the moment
  17. !! translated. FIXME
  18. !!!read language name.phtml
  19. !read name.phtml.$lang
  20. !read themes/$wims_theme/lang/name.phtml.$lang
  21. !if $class_theme!=$empty
  22.   !read themes/$class_theme/lang/$(script_file).$modu_lang
  23. !endif
  24. !if $theme_class!=$empty
  25.   !read themes/$theme_class/lang/$(script_file).$modu_lang
  26. !endif
  27.  
  28. !default wims_name_bgcolor=$wims_ref_bgcolor
  29. !if $wims_hm!=$empty or $wims_lightpopup=yes
  30.  !goto defend
  31. !endif
  32. !if $job=print or $printing=yes
  33.  !goto defend
  34. !endif
  35. !reset 1_ home_
  36.  
  37. !!********* Link #1 : "Close Window" or "Home"
  38.  
  39. !if _ isin $wims_subsession
  40.  !set 1_=!append line back,3,window.close() to $1_
  41. !else
  42.  !if $window != embeded and $module!=home
  43.    !set home_=!append line home,1,session=$wims_session.1 to $home_
  44.  !endif
  45. !endif
  46.  
  47. !!********* Link #2 : "Quit"
  48. !if $httpd_HTTP_REFERER!=$empty and $window != embeded
  49.  !set 1_=!append line exit,2,$httpd_HTTP_REFERER to $1_
  50. !endif
  51.  
  52. !!********* Link #3 : "Work"
  53. !!if $cmd=intro
  54. !! !set 1_=!append line work,1,module=$module&cmd=new to $1_
  55. !!endif
  56.  
  57. !!********* Link #4 : "Sheet"
  58. !if $wims_sheet>0 or P isin $wims_sheet
  59.  !set 1_=!append line sheet,1,module=adm/sheet&sh=$wims_sheet to $1_
  60. !endif
  61.  
  62. !!********* Link #5 : "Intro"
  63. !if $window != embeded and $module_has_intro=yes and $cmd notwordof intro help
  64.   !if $wims_theme!=default
  65.     !set wims_ariane=!append line intro,1,module=$module&cmd=intro&special_parm=$special_parm&special_parm2=$special_parm2&special_parm3=$special_parm3&special_parm4=$special_parm4 to $wims_ariane
  66.     !set wims_ariane_self=no
  67.   !else
  68.     !set 1_=!append line intro,1,module=$module&cmd=intro&special_parm=$special_parm&special_parm2=$special_parm2&special_parm3=$special_parm3&special_parm4=$special_parm4 to $1_
  69.   !endif
  70. !endif
  71. !!********* Link #6 : "References"
  72. !if _ notin $wims_session and adm/ notin $module and home notin $module\
  73.         and $cmd notwordof help ref
  74. !! !set 1_=!append line reference,4,module=$module&cmd=ref&special_parm=$cmd,ref to $1_
  75. !endif
  76.  
  77. !!********* Link #7 : "Help"
  78. !if $module_has_help=yes and $cmd notwordof intro help
  79.  !if $module_help=nopop
  80.    !set 1_=!append line help,1,module=$module&cmd=help&special_parm=$wims_help_parm,mhelp to $1_
  81.  !else
  82.    !set 1_=!append line help,4,module=$module&cmd=help&special_parm=$wims_help_parm,mhelp to $1_
  83.  !endif
  84. !endif
  85.  
  86. !!********* Link #8 : "Resume"
  87. !if $cmd=help or $cmd=hint
  88.  !if _test isin $session
  89.    !set 1_=!append line resume,1,cmd=resume to $1_
  90.  !else
  91.     !if _help isin $session
  92.       !set 1_=!append line back2,1,cmd=resume to $1_
  93.     !endif
  94.  !endif
  95.  !if $module_category!=adm
  96.    !set wims_ariane=!append line resume,1,cmd=resume\
  97.  to $wims_ariane
  98.  !endif
  99. !endif
  100.  
  101. !!********* Link #9 : "About"
  102. !if $window != embeded \
  103.         and $module_has_about=yes \
  104.         and _tool notin $module and home notin $module \
  105.         and $cmd notwordof help and _exam notin $session\
  106.         and (adm notin $module or $wims_user iswordof supervisor developper or $wims_user=$empty)
  107.                 !set 1_=!append line about,4,module=$module&cmd=help&special_parm=about,mhelp,,$wims_name_module_infos ($module) to $1_
  108. !endif
  109.  
  110. !!********* Link #10 : "WIMS Help"
  111. !if $module!=home and _exam notin $session and $wims_version_theme=0
  112.  !set 1_=!append line whelp,4,module=help/main&$wims_helper,help to $1_
  113. !endif
  114.  
  115. !!********* Link #11 : "Other Languages"
  116. !if $wims_ref_otherlangs=yes and $wims_otherlangs!=$empty
  117.  !if $wims_light_module=yes
  118.   !set wims_name_pagebase=!char 1 to -4 of $phtml
  119.   !for i_ in $wims_headmenu_languages
  120.    !set 1_=!append line $i_,0,<a href="wims.cgi?session=$session&+lang=$i_&+useropts=$useropts&+module=$module&+phtml=$wims_name_pagebase.$i_&+parm1=$parm1&+parm2=$parm2&+parm3=$parm3&+parm4=$parm4&+parm5=$parm5"><img src="gifs/$i_.gif" border="1" alt="$i_"/></a> to $1_
  121.   !next i_
  122.  !else
  123.   !set wims_name_mbase=!char 1 to -4 of $module
  124.   !for i_ in $wims_otherlangs
  125.    !set 1_=!append line $i_,0,<a href="wims.cgi?session=$session&+lang=$i_&+useropts=$useropts&+module=$wims_name_mbase"><img src="gifs/$i_.gif" border=1 alt="$i_" /></a> to $1_
  126.   !next i_
  127.  !endif
  128. !endif
  129.  
  130. !if $wims_user$wims_developer!=$empty and _ notin $session
  131.   !set wims_link_close=!append line visitor,1,cmd=close&module=home\
  132.   to $wims_link_close
  133. !endif
  134.  
  135. !set wims_hm=$1_
  136. !set wims_home_items=$home_
  137. :defend
  138. !set wims_hm_cnt=!linecnt $wims_hm
  139. !set wims_home_items_cnt=!linecnt $wims_home_items
  140. !set wims_link_close_cnt=!linecnt $wims_link_close
  141. !read themes.phtml header
  142. !if $module=home
  143.   <div class="wimstrap">
  144. !else
  145.  
  146.   <div class="wimsbody">
  147. !endif
  148. <!-- END of headmenu -->
  149.