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 " >
< h2 >< ? php p ( $l -> t ( 'Federation' )); ?> </h2>
2016-06-20 11:17:12 +03:00
< em >< ? 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.' )); ?> </em>
2015-10-29 19:27:14 +03:00
2015-11-18 17:07:41 +03:00
< p >
< input id = " autoAddServers " type = " checkbox " class = " checkbox " < ? php if ( $_ [ 'autoAddServers' ]) p ( 'checked' ); ?> />
2016-03-02 14:54:53 +03:00
< label for = " autoAddServers " >< ? php p ( $l -> t ( 'Add server automatically once a federated share was created successfully' )); ?> </label>
2015-10-29 19:27:14 +03:00
</ p >
2016-06-20 11:17:12 +03:00
< h3 >< ? php p ( $l -> t ( 'Trusted Servers' )); ?> </h3>
2015-10-29 19:27:14 +03:00
< p id = " ocFederationAddServer " >
2016-07-21 03:20:29 +03:00
< button id = " ocFederationAddServerButton " class = " " >< ? php p ( $l -> t ( '+ Add Nextcloud server' )); ?> </button>
< input id = " serverUrl " class = " hidden " type = " text " value = " " placeholder = " <?php p( $l->t ('Nextcloud Server')); ?> " name = " server_url " />
2015-10-29 19:27:14 +03:00
< span class = " msg " ></ span >
</ p >
< ul id = " listOfTrustedServers " >
< ? php foreach ( $_ [ 'trustedServers' ] as $trustedServer ) { ?>
2016-06-08 12:02:05 +03:00
< li id = " <?php p( $trustedServer['id'] ); ?> " >
2015-11-18 15:38:03 +03:00
< ? php if (( int ) $trustedServer [ 'status' ] === TrustedServers :: STATUS_OK ) { ?>
< span class = " status success " ></ span >
2016-02-26 19:51:20 +03:00
< ? php
} elseif (
( 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 >
</ div >