/[drupal]/contributions/modules/webdav/webdav_listing.tpl.php
ViewVC logotype

Contents of /contributions/modules/webdav/webdav_listing.tpl.php

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.6 - (show annotations) (download) (as text)
Tue Feb 3 17:20:22 2009 UTC (9 months, 2 weeks ago) by ulhume
Branch: MAIN
CVS Tags: DRUPAL-6--1-0-RC7, DRUPAL-6--1-0-RC8, HEAD
Changes since 1.5: +1 -1 lines
File MIME type: text/x-php
*** empty log message ***
1 <?php
2
3 /* This file is part of "WebDav for Drupal Module".
4 * Copyright 2009, arNuméral
5 * Author : Yoran Brault
6 * eMail : yoran.brault@bad_arnumeral.fr (remove bad_ before sending an email)
7 * Site : http://www.arnumeral.fr/node/5
8 *
9 * "WebDav for Drupal Module" is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2.1 of
12 * the License, or (at your option) any later version.
13 *
14 * "WebDav for Drupal Module" is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public
20 * License along with "Broken Anchor for Node comments Module"; if not, write to the Free
21 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
22 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
23 */
24
25
26
27 global $language;
28
29 $locale=$language->prefix;
30 $site=variable_get('site_name', 'Drupal site');
31 $title=t("@site - '@folder' WebDAV folder...", array(
32 '@site'=>$site,
33 '@folder'=>($root['name']==''?t("WebDAV Root"):$root['name']),
34 ));
35 ?>
36 <h2><?php print $title ?></h2>
37 <div class='webdav-listing'>
38 <table>
39 <tr>
40 <th class='icon' width="22px">&nbsp;</th>
41 <th class='filename'><?php print t("Filename")?></th>
42 <th><?php print t("type")?></th>
43 <th><?php print t("Size")?></th>
44 <th><?php print t("Created")?></th>
45 <th><?php print t("Modified")?></th>
46 </tr>
47 <tr>
48 <td><img
49 src="/<?php print drupal_get_path('module', 'webdav')."/images/up.png" ?>" /></td>
50 <td><a href=".."><?php print $root['name']==''?t('Return to @site', array('@site'=>$site)):t('Parent folder') ?></a></td>
51 <td></td>
52 <td></td>
53 <td></td>
54 <td></td>
55 </tr>
56 <?php
57 $count=0;
58 foreach ($items as $_item) {
59 $type=drupal_get_path('module', 'webdav')."/images/mimetypes/".str_replace("/", "-", $_item['type']).".png";
60 if (!file_exists($type)) {
61 $ipos=strpos($_item['type'], "/");
62 if ($ipos!==false) {
63 $type=drupal_get_path('module', 'webdav')."/images/mimetypes/".substr($_item['type'], 0, $ipos).".png";
64 }
65 }
66 if (!file_exists($type)) {
67 $type=drupal_get_path('module', 'webdav')."/images/mimetypes/unknown.png";
68 }
69 ?>
70 <tr <?php print $count%2==0?"class='a'":""?>>
71 <td><img src="/<?php print $type ?>" /></td>
72 <td><a href="<?php print $_item['id']?>"><?php print $_item['name'] ?></a></td>
73 <td><?php print $_item['type']=='collection'?'':$_item['type'] ?></td>
74 <td><?php print $_item['size'] ?></td>
75 <td><?php print format_date($_item['created'],'small') ?></td>
76 <td><?php print format_date($_item['changed'],'small') ?></td>
77 </tr>
78 <?php
79 $count++;
80 }
81 ?>
82 </table>
83
84
85 </div>
86 <!-- Haha, I make myself giggle sometime :-) -->
87 <div class='powered-by'>
88 Powered by <a href="http://drupal.org/projects/webdav" target="_blank">WebDAV Server for Drupal</a>
89 </div>

  ViewVC Help
Powered by ViewVC 1.1.2