mirror of https://github.com/MISP/MISP
91 lines
3.3 KiB
PHP
91 lines
3.3 KiB
PHP
<div class="roles view">
|
|
<h2><?php echo __('Sharing Group');?></h2>
|
|
<?php
|
|
$fields = array('id', 'uuid', 'name', 'releasability', 'description', 'active');
|
|
?>
|
|
<dl>
|
|
<?php
|
|
foreach ($fields as $f):
|
|
?>
|
|
<dt><?php
|
|
if ($f != 'active') echo ucfirst($f);
|
|
else echo __('Selectable');
|
|
?></dt>
|
|
<dd>
|
|
<?php
|
|
if ($f !== 'active') echo h($sg['SharingGroup'][$f]);
|
|
else echo '<span class="' . ($sg['SharingGroup'][$f] ? 'icon-ok' : 'icon-remove') . '"></span>';
|
|
?>
|
|
</dd>
|
|
<?php
|
|
endforeach;
|
|
?>
|
|
<dt><?php echo __('Created by');?></dt>
|
|
<dd><a href="<?php echo $baseurl; ?>/organisations/view/<?php echo $sg['Organisation']['id']; ?>"><?php echo h($sg['Organisation']['name']); ?></a></dd>
|
|
<?php
|
|
if ($sg['SharingGroup']['sync_user_id']):
|
|
?>
|
|
<dt><?php echo __('Synced by');?></dt>
|
|
<dd><a href="<?php echo $baseurl; ?>/organisations/view/<?php echo $sg['Organisation']['id']; ?>"><?php echo h($sg['Organisation']['name']); ?></a></dd>
|
|
<?php
|
|
endif;
|
|
?>
|
|
</dl><br />
|
|
<div class="row" style="width:100%;">
|
|
<?php
|
|
if (isset($sg['SharingGroupOrg'])):
|
|
?>
|
|
<div class="span6">
|
|
<b><?php echo __('Organisations');?></b>
|
|
<table class="table table-striped table-hover table-condensed">
|
|
<tr>
|
|
<th><?php echo __('Name');?></th>
|
|
<th><?php echo __('Local');?></th>
|
|
<th><?php echo __('Extend');?></th>
|
|
</tr>
|
|
<?php
|
|
foreach ($sg['SharingGroupOrg'] as $sgo):
|
|
?>
|
|
<tr>
|
|
<td><a href="<?php echo $baseurl; ?>/organisations/view/<?php echo h($sgo['Organisation']['id']); ?>"><?php echo h($sgo['Organisation']['name']); ?></a></td>
|
|
<td><span class="<?php echo ($sgo['Organisation']['local'] ? 'icon-ok' : 'icon-remove'); ?>"></span></td>
|
|
<td><span class="<?php echo ($sgo['extend'] ? 'icon-ok' : 'icon-remove'); ?>"></span></td>
|
|
</tr>
|
|
<?php
|
|
endforeach;
|
|
?>
|
|
</table>
|
|
</div>
|
|
<?php
|
|
endif;
|
|
if (!$sg['SharingGroup']['roaming']):
|
|
?>
|
|
<div class="span6">
|
|
<b>Instances</b>
|
|
<table class="table table-striped table-hover table-condensed">
|
|
<tr>
|
|
<th><?php echo __('Name');?></th>
|
|
<th><?php echo __('Url');?></th>
|
|
<th><?php echo __('All orgs');?></th>
|
|
</tr>
|
|
<?php
|
|
foreach ($sg['SharingGroupServer'] as $sgs): ?>
|
|
<tr>
|
|
<td><?php echo h($sgs['Server']['name']); ?></td>
|
|
<td><?php echo h($sgs['Server']['url']); ?></td>
|
|
<td><span class="<?php echo ($sgs['all_orgs'] ? 'icon-ok' : 'icon-remove'); ?>"></span></td>
|
|
</tr>
|
|
<?php
|
|
endforeach;
|
|
?>
|
|
</table>
|
|
</div>
|
|
<?php
|
|
endif;
|
|
?>
|
|
</div>
|
|
</div>
|
|
<?php
|
|
echo $this->element('/genericElements/SideMenu/side_menu', array('menuList' => 'globalActions', 'menuItem' => 'viewSG'));
|
|
?>
|