Skip to content

Commit 5c03950

Browse files
Removed duplicate resources for display order
1 parent 80935a1 commit 5c03950

28 files changed

+85
-39
lines changed

src/Libraries/SmartStore.Data/Migrations/MigrationsConfiguration.cs

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,52 @@ public void MigrateLocaleResources(LocaleResourcesBuilder builder)
275275
"Wishlist.EmailAFriend.FriendEmail.Required",
276276
"Wishlist.EmailAFriend.YourEmailAddress.Required"
277277
);
278+
279+
// remove duplicate resources for display order
280+
builder.Delete(
281+
"Admin.Catalog.Categories.Fields.DisplayOrder",
282+
"Admin.Catalog.Categories.Products.Fields.DisplayOrder",
283+
"Admin.Catalog.Manufacturers.Fields.DisplayOrder",
284+
"Admin.Catalog.Manufacturers.Products.Fields.DisplayOrder",
285+
"Admin.Catalog.Products.ProductVariantAttributes.Attributes.Values.Fields.DisplayOrder",
286+
"Admin.Catalog.Products.BundleItems.Fields.DisplayOrder",
287+
"Admin.Catalog.Products.Fields.HomePageDisplayOrder",
288+
"Admin.Catalog.Products.SpecificationAttributes.Fields.DisplayOrder",
289+
"Admin.Catalog.Products.Pictures.Fields.DisplayOrder",
290+
"Admin.Catalog.Products.Categories.Fields.DisplayOrder",
291+
"Admin.Catalog.Products.Manufacturers.Fields.DisplayOrder",
292+
"Admin.Catalog.Products.RelatedProducts.Fields.DisplayOrder",
293+
"Admin.Catalog.Products.AssociatedProducts.Fields.DisplayOrder",
294+
"Admin.Catalog.Products.BundleItems.Fields.DisplayOrder",
295+
"Admin.Catalog.Products.ProductVariantAttributes.Attributes.Fields.DisplayOrder",
296+
"Admin.Catalog.Products.ProductVariantAttributes.Attributes.Values.Fields.DisplayOrder",
297+
"Admin.Catalog.Products.SpecificationAttributes.Fields.DisplayOrder",
298+
"Admin.Catalog.Attributes.SpecificationAttributes.Fields.DisplayOrder",
299+
"Admin.Catalog.Attributes.SpecificationAttributes.Options.Fields.DisplayOrder",
300+
"Admin.Catalog.Categories.Fields.DisplayOrder",
301+
"Admin.Catalog.Manufacturers.Fields.DisplayOrder",
302+
"Admin.Configuration.Countries.Fields.DisplayOrder",
303+
"Admin.Configuration.Currencies.Fields.DisplayOrder",
304+
"Admin.Configuration.DeliveryTimes.Fields.DisplayOrder",
305+
"Admin.Configuration.Measures.Dimensions.Fields.DisplayOrder",
306+
"Admin.Configuration.Measures.Weights.Fields.DisplayOrder",
307+
"Admin.Configuration.Countries.States.Fields.DisplayOrder",
308+
"Admin.ContentManagement.Forums.ForumGroup.Fields.DisplayOrder",
309+
"Admin.ContentManagement.Forums.Forum.Fields.DisplayOrder",
310+
"Admin.Configuration.Languages.Fields.DisplayOrder",
311+
"Admin.Catalog.Attributes.CheckoutAttributes.Fields.DisplayOrder",
312+
"Admin.Catalog.Attributes.CheckoutAttributes.Values.Fields.DisplayOrder",
313+
"Admin.Configuration.Plugins.Fields.DisplayOrder",
314+
"Admin.ContentManagement.Polls.Answers.Fields.DisplayOrder",
315+
"Admin.ContentManagement.Polls.Fields.DisplayOrder",
316+
"Admin.Configuration.Shipping.Methods.Fields.DisplayOrder",
317+
"Admin.Configuration.Stores.Fields.DisplayOrder",
318+
"Admin.Configuration.Tax.Categories.Fields.DisplayOrder"
319+
);
320+
321+
builder.AddOrUpdate("Common.DisplayOrder.Hint",
322+
"Specifies display order. 1 represents the top of the list.",
323+
"Legt die Anzeige-Priorität fest. 1 steht bspw. für das erste Element in der Liste.");
278324
}
279325
}
280326
}

