Ignore:
Timestamp:
01/02/11 19:30:58 (13 years ago)
Author:
vronk
Message:

changes to columns, terms (unfinished) ; .ui-context-dialog

File:
1 edited

Legend:

Unmodified
Added
Removed
  • MDService2/trunk/MDService2/src/xsl/mdset2view.xsl

    r1008 r1029  
    1616</history>
    1717-->
     18<xsl:import href="model2matrix.xsl"/>
     19<xsl:import href="terms2view.xsl"/>
    1820
    1921<xsl:output method="html" />
    2022
    2123<xsl:include href="cmd_commons.xsl"/>
     24
    2225
    2326<xsl:param name="startRecord">1</xsl:param>
     
    4851        <xsl:variable name="colarray" select="tokenize($cols,',')"/>
    4952        <xsl:for-each select="$colarray" >
    50                 <col key="{.}" label="{replace(.,'^.*\.([^.]+)$','$1')}" xpath="{replace(.,'\.','/')}" />
     53                <col key="{.}" label="{replace(.,'^.*\.([^.]+)$','$1')}" xpath_osbolete="{replace(.,'\.','/')}" xpath="{my:index2xpath(.)}" />
    5154                <!-- if (contains(.,'.')) then reverse(.) else . -->
    5255        </xsl:for-each>
     
    123126        <div class="result-header" >
    124127        <xsl:attribute name="max_value"><xsl:value-of select="numberOfRecords" /></xsl:attribute>
    125         <xsl:variable name="cnt_hits" select="number(diagnostics)" />   
     128        <xsl:variable name="cnt_hits" select="number(diagnostics)" />
     129       
    126130        <span class="label" >hits: </span><span class="value hilight"><xsl:value-of select="numberOfRecords" /></span>;
    127131        <span class="label" >from:</span><span><input type="text" class="value start_record paging-input"><xsl:attribute name="value">
     
    141145                </xsl:choose>
    142146        </span>
    143         <span class="cmd cmd_next">
     147        <span class="cmd cmd_next">     
    144148        <xsl:choose>
    145149                <xsl:when test="$maximumRecords &gt; numberOfRecords or $maximumRecords = numberOfRecords">
     
    148152                </xsl:choose>
    149153        </span>
     154        <span class="cmd cmd_columns" />       
     155        <div class='ui-context-dialog ui-widget-content columns-wrapper'>
     156                <div class='query-columns'>
     157                                <xsl:call-template name="columns" />
     158                </div><span class='cmd cmd_del'></span></div>
    150159    </div>
    151         <div class="note" ><span class="label" >echo: </span><span class="value"><xsl:value-of select="echoedSearchRetrieveRequest" /></span>;</div>
     160       <div class="note" ><span class="label" >echo: </span><span class="value"><xsl:value-of select="echoedSearchRetrieveRequest" /></span>;<span class="label" >duration: </span><span class="value"><xsl:value-of select="extraResponseData/duration" /></span>;</div>
    152161</xsl:template>
     162
     163<xsl:template name="columns">   
     164                <ul>
     165                        <xsl:for-each select="$columns/*">
     166                                <li><xsl:value-of select="@label"/></li>
     167                        </xsl:for-each>
     168                </ul>
     169        <xsl:if test="extraResponseData/usedProfiles" >
     170                <span class="label">used profiles in whole result</span>
     171                <ul>
     172                        <xsl:for-each select="extraResponseData/usedProfiles/profile" >
     173                                <li><a href="{@id}" ><xsl:value-of select="@name"/></a><span class="note">|<xsl:value-of select="@count"/>|</span></li>
     174                        </xsl:for-each>
     175                </ul>
     176        </xsl:if>
     177        <xsl:variable name="resultSummary" >
     178               
     179                <!-- wrap in <Terms> to make digestible for model2matrix -->
     180                <xsl:variable name="terms" >
     181                        <Terms>
     182                        <!-- if already provided by mdrepo, use that, otherwise DIY -->         
     183                        <xsl:choose>
     184                                <xsl:when test="extraResponseData/resultSummary"><xsl:copy-of select="extraResponseData/resultSummary/Term" /></xsl:when>
     185                                <xsl:otherwise>
     186                                <!-- TODO! -->
     187                                </xsl:otherwise>
     188                        </xsl:choose>
     189                        </Terms>
     190                </xsl:variable>
     191                <xsl:apply-templates select="$terms" mode="matrix" />
     192        </xsl:variable>         
     193        <span class="label">structure summary of shown result</span>
     194        <xsl:message><xsl:value-of select="$resultSummary/*/name()" /> </xsl:message>
     195                <ul class="treeview">
     196                        <xsl:for-each select="$resultSummary" >
     197                                <!--  calling template in terms2view.xsl -->
     198                                <xsl:call-template name="table" >
     199                                </xsl:call-template>
     200                        </xsl:for-each>
     201                <!--    <xsl:apply-templates select="$resultSummary/*/Term" mode="list" >
     202                                <xsl:with-param name="options" select="'all'"></xsl:with-param>
     203                        </xsl:apply-templates> -->                     
     204                </ul>   
     205                       
     206<!--            <xsl:for-each select="$resultSummary" >
     207                                <li><a href="{@id}" ><xsl:value-of select="@name"/></a><span class="note">|<xsl:value-of select="@count"/>|</span></li>
     208                        </xsl:for-each>
     209         -->                   
     210       
     211</xsl:template>
    153212
    154213<xsl:template match="records" mode="table">
     
    164223                        <xsl:for-each select="$columns/*">
    165224                                <th title="{@key}" ><xsl:value-of select="@label"/></th>
    166                         </xsl:for-each>
    167                         <th><span class="edit-columns"> edit...</span> </th>
     225                        </xsl:for-each>                         
    168226                </tr></thead>
    169227                <tbody>         
     
    209267                        <xsl:for-each select="$columns/*">
    210268                        <!-- <td ><xsl:value-of select="$curr_cmd//*[name()=current()]" /></td> -->
     269                        <xsl:message><xsl:copy-of select="."></xsl:copy-of> </xsl:message>
    211270                                 <xsl:variable name="curr_col_xpath" select="@xpath" />
    212271                        <td>                   
Note: See TracChangeset for help on using the changeset viewer.