Merge pull request #35 from oqtane/master

sync
This commit is contained in:
Shaun Walker 2020-06-12 09:41:19 -04:00 committed by GitHub
commit 134f21e29c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 90 additions and 30 deletions

View File

@ -126,7 +126,16 @@ else
</Row> </Row>
<Detail> <Detail>
<td colspan="2"></td> <td colspan="2"></td>
<td colspan="3">@(context.Body.Length > 100 ? context.Body.Substring(0, 100) : context.Body)</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", "");
} }
@(context.Body.Length > 100 ? (context.Body.Substring(0, 97) + "...") : context.Body)
</td>
</Detail> </Detail>
</Pager> </Pager>
} }
@ -149,7 +158,16 @@ else
</Row> </Row>
<Detail> <Detail>
<td colspan="2"></td> <td colspan="2"></td>
<td colspan="3">@(context.Body.Length > 100 ? context.Body.Substring(0, 100) : context.Body)</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", "");
} }
@(context.Body.Length > 100 ? (context.Body.Substring(0, 97) + "...") : context.Body)
</td>
</Detail> </Detail>
</Pager> </Pager>
} }

View File

@ -9,56 +9,94 @@
<table class="table table-borderless"> <table class="table table-borderless">
<tr> <tr>
<td> <td>
<label class="control-label">@title: </label> <label class="control-label">@title: </label>
</td>
<td>
<input class="form-control" @bind="@username" />
</td> </td>
@if (title == "From")
{
<td>
<input class="form-control" @bind="@username" readonly />
</td>
}
@if (title == "To")
{
<td>
<input class="form-control" @bind="@username" />
</td>
}
</tr> </tr>
<tr> <tr>
<td> <td>
<label class="control-label">Subject: </label> <label class="control-label">Subject: </label>
</td>
<td>
<input class="form-control" @bind="@subject" />
</td> </td>
@if (title == "From")
{
<td>
<input class="form-control" @bind="@subject" readonly />
</td>
}
@if (title == "To")
{
<td>
<input class="form-control" @bind="@subject" />
</td>
}
</tr> </tr>
@if (title == "From") @if (title == "From")
{ {
<tr> <tr>
<td> <td>
<label class="control-label">Date: </label> <label class="control-label">Date: </label>
</td> </td>
<td> <td>
<input class="form-control" @bind="@createdon" /> <input class="form-control" @bind="@createdon" readonly />
</td> </td>
</tr> </tr>
} }
<tr> @if (title == "From")
<td> {
<label class="control-label">Message: </label> <tr>
</td> <td>
<td> <label class="control-label">Message: </label>
<textarea class="form-control" @bind="@body" rows="5" /> </td>
</td> <td>
</tr> <textarea class="form-control" @bind="@body" rows="5" readonly />
</td>
</tr>
}
@if (title == "To")
{
<tr>
<td>
<label class="control-label">Message: </label>
</td>
<td>
<textarea class="form-control" @bind="@body" rows="5" />
</td>
</tr>
}
</table> </table>
@if (reply != string.Empty) @if (reply != string.Empty)
{ {
<button type="button" class="btn btn-primary" @onclick="Send">Send</button> <button type="button" class="btn btn-primary" @onclick="Send">Send</button> }
}
else else
{ {
if (title == "From") if (title == "From")
{ {
<button type="button" class="btn btn-primary" @onclick="Reply">Reply</button> <button type="button" class="btn btn-primary" @onclick="Reply">Reply</button>}
}
} }
<NavLink class="btn btn-secondary" href="@NavigateUrl()">Cancel</NavLink> <NavLink class="btn btn-secondary" href="@NavigateUrl()">Cancel</NavLink>
<br /> <br />
<br /> <br />
<p>@reply</p> @if (title == "To")
} {
<div class="control-group">
<label class="control-label">Original Message </label>
<textarea class="form-control" @bind="@reply" rows="5" readonly />
</div>
}
}
@code { @code {
private int notificationid; private int notificationid;
@ -124,8 +162,12 @@
private void Reply() private void Reply()
{ {
title = "To"; title = "To";
subject = "RE: " + subject; if (!subject.Contains("RE:"))
{
subject = "RE: " + subject;
}
reply = body; reply = body;
body = "\n\n____________________________________________\nSent: " + createdon + "\nSubject: " + subject + "\n\n" + body;
StateHasChanged(); StateHasChanged();
} }
@ -165,5 +207,5 @@
AddModuleMessage("Error Adding Notification", MessageType.Error); AddModuleMessage("Error Adding Notification", MessageType.Error);
} }
} }
} }

View File

@ -9,7 +9,7 @@ Please note that this project is owned by the .NET Foundation and is governed by
**To get started with Oqtane:** **To get started with Oqtane:**
1.&nbsp;Install **[.NET Core 3.2 SDK (v3.1.300)](https://dotnet.microsoft.com/download/dotnet-core/thank-you/sdk-3.1.300-windows-x64-installer)**. 1.&nbsp;Install **[.NET Core 3.1 SDK (v3.1.300)](https://dotnet.microsoft.com/download/dotnet-core/thank-you/sdk-3.1.300-windows-x64-installer)**.
2.&nbsp;Install the Preview edition of [Visual Studio 2019](https://visualstudio.microsoft.com/vs/preview/) (version 16.6 or higher) with the **ASP.NET and web development** workload enabled. Oqtane works with all editions of Visual Studio from Community to Enterprise. If you do not have a SQL Server installation available already and you wish to use LocalDB for development, you must also install the **.NET desktop development workload**. 2.&nbsp;Install the Preview edition of [Visual Studio 2019](https://visualstudio.microsoft.com/vs/preview/) (version 16.6 or higher) with the **ASP.NET and web development** workload enabled. Oqtane works with all editions of Visual Studio from Community to Enterprise. If you do not have a SQL Server installation available already and you wish to use LocalDB for development, you must also install the **.NET desktop development workload**.