Formatting Taxonomies source files

This commit is contained in:
Lombiq
2015-05-19 21:46:38 +02:00
parent 1f10abb9ea
commit 82602369c6
32 changed files with 305 additions and 302 deletions

View File

@@ -146,13 +146,15 @@ namespace Orchard.Taxonomies.Controllers {
if (level == previousLevel + 1) {
parentTerm = parents.Peek();
parents.Push(new TermPosition { Term = term });
} else if (level == previousLevel) {
}
else if (level == previousLevel) {
// same parent term
if (parents.Any())
parents.Pop();
parents.Push(new TermPosition { Term = term });
} else if (level < previousLevel) {
}
else if (level < previousLevel) {
for (var i = previousLevel; i >= level; i--)
parents.Pop();
@@ -177,7 +179,8 @@ namespace Orchard.Taxonomies.Controllers {
if (scIndex != -1) {
term.Name = line.Substring(0, scIndex);
term.Slug = line.Substring(scIndex + 1);
} else {
}
else {
term.Name = line;
}

View File

@@ -40,8 +40,7 @@ namespace Orchard.Taxonomies.Services {
IOrchardServices services,
IProcessingEngine processingEngine,
ShellSettings shellSettings,
IShellDescriptorManager shellDescriptorManager)
{
IShellDescriptorManager shellDescriptorManager) {
_termContentItemRepository = termContentItemRepository;
_contentManager = contentManager;
_notifier = notifier;
@@ -261,7 +260,8 @@ namespace Orchard.Taxonomies.Services {
termsPart.Terms.Add(
new TermContentItem {
TermsPartRecord = termsPart.Record,
TermRecord = term.Record, Field = field
TermRecord = term.Record,
Field = field
});
}
@@ -282,7 +282,8 @@ namespace Orchard.Taxonomies.Services {
tpr => tpr.Terms.Any(tr =>
tr.TermRecord.Id == term.Id
|| tr.TermRecord.Path.StartsWith(rootPath)));
} else {
}
else {
query = query.Where(
tpr => tpr.Terms.Any(tr =>
tr.Field == fieldName

View File

@@ -17,8 +17,7 @@
<legend @if (settings.Required) { <text> class="required" </text> }>@Model.DisplayName.CamelFriendly()</legend>
<div class="expando">
@if (!String.IsNullOrWhiteSpace(Model.Settings.Hint))
{
@if (!String.IsNullOrWhiteSpace(Model.Settings.Hint)) {
<span class="hint">@Model.Settings.Hint</span>
}