~ubuntu-branches/ubuntu/trusty/yelp-xsl/trusty

« back to all changes in this revision

Viewing changes to xslt/mallard/html/mal2html-page.xsl

  • Committer: Bazaar Package Importer
  • Author(s): Michael Terry
  • Date: 2011-07-09 10:02:21 UTC
  • mto: (11.1.1 experimental) (1.3.1)
  • mto: This revision was merged to the branch mainline in revision 13.
  • Revision ID: james.westby@ubuntu.com-20110709100221-27hsncxrd63leyx4
Tags: upstream-3.1.2
ImportĀ upstreamĀ versionĀ 3.1.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
92
92
        <xsl:with-param name="xref" select="$target/@id"/>
93
93
      </xsl:call-template>
94
94
    </xsl:attribute>
 
95
    <xsl:attribute name="title">
 
96
      <xsl:call-template name="mal.link.tooltip">
 
97
        <xsl:with-param name="node" select="$source"/>
 
98
        <xsl:with-param name="xref" select="$target/@id"/>
 
99
      </xsl:call-template>
 
100
    </xsl:attribute>
95
101
    <xsl:copy-of select="exsl:node-set($attrs)/*/@*"/>
96
 
    <div class="linkdiv">
97
 
      <div class="title">
98
 
        <span class="title">
99
 
          <xsl:call-template name="mal.link.content">
100
 
            <xsl:with-param name="node" select="$source"/>
101
 
            <xsl:with-param name="xref" select="$target/@id"/>
102
 
            <xsl:with-param name="role" select="$role"/>
103
 
          </xsl:call-template>
104
 
        </span>
105
 
        <xsl:call-template name="mal2html.editor.badge">
106
 
          <xsl:with-param name="target" select="$target"/>
107
 
        </xsl:call-template>
108
 
      </div>
109
 
      <xsl:if test="not($nodesc) and $target/mal:info/mal:desc">
110
 
        <div class="desc">
111
 
          <xsl:apply-templates mode="mal2html.inline.mode"
112
 
                               select="$target/mal:info/mal:desc[1]/node()"/>
113
 
        </div>
114
 
      </xsl:if>
115
 
    </div>
 
102
    <span class="title">
 
103
      <xsl:call-template name="mal.link.content">
 
104
        <xsl:with-param name="node" select="$source"/>
 
105
        <xsl:with-param name="xref" select="$target/@id"/>
 
106
        <xsl:with-param name="role" select="$role"/>
 
107
      </xsl:call-template>
 
108
      <xsl:call-template name="mal2html.editor.badge">
 
109
        <xsl:with-param name="target" select="$target"/>
 
110
      </xsl:call-template>
 
111
    </span>
 
112
    <xsl:if test="not($nodesc) and $target/mal:info/mal:desc">
 
113
      <span class="linkdiv-dash">
 
114
        <xsl:text> &#x2014; </xsl:text>
 
115
      </span>
 
116
      <span class="desc">
 
117
        <xsl:apply-templates mode="mal2html.inline.mode"
 
118
                             select="$target/mal:info/mal:desc[1]/node()"/>
 
119
      </span>
 
120
    </xsl:if>
116
121
  </a>
117
122
</xsl:template>
118
123
 
146
151
            <xsl:with-param name="xref" select="$xref"/>
147
152
          </xsl:call-template>
148
153
        </xsl:attribute>
 
154
        <xsl:attribute name="title">
 
155
          <xsl:call-template name="mal.link.tooltip">
 
156
            <xsl:with-param name="xref" select="$xref"/>
 
157
          </xsl:call-template>
 
158
        </xsl:attribute>
149
159
        <xsl:call-template name="mal.link.content">
150
160
          <xsl:with-param name="node" select="."/>
151
161
          <xsl:with-param name="xref" select="$xref"/>
152
162
          <xsl:with-param name="role" select="$role"/>
153
163
        </xsl:call-template>
154
164
      </a>
