Fix Formatting + Add No Notifictions Message
This commit is contained in:
parent
99267ac2f0
commit
f6e7460b24
@ -165,116 +165,130 @@ else
|
|||||||
</select>
|
</select>
|
||||||
<br />
|
<br />
|
||||||
<ActionLink Action="Add" Text="Send Notification" Security="SecurityAccessLevel.View" EditMode="false" ResourceKey="SendNotification" />
|
<ActionLink Action="Add" Text="Send Notification" Security="SecurityAccessLevel.View" EditMode="false" ResourceKey="SendNotification" />
|
||||||
<br /><br />
|
<br />
|
||||||
|
<br />
|
||||||
@if (filter == "to")
|
@if (filter == "to")
|
||||||
{
|
{
|
||||||
<Pager Items="@notifications">
|
@if (notifications.Any())
|
||||||
<Header>
|
{
|
||||||
|
<Pager Items="@notifications">
|
||||||
|
<Header>
|
||||||
<th style="width: 1px;"> </th>
|
<th style="width: 1px;"> </th>
|
||||||
<th style="width: 1px;"> </th>
|
<th style="width: 1px;"> </th>
|
||||||
<th>@Localizer["From"]</th>
|
<th>@Localizer["From"]</th>
|
||||||
<th>@Localizer["Subject"]</th>
|
<th>@Localizer["Subject"]</th>
|
||||||
<th>@Localizer["Received"]</th>
|
<th>@Localizer["Received"]</th>
|
||||||
</Header>
|
</Header>
|
||||||
<Row>
|
<Row>
|
||||||
<td><ActionLink Action="View" Parameters="@($"id=" + context.NotificationId.ToString())" Security="SecurityAccessLevel.View" EditMode="false" ResourceKey="ViewNotification" /></td>
|
<td><ActionLink Action="View" Parameters="@($"id=" + context.NotificationId.ToString())" Security="SecurityAccessLevel.View" EditMode="false" ResourceKey="ViewNotification" /></td>
|
||||||
<td><ActionDialog Header="Delete Notification" Message="Are You Sure You Wish To Delete This Notification?" Action="Delete" Security="SecurityAccessLevel.View" Class="btn btn-danger" OnClick="@(async () => await Delete(context))" EditMode="false" ResourceKey="DeleteNotification" /></td>
|
<td><ActionDialog Header="Delete Notification" Message="Are You Sure You Wish To Delete This Notification?" Action="Delete" Security="SecurityAccessLevel.View" Class="btn btn-danger" OnClick="@(async () => await Delete(context))" EditMode="false" ResourceKey="DeleteNotification" /></td>
|
||||||
|
|
||||||
@if (context.IsRead)
|
|
||||||
{
|
|
||||||
<td>@context.FromDisplayName</td>
|
|
||||||
<td>@context.Subject</td>
|
|
||||||
<td>@string.Format("{0:dd-MMM-yyyy HH:mm:ss}", @context.CreatedOn)</td>
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<td><b>@context.FromDisplayName</b></td>
|
|
||||||
<td><b>@context.Subject</b></td>
|
|
||||||
<td><b>@string.Format("{0:dd-MMM-yyyy HH:mm:ss}", @context.CreatedOn)</b></td>
|
|
||||||
}
|
|
||||||
</Row>
|
|
||||||
<Detail>
|
|
||||||
<td colspan="2"></td>
|
|
||||||
<td colspan="3">
|
|
||||||
@{
|
|
||||||
string input = "___";
|
|
||||||
if (context.Body.Contains(input))
|
|
||||||
{
|
|
||||||
context.Body = context.Body.Split(input)[0];
|
|
||||||
context.Body = context.Body.Replace("\n", "");
|
|
||||||
context.Body = context.Body.Replace("\r", "");
|
|
||||||
}
|
|
||||||
notificationSummary = context.Body.Length > 100 ? (context.Body.Substring(0, 97) + "...") : context.Body;
|
|
||||||
}
|
|
||||||
@if (context.IsRead)
|
@if (context.IsRead)
|
||||||
{
|
{
|
||||||
@notificationSummary
|
<td>@context.FromDisplayName</td>
|
||||||
|
<td>@context.Subject</td>
|
||||||
|
<td>@string.Format("{0:dd-MMM-yyyy HH:mm:ss}", @context.CreatedOn)</td>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<b>@notificationSummary</b>
|
<td><b>@context.FromDisplayName</b></td>
|
||||||
|
<td><b>@context.Subject</b></td>
|
||||||
|
<td><b>@string.Format("{0:dd-MMM-yyyy HH:mm:ss}", @context.CreatedOn)</b></td>
|
||||||
}
|
}
|
||||||
</td>
|
</Row>
|
||||||
</Detail>
|
<Detail>
|
||||||
</Pager>
|
<td colspan="2"></td>
|
||||||
|
<td colspan="3">
|
||||||
|
@{
|
||||||
|
string input = "___";
|
||||||
|
if (context.Body.Contains(input))
|
||||||
|
{
|
||||||
|
context.Body = context.Body.Split(input)[0];
|
||||||
|
context.Body = context.Body.Replace("\n", "");
|
||||||
|
context.Body = context.Body.Replace("\r", "");
|
||||||
|
}
|
||||||
|
notificationSummary = context.Body.Length > 100 ? (context.Body.Substring(0, 97) + "...") : context.Body;
|
||||||
|
}
|
||||||
|
@if (context.IsRead)
|
||||||
|
{
|
||||||
|
@notificationSummary
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<b>@notificationSummary</b>
|
||||||
|
}
|
||||||
|
</td>
|
||||||
|
</Detail>
|
||||||
|
</Pager>
|
||||||
|
<br />
|
||||||
|
<ActionDialog Header="Clear Notifications" Message="Are You Sure You Wish To Permanently Delete All Notifications ?" Action="Delete All Notifications" Security="SecurityAccessLevel.Admin" Class="btn btn-danger" OnClick="@(async () => await DeleteAllNotifications())" ResourceKey="DeleteAllNotifications" />
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<b>You have not received any notifications.</b>
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<Pager Items="@notifications">
|
@if (notifications.Any())
|
||||||
<Header>
|
{
|
||||||
<th> </th>
|
<Pager Items="@notifications">
|
||||||
<th> </th>
|
<Header>
|
||||||
|
<th style="width: 1px;"></th>
|
||||||
|
<th style="width: 1px;"></th>
|
||||||
<th>@Localizer["To"]</th>
|
<th>@Localizer["To"]</th>
|
||||||
<th>@Localizer["Subject"]</th>
|
<th>@Localizer["Subject"]</th>
|
||||||
<th>@Localizer["Sent"]</th>
|
<th>@Localizer["Sent"]</th>
|
||||||
</Header>
|
</Header>
|
||||||
<Row>
|
<Row>
|
||||||
<td><ActionLink Action="View" Parameters="@($"id=" + context.NotificationId.ToString())" Security="SecurityAccessLevel.View" EditMode="false" ResourceKey="ViewNotification" /></td>
|
<td><ActionLink Action="View" Parameters="@($"id=" + context.NotificationId.ToString())" Security="SecurityAccessLevel.View" EditMode="false" ResourceKey="ViewNotification" /></td>
|
||||||
<td><ActionDialog Header="Delete Notification" Message="Are You Sure You Wish To Delete This Notification?" Action="Delete" Security="SecurityAccessLevel.View" Class="btn btn-danger" OnClick="@(async () => await Delete(context))" EditMode="false" ResourceKey="DeleteNotification" /></td>
|
<td><ActionDialog Header="Delete Notification" Message="Are You Sure You Wish To Delete This Notification?" Action="Delete" Security="SecurityAccessLevel.View" Class="btn btn-danger" OnClick="@(async () => await Delete(context))" EditMode="false" ResourceKey="DeleteNotification" /></td>
|
||||||
|
|
||||||
@if (context.IsRead)
|
|
||||||
{
|
|
||||||
<td>@context.ToDisplayName</td>
|
|
||||||
<td>@context.Subject</td>
|
|
||||||
<td>@string.Format("{0:dd-MMM-yyyy HH:mm:ss}", @context.CreatedOn)</td>
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<td><b>@context.ToDisplayName</b></td>
|
|
||||||
<td><b>@context.Subject</b></td>
|
|
||||||
<td><b>@string.Format("{0:dd-MMM-yyyy HH:mm:ss}", @context.CreatedOn)</b></td>
|
|
||||||
}
|
|
||||||
|
|
||||||
</Row>
|
|
||||||
<Detail>
|
|
||||||
<td colspan="2"></td>
|
|
||||||
<td colspan="3">
|
|
||||||
@{
|
|
||||||
string input = "___";
|
|
||||||
if (context.Body.Contains(input))
|
|
||||||
{
|
|
||||||
context.Body = context.Body.Split(input)[0];
|
|
||||||
context.Body = context.Body.Replace("\n", "");
|
|
||||||
context.Body = context.Body.Replace("\r", "");
|
|
||||||
}
|
|
||||||
notificationSummary = context.Body.Length > 100 ? (context.Body.Substring(0, 97) + "...") : context.Body;
|
|
||||||
}
|
|
||||||
@if (context.IsRead)
|
@if (context.IsRead)
|
||||||
{
|
{
|
||||||
@notificationSummary
|
<td>@context.ToDisplayName</td>
|
||||||
|
<td>@context.Subject</td>
|
||||||
|
<td>@string.Format("{0:dd-MMM-yyyy HH:mm:ss}", @context.CreatedOn)</td>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<b>@notificationSummary</b>
|
<td><b>@context.ToDisplayName</b></td>
|
||||||
|
<td><b>@context.Subject</b></td>
|
||||||
|
<td><b>@string.Format("{0:dd-MMM-yyyy HH:mm:ss}", @context.CreatedOn)</b></td>
|
||||||
}
|
}
|
||||||
</td>
|
|
||||||
</Detail>
|
</Row>
|
||||||
</Pager>
|
<Detail>
|
||||||
}
|
<td colspan="2"></td>
|
||||||
@if (notifications.Any())
|
<td colspan="3">
|
||||||
{
|
@{
|
||||||
<br />
|
string input = "___";
|
||||||
<ActionDialog Header="Clear Notifications" Message="Are You Sure You Wish To Permanently Delete All Notifications ?" Action="Delete All Notifications" Security="SecurityAccessLevel.Admin" Class="btn btn-danger" OnClick="@(async () => await DeleteAllNotifications())" ResourceKey="DeleteAllNotifications" />
|
if (context.Body.Contains(input))
|
||||||
|
{
|
||||||
|
context.Body = context.Body.Split(input)[0];
|
||||||
|
context.Body = context.Body.Replace("\n", "");
|
||||||
|
context.Body = context.Body.Replace("\r", "");
|
||||||
|
}
|
||||||
|
notificationSummary = context.Body.Length > 100 ? (context.Body.Substring(0, 97) + "...") : context.Body;
|
||||||
|
}
|
||||||
|
@if (context.IsRead)
|
||||||
|
{
|
||||||
|
@notificationSummary
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<b>@notificationSummary</b>
|
||||||
|
}
|
||||||
|
</td>
|
||||||
|
</Detail>
|
||||||
|
</Pager>
|
||||||
|
<br />
|
||||||
|
<ActionDialog Header="Clear Notifications" Message="Are You Sure You Wish To Permanently Delete All Notifications ?" Action="Delete All Notifications" Security="SecurityAccessLevel.Admin" Class="btn btn-danger" OnClick="@(async () => await DeleteAllNotifications())" ResourceKey="DeleteAllNotifications" />
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<b>You have not sent any notifications.</b>
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user