Skip to content

Commit

Permalink
Make rotation editable by clicking on the title in the sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
sukhwinder33445 committed Mar 3, 2025
1 parent 928d2a2 commit f000268
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
6 changes: 5 additions & 1 deletion library/Notifications/Widget/Timeline.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
use ipl\Web\Style;
use ipl\Web\Url;
use ipl\Web\Widget\Icon;
use ipl\Web\Widget\Link;
use SplObjectStorage;
use Traversable;

Expand Down Expand Up @@ -281,7 +282,10 @@ protected function assembleSidebarEntry(Rotation $rotation): BaseHtmlElement
$entry->addHtml(
$form,
new Icon('bars', ['data-drag-initiator' => true]),
new HtmlElement('span', null, Text::create($rotation->getName()))
(new Link(
[new HtmlElement('span', null, Text::create($rotation->getName())), new Icon('cog')],
Links::rotationSettings($rotation->getId(), $rotation->getScheduleId())
))->openInModal()
);

return $entry;
Expand Down
30 changes: 30 additions & 0 deletions public/css/timeline.less
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,20 @@
margin-left: .5em;
.text-ellipsis();
}

> a {
display: flex;
width: 100%;
align-items: baseline;
margin-left: .5em;

span {
width: 0;
flex: 1 0 auto;
margin-right: 0.25em;
.text-ellipsis();
}
}
}

.overlay .entry {
Expand Down Expand Up @@ -98,6 +112,22 @@
&.sortable-ghost {
opacity: .5;
}

> a {
text-decoration: none;

i {
display: none;
}

&:hover {
color: @list-item-title-hover-color;

i {
display: inline-block;
}
}
}
}

.entry .icon {
Expand Down

0 comments on commit f000268

Please sign in to comment.