<?xml version="1.0" encoding="ISO8859-1"?>
<!-- $Id: index.ui,v 3.1 2002-02-12 20:51:09 stolpmann Exp $ -->
<!DOCTYPE ui:application
PUBLIC "-//NPC//DTD WDIALOG 2.1//EN" "application.dtd" [
<!-- Better we would have a complete definition of all HTML-related
entities. For the moment, ad-hoc definitions do the job.
-->
<!ENTITY nbsp "<ui:special>&nbsp;</ui:special>">
]>
<ui:application start-dialog="directory">
<!-- ******************** TEMPLATES *********************** -->
<!-- The top-level layout of the pages.
Params:
page: the page to display
-->
<ui:template name="page-layout" from-caller="body">
<html>
<head><title><q:msg-title/></title></head>
<body bgcolor="white">
<ui:form>
<!-- We want the whole page to be indented by 20 pixels -->
<table>
<tr>
<td width="20"> </td>
<td>$body</td>
</tr>
<tr>
<td> </td>
<td>
<ui:a name="set_language" index="en">English</ui:a>
<ui:a name="set_language" index="de">Deutsch</ui:a>
</td>
</tr>
</table>
</ui:form>
</body>
</html>
</ui:template>
<!-- One row of the directory listing
Params:
filename, fileperms, fileowner, filegroup, filesize,
filemtime, filesymlink
-->
<ui:template name="directory-row"
from-caller="filename fileperms fileowner filegroup filesize
filemtime filesymlink">
<tr>
<td align="left"><tt>$fileperms</tt></td>
<td> </td>
<td align="left">$fileowner</td>
<td> </td>
<td align="left">$filegroup</td>
<td> </td>
<td align="right">$filesize</td>
<td> </td>
<td align="left"><tt>$filemtime</tt></td>
<td> </td>
<td align="left">$filename $filesymlink</td>
</tr>
</ui:template>
<!-- The default layout of a filename.
Params:
value
-->
<ui:template name="filename" from-caller="value">
$value
</ui:template>
<!-- The layout of filenames of directories.
Params:
value
-->
<ui:template name="filename_d" from-caller="value">
<ui:a name="goto_dir" index="$value">$value</ui:a>
</ui:template>
<!-- The layout of a symlink
Params:
value
-->
<ui:template name="symlink" from-caller="value">
-> $value
</ui:template>
<!-- Localized messages -->
<ui:template name="msg-title" xml:lang="en">
Directory listing application
</ui:template>
<ui:template name="msg-title" xml:lang="de">
Verzeichnislisten-Anwendung
</ui:template>
<ui:template name="msg-enter-path" xml:lang="en"
from-caller="path_widget ok_button">
<h1>Directory Listings</h1>
Please enter the path name of the directory you want to
see.<br/>
Path name: $path_widget $ok_button
</ui:template>
<ui:template name="msg-enter-path" xml:lang="de"
from-caller="path_widget ok_button">
<h1>Verzeichnislisten</h1>
Bitte gib den Pfadnamen des Verzeichnisses an, das du ansehen willst.
<br/>
Pfadname: $path_widget $ok_button
</ui:template>
<ui:template name="msg-the-directory" xml:lang="en" from-caller="dir">
The directory $dir
</ui:template>
<ui:template name="msg-the-directory" xml:lang="de" from-caller="dir">
Das Verzeichnis $dir
</ui:template>
<!-- ********************* OBJECTS *********************** -->
<ui:dialog name="directory" start-page="enter-path" lang-variable="lang">
<!-- *** Declaration of state variables *** -->
<ui:variable name="path">
<ui:string-value>/</ui:string-value>
</ui:variable>
<!-- The path to list -->
<ui:variable name="listing" temporary="yes"/>
<!-- Contains the generated listing -->
<ui:variable name="lang">
<ui:string-value>en</ui:string-value>
</ui:variable>
<!-- *** The page enter-path *** -->
<ui:page name="enter-path">
<q:page-layout>
<t:msg-enter-path>
<p:path_widget><ui:text variable="path" size="40"/></p:path_widget>
<p:ok_button>
<ui:button name="path-ok" label="OK" goto="show-listing"/>
</p:ok_button>
</t:msg-enter-path>
</q:page-layout>
</ui:page>
<!-- *** The page show-listing *** -->
<ui:page name="show-listing" from-caller="Change_path">
<ui:default name="Change_path"><ui:cond>
<ui:iflang xml:lang="en">Change path</ui:iflang>
<ui:iflang xml:lang="de">Ändere Pfad</ui:iflang>
</ui:cond></ui:default>
<ui:use template="page-layout">
<ui:param name="body">
<h1>
<t:msg-the-directory>
<p:dir><ui:dynamic variable="path"/></p:dir>
</t:msg-the-directory>
</h1>
<table>
<!-- Here multiple instances of the template
"directory-row" are inserted.
-->
<ui:dynamic variable="listing" special="yes"/>
</table>
<ui:button name="enter-path" label="$Change_path" goto="enter-path"/>
</ui:param>
</ui:use>
</ui:page>
</ui:dialog>
</ui:application>