155
 
      <xsl:if test="$role = 'guide'">
156
 
        <xsl:call-template name="mal2html.editor.badge">
157
 
          <xsl:with-param name="target" select="$target"/>
158
 
        </xsl:call-template>
159
 
      </xsl:if>
 
165
      <xsl:call-template name="mal2html.editor.badge">
 
166
        <xsl:with-param name="target" select="$target"/>
 
167
      </xsl:call-template>
160
168
      <xsl:if test="not($nodesc)">
161
169
        <xsl:variable name="desc" select="$target/mal:info/mal:desc"/>
162
170
        <xsl:if test="$desc">
231
239
        <xsl:with-param name="xref" select="$node/@xref"/>
232
240
      </xsl:call-template>
233
241
    </xsl:attribute>
 
242
    <xsl:attribute name="title">
 
243
      <xsl:call-template name="mal.link.tooltip">
 
244
        <xsl:with-param name="xref" select="$node/@xref"/>
 
245
      </xsl:call-template>
 
246
    </xsl:attribute>
234
247
    <xsl:call-template name="mal.link.content">
235
248
      <xsl:with-param name="node" select="$node"/>
236
249
      <xsl:with-param name="xref" select="$node/@xref"/>
290
303
              </xsl:call-template>
291
304
            </xsl:attribute>
292
305
            <xsl:attribute name="title">
293
 
              <xsl:call-template name="mal.link.content">
 
306
              <xsl:call-template name="mal.link.tooltip">
294
307
                <xsl:with-param name="node" select="$prev"/>
295
308
                <xsl:with-param name="xref" select="$prev/../../@id"/>
296
309
              </xsl:call-template>
314
327
              </xsl:call-template>
315
328
            </xsl:attribute>
316
329
            <xsl:attribute name="title">
317
 
              <xsl:call-template name="mal.link.content">
 
330
              <xsl:call-template name="mal.link.tooltip">
318
331
                <xsl:with-param name="node" select="$next"/>
319
332
                <xsl:with-param name="xref" select="$next/@xref"/>
320
333
              </xsl:call-template>
352
365
              <xsl:with-param name="xref" select="$prev/../../@id"/>
353
366
            </xsl:call-template>
354
367
          </xsl:attribute>
 
368
          <xsl:attribute name="title">
 
369
            <xsl:call-template name="mal.link.tooltip">
 
370
              <xsl:with-param name="node" select="$prev"/>
 
371
              <xsl:with-param name="xref" select="$prev/../../@id"/>
 
372
            </xsl:call-template>
 
373
          </xsl:attribute>
355
374
          <xsl:call-template name="mal.link.content">
356
375
            <xsl:with-param name="node" select="$prev"/>
357
376
            <xsl:with-param name="xref" select="$prev/../../@id"/>
380
399
              <xsl:with-param name="xref" select="$next/@xref"/>
381
400
            </xsl:call-template>
382
401
          </xsl:attribute>
 
402
          <xsl:attribute name="title">
 
403
            <xsl:call-template name="mal.link.tooltip">
 
404
              <xsl:with-param name="node" select="$next"/>
 
405
              <xsl:with-param name="xref" select="$next/@xref"/>
 
406
            </xsl:call-template>
 
407
          </xsl:attribute>
383
408
          <xsl:call-template name="mal.link.content">
384
409
            <xsl:with-param name="node" select="$next"/>
385
410
            <xsl:with-param name="xref" select="$next/@xref"/>
450
475
              <xsl:with-param name="msgid" select="'Draft'"/>
451
476
            </xsl:call-template>
452
477
          </xsl:when>
 
478
          <xsl:when test="$revision/@status = 'outdated'">
 
479
            <xsl:call-template name="l10n.gettext">
 
480
              <xsl:with-param name="msgid" select="'Outdated'"/>
 
481
            </xsl:call-template>
 
482
          </xsl:when>
453
483
          <xsl:when test="$revision/@status = 'review'">
