File: bounded_s_index.thtml

package info (click to toggle)
libaws 2.2dfsg-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 7,624 kB
  • ctags: 1,173
  • sloc: ada: 61,829; ansic: 6,483; makefile: 1,282; xml: 196; sh: 119; java: 112; python: 66; sed: 40
file content (32 lines) | stat: -rw-r--r-- 1,425 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
@@-- Builds an index for split pages (secondary index). 
@@-- If there are more entries than the maximum allowed, the first, last, and
@@-- current entries are always displayed; extra entries are replaced with
@@-- "..." and are associated to $2
@@--
@@-- Parameters: $1= Number of visible index entries
@@--             $2 (optional) = Href to use for "..." entries.
@@--                             (none by default)

@@TABLE@@
   @@IF@@ @_TABLE_LINE_@ = 1 or @_TABLE_LINE_@ = @_S_HREFS_V'LENGTH_@ or (@_S_PAGE_INDEX_@ <= @_"/"(2):$1_@ and @_TABLE_LINE_@ <= @_"-"(2):$1_@) or (@_S_PAGE_INDEX_@ > @_"/"(2):"-"($1):"*"(2):S_HREFS_V'LENGTH_@ and @_TABLE_LINE_@ > @_"+"(2):"-"($1):S_HREFS_V'LENGTH_@)
      @@IF@@ @_TABLE_LINE_@ = @_S_PAGE_INDEX_@
         <font color="red">@_S_INDEXES_V_@</font>
      @@ELSE@@
         <a href="@_S_HREFS_V_@">@_S_INDEXES_V_@</a>
      @@END_IF@@

   @@ELSIF@@ @_TABLE_LINE_@ > @_"+"(2):"/"(2):"-"($1):"*"(2):S_PAGE_INDEX_@ and @_TABLE_LINE_@ <= @_"+"($1):"-"(2):"/"(2):"-"($1):"*"(2):S_PAGE_INDEX_@
      @@IF@@ @_TABLE_LINE_@ = @_S_PAGE_INDEX_@
         <font color="red">@_S_INDEXES_V_@</font>
      @@ELSE@@
         <a href="@_S_HREFS_V_@">@_S_INDEXES_V_@</a>
      @@END_IF@@

   @@ELSIF@@ @_TABLE_LINE_@ = 2 or @_TABLE_LINE_@ = @_"-"(1):S_INDEXES_V'LENGTH_@
     @@IF@@ @_EXIST:$2_@
       <a href="@_$2_@">...</a>
     @@ELSE@@
       ...
     @@END_IF@@
   @@END_IF@@
@@END_TABLE@@