-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backoffice : interface pour les notifications pour les contacts (#4080)
* Backoffice : interface pour les notifications pour les contacts * Use typed_schema * Ignore Dialyzer error
- Loading branch information
1 parent
e1fc240
commit ed30c0d
Showing
8 changed files
with
136 additions
and
4 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
33 changes: 33 additions & 0 deletions
33
apps/transport/lib/transport_web/templates/backoffice/contact/_notifications.html.heex
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<div :if={!@creating_contact} class="panel" id="notifications"> | ||
<h2>Notifications reçues</h2> | ||
|
||
<p :if={Enum.empty?(@notifications)} class="notification"> | ||
Pas de notifications reçues pour le moment. | ||
</p> | ||
|
||
<table :if={Enum.count(@notifications) > 0} class="table dashboard-description"> | ||
<tr> | ||
<th><%= dgettext("backoffice", "Role") %></th> | ||
<th><%= dgettext("backoffice", "Notification reason") %></th> | ||
<th><%= dgettext("backoffice", "Dataset") %></th> | ||
<th><%= dgettext("backoffice", "Datetime") %></th> | ||
</tr> | ||
<%= for notification <- @notifications do %> | ||
<tr> | ||
<td><span class={role_class(notification)}><%= notification.role %></span></td> | ||
<td lang="en"><%= notification.reason %></td> | ||
<td :if={is_nil(notification.dataset_id)}>-</td> | ||
<td :if={!is_nil(notification.dataset_id)}> | ||
<a href={dataset_path(@conn, :details, notification.dataset.slug)} target="_blank"> | ||
<i class="fa fa-external-link-alt" aria-hidden="true"></i> | ||
<%= notification.dataset.custom_title %> | ||
</a> | ||
</td> | ||
<td><%= Shared.DateTimeDisplay.format_datetime_to_paris(notification.inserted_at, "fr") %></td> | ||
</tr> | ||
<% end %> | ||
</table> | ||
<p class="small"> | ||
Liste les notifications reçues au cours des <%= @notifications_months_limit %> derniers mois. | ||
</p> | ||
</div> |
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