<!--                                                                  -->
<!--  Copyright (C) 2006 RoyaltyShare, Inc.   All Rights Reserved     -->
<!--                                                                  -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:template name="onHoldFilesSection">
        <div class="Tracker-on-hold">
            <h3 class="Tracker-sub-header">Files On Hold</h3>
            <table class="Table Table-with-highlight">
                <thead>
                    <xsl:call-template name="newFilesHeaderRow" />
                </thead>
                <tbody>
                    <xsl:for-each select="Files/OnHoldFiles/OnHoldFile">
                        <xsl:variable name="status">
                            <xsl:choose>
                                <xsl:when test="MapFaceStatus = 'all'">Pending Review</xsl:when>
                                <xsl:when test="MapFaceStatus = 'some'">Working</xsl:when>
                                <xsl:otherwise>Support Notified</xsl:otherwise>
                            </xsl:choose>
                        </xsl:variable>

                        <tr class="Table-row Table-row-data">
                            <xsl:if test="FileID = /Root/Params/Highlight">
                                <xsl:attribute name="class">hi</xsl:attribute>
                            </xsl:if>
                            <td class="Table-col Tracker-col-service">
                                <a name="file{FileID}" />
                                <xsl:value-of select="ServiceName" />
                            </td>
                            <td class="Table-col Table-col-icon">
                                <xsl:if test="/Root/Access/app/tracker/error_log = 1">
                                    <a class="js-tooltip" href="/app/tracker?c=error_log&amp;file={FileID}" title="Download Error Log">
                                        <xsl:call-template name="icon">
                                            <xsl:with-param name="type" select="'download'" />
                                            <xsl:with-param name="role" select="'action'" />
                                        </xsl:call-template>
                                    </a>
                                </xsl:if>
                            </td>
                            <td class="Table-col Tracker-col-file-name">
                                <a class="js-tooltip">
                                    <xsl:if test="/Root/Access/app/tracker/saveas = 1">
                                        <xsl:attribute name="href">/app/tracker?c=saveas&amp;file=<xsl:value-of select="FileID" />&amp;period=<xsl:value-of select="/Root/Report/Period/PeriodID" /></xsl:attribute>
                                    </xsl:if>
                                    <xsl:if test="/Root/User/AccessLevel = 1 and VersionNum != 0">
                                        <xsl:attribute name="title">Importer Version: <xsl:value-of select="VersionNum" /></xsl:attribute>
                                    </xsl:if>
                                    <xsl:value-of select="OrigFileNamePretty" />
                                </a>
                            </td>
                            <td class="Table-col">Unknown Service/Format/Country Data</td>
                            <td class="Table-col Table-col-shrink"><xsl:value-of select="DateCreatedPretty" /></td>
                            <td class="Table-col Table-col-shrink"><xsl:value-of select="$status" /></td>
                            <td class="Table-col Table-col-icon">
                                <xsl:choose>
                                    <xsl:when test="/Root/Access/rps/mapface/main">
                                            <xsl:variable name="apos">'</xsl:variable>
                                            <xsl:variable name="escaped">"</xsl:variable>
                                            <span title="Delete File" class="Tracker-table-delete-trigger Icon-trigger js-tooltip">
                                                <xsl:attribute name="onMouseOver">javascript:window.status=''; return true;</xsl:attribute>
                                                <xsl:attribute name="data-file-name">
                                                    <xsl:value-of select="translate(OrigFileNamePretty,$apos,$escaped)" />
                                                </xsl:attribute>
                                                <xsl:attribute name="data-file-id">
                                                    <xsl:value-of select="FileID" />
                                                </xsl:attribute>
                                                <xsl:attribute name="data-page">
                                                    <xsl:value-of select="/Root/Pagination/CurrentPage" />
                                                </xsl:attribute>
                                                <xsl:call-template name="icon">
                                                    <xsl:with-param name="type" select="'delete'" />
                                                    <xsl:with-param name="role" select="'action'" />
                                                </xsl:call-template>
                                            </span>
                                    </xsl:when>
                                    <xsl:otherwise>
                                        <a class="js-tooltip" title="Errors for this file are currently being resolved.&lt;br&gt;If needed, you can request that this file be deleted by contacting support."><img src="/production/images/icons/office/Help-(Alt-2)-(16x16).gif" height="16" width="16" /></a>
                                    </xsl:otherwise>
                                </xsl:choose>
                            </td>
                        </tr>
                    </xsl:for-each>
                </tbody>
            </table>
        </div>
    </xsl:template>
</xsl:stylesheet>
