function tp_author_notification($value, $row, $table, &$info) { global $GUI; try { $author = Employee::find($row['author_id']); $icon = '<div>'; $icon .= $GUI->getIcon("?section=ord&subsection=2&order=" . $row['id'] . "&p=7&t=1", "msg", "Отправить напоминание"); $icon .= '<span style="color:blue; position: relative; top: -2px;left:5px;">' . count(AuthorNotification::findBy(array('author_id' => $author['id'], 'order_id' => $row['id'], 'type' => 1))) . '</span>'; $icon .= '</div>'; $icon .= '<div>'; $icon .= $GUI->getIcon("?section=ord&subsection=2&order=" . $row['id'] . "&p=7&t=2", "msg_red", "Отправить гневное напоминание"); $icon .= '<span style="color:red; position: relative; top: -2px;left:5px;">' . count(AuthorNotification::findBy(array('author_id' => $author['id'], 'order_id' => $row['id'], 'type' => 2))) . '</span>'; $icon .= '</div>'; } catch (Exception $e) { $icon = '<div style="height: 20px;"></div>'; } $offers_qt = ''; if (!empty($row['manager_id']) && !empty($row['status_id'])) { $offers_qt = count(AuthorOffer::findBy(array('order_id' => $row['id']))); } return $icon . '<span style="color:red; position: relative; top: -26px;left:50px;">' . $offers_qt . '</span>'; }