2015-10-29 16:27:14 +00:00
< ? php
/** @var array $_ */
2015-11-18 12:38:03 +00:00
use OCA\Federation\TrustedServers ;
2015-10-29 16:27:14 +00:00
/** @var OC_L10N $l */
script ( 'federation' , 'settings-admin' );
style ( 'federation' , 'settings-admin' )
?>
< div id = " ocFederationSettings " class = " section " >
< h2 >< ? php p ( $l -> t ( 'Federation' )); ?> </h2>
< em >< ? php p ( $l -> t ( 'ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing.' )); ?> </em>
2015-11-18 14:07:41 +00:00
< p >
< input id = " autoAddServers " type = " checkbox " class = " checkbox " < ? php if ( $_ [ 'autoAddServers' ]) p ( 'checked' ); ?> />
< label for = " autoAddServers " > Add server automatically once a federated share was created successfully </ label >
2015-10-29 16:27:14 +00:00
</ p >
< h3 > Trusted ownCloud Servers </ h3 >
< p id = " ocFederationAddServer " >
< button id = " ocFederationAddServerButton " class = " " >+ Add ownCloud server </ button >
< input id = " serverUrl " class = " hidden " type = " text " value = " " placeholder = " ownCloud Server " name = " server_url " />
< span class = " msg " ></ span >
</ p >
< ul id = " listOfTrustedServers " >
< ? php foreach ( $_ [ 'trustedServers' ] as $trustedServer ) { ?>
2015-11-18 12:38:03 +00:00
< li id = " <?php p( $trustedServer['id'] ); ?> " class = " icon-delete " >
< ? php if (( int ) $trustedServer [ 'status' ] === TrustedServers :: STATUS_OK ) { ?>
< span class = " status success " ></ span >
< ? php } elseif (( int ) $trustedServer [ 'status' ] === TrustedServers :: STATUS_PENDING ) { ?>
< span class = " status indeterminate " ></ span >
< ? php } else { ?>
< span class = " status error " ></ span >
< ? php } ?>
2015-10-29 16:27:14 +00:00
< ? php p ( $trustedServer [ 'url' ]); ?>
</ li >
< ? php } ?>
</ ul >
</ div >