Reference widget passes the configuration item "paragraphs" into the
[mkws-moved-to-github.git] / src / mkws-widget-reference.js
1 mkws.registerWidgetType('Reference', function() {
2   mkws.promotionFunction('Record').call(this);
3   if (!this.config.target) this.config.target = 'wikimedia_wikipedia_single_result';
4   if (!this.config.template) this.config.template = 'Reference';
5
6   this.team.registerTemplate('Reference', '\
7   <img src="{{md-thumburl}}" alt="{{md-title}}">\
8   <h1><a href="{{md-electronic-url}}">{{md-title}}</a></h1>\
9 {{#if md-title-remainder}}\
10   <b>{{md-title-remainder}}</b>\
11 {{/if}}\
12 {{#if md-title-responsibility}}\
13   <i>{{md-title-responsibility}}</i>\
14 {{/if}}\
15   {{{mkws-paragraphs md-description ' + this.config.paragraphs + '}}}\
16   <p class="mkwsCredit">Wikipedia</p>\
17 ');
18 });