aboutsummaryrefslogtreecommitdiffstats
path: root/include/reddav.php
diff options
context:
space:
mode:
authortuscanhobbit <tuscanhobbit@users.noreply.github.com>2014-06-24 12:05:11 +0200
committertuscanhobbit <tuscanhobbit@users.noreply.github.com>2014-06-24 12:05:11 +0200
commitcc4001fce7934b49e6e7888a602b9bb9c33cf37f (patch)
tree91f7e332149b40fd872ce66c742ca158190e80ba /include/reddav.php
parentb2b47dcd7ca823bacd5d223666c8603d099116ec (diff)
downloadvolse-hubzilla-cc4001fce7934b49e6e7888a602b9bb9c33cf37f.tar.gz
volse-hubzilla-cc4001fce7934b49e6e7888a602b9bb9c33cf37f.tar.bz2
volse-hubzilla-cc4001fce7934b49e6e7888a602b9bb9c33cf37f.zip
Fixes to links and forward URLs in filestorage
Diffstat (limited to 'include/reddav.php')
-rw-r--r--include/reddav.php38
1 files changed, 21 insertions, 17 deletions
diff --git a/include/reddav.php b/include/reddav.php
index 852a18869..fe05af606 100644
--- a/include/reddav.php
+++ b/include/reddav.php
@@ -1028,16 +1028,16 @@ class RedBrowser extends DAV\Browser\Plugin {
}
}
$attachId = $this->findAttachIdByHash($attachHash);
- $fileStorageUrl = str_replace("cloud/","filestorage/",$path);
+ $fileStorageUrl = substr($fullPath, 0, strpos($fullPath,"cloud/")) . "filestorage/".$this->auth->channel_name;
$attachIcon = ""; // "<a href=\"attach/".$attachHash."\" title=\"".$displayName."\"><i class=\"icon-download\"></i></a>";
$html.= "<tr>
<td>$icon</td>
- <td><a href=\"{$fullPath}\">{$displayName}</a></td>";
+ <td style=\"min-width: 15em\"><a href=\"{$fullPath}\">{$displayName}</a></td>";
if($is_owner) {
$html .= "<td>" . (($size) ? $attachIcon : '') . "</td>
<td><a href=\"".$fileStorageUrl."/".$attachId."/edit\" title=\"".t('Edit')."\"><i class=\"icon-pencil btn btn-default\"></i></a></td>
- <td><a href=\"".$fileStorageUrl."/".$attachId."/delete\" title=\"".t('Delete')."\"><i class=\"icon-remove btn btn-default drop-icons\"></i></a></td>";
+ <td><a href=\"".$fileStorageUrl."/".$attachId."/delete\" title=\"".t('Delete')."\" onclick=\"return confirm('Are you sure you want to delete this item?');\"><i class=\"icon-remove btn btn-default drop-icons\"></i></a></td>";
}
else {
$html .= "<td></td><td></td><td></td>";
@@ -1090,20 +1090,24 @@ class RedBrowser extends DAV\Browser\Plugin {
if (get_class($node)==='Sabre\\DAV\\SimpleCollection')
return;
- $output.= '<tr><td colspan="2"><form method="post" action="">
- <h3>Create new folder</h3>
- <input type="hidden" name="sabreAction" value="mkcol" />
- Name: <input type="text" name="name" />
- <input type="submit" value="create" />
- </form>
- <form method="post" action="" enctype="multipart/form-data">
- <h3>Upload file</h3>
- <input type="hidden" name="sabreAction" value="put" />
- Name (optional): <input type="text" name="name" /><br />
- File: <input type="file" name="file" /><br />
- <input type="submit" value="upload" />
- </form>
- </td></tr>';
+ $output.= '<table>
+ <tr>
+ <td><strong>Create new folder</strong>&nbsp;&nbsp;&nbsp;</td>
+ <td><form method="post" action="">
+ <input type="text" name="name" />
+ <input type="submit" value="create" />
+ <input type="hidden" name="sabreAction" value="mkcol" />
+ </form></td>
+ </tr><tr>
+ <td><strong>Upload file</strong>&nbsp;&nbsp;&nbsp;</td>
+ <td><form method="post" action="" enctype="multipart/form-data">
+ <input type="file" name="file" style="display: inline;"/>
+ <input type="submit" value="upload" />
+ <input type="hidden" name="sabreAction" value="put" />
+ <!-- Name (optional): <input type="text" name="name" /> we should rather provide a rename action in edit form-->
+ </form></td>
+ </tr>
+ </table>';
}