Skip to content

Commit

Permalink
Merge pull request #163 from rafaelpezzuto/improve-new-biblio-page
Browse files Browse the repository at this point in the history
Melhora página nova de bibliometria
  • Loading branch information
rafaelpezzuto authored Jun 26, 2022
2 parents 75aa0ae + 43f216b commit 3c0ae18
Show file tree
Hide file tree
Showing 4 changed files with 438 additions and 322 deletions.
36 changes: 36 additions & 0 deletions analytics/templates/website/bibliometrics_datepicker.mako
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
## coding: utf-8
<div class="row container-fluid">
<form class="form-inline">
<div class="form-group">
<div class="input-group">
<label class="sr-only" for="seleted-year">Ano</label>
<div class="input-group-addon">
<span class="glyphicon glyphicon-calendar" aria-hidden="true"></span>
</div>
<input class="input-group-addon" id="selected-year" type="number" name="selected-year" min="1941" max="2023" value="2021"/>
<div class="input-group-addon">
<a href="#" onclick="updateData();" data-toggle="tooltip" data-placement="bottom" title="${_(u'Citações realizadas no ano selecionado')}">${_(u'aplicar')}</a>
</div>
<div class="input-group-addon">
<span class="glyphicon glyphicon-question-sign" data-toggle="popover" data-container="body" data-placement="bottom" title="${_(u'Seletor de ano de citações')}" data-content="${_(u'Utilize o campo para selecionar o ano das citações e clique em aplicar para atualizar os links.')}"></span>
</div>
</div>
</div>
</form>
</div>

<script language="javascript">
function updateData() {
csvLinks = ['link_citations_granted_count', 'link_citations_received_count', 'link_citations_received_cited_forms', 'link_citations_received_citing_pids', 'link_citations_received_standardized'];
for (var i = 0; i < csvLinks.length; i++){
changeLinkData(document.getElementById(csvLinks[i]));
}
}
function changeLinkData(element){
selected_year = document.getElementById("selected-year").value;
element.text = element.text.slice(0, -8) + selected_year + '.csv';
element.href = element.href.slice(0, -8) + selected_year + '.csv';
}
</script>
Loading

0 comments on commit 3c0ae18

Please sign in to comment.