Commit f6cb0f71 authored by Administrator's avatar Administrator

Merge branch 'samuel' into merge

parents fae79313 15dbf721
...@@ -54,9 +54,9 @@ urlpatterns = patterns('', ...@@ -54,9 +54,9 @@ urlpatterns = patterns('',
url(r'^project/(\d+)/corpus/(\d+)/journals/journals.json$', corpus_views.test_journals), url(r'^project/(\d+)/corpus/(\d+)/journals/journals.json$', corpus_views.test_journals),
url(r'^project/(\d+)/corpus/(\d+)/journals', corpus_views.get_journals), url(r'^project/(\d+)/corpus/(\d+)/journals', corpus_views.get_journals),
# Terms view # # Terms view
url(r'^project/(\d+)/corpus/(\d+)/terms/ngrams.json$', corpus_views.test_ngrams), # url(r'^project/(\d+)/corpus/(\d+)/terms/ngrams.json$', corpus_views.test_ngrams),
url(r'^project/(\d+)/corpus/(\d+)/terms', corpus_views.get_ngrams), # url(r'^project/(\d+)/corpus/(\d+)/terms', corpus_views.get_ngrams),
# Update corpus # Update corpus
url(r'^project/(\d+)/corpus/(\d+)/(\w+)/update$', views.update), url(r'^project/(\d+)/corpus/(\d+)/(\w+)/update$', views.update),
...@@ -108,7 +108,9 @@ urlpatterns = patterns('', ...@@ -108,7 +108,9 @@ urlpatterns = patterns('',
url(r'^tests/project/(\d+)/ISTEXquery/go$', pubmedscrapper.testISTEX), url(r'^tests/project/(\d+)/ISTEXquery/go$', pubmedscrapper.testISTEX),
url(r'^tests/paginator/corpus/(\d+)/$', views.newpaginatorJSON), url(r'^tests/paginator/corpus/(\d+)/$', views.newpaginatorJSON),
url(r'^tests/move2trash/$' , views.move_to_trash_multiple ), url(r'^tests/move2trash/$' , views.move_to_trash_multiple ),
url(r'^corpus/(\d+)/document/(\d+)/testpage$', samtest.test_test) url(r'^corpus/(\d+)/document/(\d+)/testpage$', samtest.test_test),
url(r'^project/(\d+)/corpus/(\d+)/terms/ngrams.json$', samtest.test_ngrams),
url(r'^project/(\d+)/corpus/(\d+)/terms', samtest.get_ngrams)
) )
......
...@@ -19,7 +19,7 @@ class ISTex(FileParser): ...@@ -19,7 +19,7 @@ class ISTex(FileParser):
"source" : 'corpusName', "source" : 'corpusName',
"title" : 'title', "title" : 'title',
"genre" : "genre", "genre" : "genre",
# "language_iso3" : 'MedlineCitation/Article/Language', "language_iso3" : 'language',
"doi" : 'doi', "doi" : 'doi',
"host" : 'host', "host" : 'host',
"publication_date" : 'pubdate', "publication_date" : 'pubdate',
...@@ -34,11 +34,13 @@ class ISTex(FileParser): ...@@ -34,11 +34,13 @@ class ISTex(FileParser):
try: try:
# print(path," ==> ",len(json_doc[path])) # print(path," ==> ",len(json_doc[path]))
hyperdata[key] = json_doc[path] hyperdata[key] = json_doc[path]
except: pass except:
pass
# print("|",hyperdata["publication_date"]) # print("|",hyperdata["language_iso3"])
if "doi" in hyperdata: hyperdata["doi"] = hyperdata["doi"][0] if "doi" in hyperdata:
hyperdata["doi"] = hyperdata["doi"][0]
keywords = [] keywords = []
if "keywords" in hyperdata: if "keywords" in hyperdata:
...@@ -75,6 +77,11 @@ class ISTex(FileParser): ...@@ -75,6 +77,11 @@ class ISTex(FileParser):
if "genre" in hyperdata: if "genre" in hyperdata:
if len(hyperdata["genre"])==0: if len(hyperdata["genre"])==0:
hyperdata.pop("genre") hyperdata.pop("genre")
if "language_iso3" in hyperdata:
if len(hyperdata["language_iso3"])>0:
hyperdata["language_iso3"] = hyperdata["language_iso3"][0]
else:
hyperdata["language_iso3"] = "eng"
RealDate = hyperdata["publication_date"] RealDate = hyperdata["publication_date"]
if "publication_date" in hyperdata: hyperdata.pop("publication_date") if "publication_date" in hyperdata: hyperdata.pop("publication_date")
......
...@@ -66,7 +66,7 @@ def getGlobalStatsISTEXT(request ): ...@@ -66,7 +66,7 @@ def getGlobalStatsISTEXT(request ):
print ("LOG::TIME:_ "+datetime.datetime.now().isoformat()+" query =", query ) print ("LOG::TIME:_ "+datetime.datetime.now().isoformat()+" query =", query )
print ("LOG::TIME:_ "+datetime.datetime.now().isoformat()+" N =", N ) print ("LOG::TIME:_ "+datetime.datetime.now().isoformat()+" N =", N )
query_string = query.replace(" ","+") query_string = query.replace(" ","+")
url = "http://api.istex.fr/document/?q="+query_string url = "http://api.istex.fr/document/?q="+query_string+"&output=id,title,abstract,pubdate,corpusName,authors,language"
tasks = MedlineFetcher() tasks = MedlineFetcher()
......
...@@ -127,19 +127,9 @@ for(var i=0; i<url_elems.length; i++) { ...@@ -127,19 +127,9 @@ for(var i=0; i<url_elems.length; i++) {
url_mainIDs[url_elems[i-1]] = Number(url_elems[i]); url_mainIDs[url_elems[i-1]] = Number(url_elems[i]);
} }
} }
var theurl = "/api/nodes/"+url_mainIDs["corpus"]+"/children/duplicates?keys=title&limit=9999"
// $.ajax({
// url: theurl,
// success: function(data) {
// bisarray = data.data
// for(var i in bisarray) {
// untitlebis = bisarray[i].values
// BIS_dict[untitlebis[0]] = [bisarray[i].count , 0];// [ total amount , removed ]
// }
// pr(BIS_dict)
// if(Object.keys(BIS_dict).length>0) $("#delAll").css("visibility", "visible"); $("#delAll").show();
// }
// });
...@@ -168,7 +158,7 @@ function getRecords() { ...@@ -168,7 +158,7 @@ function getRecords() {
function transformContent2(rec_id) { function transformContent2(rec_id) {
// pr("\t\ttransformContent2: "+rec_id) // pr("\t\ttransformContent2: "+rec_id)
var elem = AjaxRecords[rec_id]; var elem = AjaxRecords[rec_id];
// pr("\t\t\t"+elem.date) // pr("\t"+elem.title)
var result = {} var result = {}
if (elem["del"]) { if (elem["del"]) {
result["id"] = elem["id"] result["id"] = elem["id"]
...@@ -261,208 +251,272 @@ function ulWriter(rowIndex, record, columns, cellWriter) { ...@@ -261,208 +251,272 @@ function ulWriter(rowIndex, record, columns, cellWriter) {
} }
function Main_test( Data , SearchFilter ) {
var DistributionDict = {}
for(var i in DistributionDict)
delete DistributionDict[i];
delete DistributionDict;
DistributionDict = {}
$("#div-table").html("")
$("#div-table").empty();
var div_table = '<p align="right">'+"\n"
div_table += '<table id="my-ajax-table" class="table table-bordered">'+"\n"
div_table += "\t"+'<thead>'+"\n"
div_table += "\t"+"\t"+'<th width="100px;" data-dynatable-column="date">Date</th>'+"\n"
div_table += "\t"+"\t"+'<th data-dynatable-column="name">Title</th>'+"\n"
div_table += "\t"+"\t"+'<th data-dynatable-column="del" data-dynatable-no-sort="true">Trash</th>'+"\n"
div_table += "\t"+"\t"+'</th>'+"\n"
div_table += "\t"+'</thead>'+"\n"
div_table += "\t"+'<tbody>'+"\n"
div_table += "\t"+'</tbody>'+"\n"
div_table += '</table>'+"\n"
div_table += '</p>';
$("#div-table").html(div_table)
var justdates = {}
for(var i in Data) {
var date = Data[i]["date"];
if ( ! justdates[date] ) justdates[date] = 0;
justdates[date]++;
// console.log(Data[i]["date"]+" : originalRecords["+arr_id+"] <- "+orig_id+" | "+Data[i]["name"])
}
// var div__filter_for_search = ''
// div__filter_for_search += '<select data-width="100px" class="selectpicker" multiple data-max-options="1">';
// div__filter_for_search += ' <optgroup label="All" data-max-options="1" selected>';
// div__filter_for_search += ' <option>Title</option>';
// div__filter_for_search += ' <option>Date</option>';
// div__filter_for_search += ' </optgroup>';
// div__filter_for_search += ' <optgroup label="Category" data-max-options="1">';
// div__filter_for_search += ' <option>Title</option>';
// div__filter_for_search += ' <option>Date</option>';
// div__filter_for_search += ' </optgroup>';
// div__filter_for_search += ' <optgroup label="Duplicates" data-max-options="1">';
// div__filter_for_search += ' <option>by DOI</option>';
// div__filter_for_search += ' <option>by Title</option>';
// div__filter_for_search += ' </optgroup>';
// div__filter_for_search += '</select>';
// $("#supmofos").html(div__filter_for_search) // $("#move2trash").prop('disabled', true);
// (3) Get records and hyperdata for paginator
$.ajax({
url: '/tests/paginator/corpus/'+url_mainIDs["corpus"],
success: function(data){
console.log(data)
var justdates = {}
for(var i in data.records) {
var orig_id = parseInt(data.records[i].id)
var arr_id = parseInt(i)
RecDict[orig_id] = arr_id;
data.records[i]["name"] = '<a target="_blank" href="/project/'+url_mainIDs["project"]+'/corpus/'+ url_mainIDs["corpus"] + '/document/'+orig_id+'">'+data.records[i]["name"]+'</a>'
data.records[i]["del"] = false
var date = data.records[i]["date"];
if ( ! justdates[date] ) justdates[date] = 0;
justdates[date]++;
// console.log(data.records[i]["date"]+" : originalRecords["+arr_id+"] <- "+orig_id+" | "+data.records[i]["name"])
}
AjaxRecords = data.records; // backup!!
// $("#move2trash").prop('disabled', true); var t0 = AjaxRecords[0].date.split("-").map(Number)
var t1 = AjaxRecords.slice(-1)[0].date.split("-").map(Number)
oldest = t0;
latest = t1;
TheBuffer = [new Date(t0[0],(t0[1]-1),t0[2]), new Date(t1[0],(t1[1]-1),t1[2])];
var t0 = AjaxRecords[0].date.split("-").map(Number)
var t1 = AjaxRecords.slice(-1)[0].date.split("-").map(Number)
oldest = t0;
latest = t1;
var arrayd3 = []
for(var e in Data) {
var date = Data[e]["date"];
if(justdates[date]!=false) {
var info = {}
info.date = date
info.dd = dateFormat.parse(date)
info.month = d3.time.month(info.dd)
info.volume = justdates[date]
arrayd3.push(info)
justdates[date] = false;
}
}
for(var i in justdates)
delete justdates[i];
delete justdates;
var ndx = crossfilter(arrayd3);
var all = ndx.groupAll();
//volumeChart:(1)
//moveChart:(1)
// monthly index avg fluctuation in percentage
var moveMonths = ndx.dimension(function (d) {
return d.month;
});
TheBuffer = [new Date(t0[0],(t0[1]-1),t0[2]), new Date(t1[0],(t1[1]-1),t1[2])]; //moveChart:(3)
var monthlyMoveGroup = moveMonths.group().reduceSum(function (d) {
return d.volume;
//return Math.abs(+d.close - +d.open);
});
//volumeChart:(2)
var volumeByMonthGroup = moveMonths.group().reduceSum(function (d) {
return d.volume / 500000;
});
var arrayd3 = [] //moveChart:(2)
for(var e in data.records) { var indexAvgByMonthGroup = moveMonths.group().reduce(
var date = data.records[e]["date"]; function (p, v) {
if(justdates[date]!=false) { ++p.days;
var info = {} p.total += (+v.open + +v.close) / 2;
info.date = date p.avg = Math.round(p.total / p.days);
info.dd = dateFormat.parse(date) return p;
info.month = d3.time.month(info.dd) },
info.volume = justdates[date] function (p, v) {
arrayd3.push(info) --p.days;
justdates[date] = false; p.total -= (+v.open + +v.close) / 2;
p.avg = p.days == 0 ? 0 : Math.round(p.total / p.days);
return p;
},
function () {
return {days: 0, total: 0, avg: 0};
} }
} );
moveChart.width(800)
.height(150)
.transitionDuration(1000)
.margins({top: 10, right: 50, bottom: 25, left: 40})
.dimension(moveMonths)
.group(indexAvgByMonthGroup)
.valueAccessor(function (d) {
return d.value.avg;
})
.x(d3.time.scale().domain([new Date(t0[0],t0[1],t0[2]), new Date(t1[0],t1[1],t1[2])]))
.round(d3.time.month.round)
.xUnits(d3.time.months)
.elasticY(true)
.renderHorizontalGridLines(true)
.brushOn(false)
.compose([
dc.lineChart(moveChart)
.group(indexAvgByMonthGroup)
.valueAccessor(function (d) {
return d.value.avg;
})
.renderArea(true)
.stack(monthlyMoveGroup, function (d) {
return d.value;
})
.title(function (d) {
var value = d.value.avg ? d.value.avg : d.value;
if (isNaN(value)) value = 0;
return dateFormat(d.key) + "\n" + numberFormat(value);
})
])
.xAxis();
volumeChart.width(800)
.height(100)
.margins({top: 0, right: 50, bottom: 20, left: 40})
.dimension(moveMonths)
.group(volumeByMonthGroup)
.centerBar(true)
.gap(0)
.x(d3.time.scale().domain([new Date(t0[0],t0[1],t0[2]), new Date(t1[0],t1[1],t1[2])]))
.round(d3.time.month.round)
.xUnits(d3.time.months)
.renderlet(function (chart) {
chart.select("g.y").style("display", "none");
moveChart.filter(chart.filter());
})
.on("filtered", function (chart) {
dc.events.trigger(function () {
var chartfilt = chart.filter()
// tricky part: identifying when the moveChart changes.
if(chartfilt) {
Push2Buffer ( chart.filter() )
} else {
if(TheBuffer) {
Push2Buffer ( false )
}
}
moveChart.focus(chartfilt);
});
});
for(var i in justdates) dc.renderAll();
delete justdates[i];
delete justdates; MyTable = []
MyTable = $('#my-ajax-table').dynatable({
var ndx = crossfilter(arrayd3); dataset: {
var all = ndx.groupAll(); records: Data
//volumeChart:(1)
//moveChart:(1)
// monthly index avg fluctuation in percentage
var moveMonths = ndx.dimension(function (d) {
return d.month;
});
//moveChart:(3)
var monthlyMoveGroup = moveMonths.group().reduceSum(function (d) {
return d.volume;
//return Math.abs(+d.close - +d.open);
});
//volumeChart:(2)
var volumeByMonthGroup = moveMonths.group().reduceSum(function (d) {
return d.volume / 500000;
});
//moveChart:(2)
var indexAvgByMonthGroup = moveMonths.group().reduce(
function (p, v) {
++p.days;
p.total += (+v.open + +v.close) / 2;
p.avg = Math.round(p.total / p.days);
return p;
}, },
function (p, v) { features: {
--p.days; pushState: false,
p.total -= (+v.open + +v.close) / 2; // sort: false //i need to fix the sorting function... the current one just sucks
p.avg = p.days == 0 ? 0 : Math.round(p.total / p.days);
return p;
}, },
function () { writers: {
return {days: 0, total: 0, avg: 0}; _rowWriter: ulWriter
// _cellWriter: customCellWriter
} }
); });
MyTable.data('dynatable').paginationPage.set(1);
moveChart.width(800) MyTable.data('dynatable').process();
.height(150)
.transitionDuration(1000) if ( $(".imadiv").length>0 ) return 1;
.margins({top: 10, right: 50, bottom: 25, left: 40}) $('<br><br><div class="imadiv"></div>').insertAfter(".dynatable-per-page")
.dimension(moveMonths) $(".dynatable-record-count").insertAfter(".imadiv")
.group(indexAvgByMonthGroup) $(".dynatable-pagination-links").insertAfter(".imadiv")
.valueAccessor(function (d) {
return d.value.avg; $("#filter_search").html( $("#filter_search").html().replace('selected="selected"') );
}) $("#"+SearchFilter).attr( "selected" , "selected" )
.x(d3.time.scale().domain([new Date(t0[0],t0[1],t0[2]), new Date(t1[0],t1[1],t1[2])]))
.round(d3.time.month.round) var the_content = $("#filter_search").html();
.xUnits(d3.time.months) $(""+the_content).insertAfter("#dynatable-query-search-my-ajax-table")
.elasticY(true) // .insertAfter("#dynatable-query-search-my-ajax-table")
.renderHorizontalGridLines(true)
.brushOn(false) return "OK"
.compose([ }
dc.lineChart(moveChart)
.group(indexAvgByMonthGroup)
.valueAccessor(function (d) {
return d.value.avg;
})
.renderArea(true)
.stack(monthlyMoveGroup, function (d) {
return d.value;
})
.title(function (d) {
var value = d.value.avg ? d.value.avg : d.value;
if (isNaN(value)) value = 0;
return dateFormat(d.key) + "\n" + numberFormat(value);
})
])
.xAxis();
volumeChart.width(800)
.height(100)
.margins({top: 0, right: 50, bottom: 20, left: 40})
.dimension(moveMonths)
.group(volumeByMonthGroup)
.centerBar(true)
.gap(0)
.x(d3.time.scale().domain([new Date(t0[0],t0[1],t0[2]), new Date(t1[0],t1[1],t1[2])]))
.round(d3.time.month.round)
.xUnits(d3.time.months)
.renderlet(function (chart) {
chart.select("g.y").style("display", "none");
moveChart.filter(chart.filter());
})
.on("filtered", function (chart) {
dc.events.trigger(function () {
var chartfilt = chart.filter()
// tricky part: identifying when the moveChart changes.
if(chartfilt) {
Push2Buffer ( chart.filter() )
} else {
if(TheBuffer) {
Push2Buffer ( false )
}
}
moveChart.focus(chartfilt);
});
});
dc.renderAll();
MyTable = $('#my-ajax-table').dynatable({
dataset: {
records: data.records
},
features: {
pushState: false,
sort: false //i need to fix the sorting function... the current one just sucks
},
writers: {
_rowWriter: ulWriter
// _cellWriter: customCellWriter
}
});
if ( $(".imadiv").length>0 ) return 1;
$('<br><br><div class="imadiv"></div>').insertAfter(".dynatable-per-page")
$(".dynatable-record-count").insertAfter(".imadiv")
$(".dynatable-pagination-links").insertAfter(".imadiv")
var the_content = $("#supmofos").html();
$(""+the_content).insertAfter("#dynatable-query-search-my-ajax-table")
$("#supmofos").remove()
// .insertAfter("#dynatable-query-search-my-ajax-table")
function SearchFilters( elem ) {
var MODE = elem.value;
if( MODE == "filter_all") {
var result = Main_test(AjaxRecords , MODE)
console.log( result )
}
if( MODE == "filter_dupl-titles") {
var getDupl_API = "/api/nodes/"+url_mainIDs["corpus"]+"/children/duplicates?keys=title&limit=9999"
$.ajax({
url: getDupl_API,
success: function(data) {
bisarray = data.data
for(var i in bisarray) {
titlebis = bisarray[i].values
BIS_dict[titlebis[0]] = true;
}
var Duplicates = []
for(var r in AjaxRecords) {
if ( BIS_dict[AjaxRecords[r].title] )
Duplicates.push( AjaxRecords[r] )
}
var result = Main_test(Duplicates , MODE)
console.log( result )
MyTable.data('dynatable').sorts.clear();
MyTable.data('dynatable').sorts.add('title', 1) // 1=ASCENDING,
MyTable.data('dynatable').process();
}
});
}
}
// FIRST portion of code to be EXECUTED:
// (3) Get records and hyperdata for paginator
$.ajax({
url: '/tests/paginator/corpus/'+url_mainIDs["corpus"],
success: function(data){
for(var i in data.records) {
var orig_id = parseInt(data.records[i].id)
var arr_id = parseInt(i)
RecDict[orig_id] = arr_id;
data.records[i]["title"] = data.records[i]["name"];
data.records[i]["name"] = '<a target="_blank" href="/project/'+url_mainIDs["project"]+'/corpus/'+ url_mainIDs["corpus"] + '/document/'+orig_id+'">'+data.records[i]["name"]+'</a>'
data.records[i]["del"] = false
} }
}); AjaxRecords = data.records; // backup-ing in global variable!
var result = Main_test(data.records , "filter_all")
console.log( result )
},
});
...@@ -370,15 +370,18 @@ $("#Clean_All").click(function(){ ...@@ -370,15 +370,18 @@ $("#Clean_All").click(function(){
}); });
$("#Save_All").click(function(){ $("#Save_All").click(function(){
console.log("click in save all 01")
var sum__selected_elems = 0; var sum__selected_elems = 0;
var poubelle = [] var poubelle = []
for(var i in FlagsBuffer) for(var i in FlagsBuffer) {
if (Object.keys(FlagsBuffer[i]).length==0) poubelle.push(i) if (Object.keys(FlagsBuffer[i]).length==0)
poubelle.push(i)
sum__selected_elems += Object.keys(FlagsBuffer[i]).length; sum__selected_elems += Object.keys(FlagsBuffer[i]).length;
}
console.log("click in save all 02")
for(var i in poubelle) for(var i in poubelle)
delete FlagsBuffer[poubelle[i]]; delete FlagsBuffer[poubelle[i]];
console.log("click in save all 03, sum:"+sum__selected_elems)
if ( sum__selected_elems>0 ) { if ( sum__selected_elems>0 ) {
console.log("") console.log("")
console.log("Do the ajax conexion with API and send this array to be processed:") console.log("Do the ajax conexion with API and send this array to be processed:")
...@@ -498,11 +501,6 @@ function Main_test( data , initial) { ...@@ -498,11 +501,6 @@ function Main_test( data , initial) {
oldest = Number(min_occ); oldest = Number(min_occ);
latest = Number(max_occ); latest = Number(max_occ);
var ndx = false; var ndx = false;
ndx = crossfilter(); ndx = crossfilter();
ndx.add(DistributionList); ndx.add(DistributionList);
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
{% load staticfiles %} {% load staticfiles %}
<link rel="stylesheet" type="text/css" href="{% static "css/bootstrap.css" %}"> <link rel="stylesheet" type="text/css" href="{% static "css/bootstrap.css" %}">
<link rel="stylesheet" type="text/css" href="{% static "js/bootstrap/bootstrap-select.min.css" %}"> <!-- here goes import stylesheet js/bootstrap/bootstrap-multiselect.css, mais ca marche pas-->
<link rel="stylesheet" type="text/css" href="{% static "css/morris.css" %}"> <link rel="stylesheet" type="text/css" href="{% static "css/morris.css" %}">
<link rel="stylesheet" type="text/css" href="{% static "css/jquery.easy-pie-chart.css"%}"> <link rel="stylesheet" type="text/css" href="{% static "css/jquery.easy-pie-chart.css"%}">
...@@ -72,6 +72,7 @@ th a { ...@@ -72,6 +72,7 @@ th a {
<input type="hidden" id="list_id" value="{{ list_id }}"></input>
<div class="container"> <div class="container">
<div class="jumbotron"> <div class="jumbotron">
...@@ -87,18 +88,7 @@ th a { ...@@ -87,18 +88,7 @@ th a {
</div> </div>
<div id="collapseOne" class="panel-collapse collapse no-transition" role="tabpanel"> <div id="collapseOne" class="panel-collapse collapse no-transition" role="tabpanel">
<div class="panel-body"> <div class="panel-body">
<p align="right"> <div id="div-table"></div>
<table id="my-ajax-table" class="table table-bordered">
<thead>
<!-- <th data-dynatable-column="id">ID</th> -->
<th width="100px;" data-dynatable-column="date">Date</th>
<th data-dynatable-column="name">Title</th>
<th data-dynatable-column="del" data-dynatable-no-sort="true">Trash</th>
</thead>
<tbody>
</tbody>
</table>
</p>
<p align="right"> <p align="right">
<button id="move2trash" class="btn btn-primary btn-lg" >Trash It!</button> <button id="move2trash" class="btn btn-primary btn-lg" >Trash It!</button>
</p> </p>
...@@ -111,24 +101,70 @@ th a { ...@@ -111,24 +101,70 @@ th a {
</div> </div>
</div> </div>
<div id="supmofos"> <div class="container">
<div class="row">
<div class="col-md-4">
<div class="jumbotron">
<h3><a href="/project/{{project.id}}/corpus/{{corpus.id}}/chart">Advanced charts</a></h3>
<ol>
<li>Count</li> <!-- read, compute -->
<li>Filter</li> <!-- count, compute -->
<li>Compare</li> <!-- select, cut -->
</ol>
<h4><a href="/project/{{project.id}}/corpus/{{corpus.id}}/">Back to corpus</a></h3>
</div>
</div>
<div class="col-md-4">
<div class="jumbotron">
<!-- <h3><a href="/project/{{project.id}}/corpus/{{corpus.id}}/matrix">Matrix</a></h3> -->
<h3>Matrix (soon)</h3>
<ol>
<li>Sort</li>
<li>Group</li>
<li>Cluster</li>
</ol>
<h4><a href="/project/{{project.id}}/corpus/{{corpus.id}}/">Back to corpus</a></h3>
</div>
</div>
<div class="col-md-4">
<div class="jumbotron">
{% if processing > 0 %}
<h3> <img width="20px" src="{% static "js/libs/img2/loading-bar.gif" %}"></img> Graph (later)</h3>
{% else %}
<h3><a href="/project/{{project.id}}/corpus/{{ corpus.id }}/explorer">Graph</a></h3>
{% endif %}
<ol>
<li>Visualize</li>
<li>Explore</li>
<li>Read</li>
</ol>
<h4><a href="/project/{{project.id}}/corpus/{{corpus.id}}/">Back to corpus</a></h3>
</div>
</div>
</div>
</div>
<select data-width="100px" dir="ltr" class="selectpicker"> <div id="filter_search" style="visibility:hidden">
<option selected>All</option> <select id="example-single-optgroups" onchange="SearchFilters(this);">
<option>Title</option> <!-- <optgroup label=""> -->
<option>Date</option> <option id="filter_all" value="filter_all">All</option>
<optgroup label="Duplicates"> <!-- <option id="filter_title" value="filter_title">Title</option> -->
<option>by DOI</option> <!-- <option id="filter_date" value="filter_date">Date</option> -->
<option>by Title</option> <!-- </optgroup> -->
</optgroup> <!-- <optgroup label="Duplicates"> -->
</select> <!-- <option value="filter_doi">By DOI</option> -->
<option id="filter_dupl-titles" value="filter_dupl-titles">Duplicates by Title</option>
<!-- </optgroup> -->
</select>
</div> </div>
<script type="text/javascript" src="{% static "js/jquery/jquery.min.js" %}"></script> <script type="text/javascript" src="{% static "js/jquery/jquery.min.js" %}"></script>
<script src="{% static "js/charts/bootstrap.min.js" %}"></script> <script src="{% static "js/charts/bootstrap.min.js" %}"></script>
<script type="text/javascript" src="{% static "js/bootstrap/bootstrap-select.min.js" %}"></script> <!-- here goes import script js/bootstrap/bootstrap-multiselect.js, mais ca marche pas-->
<script type="text/javascript" src="{% static "js/jquery/jquery.dynatable.js" %}"></script> <script type="text/javascript" src="{% static "js/jquery/jquery.dynatable.js" %}"></script>
<!-- custom-lib for dynatable.js and dc.js --> <!-- custom-lib for dynatable.js and dc.js -->
......
...@@ -110,6 +110,8 @@ input[type=radio]:checked + label { ...@@ -110,6 +110,8 @@ input[type=radio]:checked + label {
{% endblock %} {% endblock %}
<input type="hidden" id="list_id" value="{{ list_id }}"></input>
{% block content %} {% block content %}
<div class="container"> <div class="container">
<div class="container"> <div class="container">
......
...@@ -114,6 +114,8 @@ input[type=radio]:checked + label { ...@@ -114,6 +114,8 @@ input[type=radio]:checked + label {
{% block content %} {% block content %}
<input type="hidden" id="list_id" value="{{ list_id }}"></input>
<div class="container"> <div class="container">
<div class="container"> <div class="container">
......
...@@ -100,7 +100,7 @@ def get_ngrams(request , project_id , corpus_id ): ...@@ -100,7 +100,7 @@ def get_ngrams(request , project_id , corpus_id ):
except ValueError: except ValueError:
raise Http404() raise Http404()
t = get_template('tests/ngrams.html') t = get_template('corpus/terms.html')
user = cache.User[request.user.username].id user = cache.User[request.user.username].id
date = datetime.datetime.now() date = datetime.datetime.now()
...@@ -173,7 +173,7 @@ def get_journals(request , project_id , corpus_id ): ...@@ -173,7 +173,7 @@ def get_journals(request , project_id , corpus_id ):
except ValueError: except ValueError:
raise Http404() raise Http404()
t = get_template('tests/journals.html') t = get_template('corpus/journals.html')
user = cache.User[request.user.username].id user = cache.User[request.user.username].id
date = datetime.datetime.now() date = datetime.datetime.now()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment