<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
    xmlns:dyn="http://exslt.org/dynamic" extension-element-prefixes="dyn">
    <xsl:output method="html" indent="no" doctype-system="" encoding="utf-8" />

    <xsl:include href="/app/tools/bookpub/templates/ajax_request.xsl" />

    <xsl:template name="pickLayout">
        <div class="TrackerCurrency Tracker-edit-page-container">
            <div class="TrackerCurrency-common-info">
                <h3 class="Tracker-sub-header"><xsl:value-of select="concat(/Root/SplitInfo/ServiceName, ': ', /Root/SplitInfo/OriginalFileName)" /></h3>

                <div class="Bookpub-conversion-wrapper">
                    <table class="Table Table-with-highlight" style="width: 100%">
                        <thead>
                            <tr class="Table-row Table-row-header">
                                <th class="Table-col">Filename</th>
                                <th class="Table-col">Received</th>
                                <th class="Table-col">Period</th>
                                <th class="Table-col">Closed</th>
                            </tr>
                        </thead>
                        <tbody>
                            <xsl:for-each select="/Root/SplitInfo/File">
                                <tr class="Table-row Table-row-data">
                                    <td class="Table-col">
                                        <xsl:choose>
                                            <xsl:when test="/Root/Access/bookpub/tracker/saveas">
                                                <a href="/bookpub/tracker?c=saveas&amp;file={FileID}&amp;period={PeriodID}" class="js-tooltip" style="color: #0066cc;">
                                                    <xsl:value-of select="FileName" />
                                                </a>
                                            </xsl:when>
                                            <xsl:otherwise>
                                                <xsl:value-of select="FileName" />
                                            </xsl:otherwise>
                                        </xsl:choose>
                                    </td>
                                    <td class="Table-col"><xsl:value-of select="Received" /></td>
                                    <td class="Table-col"><a href="/bookpub/tracker?period={PeriodID}" title="{normalize-space(Period)}" style="color: #0066cc;"  target="_blank"><xsl:value-of select="Period" /></a></td>
                                    <td class="Table-col"><xsl:value-of select="Closed" /></td>
                                </tr>
                            </xsl:for-each>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </xsl:template>
</xsl:stylesheet>