Subversion Repositories wimsdev

Rev

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

Rev Author Line No. Line
1068 bpr 1
 
973 obado 2
!!************** headmenu.phtml  ****************
16 reyssat 3
 
973 obado 4
!! This File creates a set of 1 to 11 links, to put in the head menu of Wims, for anonymous users.
5
 
6
!! **********************************************
2995 bpr 7
!if robot isin $session or $wims_mode=popup or _check isin $session or $module=help/main.$lang
16 reyssat 8
 !exit
9
!endif
10
 
973 obado 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
 
2373 bpr 17
!read name.phtml.$lang
9309 bpr 18
!read themes/$wims_theme/lang/name.phtml.$lang
16 reyssat 19
!default wims_name_bgcolor=$wims_ref_bgcolor
2976 bpr 20
!if $wims_hm!=$empty or $wims_lightpopup=yes
16 reyssat 21
 !goto defend
22
!endif
1076 bpr 23
!if $job=print or $printing=yes
24
 !goto defend
25
!endif
9710 bpr 26
!reset 1_ home_
973 obado 27
 
28
!!********* Link #1 : "Close Window" or "Home"
2233 bpr 29
 
16 reyssat 30
!if _ isin $wims_subsession
31
 !set 1_=!append line back,3,window.close() to $1_
32
!else
1068 bpr 33
 !if $window != embeded and $module!=home
9710 bpr 34
   !set home_=!append line home,1,session=$wims_session.1 to $home_
973 obado 35
 !endif
16 reyssat 36
!endif
973 obado 37
 
38
!!********* Link #2 : "Quit"
39
!if $httpd_HTTP_REFERER!=$empty and $window != embeded
16 reyssat 40
 !set 1_=!append line exit,2,$httpd_HTTP_REFERER to $1_
41
!endif
973 obado 42
 
43
!!********* Link #3 : "Work"
4784 guerimand 44
!!if $cmd=intro
45
!! !set 1_=!append line work,1,module=$module&cmd=new to $1_
46
!!endif
973 obado 47
 
48
!!********* Link #4 : "Sheet"
16 reyssat 49
!if $wims_sheet>0 or P isin $wims_sheet
50
 !set 1_=!append line sheet,1,module=adm/sheet&sh=$wims_sheet to $1_
51
!endif
973 obado 52
 
53
!!********* Link #5 : "Intro"
54
!if $window != embeded and $module_has_intro=yes and $cmd notwordof intro help
10175 bpr 55
  !if $wims_theme!=default
56
    !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
57
    !set wims_ariane_self=no
58
  !else
59
    !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_
60
  !endif
16 reyssat 61
!endif
973 obado 62
!!********* Link #6 : "References"
1068 bpr 63
!if _ notin $wims_session and adm/ notin $module and home notin $module\
16 reyssat 64
        and $cmd notwordof help ref
2233 bpr 65
!! !set 1_=!append line reference,4,module=$module&cmd=ref&special_parm=$cmd,ref to $1_
16 reyssat 66
!endif
973 obado 67
 
68
!!********* Link #7 : "Help"
9916 bpr 69
!if $module_has_help=yes and $cmd notwordof intro help
6849 bpr 70
 !if $module_help=nopop
7767 bpr 71
   !set 1_=!append line help,1,module=$module&cmd=help&special_parm=$wims_help_parm,mhelp to $1_
16 reyssat 72
 !else
6849 bpr 73
   !set 1_=!append line help,4,module=$module&cmd=help&special_parm=$wims_help_parm,mhelp to $1_
16 reyssat 74
 !endif
75
!endif
973 obado 76
 
77
!!********* Link #8 : "Resume"
16 reyssat 78
!if $cmd=help or $cmd=hint
10274 bpr 79
 !if _test isin $session
80
   !set 1_=!append line resume,1,cmd=resume to $1_
81
 !else
10355 bpr 82
    !if _help isin $session
83
      !set 1_=!append line back2,1,cmd=resume to $1_
84
    !endif
10274 bpr 85
 !endif
10259 bpr 86
 !if $module_category!=adm
87
   !set wims_ariane=!append line resume,1,cmd=resume\
88
 to $wims_ariane
89
 !endif
16 reyssat 90
!endif
1712 bpr 91
 
973 obado 92
!!********* Link #9 : "About"
93
!if $window != embeded \
94
        and $module_has_about=yes \
10407 bpr 95
        and _tool notin $module and home notin $module \
9800 bpr 96
        and $cmd notwordof help and _exam notin $session\
97
        and (adm notin $module or $wims_user iswordof supervisor developper or $wims_user=$empty)
98
                !set 1_=!append line about,4,module=$module&cmd=help&special_parm=about,mhelp,,$wims_name_module_infos ($module) to $1_
16 reyssat 99
!endif
973 obado 100
 
101
!!********* Link #10 : "WIMS Help"
1237 bpr 102
!if $module!=home and _exam notin $session and $wims_version_theme=0
1068 bpr 103
 !set 1_=!append line whelp,4,module=help/main&$wims_helper,help to $1_
104
!endif
973 obado 105
 
106
!!********* Link #11 : "Other Languages"
16 reyssat 107
!if $wims_ref_otherlangs=yes and $wims_otherlangs!=$empty
108
 !if $wims_light_module=yes
109
  !set wims_name_pagebase=!char 1 to -4 of $phtml
110
  !for i_ in $wims_headmenu_languages
5745 bpr 111
   !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_
16 reyssat 112
  !next i_
113
 !else
114
  !set wims_name_mbase=!char 1 to -4 of $module
115
  !for i_ in $wims_otherlangs
10562 bpr 116
   !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_
16 reyssat 117
  !next i_
118
 !endif
119
!endif
120
 
10274 bpr 121
!if $wims_user$wims_developer!=$empty and _ notin $session
9810 bpr 122
  !set wims_link_close=!append line visitor,1,cmd=close&module=home\
123
  to $wims_link_close
124
!endif
125
 
16 reyssat 126
!set wims_hm=$1_
9710 bpr 127
!set wims_home_items=$home_
16 reyssat 128
:defend
129
!set wims_hm_cnt=!linecnt $wims_hm
9710 bpr 130
!set wims_home_items_cnt=!linecnt $wims_home_items
9810 bpr 131
!set wims_link_close_cnt=!linecnt $wims_link_close
16 reyssat 132
!read themes.phtml header
1140 bpr 133
!if $module=home
9282 obado 134
  <div class="wimstrap">
1140 bpr 135
!else
9282 obado 136
 
137
  <div class="wimsbody">
1140 bpr 138
!endif
9309 bpr 139
<!-- END of headmenu -->