ordered Discord channels in Channel select
This commit is contained in:
parent
63d59273a6
commit
3d72cf2d29
4 changed files with 7 additions and 4 deletions
|
@ -21,7 +21,7 @@
|
||||||
@{
|
@{
|
||||||
List<DiscordChannel> channels = _discordServers.FirstOrDefault(s => s.Id == _serverId, new DiscordServer()).Channels;
|
List<DiscordChannel> channels = _discordServers.FirstOrDefault(s => s.Id == _serverId, new DiscordServer()).Channels;
|
||||||
<option value="0">No Server Logs</option>
|
<option value="0">No Server Logs</option>
|
||||||
@foreach(DiscordChannel item in channels)
|
@foreach(DiscordChannel item in channels.OrderBy(c => c.Name))
|
||||||
{
|
{
|
||||||
<option value="@item.Id">@item.Name</option>
|
<option value="@item.Id">@item.Name</option>
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,8 @@
|
||||||
@if(message.DiscordGuildId > 0)
|
@if(message.DiscordGuildId > 0)
|
||||||
{
|
{
|
||||||
List<DiscordChannel> channels = _discordServers.Where(s => s.Id == message.DiscordGuildId).FirstOrDefault(new DiscordServer()).Channels;
|
List<DiscordChannel> channels = _discordServers.Where(s => s.Id == message.DiscordGuildId).FirstOrDefault(new DiscordServer()).Channels;
|
||||||
@foreach(DiscordChannel item in channels)
|
<option value="0">Please choose a channel.</option>
|
||||||
|
@foreach(DiscordChannel item in channels.OrderBy(c => c.Name))
|
||||||
{
|
{
|
||||||
<option value="@item.Id">@item.Name</option>
|
<option value="@item.Id">@item.Name</option>
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,7 +81,8 @@
|
||||||
@if(reminder.DiscordServerId > 0)
|
@if(reminder.DiscordServerId > 0)
|
||||||
{
|
{
|
||||||
List<DiscordChannel> channels = _discordServers.Where(s => s.Id == reminder.DiscordServerId).FirstOrDefault(new DiscordServer()).Channels;
|
List<DiscordChannel> channels = _discordServers.Where(s => s.Id == reminder.DiscordServerId).FirstOrDefault(new DiscordServer()).Channels;
|
||||||
@foreach(DiscordChannel item in channels)
|
<option value="0">Please choose a channel.</option>
|
||||||
|
@foreach(DiscordChannel item in channels.OrderBy(c => c.Name))
|
||||||
{
|
{
|
||||||
<option value="@item.Id">@item.Name</option>
|
<option value="@item.Id">@item.Name</option>
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,7 +88,8 @@
|
||||||
@if(reminder.DiscordServerId > 0)
|
@if(reminder.DiscordServerId > 0)
|
||||||
{
|
{
|
||||||
List<DiscordChannel> channels = _discordServers.Where(s => s.Id == reminder.DiscordServerId).FirstOrDefault(new DiscordServer()).Channels;
|
List<DiscordChannel> channels = _discordServers.Where(s => s.Id == reminder.DiscordServerId).FirstOrDefault(new DiscordServer()).Channels;
|
||||||
@foreach(DiscordChannel item in channels)
|
<option value="0">Please choose a channel.</option>
|
||||||
|
@foreach(DiscordChannel item in channels.OrderBy(c => c.Name))
|
||||||
{
|
{
|
||||||
<option value="@item.Id">@item.Name</option>
|
<option value="@item.Id">@item.Name</option>
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue