final move of files
[web.mtrack] / templates / tree.html
1
2  
3 <div class='browselocation'>Location: 
4 {foreach:crumbs,p}
5    / <a href='{baseURL}/Browse.php/{p.location}'>{p.name}</a>
6 {end:}
7    
8 <form flexy:if="bdata.jumps">
9     <select id='jump' name='jump'></select>
10     <button type='submit'>Choose</button>
11 </form>
12
13
14 <span flexy:if="repo">
15     <div class='repodesc'>{repo.descriptionToHtml():h}</div>
16     <div flexy:if="repo.getCheckoutCommand()" class='checkout'>
17         Use the following command to obtain a working copy:<br>
18         <pre>$ {repo.getCheckoutCommand()}</pre>
19     </div>
20       
21
22
23     <button flexy:if="canFork" id='forkbmyrepotn' type='button'>Fork</button>
24     <button  flexy:if="canDeleteFork" id='deletebtn' type='button'>Delete</button>
25     <a flexy:if="canEditRepo" class='button' href="{baseURL}/admin/repo.php/{repo.repoid}">Edit</a>
26
27     <br>
28     <a href="{baseURL}/log.php/{repo.getBrowseRootName()}/{pi}">Show History</a>
29     <br>
30 </span>
31     
32 <button flexy:if="!repo" id='newrepobtn' type='button'>New Repository</button>
33
34
35 <br>
36  
37  
38      
39 <table flexy:if="!repo" class='listing' id='dirlist'>
40   <thead>
41     
42         <tr>
43           <th class='name' width='1%'>Name</th>
44           <th class='desc'>Description</th>
45         </tr>
46
47     </thead>
48     <tbody>
49         <!-- this does not make sense... up would never happen without a repo.. unless we handle multiple forks?? -->
50         <tr flexy:if="up" class="even">
51             <td class='name'><a class='parent' href='{baseURL}/Browse.php/{up}?jump={jump}'>.. [up]</a></td>
52             <td class='desc'></td>
53         </tr>
54         <tr flexy:foreach="repos,rep">
55             <td class='name'><a class='dir' href='{baseURL}/Browse.php/{rep.displayName()}?jump={jump}'>{rep.displayName()}</a></td>
56             <td class='desc'>{rep.descriptionToHtml():h}</td>
57         </tr>
58     </tbody>
59 </table>
60  
61 <table flexy:if="repo" class='listing' id='dirlist'>
62     <thead>
63     
64         <tr flexy:if="repo">
65           <th class='name' width='1%'>Name</th>
66           <th class='rev' width='1%'>Revision</th>
67           <th class='age' width='1%'>Age</th>
68           <th class='change'>Last Change</th>
69         </tr>
70     
71     </thead>
72     <tbody>
73          <tr flexy:if="up" class="even">
74             <td class='name'><a class='parent' href='{baseURL}/Browse.php/{up}?jump={jump}'>.. [up]</a></td>
75             <td class='rev'></td>
76             <td class='age'></td>
77             <td class='change'></td>
78             <td class='desc'></td>
79         </tr>
80     
81     
82         <!-- needs class. for alt col cols.... -->
83         <tr flexy:foreach="bdata.dirs,d"> 
84             <td class='name'><a class='dir' href='{baseURL}/Browse.php/{d.repo.displayName()}/{pi}/{d.basename}?jump={jump}'>{d.basename}</a></td>
85             <td class='rev'>{d.changeset():h}</td>
86             <td class='age'>{d.ctimeToHtml():h}</td>
87             <td class='change'>{d.changeByToHtml():h}: {d.changelogOneToHtml():h}</td>
88         </tr>
89         
90         <tr flexy:foreach="bdata.files,d"> 
91             <td class='name'><a class='file' href='{baseURL}/File.php/{d.repo.displayName()}/{pi}/{d.basename}?jump={jump}'>{d.basename}</a></td>
92             <td class='rev'>{d.changeset():h}</td>
93             <td class='age'>{d.ctimeToHtml():h}</td>
94             <td class='change'>{d.changeByToHtml():h}: {d.changelogOneToHtml():h}</td>
95         </tr>
96     </tbody>
97 </table>        
98                 
99
100  
101     
102     
103     
104     
105     
106     
107     
108     
109     
110     
111     
112
113 <!-- dialogs -->
114
115
116 <div id='forkdialog' style='display:none' title='Really create a fork?'>
117     <form id='forkform' action='{baseURL}/admin/forkrepo.php' method='post'>
118         <input type='hidden' name='source' value="{repo.repoid}">
119         <p>
120             A fork is your own copy of a repo that is stored and maintained
121             on the server.
122         </p>
123         <p>
124             If all you want to do is obtain a working copy so that you can
125             collaborate on this repo, you should not create a fork.
126         </p>
127         <p>
128             You may want to fork if you want the server to keep your work backed up,
129             or to collaborate with others on work that you want to share
130             with this repo later on.
131         </p>
132         <p>
133             Choose a name for your fork:
134             <select name="repo:parent"></select>
135             <input type='text' name='name' value='{forkname}'>
136         </p>
137     </form>
138 </div>
139
140
141  <div id='deletedialog' style='display:none'    title='Really delete this repo?'>
142     <form id='deleteform' action='{baseURL}/admin/deleterepo.php' method='post'>
143         <input type='hidden' name='repoid' value='$repo->repoid'>
144         <p>Are you sure you want to delete this repo?</p>
145         <p><b>You cannot undo this action; any data will be permanently deleted</b></p>
146     </form>
147 </div>
148
149
150
151 <div id='newdialog' style='display:none' title='Create a new repo?'>
152     <form id='newrepoform' action='{baseURL}/admin/repo.php/new' method='post'>
153         <p>
154           Choose a name for your repo:
155           <select name="repo:parent2"></select>
156           <input type='text' name='repo:name' value='myrepo'>
157         </p>
158         <p>
159           Choose a repository type: $repotypes
160         </p>
161         <p>
162           Description:<br>
163           <em>You may use <a href='{baseURL}/help.php/WikiFormatting' target='_blank'>WikiFormatting</a></em><br>
164         <textarea name='repo:description' class='wiki shortwiki' rows='5' cols='78'></textarea>
165     </form>
166 </div>
167
168
169       
170
171 <!-- move me to js file.. -->
172
173 <script type="text/javascript">
174
175 $(document).ready(function() {
176     
177     
178       $('#forkdialog').dialog({
179         autoOpen: false,
180         bgiframe: true,
181         resizable: false,
182         width: 600,
183         modal: true,
184         buttons: {
185           'No': function() {
186             $(this).dialog('close');
187           },
188           'Fork': function() {
189             $('#forkform').submit();
190           }
191         }
192       });
193       $('#forkbtn').click(function () {
194         $('#forkdialog').dialog('open');
195         return false;
196       });
197       
198       
199       
200       $('#deletedialog').dialog({
201         autoOpen: false,
202         bgiframe: true,
203         resizable: false,
204         modal: true,
205         buttons: {
206           'No': function() {
207             $(this).dialog('close');
208           },
209           'Delete': function() {
210             $('#deleteform').submit();
211           }
212         }
213       });
214       $('#deletebtn').click(function () {
215         $('#deletedialog').dialog('open');
216         return false;
217       });
218       
219       
220        $('#newdialog').dialog({
221             autoOpen: false,
222             bgiframe: true,
223             resizable: false,
224             width: 600,
225             modal: true,
226             buttons: {
227               'Cancel': function() {
228                 $(this).dialog('close');
229               },
230               'Create': function() {
231                 $('#newrepoform').submit();
232               }
233             }
234       });
235     $('#newrepobtn').click(function () {
236         $('#newdialog').dialog('open');
237         return false;
238     });
239       
240 });
241   
242      
243
244 </script>