<commit_before>@using Orchard.AuditTrail.Helpers
@using Orchard.AuditTrail.Services.Models
@using Orchard.ContentManagement
@{
    var descriptor = (AuditTrailEventDescriptor)Model.Descriptor;
    var eventData = (IDictionary<string, object>) Model.EventData;
    var eventPastTense = descriptor.Name.Text.ToLower();
    var contentItemId = (int?)Model.ContentItemId;
    var contentItem = (ContentItem) Model.ContentItem;
    var eventVersionNumber = eventData.Get<int>("VersionNumber");
    var isPublishedEvent = eventData.Get<bool>("Published");
    var itemDisplayText = contentItem != null ? Html.ItemDisplayText(contentItem) : default(IHtmlString);
    var title = itemDisplayText != null ? itemDisplayText.ToString() : eventData.Get<string>("Title") ?? "[untitled]";
}
<section class="audittrail-content-eventsummary">
    @if (contentItem != null) {<commit_msg>Using default value in audit trails when title is empty (#8106)<commit_after>@using Orchard.AuditTrail.Helpers
@using Orchard.AuditTrail.Services.Models
@using Orchard.ContentManagement
@{
    var descriptor = (AuditTrailEventDescriptor)Model.Descriptor;
    var eventData = (IDictionary<string, object>) Model.EventData;
    var eventPastTense = descriptor.Name.Text.ToLower();
    var contentItemId = (int?)Model.ContentItemId;
    var contentItem = (ContentItem) Model.ContentItem;
    var eventVersionNumber = eventData.Get<int>("VersionNumber");
    var isPublishedEvent = eventData.Get<bool>("Published");
    var itemDisplayText = contentItem != null ? Html.ItemDisplayText(contentItem) : default(IHtmlString);
    var title = itemDisplayText != null ? itemDisplayText.ToString() : eventData.Get<string>("Title");
    if (string.IsNullOrEmpty(title))
    {
        title = "[untitled]";
    }
}
<section class="audittrail-content-eventsummary">
    @if (contentItem != null) {
{'fraction_non_alphanumeric': 0.124123043712898, 'fraction_numerical': 0.0021586616297895305, 'mean_word_length': 5.371134020618556, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6725280', 'n_tokens_mistral': 550, 'n_tokens_neox': 542, 'n_words': 109}