/[drupal]/contributions/modules/disknode/disknode.info.tpl.inc
ViewVC logotype

Diff of /contributions/modules/disknode/disknode.info.tpl.inc

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

revision 1.1, Fri Jan 27 16:01:48 2006 UTC revision 1.1.10.1, Thu May 14 01:06:51 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  global $base_url;  global $title;
3    global $disknode_breadcrumb;
4    global $disknode_file;
5  ?>  ?>
6  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
7  <html>  <html>
8  <head>  <head>
9      <title>Disknode - <?= $title ?></title>      <title>Disknode - <?php print $title ?></title>
10      <style type="text/css">      <link href="<?php print base_path() . drupal_get_path('module', 'disknode') . '/disknode.style.css'; ?>" rel="stylesheet" type="text/css" />
11      <?php readfile(dirname(__FILE__).'/disknode.style.css'); ?>      <base href="<?php print base_path() ?>" />
     </style>  
     <base href="<?= $base_url ?>/" />  
12  </head>  </head>
13  <body>  <body>
14  <h1><?= $title ?></h1>  <div>
15  <h2><?= basename($file->filename) ?></h2>  <h1><?php print $title ?></h1>
16    <h2><?php print $disknode_breadcrumb . $disknode_file->filename ?></h2>
17    </div>
18    <div id="controls">
19    <?php
20      print '<ul class="controls">';
21      print '<li class="control-browse">' . l('Browse', "disknode/browse", array('attributes' => array('class' => 'controltext'), 'absolute' => true, 'query' => "subdir=".$subdir)) . '</li>';
22      print '</ul>'
23    ?>
24    </div>
25    <?php
26      echo theme_status_messages();
27    ?>
28    
29  <i>Not implemented</i>  <dl>
30    <dt>File path</dt>
31    <dd><input readonly="readonly" value="<?php echo $disknode_file->filepath ?>" style="width: 90%;" /></dd>
32    
33  <div id="controls">  <dt>Last modified</dt>
34  <span title="Browse and select files"><?= l("Browse", "disknode/browse", null, "subdir=".dirname($file->filename)) ?></span>  <dd><?php echo date("r", $disknode_file->filetime) ?></dd>
35    
36    <dt>File size</dt>
37    <dd title="<?php echo $disknode_file->size ?> bytes"><?php echo format_size($disknode_file->size) ?></dd> <!-- TODO: find function for human readable size (drupal function?) -->
38    
39    <dt>Mime type</dt>
40    <dd><code><?php echo $disknode_file->mimetype ?></code></dd>
41    
42    <?php if (count($disknode_file->fileowner)) {?>
43    
44    <dt>Owned by:</dt>
45    <dd><code><?php echo $disknode_file->fileowner  ?></code></dd>
46    
47    <?php  } ?>
48    </dl>
49    <?php if (count($disknode_file->nodes) > 0) {
50      echo '<h4>Associated nodes</h4>';
51      echo '<ul>';
52      foreach ($disknode_file->nodes as $node) {
53        echo '<li class="disknode-associated-nodes">' . $node->link . '</li>';
54      }
55      echo '</ul>';
56      echo '<br />';
57    }
58    ?>
59    
60    <div class="tabcontrol">
61    <script type="text/javascript">
62    var currentTab;
63    var currentTabPage;
64    function openTab(tabname) {
65      if (currentTabPage) {
66        currentTabPage.style.display = 'none';
67      }
68      if (currentTab) {
69        currentTab.className = '';
70      }
71      currentTab = document.getElementById('tab_'+tabname);
72      currentTabPage = document.getElementById('tabpage_'+tabname);
73      if (currentTabPage) {
74        currentTabPage.style.display = 'block';
75      }
76      if (currentTab) {
77        currentTab.className = 'active';
78      }
79    }
80    </script>
81    <ul class="tabcontrol">
82        <li id="tab_move" onclick="openTab('move');">Move</li>
83        <li id="tab_copy" onclick="openTab('copy');">Copy</li>
84        <li id="tab_delete" onclick="openTab('delete');">Delete</li>
85    </ul>
86    <div class="tab" id="tabpage_move">
87      <form method="post" action="">
88            <input type="hidden" name="op" value="move" />
89            <label for="newname">New name/location</label><br />
90            <input type="text" name="newname" id="newname" value="<?php echo isset($_POST["newname"])?$_POST["newname"]:$disknode_file->filepath ?>" style="width: 95%;" /><br />
91            <br />
92            <button type="submit">move</button>
93      </form>
94    </div>
95    
96    <div class="tab" id="tabpage_copy">
97      <form method="post" action="">
98            <input type="hidden" name="op" value="copy" />
99            <label for="newname">New file</label><br />
100            <input type="text" name="newname" id="newname" value="<?php echo isset($_POST["newname"])? $_POST["newname"]:$disknode_file->filepath ?>" style="width: 95%;" /><br /><br />
101            <button type="submit">copy</button>
102      </form>
103    </div>
104    
105    <div class="tab" id="tabpage_delete">
106      <form method="post" action="">
107            <input type="hidden" name="op" value="delete" />
108            <input type="checkbox" name="yesimsure" id="yesimsure" value="1" />
109            <label for="yesimsure">Yes, I am sure.</label><br /><br />
110            <button type="submit">delete</button>
111    
112      </form>
113    </div>
114    
115    
116    
117    <?php
118    if (isset($_POST["op"])) {
119      echo "<script type=\"text/javascript\">openTab('" . $_POST["op"] . "');</script>";
120    }
121    ?>
122  </div>  </div>
123  </body>  </body>
124  </html>  </html>

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.10.1

  ViewVC Help
Powered by ViewVC 1.1.2