2015-10-29 19:27:14 +03:00
< ? php
/** @var array $_ */
2015-11-18 15:38:03 +03:00
use OCA\Federation\TrustedServers ;
2016-10-28 22:46:28 +03:00
/** @var \OCP\IL10N $l */
2015-10-29 19:27:14 +03:00
script ( 'federation' , 'settings-admin' );
style ( 'federation' , 'settings-admin' )
?>
< div id = " ocFederationSettings " class = " section " >
2017-04-25 18:45:02 +03:00
< h2 >< ? php p ( $l -> t ( 'Trusted servers' )); ?> </h2>
2020-06-25 10:07:14 +03:00
< p class = " settings-hint " >< ? php p ( $l -> t ( 'Federation allows you to connect with other trusted servers to exchange the user directory. For example this will be used to auto-complete external users for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share.' )); ?> </p>
2015-10-29 19:27:14 +03:00
< ul id = " listOfTrustedServers " >
2020-04-10 15:19:56 +03:00
< ? php foreach ( $_ [ 'trustedServers' ] as $trustedServer ) { ?>
2016-06-08 12:02:05 +03:00
< li id = " <?php p( $trustedServer['id'] ); ?> " >
2020-04-10 15:19:56 +03:00
< ? php if (( int ) $trustedServer [ 'status' ] === TrustedServers :: STATUS_OK ) { ?>
2015-11-18 15:38:03 +03:00
< span class = " status success " ></ span >
2016-02-26 19:51:20 +03:00
< ? php
2020-04-10 15:19:56 +03:00
} elseif (
2016-02-26 19:51:20 +03:00
( int ) $trustedServer [ 'status' ] === TrustedServers :: STATUS_PENDING ||
( int ) $trustedServer [ 'status' ] === TrustedServers :: STATUS_ACCESS_REVOKED
) { ?>
2015-11-18 15:38:03 +03:00
< span class = " status indeterminate " ></ span >
< ? php } else { ?>
< span class = " status error " ></ span >
< ? php } ?>
2015-10-29 19:27:14 +03:00
< ? php p ( $trustedServer [ 'url' ]); ?>
2016-06-08 12:02:05 +03:00
< span class = " icon icon-delete " ></ span >
2015-10-29 19:27:14 +03:00
</ li >
< ? php } ?>
</ ul >
2017-04-24 20:09:30 +03:00
< p id = " ocFederationAddServer " >
< button id = " ocFederationAddServerButton " class = " " >< ? php p ( $l -> t ( '+ Add trusted server' )); ?> </button>
< input id = " serverUrl " class = " hidden " type = " text " value = " " placeholder = " <?php p( $l->t ('Trusted server')); ?> " name = " server_url " />
< button id = " ocFederationSubmit " class = " hidden " >< ? php p ( $l -> t ( 'Add' )); ?> </button>
< span class = " msg " ></ span >
</ p >
2015-10-29 19:27:14 +03:00
</ div >