Project

General

Profile

« Previous | Next » 

Revision 9564

Added by Chris Jones over 8 years ago

Layout the study area descriptors a bit better in a table as opposed to a div. This also accommodates the name_or_id attribute (as the Code column), whereas the div didn't handle it. Needs som work on the citation column.

refs https://github.nceas.ucsb.edu/KNB/arctic-data/issues/42

View differences:

lib/style/skins/metacatui/eml-2/eml-project.xsl
127 127

  
128 128

  
129 129
   <xsl:template name="projectstudyareadescription">
130
     <xsl:for-each select="studyAreaDescription">
131
       <label class="control-label projectStudyAreaDescription"><xsl:text>Study Area:</xsl:text></label>
130
       <xsl:for-each select="studyAreaDescription">
131
            <div class="control-group">
132
                <label class="control-label projectStudyAreaDescription"><xsl:text>Study Area Descriptors:</xsl:text></label>
133
                <div class="controls controls-well">
134
                    <table class="table table-striped">
135
                        <thead>
136
                            <th>Name</th>
137
                            <th>Code</th>
138
                            <th>Value</th>
139
                            <th>Classification System</th>
140
                        </thead>
141
                        <tbody>
142
                            <xsl:for-each select="descriptor">
143
                                <tr>
144
                                    <xsl:for-each select="descriptorValue">
145
                                        <td>
146
                                            <xsl:value-of select="../@name" />
147
                                        </td>
148
                                        <td>
149
                                            <xsl:value-of select="./@name_or_id" />
150
                                        </td>
151
                                        <td>
152
                                            <xsl:value-of select="." />
153
                                        </td>
154
                                        <td>
155
                                            <xsl:choose>
156
                                                <xsl:when test="citation != ''">
157
                                                    <xsl:for-each select="citation">
158
                                                        <label class="control-label projectCitation">Citation:</label>
159
                                                        <div class="controls controls-well">
160
                                                            <xsl:call-template name="citation" />
161
                                                        </div>
162
                                                    </xsl:for-each>
163
                                                </xsl:when>
164
                                                <xsl:otherwise>
165
                                                    <xsl:text>&#160;</xsl:text>
166
                                                </xsl:otherwise>
167
                                            </xsl:choose>
168
                                        </td>
169
                                    </xsl:for-each>
170
                                </tr>
171
                            </xsl:for-each>
172
                        </tbody>
173
                    </table>
174
                </div>
175
            </div>
176
            
177
            <xsl:for-each select="citation">
178
               <div class="control-group">
179
 	   	           <label class="control-label projectCitation">Study Area Citation:</label>
180
                   <div class="controls controls-well">
181
                       <xsl:call-template name="citation" />
182
                   </div>
183
               </div>
184
               
185
            </xsl:for-each>
186
            
187
            <xsl:for-each select="coverage">
132 188
              <div class="control-group">
133
                  <xsl:for-each select="descriptor">
134
                      <xsl:for-each select="descriptorValue">
135
                      <label class="control-label"><xsl:value-of select="../@name"/></label>
136
                          <div class="controls controls-well">
137
                             <xsl:choose>
138
                                <xsl:when test="./@citableClassificationSystem">
139
                                  <xsl:value-of select="."/>&#160;<xsl:value-of select="./@name_or_id"/>
140
                                </xsl:when>
141
                                <xsl:otherwise>
142
                                  <xsl:value-of select="."/>&#160;<xsl:value-of select="./@name_or_id"/>&#160;(No Citable Classification System)
143
                                </xsl:otherwise>
144
                              </xsl:choose>
145
                          </div>
146
                      </xsl:for-each>
147
                      
148
                      <xsl:for-each select="citation">
149
                        <label class="control-label projectCitation">Citation:</label>
150
                        <div class="controls controls-well">
151
                          <xsl:call-template name="citation" />
152
                        </div>
153
                    </xsl:for-each>
154
                    
155
               </xsl:for-each>
156
            </div>
157

  
158
       <xsl:for-each select="citation">
159
          <div class="control-group">
160
			<label class="control-label projectCitation">Study Area Citation:</label>
161
            <div class="controls controls-well">
162
              <xsl:call-template name="citation" />
163
            </div>
164
          </div>
165
          
166
      </xsl:for-each>
167

  
168
       <xsl:for-each select="coverage">
169
         <div class="control-group">
170
           <label class="control-label">Study Area Coverage:</label>
171
           <div class="controls controls-well">
172
             <xsl:call-template name="coverage" />
173
           </div>
174
         </div>
175
      </xsl:for-each>
176
    </xsl:for-each>
189
                <label class="control-label">Study Area Coverage:</label>
190
                <div class="controls controls-well">
191
                  <xsl:call-template name="coverage" />
192
                </div>
193
              </div>
194
            </xsl:for-each>
195
       </xsl:for-each>
177 196
   </xsl:template>
178 197

  
179 198

  

Also available in: Unified diff