Compare commits

..

No commits in common. "c0cfa90874cf5a3d9963793b0cff0fb80040446c" and "4c06a744109cb9b1a1052ad265d1ee95cc7a1da0" have entirely different histories.

3 changed files with 9 additions and 45 deletions

View File

@ -1,6 +1,5 @@
using System.ComponentModel;
using System.Diagnostics;
using System.Text;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using vassago.Models;
@ -45,25 +44,6 @@ public class ChannelsController : Controller
ViewData["breadcrumbs"];
walker = walker.ParentChannel;
}
var sb = new StringBuilder();
sb.Append("[");
sb.Append("{text: \"channels\", nodes: [");
var first=true;
foreach(var subChannel in channel.SubChannels)
{
if(!first)
{
sb.Append(',');
}
else
{
first = false;
}
sb.Append($"{{\"text\": \"<a href=\\\"{Url.ActionLink(action: "Details", controller: "Channels", values: new {id = subChannel.Id})}\\\">{subChannel.DisplayName}</a>\"");
}
sb.Append("]");
ViewData.Add("channelsTree", sb.ToString());
return View(
new Tuple<Channel, Enumerations.LewdnessFilterLevel, Enumerations.MeannessFilterLevel>(
channel, channel.EffectivePermissions.LewdnessFilterLevel, channel.EffectivePermissions.MeannessFilterLevel

View File

@ -7,7 +7,7 @@
var IfInheritedMeannessFilterLevel = Model.Item3;
}
<a href="/">home</a>/
@Html.Raw(ViewData["breadcrumbs"])
<table class="table">
@ -78,16 +78,7 @@
</tr>
<tr>
<th scope="row">Sub Channels</th>
<td>
@if((ThisChannel.SubChannels?.Count ?? 0) > 0)
{
@Html.Raw("<div id=\"channelsTree\"></div>");
}
else
{
@Html.Raw("0")
}
</td>
<td>@(ThisChannel.SubChannels?.Count ?? 0)</td>
</tr>
<tr>
<th scope="row">Accounts</th>
@ -96,6 +87,7 @@
</tbody>
</table>
@section Scripts{
<script type="text/javascript">
@{
@ -117,15 +109,12 @@
console.log(channelNow);
return channelNow;
}
@if((ThisChannel.SubChannels?.Count ?? 0) > 0)
{
/*
function channelsTree() {
function getTree() {
var tree = @Html.Raw(ViewData["treeString"]);
console.log(tree);
return tree;
}
$('#channelsTree').bstreeview({ data: channelsTree() });
*/
}
$('#tree').bstreeview({ data: getTree() });
</script>
}

View File

@ -24,11 +24,6 @@ case "$1" in
dotnet ef database update --connection "$connnectionstr"
;;
"db-fullreset")
sudo -u postgres psql -c "drop database ${servicename}_dev;"
sudo -u postgres psql -c "delete user $servicename"
$0 "initial"
;;
*)
echo "Unknown command '$1', try 'initial'"
;;