52 lines
18 KiB
JavaScript
52 lines
18 KiB
JavaScript
var SCRUTARI_HTML = {
|
|
_name:'default',
|
|
structure:{
|
|
'area-input':'<div data-scrutari-area="input" class="scrutari-area-Input"> <div> <input type="search" size="40" name="q" value=""> <button type="submit">_ button_submit</button> </div> <button type="button" data-scrutari-button="parametersDisplay" class="scrutari-Hidden" data-scrutari-state="off"> _ button_parameters </button> </div> ',
|
|
'area-parameters':'<div data-scrutari-area="parameters" class="scrutari-area-Parameters scrutari-Hidden"> {{panel-options}} {{panel-corpus}} {{panel-base}} {{panel-lang}} {{panel-category}} <div class="scrutari-area-Resubmit"> <button type="submit">_ button_resubmit</button> </div> </div>',
|
|
'area-poweredby':'<div class="scrutari-area-Poweredby scrutari-Hidden" data-scrutari-hidden="empty"> <p> <a href="http://www.scrutari.net" target="_blank"> <span class="scrutari-icon-Logo"></span> _ link_poweredby </a> </p> </div>',
|
|
'area-result':'<div data-scrutari-area="result" class="scrutari-area-Result"> <div data-scrutari-block="paginationBlock"></div> <div> {{result-links}} </div> <div> {{result-history}} </div> <div> {{result-subsearch}} </div> </div>',
|
|
'area-stats':'<div data-scrutari-area="stats" class="scrutari-area-Stats"> {{stats-table}} </div> ',
|
|
'area-title':'<div data-scrutari-area="title" class="scrutari-area-Title"> <p> <span data-scrutari-label="mainTitle"></span> </p> </div> ',
|
|
'main-form':'<form data-scrutari-form="mainsearch" role="search"> {{area-input}} {{area-parameters}} </form>',
|
|
'main':'{{area-title}} {{main-form}} {{area-stats}} {{area-result}} {{area-poweredby}} {{modal-*}}',
|
|
'modal-help_mode':'<aside class="scrutari-Hidden" data-scrutari-modal="help_mode" aria-hidden="true"> <header> _ mode_help </header> <div> _ help_mode.html </div> </aside>',
|
|
'modal-help_periode':'<aside class="scrutari-Hidden" data-scrutari-modal="help_periode" aria-hidden="true"> <header> _ periode_help </header> <div> _ help_periode.html </div> </aside>',
|
|
'modal-help_ponderation':'<aside class="scrutari-Hidden" data-scrutari-modal="help_ponderation" aria-hidden="true"> <header> _ ponderation_help </header> <div> _ help_ponderation.html </div> </aside>',
|
|
'modal-loading':'<aside class="scrutari-Hidden" data-scrutari-modal="loading" aria-hidden="true"> <div> <span class="scrutari-icon-Loader"></span> _ loading_search </div> </aside>',
|
|
'panel-base':'<details class="scrutari-Hidden" data-scrutari-panel="base"> <summary> _ title_filter_base <span data-scrutari-label="baseFilter" class="scrutari-panel-State scrutari-Disabled" data-scrutari-alternate="_ filter_on">_ filter_off</span> </summary> <div> <div class="scrutari-panel-Toolbar"> <span class="scrutari-panel-ButtonGroup"> <button type="button" data-scrutari-button="enablePanel" data-scrutari-target="base" data-scrutari-state="off"> <span data-scrutari-alternate="_ button_filter_off">_ button_filter_on</span> </button> </span> <span class="scrutari-panel-ButtonGroup"> <button type="button" data-scrutari-button="checkAll" data-scrutari-target="base" disabled>_ button_check_all</button> <button type="button" data-scrutari-button="uncheckAll" data-scrutari-target="base" disabled>_ button_uncheck_all</button> </span> </div> <div class="scrutari-panel-Columns scrutari-Disabled" data-scrutari-block="columnsBlock-base"> <div></div> <div></div> <div></div> <div></div> </div> </div> </details>',
|
|
'panel-category':'<details class="scrutari-Hidden" data-scrutari-panel="category"> <summary> _ title_filter_category <span data-scrutari-label="categoryFilter" class="scrutari-panel-State scrutari-Disabled" data-scrutari-alternate="_ filter_on">_ filter_off</span> </summary> <div> <div class="scrutari-panel-Toolbar"> <span class="scrutari-panel-ButtonGroup"> <button type="button" data-scrutari-button="enablePanel" data-scrutari-target="category" data-scrutari-state="off"> <span data-scrutari-alternate="_ button_filter_off">_ button_filter_on</span> </button> </span> <span class="scrutari-panel-ButtonGroup"> <button type="button" data-scrutari-button="checkAll" data-scrutari-target="category" disabled>_ button_check_all</button> <button type="button" data-scrutari-button="uncheckAll" data-scrutari-target="category" disabled>_ button_uncheck_all</button> </span> </div> <div class="scrutari-panel-Columns scrutari-Disabled" data-scrutari-block="columnsBlock-category"> <div></div> <div></div> <div></div> <div></div> </div> </div> </details>',
|
|
'panel-corpus':'<details class="scrutari-Hidden" data-scrutari-panel="corpus"> <summary> _ title_filter_corpus <span data-scrutari-label="corpusFilter" class="scrutari-panel-State scrutari-Disabled" data-scrutari-alternate="_ filter_on">_ filter_off</span> </summary> <div> <div class="scrutari-panel-Toolbar"> <span class="scrutari-panel-ButtonGroup"> <button type="button" data-scrutari-button="enablePanel" data-scrutari-target="corpus" data-scrutari-state="off"> <span data-scrutari-alternate="_ button_filter_off">_ button_filter_on</span> </button> </span> <span class="scrutari-panel-ButtonGroup"> <button type="button" data-scrutari-button="checkAll" data-scrutari-target="corpus" disabled>_ button_check_all</button> <button type="button" data-scrutari-button="uncheckAll" data-scrutari-target="corpus" disabled>_ button_uncheck_all</button> </span> </div> <div class="scrutari-panel-Columns scrutari-Disabled" data-scrutari-block="columnsBlock-corpus"> <div></div> <div></div> <div></div> <div></div> </div> </div> </details>',
|
|
'panel-lang':'<details class="scrutari-Hidden" data-scrutari-panel="lang"> <summary> _ title_filter_lang <span data-scrutari-label="langFilter" class="scrutari-panel-State scrutari-Disabled" data-scrutari-alternate="_ filter_on">_ filter_off</span> </summary> <div> <div class="scrutari-panel-Toolbar"> <span class="scrutari-panel-ButtonGroup"> <button type="button" data-scrutari-button="enablePanel" data-scrutari-target="lang" data-scrutari-state="off"> <span data-scrutari-alternate="_ button_filter_off">_ button_filter_on</span> </button> </span> <span class="scrutari-panel-ButtonGroup"> <button type="button" data-scrutari-button="checkAll" data-scrutari-target="lang" disabled>_ button_check_all</button> <button type="button" data-scrutari-button="uncheckAll" data-scrutari-target="lang" disabled>_ button_uncheck_all</button> </span> </div> <div class="scrutari-panel-Columns scrutari-Disabled" data-scrutari-block="columnsBlock-lang"> <div></div> <div></div> <div></div> <div></div> </div> </div> </details>',
|
|
'panel-options':'<details data-scrutari-panel="options"> <summary> _ title_options </summary> <div> <div class="scrutari-panel-Columns"> <div> <p><span>_ mode_title</span><button data-scrutari-button="showModal" data-scrutari-target="help_mode" type="button" title="_ mode_help">?</button></p> <div> <label><input type="radio" name="q-mode" value="intersection" checked> _ mode_intersection</label> <label><input type="radio" name="q-mode" value="union"> _ mode_union</label> <label><input type="radio" name="q-mode" value="operation"> _ mode_operation</label> <label><input type="checkbox" name="wildchar" value="end" checked> _ wildchar_end</label> </div> </div> <div> <p><span>_ ponderation_title</span><button data-scrutari-button="showModal" data-scrutari-target="help_ponderation" type="button" title="_ ponderation_help">?</button></p> <div> <label><input type="radio" name="ponderation" value="pertinence" checked> _ ponderation_pertinence</label> <label><input type="radio" name="ponderation" value="date"> _ ponderation_date</label> </div> </div> <div> <p><span>_ periode_title</span><button data-scrutari-button="showModal" data-scrutari-target="help_periode" type="button" title="_ periode_help">?</button></p> <div> <input type="text" name="periode" value="" size="20"> </div> </div> </div> </div> </details>',
|
|
'result-history':'<div class="scrutari-Hidden" data-scrutari-hidden="start"> <p class="scrutari-links-Title">_ title_history</p> <div data-scrutari-block="historyList"> </div> </div>',
|
|
'result-links':'<div class="scrutari-Hidden" data-scrutari-hidden="empty"> <p class="scrutari-links-Title">_ title_share</p> <p class="scrutari-links-Permalink"> <a href="#" data-scrutari-link="permalink" target="_blank" title="_ link_permalink" > <span data-scrutari-label="permalinkValue"></span> </a> </p> <p class="scrutari-links-Title">_ title_download</p> <p> <a href="#" data-scrutari-link="ods" target="_blank" title="_ link_ods" class="scrutari-links-ButtonLike">ods</a> <a href="#" data-scrutari-link="csv" target="_blank" title="_ link_csv" class="scrutari-links-ButtonLike">csv</a> </p> <p class="scrutari-links-Title">_ title_feed</p> <p> <a href="#" data-scrutari-link="atom" target="_blank" title="_ link_atom" class="scrutari-links-ButtonLike">atom</a> </p> </div>',
|
|
'result-subsearch':'<div class="scrutari-Hidden" data-scrutari-hidden="threshold"> <form data-scrutari-form="subsearch" role="search"> <p class="scrutari-subsearch-Title">_ title_subsearch</p> <div class="scrutari-subsearch-Form"> <input type="search" size="40" name="q"> <button type="submit">_ button_subsearch</button> </div> </form> </div>',
|
|
'stats-filter':'<tr class="scrutari-Hidden" data-scrutari-hidden="filter" data-scrutari-count="stats-filter"> <td class="scrutari-stats-Cell"><abbr class="scrutari-stats-Abbr" title="_ stats_filter_title">_ stats_filter_short</abbr></td> <td class="scrutari-stats-Cell scrutari-stats-Number"><span class="scrutari-stats-Count" data-scrutari-component="value"></span></td> <td class="scrutari-stats-Cell scrutari-stats-Titles"><span data-scrutari-component="titles"></span></td> </tr>',
|
|
'stats-global':'<tr class="scrutari-Hidden" data-scrutari-hidden="init" data-scrutari-count="stats-global"> <td class="scrutari-stats-Cell"><abbr class="scrutari-stats-Abbr" title="_ stats_global_title">_ stats_global_short</abbr></td> <td class="scrutari-stats-Cell scrutari-stats-Number"><span class="scrutari-stats-Count" data-scrutari-component="value"></span></td> </tr>',
|
|
'stats-result':'<tr class="scrutari-Hidden" data-scrutari-hidden="start" data-scrutari-count="stats-result"> <td class="scrutari-stats-Cell"><abbr class="scrutari-stats-Abbr" title="_ stats_result_title">_ stats_result_short</abbr></td> <td class="scrutari-stats-Cell scrutari-stats-Number"><span class="scrutari-stats-Count" data-scrutari-component="value"></span></td> </tr>',
|
|
'stats-table':'<table class="scrutari-stats-Table"> {{stats-global}} {{stats-filter}} {{stats-result}} </table> '
|
|
},
|
|
templates:{
|
|
'base':' <p> <label class="scrutari-Label" {{if phraseMap.longtitle}}title="{{> phraseMap.longtitle}}"{{/if}}><input type="checkbox" name="base" value="{{:codebase}}" data-scrutari-title="{{> title}}"> {{if baseicon}} <img src="{{:baseicon}}" alt="" class="scrutari-panel-Icon"> {{/if}} <span data-scrutari-component="stat-text">{{> title}} <small>(<span data-scrutari-stat-type="base" data-scrutari-stat-key="{{:codebase}}" data-scrutari-stat-default="{{:stats.fiche}}"></span>{{:~scrutari_format(stats.fiche)}})</small></span> </label> </p>',
|
|
'category':' <p> <label class="scrutari-Label" {{if phraseMap.description}}title="{{> phraseMap.description}}"{{/if}}> <input type="checkbox" name="category" value="{{:name}}" data-scrutari-title="{{> title}}"> <span data-scrutari-component="stat-text">{{> title}} <small>(<span data-scrutari-stat-type="category" data-scrutari-stat-key="{{:name}}" data-scrutari-stat-default="{{:stats.fiche}}"></span>{{:~scrutari_format(stats.fiche)}})</small></span> </label> </p>',
|
|
'corpus':' <p> <label class="scrutari-Label"><input type="checkbox" name="corpus" value="{{:codecorpus}}" data-scrutari-title="{{> title}}"> <span data-scrutari-component="stat-text">{{> title}} <small>(<span data-scrutari-stat-type="corpus" data-scrutari-stat-key="{{:codecorpus}}" data-scrutari-stat-default="{{:stats.fiche}}"></span>{{:~scrutari_format(stats.fiche)}})</small></span> </label> </p>',
|
|
'fiche':' <div class="scrutari-fiche-Block" data-scrutari-block="fiche-{{:codefiche}}"> {{include tmpl="fiche_icon" /}} <div class="scrutari-fiche-Body {{if _thumbnail}}scrutari-fiche-ThumbnailBody{{/if}}"> {{for _bodyTemplateArray ~fiche=#data}} {{include ~fiche tmpl=~scrutari_client.getTemplate(#data) /}} {{/for}} </div> </div> ',
|
|
'fiche_attribute':'{{if type!=="block"}} <p class="scrutari-fiche-Attribute"> <span class="scrutari-label-Attribute">{{>title}}{{>~scrutari_loc("_ colon")}}</span> {{for valueArray ~len=valueArray.length}} {{:~scrutari_mark(#data)}}{{if #index != (~len -1)}}, {{/if}} {{/for}} </p> {{else}} <div class="scrutari-fiche-AttributeBlock"> <p class="scrutari-fiche-AttributeTitle"> <span class="scrutari-label-Attribute">{{>title}}{{>~scrutari_loc("_ colon")}}</span> </p> <div class="scrutari-fiche-AttributeValues"> {{for valueArray ~len=valueArray.length}} <p class="scrutari-fiche-AttributeValue"> {{:~scrutari_mark(#data)}} </p> {{/for}} </div> </div> {{/if}}',
|
|
'fiche_bythesaurusarray':'{{if _bythesaurusArray}} {{for _bythesaurusArray}} <p class="scrutari-fiche-Motcle"> <span class="scrutari-label-Motcle"> {{> thesaurus.title}}{{>~scrutari_loc("_ colon")}} </span> {{for motcleArray ~len=motcleArray.length}} {{if mlabelArray}}{{for mlabelArray}}{{if #index > 0}}/{{/if}}{{:~scrutari_mark(mvalue)}}{{/for}}{{/if}}{{if #index != (~len -1)}}, {{/if}} {{/for}} </p> {{/for}} {{/if}} ',
|
|
'fiche_icon':'{{if _thumbnail}} <div class="scrutari-fiche-Thumbnail"> <img class="scrutari-fiche-ThumbnailImg" alt="" src="{{:_thumbnail}}"/> {{if _icon}} <img class="scrutari-fiche-ThumbnailIcon" alt="" src="{{:_icon}}"/> {{/if}} </div> {{else _icon}} <div class="scrutari-fiche-Icon"><img alt="" src="{{:_icon}}"/></div> {{/if}} ',
|
|
'fiche_mcomplementarray':'{{if mcomplementArray}} {{for mcomplementArray}} <p class="scrutari-fiche-Complement"> <span class="scrutari-label-Complement"> {{>title}}{{>~scrutari_loc("_ colon")}} </span> {{:~scrutari_mark(mvalue)}} </p> {{/for}} {{/if}} ',
|
|
'fiche_motclearray':'{{if _motcleArray}} <p class="scrutari-fiche-Motcle"> <span class="scrutari-label-Motcle"> {{if _motcleArray.length == 1}} {{>~scrutari_loc("_ fiche_motscles_one")}} {{else}} {{>~scrutari_loc("_ fiche_motscles_many")}} {{/if}} </span> {{for _motcleArray ~len=_motcleArray.length}} {{if mlabelArray}}{{for mlabelArray}}{{if #index > 0}}/{{/if}}{{:~scrutari_mark(mvalue)}}{{/for}}{{/if}}{{if #index != (~len -1)}}, {{/if}} {{/for}} </p> {{/if}} ',
|
|
'fiche_msoustitre':'{{if msoustitre}} <p class="scrutari-fiche-Soustitre"> {{:~scrutari_mark(msoustitre)}} </p> {{/if}} ',
|
|
'fiche_mtitre':'<p class="scrutari-fiche-Titre"> <a href="{{:href}}" class="scrutari-fiche-Link" data-scrutari-link="fiche_{{:codefiche}}" {{if _target}} target="{{:_target}}"{{/if}}> {{if mtitre}} {{:~scrutari_mark(mtitre)}} {{else}} {{:href}} {{/if}} </a> </p> ',
|
|
'fiche_primaryattributearray':'{{if _primaryAttributeArray}} {{for _primaryAttributeArray tmpl="fiche_attribute" /}} {{/if}} ',
|
|
'fiche_secondaryattributearray':'{{if _secondaryAttributeArray}} {{for _secondaryAttributeArray tmpl="fiche_attribute" /}} {{/if}} ',
|
|
'fiche_year':'{{if year}} <p class="scrutari-fiche-Year"> {{:year}} </p> {{/if}} ',
|
|
'history':'<div data-scrutari-block="{{:name}}" class="scrutari-history-Block scrutari-history-Active"> <div class="scrutari-history-Search"> <button data-scrutari-button="loadHistory" data-scrutari-target="{{:name}}" class="scrutari-history-Load" {{if fichestat == 0}}disabled="disabled"{{/if}}> {{>sequence}} ({{:fichestat}}) </button> <button data-scrutari-button="removeHistory" data-scrutari-target="{{:name}}" class="scrutari-history-Remove" title="{{>~scrutari_loc(\'_ button_remove\')}}"><span aria-hidden="true">×</span></button> </div> <div class="scrutari-history-Subsearch" data-scrutari-component="subsearch"></div> </div>',
|
|
'lang':' <p> <label class="scrutari-Label"><input type="checkbox" name="lang" value="{{:lang}}" data-scrutari-title="{{:lang}}"> <span data-scrutari-component="stat-text">{{> title}} [{{:lang}}] <small>(<span data-scrutari-stat-type="lang" data-scrutari-stat-key="{{:lang}}" data-scrutari-stat-default="{{:fiche}}"></span>{{:~scrutari_format(fiche)}})</small></span> </label> </p>',
|
|
'loading':'<span class="scrutari-icon-Loader"></span> {{>~scrutari_loc(\'_ loading_pagination\')}}',
|
|
'pagination_empty':'<p><em>{{>~scrutari_loc("_ result_none")}}</em></p> {{if withFilter}} <p><em>{{>~scrutari_loc("_ result_fitlerwarning")}}</em></p> {{else scrutariResult.searchMeta.reportArray.length > 0}} <p>Analyse des termes de la recherche{{>~scrutari_loc("_ colon")}}</p> <dl> {{for scrutariResult.searchMeta.reportArray}} <dt>{{> text}}</dt> <dl> {{if canonicalArray.length > 0}} <p>Correspondances trouvées (entre parenthèses, le nombre d\'occurrences par langue): </p> <ul> {{for canonicalArray}} <li> {{> canonical}} ({{for langreportArray}}{{if #index > 0}}, {{/if}}{{:lang}}={{:ficheCount}}{{/for}}) </li> {{/for}} </ul> {{/if}} {{if neighbourArray.length > 0}} <p>Pas de correspondances trouvées. Termes se rapprochant (entre parenthèses, le code des langues concernées) : </p> <ul> {{for neighbourArray}} <li> {{> neighbour}} <small>({{for langArray}}{{if #index > 0}}, {{/if}}{{:#data}}{{/for}})</small> </li> {{/for}} </ul> {{/if}} {{if canonicalArray.length == 0 && neighbourArray.length == 0}} <p>Aucune correspondance ou terme voisin trouvé</p> {{/if}} </dl> {{/for}} </dl> {{/if}}',
|
|
'pagination_groups':'<div class="scrutari-group-List" role="tablist"> {{for array}} <button role="tab" class="scrutari-group-Tab" {{if active}}disabled{{/if}} data-scrutari-button="ficheGroupTab" {{if description}}title="{{>description}}"{{/if}} data-scrutari-target="{{:name}}"> {{>title}} ({{:fichestat}}) </button> {{/for}} </div> {{for array}} <div class="scrutari-group-Content {{if !active}}scrutari-Hidden{{/if}}" data-scrutari-block="ficheGroup-{{:name}}" data-scrutari-name="{{:name}}"> <div data-scrutari-block="topTabs-{{:name}}"></div> <div data-scrutari-block="ficheList-{{:name}}"></div> <div data-scrutari-block="bottomTabs-{{:name}}"></div> </div> {{/for}}',
|
|
'pagination_unique':'<div data-scrutari-block="topTabs"></div> <div data-scrutari-block="ficheList"></div> <div data-scrutari-block="bottomTabs"></div>',
|
|
'tabs':'<div class="scrutari-pagination-TabList"> {{for tabArray}} {{if state===\'active\'}} <button class="scrutari-pagination-Tab" disabled>{{>title}}</button> {{else state===\'etc\'}} <span class="scrutari-pagination-Etc">{{>title}}</span> {{else}} <button class="scrutari-pagination-Tab" role="tab" data-scrutari-button="paginationTab" data-scrutari-type="{{:~root.type}}" data-scrutari-position="{{:~root.position}}" data-scrutari-number="{{:number}}" {{if ~root.ficheGroupName}} data-scrutari-fiche-group-name="{{:~root.ficheGroupName}}"{{/if}}>{{>title}}</button> {{/if}} {{/for}} </div>'
|
|
}
|
|
}; |