Cleanup of template query builder whitespace

This commit is contained in:
Callum Whyte
2018-07-27 13:02:37 +01:00
parent 9162be9fb0
commit 154d36e580
2 changed files with 3 additions and 5 deletions

View File

@@ -22,7 +22,8 @@
function getQuerySnippet(queryExpression) {
var code = "\n@{\n" + "\tvar selection = " + queryExpression + ";\n}\n";
code += "<ul>\n" +
"\t@foreach(var item in selection){\n" +
"\t@foreach (var item in selection)\n" +
"\t{\n" +
"\t\t<li>\n" +
"\t\t\t<a href=\"@item.Url\">@item.Name</a>\n" +
"\t\t</li>\n" +

View File

@@ -255,12 +255,10 @@ namespace Umbraco.Web.Editors
? contents.OrderBy(x => x.Id)
: contents.OrderByDescending(x => x.Id);
case "createDate":
return sortExpression.Direction == "ascending"
? contents.OrderBy(x => x.CreateDate)
: contents.OrderByDescending(x => x.CreateDate);
case "publishDate":
return sortExpression.Direction == "ascending"
? contents.OrderBy(x => x.UpdateDate)
: contents.OrderByDescending(x => x.UpdateDate);
@@ -269,7 +267,6 @@ namespace Umbraco.Web.Editors
? contents.OrderBy(x => x.Name)
: contents.OrderByDescending(x => x.Name);
default:
return sortExpression.Direction == "ascending"
? contents.OrderBy(x => x.Name)
: contents.OrderByDescending(x => x.Name);
@@ -281,10 +278,10 @@ namespace Umbraco.Web.Editors
var aliases = new List<string>();
if (targetNode == null || targetNode.Id == current.Id) return aliases;
if (targetNode.Id != current.Id)
{
aliases.Add(targetNode.ContentType.Alias);
}
aliases.AddRange(this.GetChildContentTypeAliases(targetNode.Parent, current));