mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-26 20:16:15 +08:00
Formatting Taxonomies source files
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user