src/Presentation/SmartStore.Web/Administration/Models/Catalog/CategoryModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public CategoryModel()
9696
[SmartResourceDisplayName("Admin.Catalog.Categories.Fields.Deleted")]
9797
public bool Deleted { get; set; }
9898

99-
[SmartResourceDisplayName("Admin.Catalog.Categories.Fields.DisplayOrder")]
99+
[SmartResourceDisplayName("Common.DisplayOrder")]
100100
public int DisplayOrder { get; set; }
101101

102102
[SmartResourceDisplayName("Common.CreatedOn")]
@@ -154,7 +154,7 @@ public class CategoryProductModel : EntityModelBase
154154
[SmartResourceDisplayName("Admin.Catalog.Categories.Products.Fields.IsFeaturedProduct")]
155155
public bool IsFeaturedProduct { get; set; }
156156

157-
[SmartResourceDisplayName("Admin.Catalog.Categories.Products.Fields.DisplayOrder")]
157+
[SmartResourceDisplayName("Common.DisplayOrder")]
158158
//we don't name it DisplayOrder because Telerik has a small bug
159159
//"if we have one more editor with the same name on a page, it doesn't allow editing"
160160
//in our case it's category.DisplayOrder

src/Presentation/SmartStore.Web/Administration/Models/Catalog/ManufacturerModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public ManufacturerModel()
7070
[SmartResourceDisplayName("Admin.Catalog.Manufacturers.Fields.Deleted")]
7171
public bool Deleted { get; set; }
7272

73-
[SmartResourceDisplayName("Admin.Catalog.Manufacturers.Fields.DisplayOrder")]
73+
[SmartResourceDisplayName("Common.DisplayOrder")]
7474
public int DisplayOrder { get; set; }
7575

7676
[SmartResourceDisplayName("Common.CreatedOn")]
@@ -114,7 +114,7 @@ public class ManufacturerProductModel : EntityModelBase
114114
[SmartResourceDisplayName("Admin.Catalog.Manufacturers.Products.Fields.IsFeaturedProduct")]
115115
public bool IsFeaturedProduct { get; set; }
116116

117-
[SmartResourceDisplayName("Admin.Catalog.Manufacturers.Products.Fields.DisplayOrder")]
117+
[SmartResourceDisplayName("Common.DisplayOrder")]
118118
//we don't name it DisplayOrder because Telerik has a small bug
119119
//"if we have one more editor with the same name on a page, it doesn't allow editing"
120120
//in our case it's category.DisplayOrder

src/Presentation/SmartStore.Web/Administration/Models/Catalog/ProductAttributeOptionModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public ProductAttributeOptionModel()
5252
[SmartResourceDisplayName("Admin.Catalog.Products.ProductVariantAttributes.Attributes.Values.Fields.IsPreSelected")]
5353
public bool IsPreSelected { get; set; }
5454

55-
[SmartResourceDisplayName("Admin.Catalog.Products.ProductVariantAttributes.Attributes.Values.Fields.DisplayOrder")]
55+
[SmartResourceDisplayName("Common.DisplayOrder")]
5656
public int DisplayOrder { get; set; }
5757

5858
[SmartResourceDisplayName("Admin.Catalog.Products.ProductVariantAttributes.Attributes.Values.Fields.ValueTypeId")]

src/Presentation/SmartStore.Web/Administration/Models/Catalog/ProductBundleItemModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public ProductBundleItemModel()
5050
[SmartResourceDisplayName("Admin.Catalog.Products.BundleItems.Fields.Published")]
5151
public bool Published { get; set; }
5252

53-
[SmartResourceDisplayName("Admin.Catalog.Products.BundleItems.Fields.DisplayOrder")]
53+
[SmartResourceDisplayName("Common.DisplayOrder")]
5454
public int DisplayOrder { get; set; }
5555

5656
[SmartResourceDisplayName("Common.CreatedOn")]

src/Presentation/SmartStore.Web/Administration/Models/Catalog/ProductModel.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public ProductModel()
8383
[SmartResourceDisplayName("Admin.Catalog.Products.Fields.ShowOnHomePage")]
8484
public bool ShowOnHomePage { get; set; }
8585

86-
[SmartResourceDisplayName("Admin.Catalog.Products.Fields.HomePageDisplayOrder")]
86+
[SmartResourceDisplayName("Common.DisplayOrder")]
8787
public int HomePageDisplayOrder { get; set; }
8888

