mediawiki-extensions-Popups/resources/ext.popups.main/templates/preview-generic.mustache
Jan Drewniak 1e946a379d Custom page preview for disambiguation pages
Creating a different page preview for disambiguation pages.

This patch:
- modifies the Preview model to accept a new 'type' property
- modifies the Restbase Gateway to pass the 'type' prop to the Preview model
- creates a new template to accept both generic/disambig previews
- modifies the renderer to render the new template
- generates icons for new template through resource loader
- adds new i18n strings
- modifies event-logging "preview seen" event to send new "disambiguation" previewType
- updates event logging schema version
- adds tests for Preview model and renderer for new preview type
- does way too much? yes, yes it does.

Bug: T168392
Change-Id: Idc936cc3eabbdd99a3d98f43c66b4cdbb7d24917
2018-03-14 11:24:26 -07:00

15 lines
513 B
Plaintext

<div class="mwe-popups mwe-popups-type-{{type}}" role="tooltip" aria-hidden>
<div class="mwe-popups-container">
<div class="mw-ui-icon mw-ui-icon-element mw-ui-icon-large mw-ui-icon-preview-{{type}}"></div>
{{#showTitle}}
<strong class="mwe-popups-title">{{title}}</strong>
{{/showTitle}}
<a href="{{url}}" class="mwe-popups-extract">
{{extractMsg}}
</a>
<footer>
<a href="{{url}}" class="mwe-popups-read-link">{{linkMsg}}</a>
</footer>
</div>
</div>