wip making UI actions for notes
This commit is contained in:
@@ -2,13 +2,20 @@
|
||||
|
||||
<textarea id="content" name="content" spellcheck="false">@Model.Text</textarea>
|
||||
|
||||
<div class="note-names">
|
||||
@foreach (var note in Model.NoteNames.Order())
|
||||
{
|
||||
var css = note.Equals(Model.CurrentNote, StringComparison.OrdinalIgnoreCase) ? "current" : null;
|
||||
<div class="note-actions">
|
||||
<select id="note-dropdown" class="note-dropdown">
|
||||
@foreach (var note in Model.NoteNames.Order())
|
||||
{
|
||||
var selected = note.Equals(Model.CurrentNote, StringComparison.OrdinalIgnoreCase) ? "selected" : null;
|
||||
<option value="@note" selected="@selected">@note</option>
|
||||
}
|
||||
</select>
|
||||
|
||||
<a href="@note" class="@css">@note</a>
|
||||
}
|
||||
<a asp-action="Delete" asp-controller="Note" asp-route-noteName="@Model.CurrentNote" class="btn btn-danger">Delete</a>
|
||||
<form method="post" class="action-form" asp-action="Create" asp-controller="Note">
|
||||
<input type="text" name="noteName" placeholder="Note name" />
|
||||
<button type="submit" class="btn btn-primary">Create</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="toast" id="saved-indicator">Saved</div>
|
||||
|
Reference in New Issue
Block a user