Source

main / Source / WebClient / Web.Client / Views / Document / ErrorTab.cshtml

Full commit
Naethra D 3ee1b94 


































































































































































@model DataUp.Web.Client.ViewModel.DocumentDetailViewModel 
@{
    ViewBag.Title = "best practices check";
}
<div class="screenInfoBox">
    <p>
        DataUp has checked your data file for potential issues that might make your data
        less understandable to others. Some of the issues are related to .csv compatibility,
        and others are simply best practices for data management and organization.
    </p>
</div>
@*<div class="documentSubTabHolder">
    <ul class="documentSubTab">
        @for (int index = 0; index < Model.SheetList.Count(); index++)
        {
            var documentSheet = @Model.SheetList.ElementAt(index);
            <li><a @(index == 0 ? "class=active" : "") sheetName="@documentSheet.Name" sheetId="@documentSheet.SheetId">
            @documentSheet.Name (@documentSheet.Errors.Count())</a></li>
        }
    </ul>
</div>*@
@if (Model.NoError)
{
    <div class="NoErrorbackground">
        There are no errors in this file</div>
}
else
{ 
    <div class="documentSubTabHolder">
        <div id="st_horizontal" class="st_horizontal">
            <div class="st_tabs_container st_sliding_active">
                <a style="display: inline;" href="#prev" class="st_prev st_btn_disabled"></a>
                <div style="overflow: hidden;" class="st_slide_container">
                    <ul style="margin-left: 0px;" class="st_tabs documentSubTab">
                        @for (int index = 0; index < Model.SheetList.Count(); index++)
                        {
                            var documentSheet = @Model.SheetList.ElementAt(index);
                            <li><a @(index == 0 ? "class=active" : "") sheetName="@documentSheet.Name" sheetId="@documentSheet.SheetId">
                                @documentSheet.Name (@documentSheet.Errors.Count())</a></li>
                        }
                    </ul>
                </div>
                <!-- /.st_slide_container -->
                <a style="display: inline;" href="#next" class="st_next st_btn_disabled"></a>
            </div>
            <!-- /.st_tabs_container -->
            <!-- /.st_view_container -->
        </div>
    </div>

                        if (Model.IsPostAsXSL)
                        { 
    <div class="docRemovBtnHoldr">
        <a class="docRemovBtn disabled" actionUrl="@Url.Action("RemoveSelected", "Document", new { documentId = Model.DocumentId, })">
            Remove Selected</a> <a class="docRemovAllBtn hide">Remove All</a>
    </div>
                        }
@*@if (!Model.NoError)
{ *@
    <div class="documentErorTableContainer">
        <table width="100%" border="0" cellspacing="0" cellpadding="1" style="table-layout: fixed">
            <tr class="gridHeader">
                @if (Model.IsPostAsXSL)
                {
                    <td class="documentErorTableContainerTD1 trimmText noLeftBorder">
                        <input name="" type="checkbox" value="" class="documentTableChkBx" style="display: none" />
                    </td> 
                }
                <td class="documentErorTableContainerTD3 " title="Potential problem">
                    Potential problem
                </td>
                <td class="documentErorTableContainerTD4" title="Why this may be a problem">
                    Why this may be a problem
                </td>
                <td class="documentErorTableContainerTD5" title="Suggested remedy">
                    Suggested remedy
                </td>
                <td class="documentErorTableContainerTD2" title="Location(s)">
                    Location(s)
                </td>
            </tr>
        </table>
        <div class="documentListScrollStp">
            <table class="docErrorTable" width="100%" border="0" cellspacing="0" cellpadding="1"
                style="table-layout: fixed">
                @for (int index = 0; index < Model.SheetList.Count(); index++)
                {
                    var documentSheet = @Model.SheetList.ElementAt(index);
                    if (documentSheet.Errors.Count() == 0)
                    {
                          
                    <tr id="@documentSheet.SheetId" @(index != 0 ? "style=display:none" : "") >
                        <td >
                            <div class="NoErrorbackground">
                                No Item found </div>
                        </td>
                    </tr>
                   
                    }
                    else
                    {
                        foreach (var documentError in documentSheet.Errors)
                        {
                    <tr id="@documentSheet.SheetId" @(index != 0 ? "style=display:none" : "")>
                        @if (Model.IsPostAsXSL)
                        {
                            if (!documentError.CanFix)
                            { 
                            <td class="documentErorTableContainerTD1">
                                <input name="" type="checkbox" value="" class="documentTableChkBx" disabled="disabled" />
                            </td> 
                            }
                            else
                            { 
                            <td class="documentErorTableContainerTD1">
                                <input name="" type="checkbox" value="" class="documentTableChkBx" erroraddress="" />
                                <input type="hidden" value="@documentError.Error" />
                            </td>                                              
                            }
                        }
                        <td class="documentErorTableContainerTD3" title="@documentError.Title">
                            @documentError.Title
                        </td>
                        <td class="documentErorTableContainerTD4" title="@documentError.Description">
                            @documentError.Description
                        </td>
                        <td class="documentErorTableContainerTD5" title="@documentError.Recommendation">
                            @documentError.Recommendation
                        </td>
                        <td class="documentErorTableContainerTD2" title="@documentError.ErrorAddress">
                            @documentError.ErrorAddress
                        </td>
                    </tr>
                        }
                    }
                }
            </table>
        </div>
    </div>
@*}*@
    var postMethod = @Model.IsPostAsXSL;

    if (postMethod)
    { 
    <div class="fixErrorContainer">
        <div class="fixErrors" style="line-height: 20px;">
            Some of the potential issues listed here must be manually altered to comply with
            best practices. <a class="browsButton" href="@Url.Action("Download", "Document", new { id = Model.DocumentId })" >
                Download</a> modified files to fix errors. You can Ignore these errors and continue
            posting</div>
    </div>
    }
    else
    {
      <div class="fixErrorContainer">
        <div class="fixErrors" style="line-height: 20px;">
            Color coded text, embedded formulas or objects, merged cells, and any other non-csv compatible components will not be retained in the file upon posting.
            Some of the potential issues listed here must be manually altered to comply with
            best practices. <a class="browsButton" href="@Url.Action("Download", "Document", new { id = Model.DocumentId })" >
                Download</a> modified files to fix errors. You can Ignore these errors and continue
            posting</div>
    </div>
    }
}