8989
[SmartResourceDisplayName("Admin.Catalog.Products.Fields.MetaKeywords")]
@@ -422,7 +422,7 @@ public AddProductSpecificationAttributeModel()
422422
[SmartResourceDisplayName("Admin.Catalog.Products.SpecificationAttributes.Fields.ShowOnProductPage")]
423423
public bool? ShowOnProductPage { get; set; }
424424

425-
[SmartResourceDisplayName("Admin.Catalog.Products.SpecificationAttributes.Fields.DisplayOrder")]
425+
[SmartResourceDisplayName("Common.DisplayOrder")]
426426
public int DisplayOrder { get; set; }
427427

428428
public IList<SelectListItem> AvailableAttributes { get; set; }
@@ -440,7 +440,7 @@ public class ProductPictureModel : EntityModelBase
440440
[SmartResourceDisplayName("Admin.Catalog.Products.Pictures.Fields.Picture")]
441441
public string PictureUrl { get; set; }
442442

443-
[SmartResourceDisplayName("Admin.Catalog.Products.Pictures.Fields.DisplayOrder")]
443+
[SmartResourceDisplayName("Common.DisplayOrder")]
444444
public int DisplayOrder { get; set; }
445445
}
446446

@@ -457,7 +457,7 @@ public class ProductCategoryModel : EntityModelBase
457457
[SmartResourceDisplayName("Admin.Catalog.Products.Categories.Fields.IsFeaturedProduct")]
458458
public bool IsFeaturedProduct { get; set; }
459459

460-
[SmartResourceDisplayName("Admin.Catalog.Products.Categories.Fields.DisplayOrder")]
460+
[SmartResourceDisplayName("Common.DisplayOrder")]
461461
public int DisplayOrder { get; set; }
462462
}
463463

@@ -474,7 +474,7 @@ public class ProductManufacturerModel : EntityModelBase
474474
[SmartResourceDisplayName("Admin.Catalog.Products.Manufacturers.Fields.IsFeaturedProduct")]
475475
public bool IsFeaturedProduct { get; set; }
476476

477-
[SmartResourceDisplayName("Admin.Catalog.Products.Manufacturers.Fields.DisplayOrder")]
477+
[SmartResourceDisplayName("Common.DisplayOrder")]
478478
public int DisplayOrder { get; set; }
479479
}
480480

@@ -489,7 +489,7 @@ public class RelatedProductModel : EntityModelBase
489489
public string ProductTypeName { get; set; }
490490
public string ProductTypeLabelHint { get; set; }
491491

492-
[SmartResourceDisplayName("Admin.Catalog.Products.RelatedProducts.Fields.DisplayOrder")]
492+
[SmartResourceDisplayName("Common.DisplayOrder")]
493493
public int DisplayOrder { get; set; }
494494

495495
[SmartResourceDisplayName("Admin.Catalog.Products.Fields.Sku")]
@@ -508,7 +508,7 @@ public partial class AssociatedProductModel : EntityModelBase
508508
public string ProductTypeName { get; set; }
509509
public string ProductTypeLabelHint { get; set; }
510510

511-
[SmartResourceDisplayName("Admin.Catalog.Products.AssociatedProducts.Fields.DisplayOrder")]
511+
[SmartResourceDisplayName("Common.DisplayOrder")]
512512
public int DisplayOrder { get; set; }
513513

514514
[SmartResourceDisplayName("Admin.Catalog.Products.Fields.Sku")]
@@ -535,7 +535,7 @@ public partial class BundleItemModel : EntityModelBase
535535
[SmartResourceDisplayName("Admin.Catalog.Products.BundleItems.Fields.Quantity")]
536536
public int Quantity { get; set; }
537537

538-
[SmartResourceDisplayName("Admin.Catalog.Products.BundleItems.Fields.DisplayOrder")]
538+
[SmartResourceDisplayName("Common.DisplayOrder")]
539539
public int DisplayOrder { get; set; }
540540

541541
[SmartResourceDisplayName("Admin.Catalog.Products.BundleItems.Fields.Discount")]
@@ -621,7 +621,7 @@ public class ProductVariantAttributeModel : EntityModelBase
621621
//we don't name it DisplayOrder because Telerik has a small bug
622622
//"if we have one more editor with the same name on a page, it doesn't allow editing"
623623
//in our case it's category.DisplayOrder
624-
[SmartResourceDisplayName("Admin.Catalog.Products.ProductVariantAttributes.Attributes.Fields.DisplayOrder")]
624+
[SmartResourceDisplayName("Common.DisplayOrder")]
625625
public int DisplayOrder1 { get; set; }
626626

