File: oneitem.phtml

package info (click to toggle)
wims 2%3A4.29a%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 185,704 kB
  • sloc: xml: 366,687; javascript: 120,570; ansic: 62,341; java: 62,170; sh: 7,744; perl: 3,937; yacc: 3,217; cpp: 1,915; lex: 1,805; makefile: 1,084; lisp: 914; pascal: 601; python: 520; php: 318; asm: 7
file content (95 lines) | stat: -rw-r--r-- 2,788 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
!! 0 is used for title in the menu, 01 is juste some text.
!! the next line doesn't work from everywhere (for example,
!! when executing an exercise in a sheet so ... copy paste for the moment
!! must be the same as html/oneitem.phtml
!!##!changeto adm/oneitem.phtml $wims_read_parm

!! be careful : if 3_ (url) contains a comma, there should be a confusion
!! for types 2, 3, 4, 5, 7
!! to have no bug, the url part (3_) should be coded, for example , -> %2C
!! it should have been better to put the url always in last position.
!! it would be the only way to be sure and to have no surprise.

!if $wims_theme_icon=yes
  !set wims_theme_icon=$wims_theme
!endif
!distribute items $wims_read_parm into 1_,2_,3_,4_,5_
!reset w_image
!if " isin $1_
  !set w_name=!replace internal " by in $1_
  !reset w_name1
!else
  !set w_name1=!word 1 of $1_
  !set w_name2=!word 2 to -1 of $1_
  !set w_name=$(wims_name_$(w_name1)) $w_name2
  !if $w_name issametext
    !set w_name=$1_
  !endif
!endif
!goto $2_
:0
 $(wims_read_parm[3..-1])
!exit
:01
 $(wims_read_parm[3..-1])
 !exit
:1
 !set 3_=!item 3 to -1 of $wims_read_parm
 !set 3_=!nospace $3_
 !set wims_ref_class=$w_name1
 !default wims_ref_title=$(wims_name_title_$1_)
 !!default wims_ref_title=!detag $w_name
 !href $3_ <span>$w_name</span>
 !reset wims_ref_class wims_ref_title
 !exit
:2
 !if $4_ notsametext
  <a href="$3_" target="wims_$4_" class="$w_name1"><span class="text_item">$w_name</span></a>
 !else
  <a href="$3_" class="$w_name1"><span class="text_item">$w_name</span></a>
 !endif
 !exit
:3
 <a href="#" onclick="$3_" class="$w_name1"><span class="text_item">$w_name</span></a>
 !exit
:4
  !!open in a new window (target=wims_$4_)
  !set wims_ref_class=$w_name1
  !default wims_ref_title=$(wims_name_title_$1_)
  !!default wims_ref_title=$w_name
  !href target=wims_$4_ $3_ <span class="text_item">$w_name</span>
  !reset wims_ref_class wims_ref_title
  !exit
:5
 <a href="$3_" class="$w_name1">$4_</a>
 !exit
:6
!! no text (only the icon - should exist)
 !set 3_=!item 3 to -1 of $wims_read_parm
 !set 3_=!nospace $3_
 !set wims_ref_class=$w_name1
 !!default wims_ref_title=$w_name
 !href $3_ <span class="show-for-sr">$w_name</span>
 !reset wims_ref_class wims_ref_title
 !exit
:7
 !set wims_ref_class=wims_button_feedback
 !default wims_ref_title=$(wims_name_title_$1_)
 !!default wims_ref_title=$w_name
 !href target=wims_$4_ $3_ <span>$w_name</span>
 !reset wims_ref_class wims_ref_title
 !exit
:8
 <span class="text_item $wims_ref_class">$w_name</span>
 !reset wims_ref_class
 !exit
:9
!! title is the last item
 !set 3_=!item 3 to -2 of $wims_read_parm
 !set 3_=!nospace $3_
 !set wims_ref_class=$w_name1
 !set wims_ref_title=!item -1 of $wims_read_parm
 !href $3_ $w_name
 !reset wims_ref_class wims_ref_title
 !exit
:*