Docs module update badge improvement

pull/2850/head
Halil İbrahim Kalkan 6 years ago
parent b9a36f6389
commit 479fc27ec7

@ -19,6 +19,8 @@
"FilterTopics": "Filter topics",
"MultipleVersionDocumentInfo": "This document has multiple versions. Select the options best fit for you.",
"New": "New",
"Upd": "Upd"
"Upd": "Upd",
"NewExplanation": "Created in the last two weeks.",
"UpdatedExplanation": "Updated in the last two weeks."
}
}

@ -18,6 +18,8 @@
"DocumentNotFoundInSelectedLanguage": "İstediğiniz dilde belge bulunamadı. Varsayılan dilde belge gösterilir.",
"MultipleVersionDocumentInfo": "Bu dökümanın birden çok versiyonu bulunmaktadır. Sizin için en uygun olan seçenekleri seçiniz.",
"New": "Yeni",
"Upd": "güncellenmiş"
"Upd": "Günc",
"NewExplanation": "Son iki hafta içinde oluşturuldu.",
"UpdatedExplanation": "Son iki hafta içinde güncellendi."
}
}

@ -124,15 +124,16 @@ namespace Volo.Docs.Areas.Documents.TagHelpers
else
{
var badge = "";
if (!node.Path.IsNullOrWhiteSpace() && node.LastUpdatedTime.HasValue && node.LastUpdatedTime + TimeSpan.FromDays(30) > DateTime.Now)
if (!node.Path.IsNullOrWhiteSpace() && node.LastUpdatedTime.HasValue && node.LastUpdatedTime + TimeSpan.FromDays(14) > DateTime.Now)
{
if (node.UpdatedCount > 1)
{
badge = "<span class='badge badge-light ml-2'>" + _localizer["Upd"] + "</span>";
badge = "<span class='badge badge-light ml-2' title=\"" + _localizer["UpdatedExplanation"] + "\">" + _localizer["Upd"] + "</span>";
}
else
{
badge = "<span class='badge badge-primary ml-2'>" + _localizer["New"] + "</span>";
badge = "<span class='badge badge-primary ml-2' title=\"" + _localizer["NewExplanation"] + "\">" + _localizer["New"] + "</span>";
}
}

Loading…
Cancel
Save