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 var nPara = this.config.paragraphs || 0;
6 var nSent = this.config.sentences || 0;
8 this.team.registerTemplate('Reference', '\
9 <img src="{{md-thumburl}}" alt="{{md-title}}">\
10 <h1><a href="{{md-electronic-url}}">{{md-title}}</a></h1>\
11 {{#if md-title-remainder}}\
12 <b>{{md-title-remainder}}</b>\
14 {{#if md-title-responsibility}}\
15 <i>{{md-title-responsibility}}</i>\
17 {{{mkws-paragraphs md-description ' + nPara + ' ' + nSent + '}}}\
18 <p class="mkwsCredit">Wikipedia</p>\