454
484
            <xsl:call-template name="l10n.gettext">
455
485
              <xsl:with-param name="msgid" select="'Ready for review'"/>
456
486
            </xsl:call-template>
457
487
          </xsl:when>
 
488
          <xsl:when test="$revision/@status = 'candidate'">
 
489
            <xsl:call-template name="l10n.gettext">
 
490
              <xsl:with-param name="msgid" select="'Candidate'"/>
 
491
            </xsl:call-template>
 
492
          </xsl:when>
458
493
          <xsl:when test="$revision/@status = 'final'">
459
494
            <xsl:call-template name="l10n.gettext">
460
495
              <xsl:with-param name="msgid" select="'Final'"/>
499
534
                <xsl:with-param name="msgid" select="'Draft'"/>
500
535
              </xsl:call-template>
501
536
            </xsl:when>
 
537
            <xsl:when test="$revision/@status = 'outdated'">
 
538
              <xsl:call-template name="l10n.gettext">
 
539
                <xsl:with-param name="msgid" select="'Outdated'"/>
 
540
              </xsl:call-template>
 
541
            </xsl:when>
502
542
            <xsl:when test="$revision/@status = 'review'">
503
543
              <xsl:call-template name="l10n.gettext">
504
544
                <xsl:with-param name="msgid" select="'Ready for review'"/>
505
545
              </xsl:call-template>
506
546
            </xsl:when>
 
547
            <xsl:when test="$revision/@status = 'candidate'">
 
548
              <xsl:call-template name="l10n.gettext">
 
549
                <xsl:with-param name="msgid" select="'Candidate'"/>
 
550
              </xsl:call-template>
 
551
            </xsl:when>
507
552
            <xsl:when test="$revision/@status = 'final'">
508
553
              <xsl:call-template name="l10n.gettext">
509
554
                <xsl:with-param name="msgid" select="'Final'"/>
824
869
                          <xsl:with-param name="xref" select="$xref"/>
825
870
                        </xsl:call-template>
826
871
                      </xsl:attribute>
 
872
                      <xsl:attribute name="title">
 
873
                        <xsl:call-template name="mal.link.tooltip">
 
874
                          <xsl:with-param name="xref" select="$xref"/>
 
875
                        </xsl:call-template>
 
876
                      </xsl:attribute>
827
877
                      <xsl:for-each select="$node/e:mouseover[@match = $xref]">
828
878
                        <img>
829
879
                          <xsl:copy-of select="@src | @width | @height"/>
838
888
                  </li>
839
889
                </xsl:for-each>
840
890
              </xsl:for-each>
841
 
 
842
 
 
843
 
 
844
 
 
845
891
            </ul>
846
892
          </xsl:when>
847
893
          <xsl:when test="contains($style, ' toronto ')">
865
911
                                <xsl:with-param name="xref" select="$xref"/>
866
912
                              </xsl:call-template>
867
913
                            </xsl:attribute>
 
914
                            <xsl:attribute name="title">
 
915
                              <xsl:call-template name="mal.link.tooltip">
 
916
                                <xsl:with-param name="xref" select="$xref"/>
 
917
                              </xsl:call-template>
 
918
                            </xsl:attribute>
868
919
                            <xsl:call-template name="mal.link.content">
869
920
                              <xsl:with-param name="node" select="."/>
870
921
                              <xsl:with-param name="xref" select="$xref"/>
1215
1266
  padding-</xsl:text><xsl:value-of select="$left"/><xsl:text>: 1em;
1216
1267
}
1217
1268
 
1218
 
