/[cvs]/nfo/php/libs/net.php.pear/Tree/docs/TreeEditor/index.tpl
ViewVC logotype

Annotation of /nfo/php/libs/net.php.pear/Tree/docs/TreeEditor/index.tpl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Thu Feb 27 16:53:28 2003 UTC (21 years, 6 months ago) by joko
Branch: MAIN
+ added doc/, from PEAR

1 joko 1.1 <!--
2     Id: index.tpl,v 1.1 2003/01/30 17:18:24 cain Exp
3     $Id: index.tpl,v 1.1 2003/01/30 17:18:24 cain Exp $
4     -->
5    
6     <html>
7     <body>
8     <style>
9     body, table.simple
10     \{
11     font-family : verdana, geneva, arial;
12     font-size : 11px;
13     background-color: #DCDCDC;
14     \}
15     table,td, input
16     \{
17     background-color: white;
18     \}
19     input.button,img.button
20     \{
21     border: 1px outset black;
22     \}
23     td.selected
24     \{
25     background-color: lightblue;
26     \}
27     a
28     \{
29     color: red;
30     text-decoration: none;
31     \}
32    
33     </style>
34    
35     <form method="post" action="{$_SERVER['PHP_SELF']}">
36    
37     {if(@$session->action == 'cut')}
38     <img src="cut"> &nbsp;
39     <img src="copy"> &nbsp;
40     {else}
41     <input id="cut" src="cut" name="action_cut" type="image" class="button" onmousedown="document.getElementById('cut').style.border='1px inset black'" alt="cut" name="cut" title="cut"> &nbsp;
42     <input id="copy" src="copy" name="action_copy" type="image" class="button" onmousedown="document.getElementById('copy').style.border='1px inset black'" title="copy"> &nbsp;
43     <input id="paste" src="paste" name="action_paste" type="image" class="button" onmousedown="document.getElementById('paste').style.border='1px inset black'" title="paste"> &nbsp;
44    
45     <img src="" width="1" height="22" class="button"> &nbsp;
46    
47     {if(@$session->action == 'cut')}
48     <img src="delete"> &nbsp;
49     {else}
50     <input id="delete" src="delete" name="action_delete" type="image" class="button" onmousedown="document.getElementById('delete').style.border='1px inset black'" title="delete">
51    
52     &nbsp;
53     <img src="" width="1" height="22" class="button"> &nbsp;
54    
55     &nbsp;
56     work on: &nbsp;
57     <input type="submit" value="DB" name="use_DB">
58     &nbsp;
59     <input type="submit" value="Filesystem" name="use_Filesystem">
60     &nbsp;
61     <input type="submit" value="XML" name="use_XML">
62     &nbsp;
63     <input type="submit" value="Array" name="use_Array">
64    
65     <br><br>
66    
67     current tree instanciation used:
68     <code>
69     {if( @$session->use == 'DB' )}
70     $tree = new treeClass( 'DBnested' , 'mysql://root@localhost/test' , array('table'=&gt;TABLE_TREE , 'order' =&gt; 'name') );
71     {else}
72     $tree = new treeClass( 'Filesystem' , '/home/cain/tmp' ,array('order' =&gt; 'name') );
73     </code>
74    
75     <hr>
76    
77     <table align="left">
78     {foreach( $allVisibleFolders as $aFolder )}
79     { $class=''}
80     {if( in_array($aFolder['id'],$session->data) )}
81     { $class=' class="selected"'}
82     <tr>
83     <td {$class}>
84     {if( @$session->action == 'cut')}
85     <input type="radio" name="moveDest" value="{$aFolder['id']}">
86     {else}
87     <input type="checkbox" name="selectedNodes[]" value="{$aFolder['id']}">
88     </td>
89     <td {$class}>
90     {%tree_showNode($aFolder)%}
91     </td>
92     </tr>
93     </table>
94    
95     {if( @$session->action!='cut' )}
96     <table class="simple" border="1">
97     <tr>
98     <th colspan="2">Add Folder</th>
99     </tr>
100     <tr>
101     <td colspan="2">
102     Choose the parent folder on the left side,
103     <br>
104     under which the new folder shall be created!
105     </td>
106     </tr>
107     <tr>
108     <td>Name</td>
109     <td>
110     <input name="newFolder[name]">
111     </td>
112     </tr>
113     <tr>
114     <td>&nbsp;</td>
115     <td>
116     <input type="submit" name="action_add" value="add">
117     </td>
118     </tr>
119     </table>
120    
121    
122    
123     {if(@$session->action=='cut')}
124     You have chosen 'CUT', those folders are in the clipboard now.<br>
125     Please select the destination and push the 'PASTE' button! <img class="button" src="paste">
126     <br>
127     {if(@$session->action=='copy')}
128     You have chosen 'COPY', those folders are in the clipboard now.<br>
129     Please select the destination and push the 'PASTE' button! <img class="button" src="paste"><br>
130     Or choose other folder(s) that you want to put in the clipboard.
131     <br>
132    
133    
134     {if(@$results)}
135     <font color="red">
136     {if( @$methodFailed )}
137     ERROR
138     {else}
139     OK
140     <br>
141     </font>
142     {if(sizeof($methodCalls))}
143     <table class="simple" border="1">
144     <tr>
145     <th>methods called</th>
146     <th>returned</th>
147     </tr>
148     {foreach( $methodCalls as $key=>$aCall)}
149     <tr>
150     <td nowrap>{$aCall}</td>
151     <td align="center">
152     {if(PEAR::isError($results[$key]))}
153     <font color="red">{$results[$key]->getMessage()}</font>
154     <br>
155     {print_r($results[$key])}
156     </td>
157     </tr>
158     </table>
159     {else}
160     <font color="red">
161     {print_r($results)}
162     </font>
163    
164    
165    
166    
167     </form>
168    
169     <script type="text/javascript" language="JavaScript" src="{$config->vApplRoot}/external/calendar/popcalendar.js.php"></script>
170    
171     </body>
172     </html>
173    
174    
175    
176    
177    
178    
179    
180     <!--
181     this macro shows a node for the explorer view
182    
183     @param array the current project
184     -->
185     {%macro tree_showNode($aNode)%}
186     {global $tree,$session}
187    
188     {%repeat $aNode['level'] times%}
189     &nbsp; &nbsp;
190    
191     {if( $tree->hasChildren($aNode['id']) )}
192     <a href="{$_SERVER['PHP_SELF']}?unfold={$aNode['id']}">
193     {if(@$session->temp->openProjectFolders[$aNode['id']])}
194     <img src="openFolder" border="0"></a>
195     {else}
196     <img src="closedFolder" border="0"></a>
197     {else}
198     <img src="folder">
199    
200     &nbsp;
201     <b>
202     {if( $tree->getRootId() == $aNode['id'] )}
203     ...{echo substr($aNode['name'],-28)}
204     {else}
205     {$aNode['name']}
206     </b>
207    
208     {if( $tree->getRootId() == $aNode['id'] )}
209     &nbsp; <a href="{$_SERVER['PHP_SELF']}?unfoldAll=true" title="unfold all">++</a>

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed