Skip to content
Snippets Groups Projects
Commit ba3334ea authored by Jared Hancock's avatar Jared Hancock
Browse files

notes: Add icon to indicate type of note

parent 1c9a87e5
No related branches found
No related tags found
No related merge requests found
...@@ -52,6 +52,19 @@ class QuickNote extends QuickNoteModel { ...@@ -52,6 +52,19 @@ class QuickNote extends QuickNoteModel {
return static::$types[$this->ext_id[0]]; return static::$types[$this->ext_id[0]];
} }
function getExtIconClass() {
switch ($this->ext_id[0]) {
case 'U':
return 'user';
case 'O':
return 'building';
}
}
function getIconTitle() {
return sprintf("%s Note", static::$types[$this->ext_id[0]]);
}
static function forUser($user, $org=false) { static function forUser($user, $org=false) {
if ($org) if ($org)
return static::objects()->filter(array('ext_id__in' => return static::objects()->filter(array('ext_id__in' =>
......
<div class="quicknote" data-id="<?php echo $note->id; ?>"> <div class="quicknote" data-id="<?php echo $note->id; ?>">
<div class="header"> <div class="header">
<div class="header-left"> <div class="header-left">
<i class="note-type icon-<?php echo $note->getExtIconClass(); ?>"i
title="<?php echo $note->getIconTitle(); ?>"></i>&nbsp;
<?php echo $note->getFormattedTime(); ?> <?php echo $note->getFormattedTime(); ?>
</div> </div>
<div class="header-right"> <div class="header-right">
<?php <?php
echo $note->getStaff()->getName(); echo $note->getStaff()->getName();
if ($ext_id && $note->ext_id != $ext_id) { ?>
<span class="label label-info"><?php echo $note->getExtType(); ?></span>
<?php }
if (isset($show_options) && $show_options) { ?> if (isset($show_options) && $show_options) { ?>
<div class="options"> <div class="options">
<a href="#" class="action edit-note no-pjax" title="edit"><i class="icon-pencil"></i></a> <a href="#" class="action edit-note no-pjax" title="edit"><i class="icon-pencil"></i></a>
......
...@@ -1666,8 +1666,8 @@ tr.disabled th { ...@@ -1666,8 +1666,8 @@ tr.disabled th {
} }
.quicknote .header .options { .quicknote .header .options {
display: inline-block; display: inline-block;
padding-left: 5px; padding-left: 10px;
margin-left: 10px; margin-left: 5px;
white-space: nowrap; white-space: nowrap;
border-left: 1px solid rgba(0,0,0,0.2); border-left: 1px solid rgba(0,0,0,0.2);
} }
...@@ -1732,6 +1732,13 @@ tr.disabled th { ...@@ -1732,6 +1732,13 @@ tr.disabled th {
padding-right: 5px; padding-right: 5px;
} }
i.note-type {
color: #2a67ac;
opacity: 0.8;
border-right: 1px solid rgba(0, 0, 0, 0.2);
padding-right: 8px;
}
table.custom-info th { table.custom-info th {
background: transparent; background: transparent;
border: none; border: none;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment