mediawiki-extensions-Popups/resources/ext.popups/templates/preview-empty.mustache
Sam Smith b2f9ffa9b0 previews: Add generic fallback preview
Changes:
* Make the gateway handle missing pages, which are characterised by the
  MediaWiki API response having both the missing property set to truthy
  and the page not having any revisions.
* Add the preview-empty template and associated "mwe-popups-is-empty"
  CSS class, which describe what an empty preview contains and how it
  should look.

Supporting changes:
* Move the original preview template into the ext.popups module.

Bug: T151054
Change-Id: Ife75bf9c6bafdfe0a6cc3e20eea853b4ac8f951b
2016-12-02 12:02:43 +00:00

14 lines
517 B
Plaintext

<div class="mwe-popups mwe-popups-is-empty" role="tooltip" aria-hidden>
<div class="mwe-popups-container">
<div class="mwe-popups-sade-face-icon"></div>
<a href="{{url}}" class="mwe-popups-extract">{{extractMsg}}</a>
<footer>
{{! If the preview "is empty", i.e. a preview can't be generated, then we
show a link to the page to make it clear that the preview can be
clicked. }}
<a href="{{url}}" class="mwe-popups-read-link">{{readMsg}}</a>
</footer>
</div>
</div>