2020-02-26 18:22:57 +03:00
< ? php
script ( \OCA\Files\AppInfo\Application :: APP_ID , 'dist/files-app-settings' );
?>
2013-12-09 16:32:28 +04:00
< div id = " app-navigation " >
2015-04-08 20:25:28 +03:00
< ul class = " with-icon " >
2018-06-01 21:29:43 +03:00
2018-06-20 23:40:10 +03:00
< ? php
2018-06-18 12:13:52 +03:00
2018-06-20 23:40:10 +03:00
$pinned = 0 ;
foreach ( $_ [ 'navigationItems' ] as $item ) {
2018-06-27 01:35:28 +03:00
$pinned = NavigationListElements ( $item , $l , $pinned );
2018-06-20 23:40:10 +03:00
}
?>
2018-06-16 23:44:18 +03:00
2019-06-23 22:21:13 +03:00
< ? php if ( $_ [ 'quota' ] === \OCP\Files\FileInfo :: SPACE_UNLIMITED ) : ?>
< li id = " quota " class = " pinned <?php p( $pinned === 0 ? 'first-pinned ' : '') ?> " >
< a href = " # " class = " icon-quota svg " >
< p >< ? php p ( $l -> t ( '%s used' , [ $_ [ 'usage' ]])); ?> </p>
</ a >
</ li >
< ? php else : ?>
< li id = " quota " class = " has-tooltip pinned <?php p( $pinned === 0 ? 'first-pinned ' : '') ?> "
2019-06-24 19:35:37 +03:00
title = " <?php p( $l->t ('%s%% of %s used', [ $_['usage_relative'] , $_['total_space'] ])); ?> " >
2019-06-23 22:21:13 +03:00
< a href = " # " class = " icon-quota svg " >
2019-06-24 19:33:10 +03:00
< p id = " quotatext " >< ? php p ( $l -> t ( '%1$s of %2$s used' , [ $_ [ 'usage' ], $_ [ 'total_space' ]])); ?> </p>
2019-06-23 22:21:13 +03:00
< div class = " quota-container " >
< progress value = " <?php p( $_['usage_relative'] ); ?> " max = " 100 " class = " <?= ( $_['usage_relative'] > 80) ? 'warn' : '' ?> " ></ progress >
</ div >
</ a >
</ li >
< ? php endif ; ?>
2013-12-09 16:32:28 +04:00
</ ul >
< div id = " app-settings " >
< div id = " app-settings-header " >
2018-06-20 23:40:10 +03:00
< button class = " settings-button "
data - apps - slide - toggle = " #app-settings-content " >
< ? php p ( $l -> t ( 'Settings' )); ?>
2014-12-17 14:20:38 +03:00
</ button >
2013-12-09 16:32:28 +04:00
</ div >
< div id = " app-settings-content " >
2020-02-26 18:22:57 +03:00
< div id = " files-app-settings " ></ div >
2016-04-12 18:10:09 +03:00
< div id = " files-setting-showhidden " >
2018-06-20 23:40:10 +03:00
< input class = " checkbox " id = " showhiddenfilesToggle "
checked = " checked " type = " checkbox " >
2016-04-12 18:10:09 +03:00
< label for = " showhiddenfilesToggle " >< ? php p ( $l -> t ( 'Show hidden files' )); ?> </label>
</ div >
2018-06-20 23:40:10 +03:00
< label for = " webdavurl " >< ? php p ( $l -> t ( 'WebDAV' )); ?> </label>
< input id = " webdavurl " type = " text " readonly = " readonly "
2020-01-10 14:11:26 +03:00
value = " <?php p( $_['webdav_url'] ); ?> " />
2020-03-26 19:43:13 +03:00
< em >< a href = " <?php echo link_to_docs('user-webdav') ?> " target = " _blank " rel = " noreferrer noopener " >< ? php p ( $l -> t ( 'Use this address to access your Files via WebDAV' )) ?> ↗</a></em>
2013-12-09 16:32:28 +04:00
</ div >
</ div >
2018-06-01 21:29:43 +03:00
2013-12-09 16:32:28 +04:00
</ div >
2018-06-20 23:40:10 +03:00
< ? php
/**
* Prints the HTML for a single Entry .
*
* @ param $item The item to be added
* @ param $l Translator
2018-06-27 01:35:28 +03:00
* @ param $pinned IntegerValue to count the pinned entries at the bottom
2018-06-20 23:40:10 +03:00
*
* @ return int Returns the pinned value
*/
2018-06-27 01:35:28 +03:00
function NavigationListElements ( $item , $l , $pinned ) {
2018-07-26 16:05:00 +03:00
strpos ( $item [ 'classes' ] ? ? '' , 'pinned' ) !== false ? $pinned ++ : '' ;
2018-06-20 23:40:10 +03:00
?>
2018-07-13 10:33:57 +03:00
< li
data - id = " <?php p( $item['id'] ) ?> "
< ? php if ( isset ( $item [ 'dir' ])) { ?> data-dir="<?php p($item['dir']); ?>" <?php } ?>
< ? php if ( isset ( $item [ 'view' ])) { ?> data-view="<?php p($item['view']); ?>" <?php } ?>
< ? php if ( isset ( $item [ 'expandedState' ])) { ?> data-expandedstate="<?php p($item['expandedState']); ?>" <?php } ?>
class = " nav-<?php p( $item['id'] ) ?>
< ? php if ( isset ( $item [ 'classes' ])) { p ( $item [ 'classes' ]); } ?>
< ? php p ( $pinned === 1 ? 'first-pinned' : '' ) ?>
< ? php if ( isset ( $item [ 'defaultExpandedState' ]) && $item [ 'defaultExpandedState' ]) { ?> open<?php } ?>"
2018-06-27 01:35:28 +03:00
< ? php if ( isset ( $item [ 'folderPosition' ])) { ?> folderposition="<?php p($item['folderPosition']); ?>" <?php } ?>>
2018-06-20 23:40:10 +03:00
< a href = " <?php p(isset( $item['href'] ) ? $item['href'] : '#') ?> "
2018-07-13 10:33:57 +03:00
class = " nav-icon-<?php p(isset( $item['icon'] ) && $item['icon'] !== '' ? $item['icon'] : $item['id'] ) ?> svg " >< ? php p ( $item [ 'name' ]); ?> </a>
2018-06-20 23:40:10 +03:00
< ? php
NavigationElementMenu ( $item );
if ( isset ( $item [ 'sublist' ])) {
?>
2018-07-13 10:33:57 +03:00
< button class = " collapse app-navigation-noclose " < ? php if ( sizeof ( $item [ 'sublist' ]) == 0 ) { ?> style="display: none" <?php } ?>></button>
2018-07-12 17:49:25 +03:00
< ul id = " sublist-<?php p( $item['id'] ); ?> " >
2018-06-20 23:40:10 +03:00
< ? php
foreach ( $item [ 'sublist' ] as $item ) {
2018-06-27 01:35:28 +03:00
$pinned = NavigationListElements ( $item , $l , $pinned );
2018-06-20 23:40:10 +03:00
}
?>
</ ul >
< ? php } ?>
</ li >
< ? php
return $pinned ;
}
/**
* Prints the HTML for a dotmenu .
*
* @ param $item The item to be added
*
* @ return void
*/
function NavigationElementMenu ( $item ) {
2018-07-13 10:33:57 +03:00
if ( isset ( $item [ 'menubuttons' ]) && $item [ 'menubuttons' ] === 'true' ) {
2018-06-20 23:40:10 +03:00
?>
< div id = " dotmenu-<?php p( $item['id'] ); ?> "
2018-07-13 10:33:57 +03:00
class = " app-navigation-entry-utils " < ? php if ( isset ( $item [ 'enableMenuButton' ]) && $item [ 'enableMenuButton' ] === 0 ) { ?> style="display: none"<?php } ?>>
2018-06-20 23:40:10 +03:00
< ul >
< li class = " app-navigation-entry-utils-menu-button svg " >
< button id = " dotmenu-button-<?php p( $item['id'] ) ?> " ></ button >
</ li >
</ ul >
</ div >
< div id = " dotmenu-content-<?php p( $item['id'] ) ?> "
class = " app-navigation-entry-menu " >
< ul >
</ ul >
</ div >
< ? php }
2018-06-27 11:40:32 +03:00
}