summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2013-12-09 13:32:28 +0100
committerVincent Petry <pvince81@owncloud.com>2014-05-15 17:51:04 +0200
commit9ccb3279dd09b7042ab07c936a4c04127282476f (patch)
treed310007de95b3dae9970ec999b808dad09bd780b /apps
parent04f73275ba222f0aae80cf80890477b141cd4902 (diff)
downloadnextcloud-server-9ccb3279dd09b7042ab07c936a4c04127282476f.tar.gz
nextcloud-server-9ccb3279dd09b7042ab07c936a4c04127282476f.zip
Added app navigation for files app
- Added links to trashbin and shared dir - Moved "WebDAV" settings block to the app nav's settings section - Added sidebar support in trashbin app as well
Diffstat (limited to 'apps')
-rw-r--r--apps/files/css/files.css7
-rw-r--r--apps/files/index.php6
-rw-r--r--apps/files/js/files.js8
-rw-r--r--apps/files/templates/appnavigation.php19
-rw-r--r--apps/files/templates/index.php7
-rw-r--r--apps/files_trashbin/index.php5
-rw-r--r--apps/files_trashbin/templates/index.php3
7 files changed, 52 insertions, 3 deletions
diff --git a/apps/files/css/files.css b/apps/files/css/files.css
index 3dc5ef5a396..db23f54f215 100644
--- a/apps/files/css/files.css
+++ b/apps/files/css/files.css
@@ -84,6 +84,9 @@
}
#filestable tbody tr { background-color:#fff; height:51px; }
+.app-files #controls {
+ left: 300px;
+}
#filestable tbody tr:hover, tbody tr:active {
background-color: rgb(240,240,240);
}
@@ -431,3 +434,7 @@ table.dragshadow td.size {
.mask.transparent{
opacity: 0;
}
+
+.app-files #app-settings input {
+ width: 90%;
+}
diff --git a/apps/files/index.php b/apps/files/index.php
index a4e9a938507..df207582dd6 100644
--- a/apps/files/index.php
+++ b/apps/files/index.php
@@ -89,6 +89,11 @@ if ($trashEnabled) {
$trashEmpty = \OCA\Files_Trashbin\Trashbin::isEmpty($user);
}
+$nav = new OCP\Template('files', 'appnavigation', '');
+
+$nav->assign('trash', $trashEnabled);
+$nav->assign('trashEmpty', $trashEmpty);
+
OCP\Util::addscript('files', 'fileactions');
OCP\Util::addscript('files', 'files');
OCP\Util::addscript('files', 'keyboardshortcuts');
@@ -110,5 +115,6 @@ $tmpl->assign("mailNotificationEnabled", $config->getAppValue('core', 'shareapi_
$tmpl->assign("allowShareWithLink", $config->getAppValue('core', 'shareapi_allow_links', 'yes'));
$tmpl->assign("encryptionInitStatus", $encryptionInitStatus);
$tmpl->assign('disableSharing', false);
+$tmpl->assign('appNavigation', $nav);
$tmpl->printPage();
diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index 6d167851e64..60e20a62e87 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -254,6 +254,14 @@ $(document).ready(function() {
}
}
+ $('#app-settings-header').on('click', function() {
+ var $settings = $('#app-settings');
+ $settings.toggleClass('opened');
+ if ($settings.hasClass('opened')) {
+ $settings.find('input').focus();
+ }
+ });
+
//scroll to and highlight preselected file
if (getURLParameter('scrollto')) {
FileList.scrollTo(getURLParameter('scrollto'));
diff --git a/apps/files/templates/appnavigation.php b/apps/files/templates/appnavigation.php
new file mode 100644
index 00000000000..22987ec637c
--- /dev/null
+++ b/apps/files/templates/appnavigation.php
@@ -0,0 +1,19 @@
+<div id="app-navigation">
+ <ul>
+ <li class="allfiles"><a href="<?php p(OC_Helper::linkTo('files', '')) ?>"><?php p($l->t('All Files'));?></a></li>
+ <li class="sep"></li>
+ <?php if ($_['trash'] ): ?>
+ <li class="trash"><a href="<?php p(OC_Helper::linkTo('files_trashbin', 'index.php')) ?>"><?php p($l->t('Deleted files'));?></a></li>
+ <?php endif; ?>
+ </ul>
+ <div id="app-settings">
+ <div id="app-settings-header">
+ <button class="settings-button"></button>
+ </div>
+ <div id="app-settings-content">
+ <h2><?php p($l->t('WebDAV'));?></h2>
+ <div><input id="webdavurl" type="text" readonly="readonly" value="<?php p(OC_Helper::linkToRemote('webdav')); ?>"></input></div>
+ <em><?php print_unescaped($l->t('Use this address to <a href="%s" target="_blank">access your Files via WebDAV</a>', array(link_to_docs('user-webdav'))));?></em>
+ </div>
+ </div>
+</div>
diff --git a/apps/files/templates/index.php b/apps/files/templates/index.php
index 9c593a9341d..9ed294e6b6f 100644
--- a/apps/files/templates/index.php
+++ b/apps/files/templates/index.php
@@ -1,4 +1,6 @@
<?php /** @var $l OC_L10N */ ?>
+<?php $_['appNavigation']->printPage(); ?>
+<div id="app-content">
<div id="controls">
<div class="actions creatable hidden">
<?php if(!isset($_['dirToken'])):?>
@@ -37,9 +39,6 @@
data-url="<?php print_unescaped(OCP\Util::linkTo('files', 'ajax/upload.php')); ?>" />
<a href="#" class="svg icon-upload"></a>
</div>
- <?php if ($_['trash']): ?>
- <input id="trash" type="button" value="<?php p($l->t('Deleted files'));?>" class="button" <?php $_['trashEmpty'] ? p('disabled') : '' ?> />
- <?php endif; ?>
<div id="uploadprogresswrapper">
<div id="uploadprogressbar"></div>
<input type="button" class="stop" style="display:none"
@@ -112,6 +111,8 @@
</p>
</div>
+</div><!-- closing app-content -->
+
<!-- config hints for javascript -->
<input type="hidden" name="filesApp" id="filesApp" value="1" />
<input type="hidden" name="allowZipDownload" id="allowZipDownload" value="<?php p($_['allowZipDownload']); ?>" />
diff --git a/apps/files_trashbin/index.php b/apps/files_trashbin/index.php
index 6e6a8a38307..16cd5ecd4cd 100644
--- a/apps/files_trashbin/index.php
+++ b/apps/files_trashbin/index.php
@@ -39,4 +39,9 @@ if ($isIE8 && isset($_GET['dir'])){
$tmpl->assign('dir', $dir);
$tmpl->assign('disableSharing', true);
+$nav = new OCP\Template('files', 'appnavigation', '');
+$nav->assign('trash', true);
+
+$tmpl->assign('appNavigation', $nav);
+
$tmpl->printPage();
diff --git a/apps/files_trashbin/templates/index.php b/apps/files_trashbin/templates/index.php
index 7c673c317e0..02067385d4e 100644
--- a/apps/files_trashbin/templates/index.php
+++ b/apps/files_trashbin/templates/index.php
@@ -1,4 +1,6 @@
<?php /** @var $l OC_L10N */ ?>
+<?php $_['appNavigation']->printPage(); ?>
+<div id="app-content">
<div id="controls">
<div id="file_action_panel"></div>
</div>
@@ -44,3 +46,4 @@
<tfoot>
</tfoot>
</table>
+</div>