-
-
Notifications
You must be signed in to change notification settings - Fork 550
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] announcement: Migration to 17.0
TT50049
- Loading branch information
1 parent
3dbe4f0
commit 2577de3
Showing
8 changed files
with
64 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
93 changes: 39 additions & 54 deletions
93
announcement/static/src/js/announcement_menu/announcement_menu.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,56 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<templates> | ||
<t t-name="announcement.AnnouncementMenu" owl="1"> | ||
<div class="o_ActivityMenuView dropdown" t-ref="root"> | ||
<a | ||
class="o_ActivityMenuView_dropdownToggle dropdown-toggle o-no-caret o-dropdown--narrow" | ||
t-att-aria-expanded="announcementMenuView.isOpen ? 'true' : 'false'" | ||
title="Announcements" | ||
href="#" | ||
role="button" | ||
t-on-click="onClickDropdownToggle" | ||
> | ||
<i | ||
class="fa fa-lg fa-bullhorn" | ||
role="img" | ||
aria-label="Announcements" | ||
/> <span | ||
t-if="announcements.count > 0" | ||
class="badge bg-warning" | ||
t-out="announcements.count" | ||
/> | ||
</a> | ||
<div | ||
t-if="announcementMenuView.isOpen" | ||
class="o_ActivityMenuView_dropdownMenu o-dropdown-menu dropdown-menu-end show bg-view" | ||
role="menu" | ||
> | ||
<div class="o_ActivityMenuView_activityGroups"> | ||
<t t-if="announcements.count > 0"> | ||
<t t-name="announcement.AnnouncementMenu"> | ||
<Dropdown | ||
position="'bottom-end'" | ||
autoOpen="false" | ||
menuClass="discussSystray.menuClass" | ||
class="discussSystray.class" | ||
> | ||
<t t-set-slot="toggler"> | ||
<i class="fa fa-lg fa-bullhorn" role="img" aria-label="Announcements" /> | ||
<span | ||
t-if="announcements.count" | ||
class="o-mail-ActivityMenu-counter badge rounded-pill bg-warning" | ||
><t t-esc="announcements.count" /></span> | ||
</t> | ||
<t t-set-slot="default"> | ||
<div t-att-class="`${discussSystray.contentClass} o-mail-ActivityMenu`"> | ||
<div | ||
t-if="announcements.count === 0" | ||
class="o-mail-ActivityMenu-empty align-items-center text-muted p-2 opacity-50 d-flex justify-content-center" | ||
> | ||
<span>No announcements.</span> | ||
</div> | ||
<div | ||
class="d-flex flex-column list-group-flush" | ||
name="activityGroups" | ||
> | ||
<t | ||
t-foreach="announcements.data" | ||
t-as="announcement" | ||
t-key="announcement.id" | ||
> | ||
<div | ||
class="o_ActivityMenuView_activityGroup" | ||
class="o-mail-ActivityGroup list-group-item list-group-item-action d-flex p-2 cursor-pointer" | ||
t-on-click="() => this.openAnnouncement(announcement)" | ||
> | ||
<div | ||
class="o_ActivityMenuView_activityGroupIconContainer" | ||
> | ||
<img | ||
src="/announcement/static/description/icon.png" | ||
alt="Announcement" | ||
<img | ||
alt="Announcement" | ||
src="/announcement/static/description/icon.png" | ||
/> | ||
<div class="flex-grow-1 overflow-hidden"> | ||
<div | ||
class="d-flex px-2" | ||
name="activityTitle" | ||
t-out="announcement.name" | ||
/> | ||
</div> | ||
<div class="o_ActivityMenuView_activityGroupInfo"> | ||
<div class="o_ActivityMenuView_activityGroupTitle"> | ||
<span | ||
class="o_ActivityMenuView_activityGroupName" | ||
> | ||
<t t-esc="announcement.name" /> | ||
</span> | ||
</div> | ||
</div> | ||
</div> | ||
</t> | ||
</t> | ||
<t t-else=""> | ||
<div | ||
class="o_ActivityMenuView_noActivity dropdown-item-text text-center d-flex justify-content-center" | ||
> | ||
<span>No announcements.</span> | ||
</div> | ||
</t> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</t> | ||
</Dropdown> | ||
</t> | ||
</templates> | ||
<!-- --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters