mirror of https://github.com/MISP/MISP
chg: [analyst-notes:ui] Few improvements
parent
959ffa5196
commit
0d61abd4e8
|
@ -5,8 +5,7 @@ $URL_ADD = '/analyst-notes/add/';
|
||||||
$URL_EDIT = '/analyst-notes/edit/';
|
$URL_EDIT = '/analyst-notes/edit/';
|
||||||
$URL_DELETE = '/analyst-notes/delete/';
|
$URL_DELETE = '/analyst-notes/delete/';
|
||||||
|
|
||||||
$uuid = $event['Event']['uuid'];
|
$object_uuid = 'bf74e1a4-99c2-4fcb-8a5d-a71118effd1a'; // e.g. $event['Event']['uuid']
|
||||||
$object_uuid = 'bf74e1a4-99c2-4fcb-8a5d-a71118effd1a';
|
|
||||||
$object_type = 'event';
|
$object_type = 'event';
|
||||||
$notes = [
|
$notes = [
|
||||||
[
|
[
|
||||||
|
@ -135,8 +134,8 @@ $noteCount = countNotes($notes);
|
||||||
<?php if (empty($notes)): ?>
|
<?php if (empty($notes)): ?>
|
||||||
<i class="<?= $this->FontAwesome->getClass('sticky-note') ?> useCursorPointer" onclick="openNotes(this)" title="<?= __('Notes and opinions for this UUID') ?>"></i>
|
<i class="<?= $this->FontAwesome->getClass('sticky-note') ?> useCursorPointer" onclick="openNotes(this)" title="<?= __('Notes and opinions for this UUID') ?>"></i>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<span class="label label-info" title="<?= __n('This UUID has %s note', 'This UUID has %s notes', $noteCount, $noteCount) ?>">
|
<span class="label label-info useCursorPointer" onclick="openNotes(this)" >
|
||||||
<i class="<?= $this->FontAwesome->getClass('sticky-note') ?> useCursorPointer" onclick="openNotes(this)" title="<?= __('Notes and opinions for this UUID') ?>"></i>
|
<i class="<?= $this->FontAwesome->getClass('sticky-note') ?> useCursorPointer" title="<?= __('Notes and opinions for this UUID') ?>"></i>
|
||||||
<?= $noteCount; ?>
|
<?= $noteCount; ?>
|
||||||
</span>
|
</span>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
@ -221,7 +220,7 @@ $noteCount = countNotes($notes);
|
||||||
{{=it.notes_html}} \
|
{{=it.notes_html}} \
|
||||||
</div> \
|
</div> \
|
||||||
')
|
')
|
||||||
var addNoteButton = '<button class="btn btn-small btn-block btn-primary" type="button" onclick="createNewNote(this, \'<?= $object_type ?>\', \'<?= $uuid ?>\')"> \
|
var addNoteButton = '<button class="btn btn-small btn-block btn-primary" type="button" onclick="createNewNote(this, \'<?= $object_type ?>\', \'<?= $object_uuid ?>\')"> \
|
||||||
<i class="<?= $this->FontAwesome->getClass('plus') ?>"></i> <?= 'Add a note' ?> \
|
<i class="<?= $this->FontAwesome->getClass('plus') ?>"></i> <?= 'Add a note' ?> \
|
||||||
</button>'
|
</button>'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue