Skip to content

Commit

Permalink
ContactListItem: Drop channel indicator (#285)
Browse files Browse the repository at this point in the history
resolves #266
  • Loading branch information
sukhwinder33445 authored Feb 26, 2025
2 parents fb6b06c + dc42339 commit 364c47d
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 110 deletions.
4 changes: 1 addition & 3 deletions application/controllers/ContactsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
use ipl\Web\Control\LimitControl;
use ipl\Web\Control\SortControl;
use ipl\Web\Filter\QueryString;
use ipl\Web\Url;
use ipl\Web\Widget\ButtonLink;
use ipl\Html\ValidHtml;

Expand All @@ -42,8 +41,7 @@ public function init()

public function indexAction()
{
$contacts = Contact::on($this->db)
->withColumns('has_email');
$contacts = Contact::on($this->db);

$limitControl = $this->createLimitControl();
$paginationControl = $this->createPaginationControl($contacts);
Expand Down
93 changes: 0 additions & 93 deletions library/Notifications/Model/Behavior/HasAddress.php

This file was deleted.

2 changes: 0 additions & 2 deletions library/Notifications/Model/Contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

use DateTime;
use ipl\Orm\Behavior\BoolCast;
use Icinga\Module\Notifications\Model\Behavior\HasAddress;
use ipl\Orm\Behavior\MillisecondTimestamp;
use ipl\Orm\Behaviors;
use ipl\Orm\Model;
Expand Down Expand Up @@ -70,7 +69,6 @@ public function getSearchColumns(): array

public function createBehaviors(Behaviors $behaviors): void
{
$behaviors->add(new HasAddress());
$behaviors->add(new MillisecondTimestamp(['changed_at']));
$behaviors->add(new BoolCast(['deleted']));
}
Expand Down
12 changes: 0 additions & 12 deletions library/Notifications/Widget/ItemList/ContactListItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
use ipl\Html\Text;
use ipl\Web\Common\BaseListItem;
use ipl\Web\Url;
use ipl\Web\Widget\Icon;
use ipl\Web\Widget\Link;

/**
Expand Down Expand Up @@ -40,17 +39,6 @@ protected function assembleVisual(BaseHtmlElement $visual): void
));
}

protected function assembleFooter(BaseHtmlElement $footer): void
{
$contactIcons = new HtmlElement('div', Attributes::create(['class' => 'contact-icons']));

if (isset($this->item->has_email) && $this->item->has_email) {
$contactIcons->addHtml(new Icon('at'));
}

$footer->addHtml($contactIcons);
}

protected function assembleTitle(BaseHtmlElement $title): void
{
$title->addHtml(new Link(
Expand Down

0 comments on commit 364c47d

Please sign in to comment.