Permalink
Browse files

updated Websilk to use Datasilk Core 0.7.8

  • Loading branch information...
markentingh committed Jan 17, 2018
1 parent 420b9bb commit fd23b6f88ebf344790a4259e47318ad605e8054e
View
@@ -1,6 +1,6 @@
namespace Websilk
{
public class Page : global::Page
public class Page : Datasilk.Page
{
public User User;
public Website website = new Website();
@@ -50,8 +50,8 @@ public override string Render(string[] path, string body = "", object metadata =
AddScript("js/pages/dashboard/dashboard.js");
//load the dashboard layout
var scaffold = new Scaffold(S, "/Pages/Dashboard/dashboard.html");
var scaffMenu = new Scaffold(S, "/Pages/Dashboard/menu-item.html");
var scaffold = new Scaffold("/Pages/Dashboard/dashboard.html");
var scaffMenu = new Scaffold("/Pages/Dashboard/menu-item.html");
//load user profile
scaffold.Data["profile-img"] = "";
@@ -20,7 +20,7 @@ public override string Render(string[] path, string body = "", object metadata =
}else
{
//load downloads list
var scaffold = new Scaffold(S, "/Pages/Dashboard/Downloads/downloads.html");
var scaffold = new Scaffold("/Pages/Dashboard/Downloads/downloads.html");
return scaffold.Render();
}
return "";
@@ -23,7 +23,7 @@ public override string Render(string[] path, string body = "", object metadata =
AddScript("js/pages/dashboard/pages/pages.js");
//load pages list
var scaffold = new Scaffold(S, "/Pages/Dashboard/Pages/pages.html");
var scaffold = new Scaffold("/Pages/Dashboard/Pages/pages.html");
var servePage = new Services.Dashboard.Pages(S);
if (S.Request.Query.ContainsKey("websiteid")) { website.id = int.Parse(S.Request.Query["websiteid"]); }
scaffold.Data["page-list"] = servePage.View(website.id, 0, 1, 1000, 4, 0, "");
@@ -77,7 +77,7 @@ private string ViewPagesList(List<Query.Models.PageInfo> pages, int websiteId, i
var secureSettings = User.checkSecurity(websiteId, "websilk/pages", Websilk.User.enumSecurity.update);
var options = new bool[] { false, false, false, false };
var pageItem = new Scaffold(S, "/Pages/Dashboard/Pages/page-item.html");
var pageItem = new Scaffold("/Pages/Dashboard/Pages/page-item.html");
var pageLink = "";
var color = "";
@@ -178,7 +178,7 @@ public string Create(int websiteId, int parentId, string title, string descripti
public string ViewSettings(int websiteId, int id)
{
var scaffold = new Scaffold(S, "/pages/dashboard/pages/settings.html");
var scaffold = new Scaffold("/pages/dashboard/pages/settings.html");
var query = new Query.Pages(S.Server.sqlConnectionString);
var page = query.GetPageInfo(websiteId, id);
if (page != null)
@@ -22,7 +22,7 @@ public override string Render(string[] path, string body = "", object metadata =
else
{
//load photos list
var scaffold = new Scaffold(S, "/Pages/Dashboard/Photos/photos.html");
var scaffold = new Scaffold("/Pages/Dashboard/Photos/photos.html");
return scaffold.Render();
}
return "";
@@ -15,7 +15,7 @@ public override string Render(string[] path, string body = "", object metadata =
{
//load downloads list
var scaffold = new Scaffold(S, "/Pages/Dashboard/Settings/Themes/themes.html");
var scaffold = new Scaffold("/Pages/Dashboard/Settings/Themes/themes.html");
return scaffold.Render();
}
}
@@ -9,7 +9,7 @@ public Timeline(Core WebsilkCore) : base(WebsilkCore)
public override string Render(string[] path, string body = "", object metadata = null)
{
//load timeline
var scaffold = new Scaffold(S, "/Pages/Dashboard/Timeline/timeline.html");
var scaffold = new Scaffold("/Pages/Dashboard/Timeline/timeline.html");
return scaffold.Render();
}
}
@@ -22,7 +22,7 @@ public override string Render(string[] path, string body = "", object metadata =
else
{
//load downloads list
var scaffold = new Scaffold(S, "/Pages/Dashboard/Users/users.html");
var scaffold = new Scaffold("/Pages/Dashboard/Users/users.html");
return scaffold.Render();
}
return "";
View
@@ -15,20 +15,20 @@ public override string Render(string[] path, string body = "", object metadata =
}
//check for database reset
var scaffold = new Scaffold(S, "/Pages/Login/login.html");
var scaffold = new Scaffold("/Pages/Login/login.html");
if (S.Server.environment == Server.enumEnvironment.development && S.Server.Cache.ContainsKey("resetPass"))
{
if ((int)S.Server.Cache["resetPass"] == 1)
{
//load new administrator form
scaffold = new Scaffold(S, "/Pages/Login/new-admin.html");
scaffold = new Scaffold("/Pages/Login/new-admin.html");
scaffold.Data["title"] = "Create an administrator account";
scripts += "<script src=\"/js/pages/login/new-admin.js\"></script>";
}
else if ((int)S.Server.Cache["resetPass"] == 2)
{
//load new password form (for admin only)
scaffold = new Scaffold(S, "/Pages/Login/new-pass.html");
scaffold = new Scaffold("/Pages/Login/new-pass.html");
scaffold.Data["title"] = "Create an administrator password";
scripts += "<script src=\"/js/pages/login/new-pass.js\"></script>";
}
View
@@ -1,6 +1,6 @@
namespace Websilk
{
public class Service : global::Service
public class Service : Datasilk.Service
{
public User User;
public Website website = new Website();
View
@@ -9,8 +9,8 @@ public class Icons : Service
public string List()
{
var scaffold = new Scaffold(S, "/Tests/icons.html");
var icon = new Scaffold(S, "/Tests/icon.html");
var scaffold = new Scaffold("/Tests/icons.html");
var icon = new Scaffold("/Tests/icon.html");
var icons = new StringBuilder();
var list = new List<string>()

0 comments on commit fd23b6f

Please sign in to comment.