div.desc a {
1219
 
  color: </xsl:text><xsl:value-of select="$color.text_light"/><xsl:text>;
 
1269
div.links .desc a {
 
1270
  color: inherit;
1220
1271
}
1221
 
div.desc a:hover {
 
1272
div.links .desc a:hover {
1222
1273
  color: </xsl:text><xsl:value-of select="$color.link"/><xsl:text>;
1223
1274
}
1224
1275
a.bold { font-weight: bold; }
1225
 
a.linkdiv { display: block; }
1226
 
a.linkdiv:hover { text-decoration: none; }
1227
 
div.linkdiv div.title {
 
1276
a.linkdiv {
 
1277
  display: block;
 
1278
  margin: 0;
 
1279
  padding: 0.5em;
 
1280
}
 
1281
a.linkdiv:hover {
 
1282
  text-decoration: none;
 
1283
  background-color: </xsl:text>
 
1284
    <xsl:value-of select="$color.blue_background"/><xsl:text>;
 
1285
  outline: solid 1px </xsl:text>
 
1286
    <xsl:value-of select="$color.blue_border"/><xsl:text>;
 
1287
}
 
1288
a.linkdiv > span.title {
 
1289
  display: block;
 
1290
  margin: 0;
1228
1291
  font-size: 1em;
 
1292
  font-weight: bold;
1229
1293
  color: inherit;
1230
1294
}
1231
 
div.linkdiv div.desc {
 
1295
a.linkdiv > span.desc {
 
1296
  display: block;
 
1297
  margin: 0.2em 0 0 0;
1232
1298
  color: </xsl:text><xsl:value-of select="$color.text_light"/><xsl:text>;
1233
1299
}
1234
 
div.linkdiv {
1235
 
  margin: 0;
1236
 
  padding: 0.5em;
1237
 
  border: solid 1px </xsl:text>
1238
 
    <xsl:value-of select="$color.background"/><xsl:text>;
1239
 
}
1240
 
a:hover div.linkdiv {
1241
 
  text-decoration: none;
1242
 
  border-color: </xsl:text>
1243
 
    <xsl:value-of select="$color.blue_border"/><xsl:text>;
1244
 
  background-color: </xsl:text>
1245
 
    <xsl:value-of select="$color.blue_background"/><xsl:text>;
1246
 
}
 
1300
span.linkdiv-dash { display: none; }
1247
1301
 
1248
1302
div.example {
1249
1303
  border-</xsl:text><xsl:value-of select="$left"/><xsl:text>: solid 4px </xsl:text>
1270
1324
  margin: 0; padding: 0;
1271
1325
  list-style-type: none;
1272
1326
}
1273
 
li.tree { margin: 0; padding: 0; }
 
1327
li.tree { margin: -2px 0 0 0; padding: 0; }
1274
1328
li.tree div { margin: 0; padding: 0; }
1275
1329
ul.tree ul.tree {
1276
1330
  margin-</xsl:text><xsl:value-of select="$left"/><xsl:text>: 1.44em;
1332
1386
    <xsl:value-of select="$color.text_light"/><xsl:text>;
1333
1387
  border: solid 1px </xsl:text>
1334
1388
    <xsl:value-of select="$color.red_border"/><xsl:text>;
 
1389
  background-color: </xsl:text>
 
1390
    <xsl:value-of select="$color.yellow_background"/><xsl:text>;
1335
1391
}
1336
 
span.status-stub { background-color: </xsl:text>
1337
 
  <xsl:value-of select="$color.red_background"/><xsl:text>; }
1338
 
span.status-draft { background-color: </xsl:text>
1339
 
  <xsl:value-of select="$color.red_background"/><xsl:text>; }
1340
 
span.status-incomplete { background-color: </xsl:text>
1341
 
  <xsl:value-of select="$color.red_background"/><xsl:text>; }
1342
 
span.status-review { background-color: </xsl:text>
1343
 
  <xsl:value-of select="$color.yellow_background"/><xsl:text>; }
 
1392
span.status-stub, span.status-draft, span.status-incomplete, span.status-outdated { background-color: </xsl:text>
 
1393
  <xsl:value-of select="$color.red_background"/><xsl:text>; }
1344
1394
</xsl:text>
1345
1395
</xsl:if>
1346
1396
</xsl:template>