Skip to content

Commit

Permalink
Link builder
Browse files Browse the repository at this point in the history
  • Loading branch information
mgesing committed Feb 18, 2019
1 parent 00caa38 commit c23fc90
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,6 @@ public void MigrateLocaleResources(LocaleResourcesBuilder builder)
builder.AddOrUpdate("Common.BrowseFiles", "Browse", "Durchsuchen");
builder.AddOrUpdate("Common.Url", "URL", "URL");
builder.AddOrUpdate("Common.File", "File", "Datei");
builder.AddOrUpdate("Common.Media", "Media", "Medien");
builder.AddOrUpdate("Common.Entity.Product", "Product", "Produkt");
builder.AddOrUpdate("Common.Entity.Category", "Category", "Warengruppe");
builder.AddOrUpdate("Common.Entity.Manufacturer", "Manufacturer", "Hersteller");
Expand Down
8 changes: 0 additions & 8 deletions src/Libraries/SmartStore.Services/Cms/LinkResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ protected virtual TokenizeResult Parse(string linkExpression)
case TokenizeType.Category:
case TokenizeType.Manufacturer:
case TokenizeType.Topic:
case TokenizeType.Media:
var id = value.ToInt();
if (id != 0)
{
Expand Down Expand Up @@ -117,10 +116,6 @@ public virtual TokenizeResult GetDisplayName(string linkExpression, int language
r.Result = GetFromDatabase<Topic>(x => x.SystemName, (int)r.Value);
}
break;
case TokenizeType.Media:
var entityId = (int)r.Value;
r.Result = GetFromDatabase<Picture>(x => x.SeoFilename, (int)r.Value);
break;
case TokenizeType.Url:
var url = r.Value.ToString();
if (url.EmptyNull().StartsWith("~"))
Expand Down Expand Up @@ -170,9 +165,6 @@ public virtual TokenizeResult GetLink(string linkExpression, int languageId = 0)
result.Result = _urlHelper.RouteUrl(entityName, new { SeName = slug });
}
break;
case TokenizeType.Media:
result.Result = _services.PictureService.GetUrl((int)result.Value);
break;
case TokenizeType.Url:
var url = result.Value.ToString();
if (url.EmptyNull().StartsWith("~"))
Expand Down
1 change: 0 additions & 1 deletion src/Libraries/SmartStore.Services/Cms/TokenizeResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public enum TokenizeType
Manufacturer,
Topic,
Url = 20,
Media = 25,
File = 30
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
return new { icon = "far fa-building", name = T("Common.Entity.Manufacturer").Text };
case TokenizeType.Topic:
return new { icon = "far fa-file", name = T("Common.Entity.Topic").Text };
case TokenizeType.Media:
return new { icon = "fas fa-images", name = T("Common.Media").Text };
case TokenizeType.File:
return new { icon = "far fa-folder-open", name = T("Common.File").Text };
case TokenizeType.Url:
Expand Down Expand Up @@ -93,9 +91,6 @@
{
<input type="text" class="form-control transferable resettable" value="@value" />
}
else if (type == TokenizeType.Media)
{
}
else if (type == TokenizeType.File)
{
<input id="lb-file-url-@rnd" type="text" class="form-control transferable resettable" value="@label" readonly />
Expand Down

0 comments on commit c23fc90

Please sign in to comment.