@using Zap.BI.Core.Resources
@using Zap.BI.Portal.Helpers
@using Zap.BI.Portal.Models
@using Zap.BI.Portal.Pages
@using Zap.Text
@model UpgradeReportViewModel

@{
    Layout = null;
}

<style>
    .header, .resources
    {
        font-family: 'Open Sans', 'Segoe UI', sans-serif;
        font-size: 11pt;
    }

    ul 
    {
        list-style: none;
        margin-bottom: 0.5em;
    }

    a 
    {
        color: teal;
        text-decoration: none;
    }

    h1
    {
        font-weight: normal;
        margin-bottom: 0;
    }
</style>
<div class="header">
    <h1>@Model.ApplicationName @CoreResourceText.UpgradeReport.FormatWith(Model.CollectionName)</h1>
    <div>@Model.ProductVersionUpgradeInfo</div>
    <a target="_blank" href="@Model.ReleaseNotesUrl">@PageText.UpgradeReport_ReleaseNotes.FormatWith(@Model.ReleaseNotesVersionName)</a>

</div>
<div class="resources">
    <ul>
        @foreach (ResourceUpgradeViewModel resource in @Model.Resources)
        {
            <li>
                @Html.RawSanitizedHtml(@resource.ResourceLinkHtml)
                <ul>
                    @foreach (UpgradeMessageViewModel message in @resource.Messages)
                    {
                        if (message.HelpUrl == null)
                         {
                             <li>@message.Message</li>
                         }
                        else
                        {
                            <li>@message.Message (<a target="_blank" href="@message.HelpUrl">@PageText.Label_MoreInfo</a>)</li>
                        }
                    }
                </ul>
            </li>
        }
    </ul>
</div>
