diff options
author | Vincent Petry <pvince81@owncloud.com> | 2013-12-09 16:32:28 +0400 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-05-15 19:51:04 +0400 |
commit | 9ccb3279dd09b7042ab07c936a4c04127282476f (patch) | |
tree | d310007de95b3dae9970ec999b808dad09bd780b | |
parent | 04f73275ba222f0aae80cf80890477b141cd4902 (diff) |
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
-rw-r--r-- | apps/files/css/files.css | 7 | ||||
-rw-r--r-- | apps/files/index.php | 6 | ||||
-rw-r--r-- | apps/files/js/files.js | 8 | ||||
-rw-r--r-- | apps/files/templates/appnavigation.php | 19 | ||||
-rw-r--r-- | apps/files/templates/index.php | 7 | ||||
-rw-r--r-- | apps/files_trashbin/index.php | 5 | ||||
-rw-r--r-- | apps/files_trashbin/templates/index.php | 3 | ||||
-rw-r--r-- | core/css/apps.css | 3 | ||||
-rw-r--r-- | core/css/styles.css | 5 | ||||
-rw-r--r-- | settings/templates/personal.php | 6 |
10 files changed, 55 insertions, 14 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> diff --git a/core/css/apps.css b/core/css/apps.css index a0bb262854d..377878467c0 100644 --- a/core/css/apps.css +++ b/core/css/apps.css @@ -178,6 +178,9 @@ bottom: 0; border-top: 1px solid #ccc; } +#app-settings.opened #app-settings-content { + display: block; +} #app-settings-header { background-color: #eee; } diff --git a/core/css/styles.css b/core/css/styles.css index d21e6bc6907..b99af47ff37 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -302,11 +302,6 @@ input[type="submit"].enabled { border-bottom: 1px solid #e7e7e7; z-index: 50; } -/* account for shift of controls bar due to app navigation */ -#body-user #controls, -#body-settings #controls { - padding-left: 80px; -} #controls .button, #controls button, #controls input[type='submit'], diff --git a/settings/templates/personal.php b/settings/templates/personal.php index afa3f5d700a..1d1500743ad 100644 --- a/settings/templates/personal.php +++ b/settings/templates/personal.php @@ -133,12 +133,6 @@ if($_['passwordChangeSupported']) { <?php endif; ?> </form> -<div class="section"> - <h2><?php p($l->t('WebDAV'));?></h2> - <code><?php print_unescaped(OC_Helper::linkToRemote('webdav')); ?></code><br /> - <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> - <?php foreach($_['forms'] as $form) { print_unescaped($form); };?> |