627627
public string ViewEditUrl { get; set; }
@@ -683,7 +683,7 @@ public ProductVariantAttributeValueModel()
683683
[SmartResourceDisplayName("Admin.Catalog.Products.ProductVariantAttributes.Attributes.Values.Fields.IsPreSelected")]
684684
public bool IsPreSelected { get; set; }
685685

686-
[SmartResourceDisplayName("Admin.Catalog.Products.ProductVariantAttributes.Attributes.Values.Fields.DisplayOrder")]
686+
[SmartResourceDisplayName("Common.DisplayOrder")]
687687
public int DisplayOrder { get; set; }
688688

689689
[SmartResourceDisplayName("Admin.Catalog.Products.ProductVariantAttributes.Attributes.Values.Fields.ValueTypeId")]

src/Presentation/SmartStore.Web/Administration/Models/Catalog/ProductSpecificationAttributeModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public ProductSpecificationAttributeModel()
3333
[SmartResourceDisplayName("Admin.Catalog.Products.SpecificationAttributes.Fields.ShowOnProductPage")]
3434
public bool? ShowOnProductPage { get; set; }
3535

36-
[SmartResourceDisplayName("Admin.Catalog.Products.SpecificationAttributes.Fields.DisplayOrder")]
36+
[SmartResourceDisplayName("Common.DisplayOrder")]
3737
public int DisplayOrder { get; set; }
3838

3939
#region Nested classes

src/Presentation/SmartStore.Web/Administration/Models/Catalog/SpecificationAttributeModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public SpecificationAttributeModel()
2626
[AllowHtml, SmartResourceDisplayName("Admin.Catalog.Attributes.SpecificationAttributes.Fields.Alias")]
2727
public string Alias { get; set; }
2828

29-
[SmartResourceDisplayName("Admin.Catalog.Attributes.SpecificationAttributes.Fields.DisplayOrder")]
29+
[SmartResourceDisplayName("Common.DisplayOrder")]
3030
public int DisplayOrder { get; set; }
3131

3232
[SmartResourceDisplayName("Admin.Catalog.Attributes.SpecificationAttributes.Fields.AllowFiltering")]

src/Presentation/SmartStore.Web/Administration/Models/Catalog/SpecificationAttributeOptionModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public SpecificationAttributeOptionModel()
2525
[AllowHtml, SmartResourceDisplayName("Admin.Catalog.Attributes.SpecificationAttributes.Options.Fields.Alias")]
2626
public string Alias { get; set; }
2727

28-
[SmartResourceDisplayName("Admin.Catalog.Attributes.SpecificationAttributes.Options.Fields.DisplayOrder")]
28+
[SmartResourceDisplayName("Common.DisplayOrder")]
2929
public int DisplayOrder {get;set;}
3030

3131
public IList<SpecificationAttributeOptionLocalizedModel> Locales { get; set; }

src/Presentation/SmartStore.Web/Administration/Models/DataExchange/ExportPreviewModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public class ExportPreviewCategoryModel : EntityModelBase
8686
[SmartResourceDisplayName("Admin.Catalog.Categories.Fields.Published")]
8787
public bool Published { get; set; }
8888

89-
[SmartResourceDisplayName("Admin.Catalog.Categories.Fields.DisplayOrder")]
89+
[SmartResourceDisplayName("Common.DisplayOrder")]
9090
public int DisplayOrder { get; set; }
9191

9292
[SmartResourceDisplayName("Admin.Common.Store.LimitedTo")]
@@ -101,7 +101,7 @@ public class ExportPreviewManufacturerModel : EntityModelBase
101101
[SmartResourceDisplayName("Admin.Catalog.Manufacturers.Fields.Published")]
102102
public bool Published { get; set; }
103103

104-
[SmartResourceDisplayName("Admin.Catalog.Manufacturers.Fields.DisplayOrder")]
104+
[SmartResourceDisplayName("Common.DisplayOrder")]
105105
public int DisplayOrder { get; set; }
106106

107107
[SmartResourceDisplayName("Admin.Common.Store.LimitedTo")]

0 commit comments

Comments
 (0)