alignment of action buttons

pull/217/head
Christophe Vandeplas 2013-06-03 14:44:31 +02:00
parent d5c5134691
commit bdc973f9ed
11 changed files with 28 additions and 24 deletions

View File

@ -85,7 +85,7 @@ foreach ($attributes as $attribute):
?>&nbsp;</td>
<td class="short" onclick="document.location ='<?php echo $this->Html->url(array('controller' => 'events', 'action' => 'view', $attribute['Attribute']['event_id']), true);?>';">
<?php echo $attribute['Attribute']['to_ids'] ? 'Yes' : 'No'; ?>&nbsp;</td>
<td class="actions short"><?php
<td class="short action-links"><?php
if ($isAdmin || ($isAclModify && $attribute['Event']['user_id'] == $me['id']) || ($isAclModifyOrg && $attribute['Event']['org'] == $me['org'])) {
echo $this->Html->link('', array('action' => 'edit', $attribute['Attribute']['id']), array('class' => 'icon-edit', 'title' => 'Edit'));
echo $this->Form->postLink('',array('action' => 'delete', $attribute['Attribute']['id']), array('class' => 'icon-trash', 'title' => 'Delete'), __('Are you sure you want to delete this attribute?'));

View File

@ -26,7 +26,7 @@ foreach ($list as $item):?>
<tr>
<td class="short"><?php echo h($item['Blacklist']['id']);?>&nbsp;</td>
<td><?php echo h($item['Blacklist']['name']);?>&nbsp;</td>
<td class="actions short">
<td class="short action-links">
<?php echo $this->Html->link('', array('admin' => true, 'action' => 'edit', $item['Blacklist']['id']), array('class' => 'icon-edit', 'title' => 'Edit'));?>
<?php echo $this->Form->postLink('', array('admin' => true, 'action' => 'delete', $item['Blacklist']['id']), array('class' => 'icon-trash', 'title' => 'Delete'), __('Are you sure you want to delete "%s"?', $item['Blacklist']['name']));?>
</td>

View File

@ -95,7 +95,7 @@
<td class="short" onclick="document.location ='<?php echo $this->Html->url(array('action' => 'view', $event['Event']['id']), true);?>';">
<?php echo $analysisLevels[$event['Event']['analysis']]; ?>&nbsp;
</td>
<td class="short" onclick="document.location ='<?php echo $this->Html->url(array('action' => 'view', $event['Event']['id']), true);?>';">
<td onclick="document.location ='<?php echo $this->Html->url(array('action' => 'view', $event['Event']['id']), true);?>';">
<?php echo nl2br(h($event['Event']['info'])); ?>&nbsp;
</td>
<?php if ('true' == Configure::read('CyDefSIG.sync')): ?>
@ -103,7 +103,7 @@
<?php echo $event['Event']['distribution'] != 'All communities' ? $event['Event']['distribution'] : 'All';?>
</td>
<?php endif; ?>
<td class="actions short">
<td class="short action-links">
<?php
if (0 == $event['Event']['published'] && ($isSiteAdmin || ($isAclPublish && $event['Event']['org'] == $me['org'])))
echo $this->Form->postLink('', array('action' => 'alert', $event['Event']['id']), array('class' => 'icon-download-alt', 'title' => 'Publish Event'), 'Are you sure this event is complete and everyone should be informed?');

View File

@ -143,9 +143,9 @@ if (!empty($event['Attribute'])):?>
<th>Type</th>
<th>Value</th>
<th>Related Events</th>
<th <?php echo "title='" . $attrDescriptions['signature']['desc'] . "'";?>>IDS Signature</th>
<th <?php echo "title='" . $attrDescriptions['private']['desc'] . "'";?>>Distribution</th>
<th class="actions">Actions</th>
<th title="<?php echo $attrDescriptions['signature']['desc'];?>">IDS Signature</th>
<th title="<?php echo $attrDescriptions['private']['desc'];?>">Distribution</th>
<th class="actions">Actions</th>
</tr><?php
foreach ($categories as $category):
$first = 1;
@ -155,17 +155,17 @@ if (!empty($event['Attribute'])):?>
if (count($attribute['ShadowAttribute'])) $extra .= 'highlightGreen highlightTop';
?>
<tr>
<td class= "short <?php echo $extra; if ($extra != "") echo ' highlightLeft'; ?>" title="<?php if('' != $attribute['category']) echo $categoryDefinitions[$attribute['category']]['desc'];?>"><?php
<td class="short <?php echo $extra; if ($extra != "") echo ' highlightLeft'; ?>" title="<?php if('' != $attribute['category']) echo $categoryDefinitions[$attribute['category']]['desc'];?>"><?php
if ($first) {
if ('' == $attribute['category']) echo '(no category)';
echo h($attribute['category']);
} else {
echo '&nbsp;';
}?></td>
<td class= "short <?php echo $extra; ?>" title="<?php
<td class="short <?php echo $extra; ?>" title="<?php
echo $typeDefinitions[$attribute['type']]['desc'];?>"><?php
echo h($attribute['type']);?></td>
<td class= "short <?php echo $extra; ?>"><?php
<td class="<?php echo $extra; ?>"><?php
$sigDisplay = $attribute['value'];
if ('attachment' == $attribute['type'] || 'malware-sample' == $attribute['type'] ) {
$filenameHash = explode('|', $attribute['value']);
@ -190,7 +190,7 @@ if (!empty($event['Attribute'])):?>
echo nl2br(h($sigDisplay));
}
?></td>
<td class= "short <?php echo $extra; ?>">
<td class="short <?php echo $extra; ?>">
<?php
$first = 0;
if (isset($relatedAttributes[$attribute['id']]) && (null != $relatedAttributes[$attribute['id']])) {
@ -208,9 +208,9 @@ if (!empty($event['Attribute'])):?>
}
?>&nbsp;
</td>
<td class= "short <?php echo $extra; ?>"><?php echo $attribute['to_ids'] ? 'Yes' : 'No';?></td>
<td class= "short <?php echo $extra; ?>"><?php echo $attribute['distribution'] != 'All communities' ? $attribute['distribution'] : 'All';?></td>
<td class = "actions <?php echo $extra; if ($extra != '') echo ' highlightRight'; ?>">
<td class="short <?php echo $extra; ?>"><?php echo $attribute['to_ids'] ? 'Yes' : 'No';?></td>
<td class="short <?php echo $extra; ?>"><?php echo $attribute['distribution'] != 'All communities' ? $attribute['distribution'] : 'All';?></td>
<td class="short action-links <?php echo $extra; if ($extra != '') echo ' highlightRight'; ?>">
<?php
if ($isSiteAdmin || $mayModify) {
echo $this->Html->link('', array('controller' => 'attributes', 'action' => 'edit', $attribute['id']), array('class' => 'icon-edit', 'title' => 'Edit'));
@ -279,7 +279,7 @@ if (!empty($event['Attribute'])):?>
if ($shadowAttribute['to_ids'] != $attribute['to_ids']) echo $shadowAttribute['to_ids'] ? 'Yes' : 'No';
?></td>
<td class="short <?php echo $extra; ?> highlightRed"></td>
<td class="actions highlightRight <?php echo $extra; ?> highlightRed">
<td class="short action-links highlightRight <?php echo $extra; ?> highlightRed">
<?php
if (($event['Event']['org'] == $me['org'] && $mayPublish) || $isSiteAdmin) {
echo $this->Html->link('', array('controller' => 'shadow_attributes', 'action' => 'accept', $shadowAttribute['id']), array('class' => 'icon-ok', 'title' => 'Accept'));
@ -319,7 +319,7 @@ if (!empty($event['Attribute'])):?>
echo h($remain['ShadowAttribute']['type']);
?>
</td>
<td class = "short <?php echo $extra; ?>">
<td class="<?php echo $extra; ?>">
<?php
$sigDisplay = nl2br(h($remain['ShadowAttribute']['value']));
if ('attachment' == $remain['ShadowAttribute']['type'] || 'malware-sample' == $remain['ShadowAttribute']['type'] ) {
@ -353,7 +353,7 @@ if (!empty($event['Attribute'])):?>
echo $remain['ShadowAttribute']['to_ids'] ? 'Yes' : 'No';
?></td>
<td class="short <?php echo $extra; ?>"></td>
<td class="actions highlightRight <?php echo $extra; ?>">
<td class="short action-links highlightRight <?php echo $extra; ?>">
<?php
if (($event['Event']['org'] == $me['org'] && $mayPublish) || $isSiteAdmin) {
echo $this->Html->link('', array('controller' => 'shadow_attributes', 'action' => 'accept', $remain['ShadowAttribute']['id']), array('class' => 'icon-ok', 'title' => 'Accept'));

View File

@ -28,7 +28,7 @@ foreach ($list as $item):?>
<td class="short"><?php echo h($item['Regexp']['id']);?>&nbsp;</td>
<td><?php echo h($item['Regexp']['regexp']);?>&nbsp;</td>
<td><?php echo h($item['Regexp']['replacement']);?>&nbsp;</td>
<td class="actions short">
<td class="short action-links">
<?php echo $this->Html->link('', array('admin' => true, 'action' => 'edit', $item['Regexp']['id']), array('class' => 'icon-edit', 'title' => 'Edit'));?>
<?php echo $this->Form->postLink('', array('admin' => true, 'action' => 'delete', $item['Regexp']['id']), array('class' => 'icon-trash', 'title' => 'Delete'), __('Are you sure you want to delete %s?', h($item['Regexp']['regexp'])));?>
</td>

View File

@ -36,7 +36,7 @@ foreach ($list as $item): ?>
<td class="short"><?php echo h($item['Role']['perm_admin']); ?>&nbsp;</td>
<td class="short"><?php echo h($item['Role']['perm_audit']); ?>&nbsp;</td>
<td class="short"><?php echo h($item['Role']['perm_auth']); ?>&nbsp;</td>
<td class="actions short">
<td class="short action-links">
<?php echo $this->Html->link('', array('admin' => true, 'action' => 'edit', $item['Role']['id']), array('class' => 'icon-edit', 'title' => 'Edit')); ?>
<?php echo $this->Form->postLink('', array('admin' => true, 'action' => 'delete', $item['Role']['id']), array('class' => 'icon-trash', 'title' => 'Delete'), __('Are you sure you want to delete %s?', $item['Role']['name'])); ?>
</td>

View File

@ -46,7 +46,7 @@ foreach ($servers as $server): ?>
endif; ?>
<td class="short"><?php echo $server['Server']['lastpulledid']; ?></td>
<td class="short"><?php echo $server['Server']['lastpushedid']; ?></td>
<td class="actions">
<td class="short action-links">
<?php
if ($server['Server']['pull'] && $me['org'] == 'ADMIN') echo $this->Form->postLink('', array('action' => 'pull', $server['Server']['id'], 'full'), array('class' => 'icon-download', 'title' => 'Pull all'));
if ($server['Server']['push'] && $me['org'] == 'ADMIN') echo $this->Form->postLink('', array('action' => 'push', $server['Server']['id'], 'full'), array('class' => 'icon-upload', 'title' => 'Push all') );

View File

@ -23,7 +23,7 @@ foreach ($users as $user): ?>
<?php echo h($user['User']['org']); ?>&nbsp;</td>
<td class="short" onclick="document.location ='<?php echo $this->Html->url(array('admin' => true, 'action' => 'view', $user['User']['id']), true);?>';">
<?php echo $this->Html->link($user['Role']['name'], array('controller' => 'roles', 'action' => 'view', $user['Role']['id'])); ?></td>
<td class="short" onclick="document.location ='<?php echo $this->Html->url(array('admin' => true, 'action' => 'view', $user['User']['id']), true);?>';">
<td onclick="document.location ='<?php echo $this->Html->url(array('admin' => true, 'action' => 'view', $user['User']['id']), true);?>';">
<?php echo h($user['User']['email']); ?>&nbsp;</td>
<td class="short" onclick="document.location ='<?php echo $this->Html->url(array('admin' => true, 'action' => 'view', $user['User']['id']), true);?>';">
<?php echo $user['User']['autoalert']? 'Yes' : 'No'; ?>&nbsp;</td>
@ -43,7 +43,7 @@ foreach ($users as $user): ?>
?>&nbsp;</td>
<td class="short" onclick="document.location ='<?php echo $this->Html->url(array('admin' => true, 'action' => 'view', $user['User']['id']), true);?>';">
<?php echo h($user['User']['newsread']); ?>&nbsp;</td>
<td class="actions">
<td class="short action-links">
<?php
if (($isAclAdmin && (($user['User']['org'] == $me['org'])) || ('1' == $me['id'])) || ($me['org'] == 'ADMIN')) {
echo $this->Html->link('', array('admin' => true, 'action' => 'edit', $user['User']['id']), array('class' => 'icon-edit', 'title' => 'Edit'));

View File

@ -116,7 +116,7 @@ if (h($user['User']['change_pw']) == 1) {
<td><?php echo h($event['info']);?></td>
<td><?php echo h($event['uuid']);?></td>
<td><?php echo h($event['distribution']);?></td>
<td class="actions">
<td class="short action-links">
<?php if ($mayModify) echo $this->Html->link('', array('controller' => 'events', 'action' => 'edit', $event['id']), array('class' => 'icon-download-alt')); ?>
<?php
if ($mayModify) echo $this->Form->postLink('', array('controller' => 'events', 'action' => 'delete', $event['id']), array('class' => 'icon-trash'), __('Are you sure you want to delete # %s?', $event['id']));

View File

@ -26,7 +26,7 @@ foreach ($list as $item):?>
<tr>
<td class="short"><?php echo h($item['Whitelist']['id']);?>&nbsp;</td>
<td><?php echo h($item['Whitelist']['name']);?>&nbsp;</td>
<td class="actions short">
<td class="short action-links">
<?php echo $this->Html->link('', array('admin' => true, 'action' => 'edit', $item['Whitelist']['id']), array('class' => 'icon-edit', 'title' => 'Edit'));?>
<?php echo $this->Form->postLink('', array('admin' => true, 'action' => 'delete', $item['Whitelist']['id']), array('class' => 'icon-trash', 'title' => 'Delete'), __('Are you sure you want to delete "%s"?', $item['Whitelist']['name']));?>
</td>

View File

@ -217,6 +217,10 @@ th a.desc:after {
content: ' ⇡';
}
td.action-links {
text-align: right;
}
/*
.view_icon{
background-position: 0 0;