Commit e906897e authored by Romain Loth's avatar Romain Loth

Merge branch 'testing' into romain-testing

(adds the new 'source' names that were formerly known as 'journal')
parents 6f3032d5 5e27f308
......@@ -24,7 +24,7 @@ class CernParser(Parser):
"773":{
"c": "pages",
"n": "issue",
"p": "journal",
"p": "source",
"v": "volume",
"y": "publication_year"
},
......
......@@ -159,11 +159,11 @@ class EuropresseParser(Parser):
try:
pub_name = html_article.xpath(name_xpath)[0].text
name = pub_name.split(', ')
hyperdata['journal'] = name[0]
hyperdata['number'] = name[1]
hyperdata['source'] = name[0]
hyperdata['number'] = name[1]
except:
try:
hyperdata['journal'] = pub_name.strip()
hyperdata['source'] = pub_name.strip()
except:
pass
......
......@@ -10,7 +10,7 @@ class ISIParser(RISParser):
"TI": {"type": "hyperdata", "key": "title", "separator": " "},
"AU": {"type": "hyperdata", "key": "authors", "separator": ", "},
"DI": {"type": "hyperdata", "key": "doi"},
"SO": {"type": "hyperdata", "key": "journal"},
"SO": {"type": "hyperdata", "key": "source"},
"PY": {"type": "hyperdata", "key": "publication_year"},
"PD": {"type": "hyperdata", "key": "publication_month"},
"LA": {"type": "hyperdata", "key": "language_fullname"},
......
......@@ -64,7 +64,7 @@ class ISTexParser(Parser):
hyperdata["publication_date"].append( hyperdata["host"]["pubdate"] )
if "title" in hyperdata["host"]:
hyperdata["journal"] = hyperdata["host"]["title"]
hyperdata["source"] = hyperdata["host"]["title"]
authors=False
if "authorsRAW" in hyperdata:
......
......@@ -7,7 +7,7 @@ from io import BytesIO
class PubmedParser(Parser):
hyperdata_path = {
"journal" : 'MedlineCitation/Article/Journal/Title',
"source" : 'MedlineCitation/Article/Journal/Title',
"title" : 'MedlineCitation/Article/ArticleTitle',
"abstract" : 'MedlineCitation/Article/Abstract/AbstractText',
"title2" : 'MedlineCitation/Article/VernacularTitle',
......
......@@ -19,7 +19,7 @@ class RepecParser(Parser):
b"T1": {"type": "hyperdata", "key": "title", "separator": " "},
b"ST": {"type": "hyperdata", "key": "subtitle", "separator": " "},
b"A1": {"type": "hyperdata", "key": "authors", "separator": "\n"},
b"JO": {"type": "hyperdata", "key": "journal"},
b"JO": {"type": "hyperdata", "key": "source"},
b"UR": {"type": "hyperdata", "key": "doi"},
b"Y1": {"type": "hyperdata", "key": "publication_year"},
b"PD": {"type": "hyperdata", "key": "publication_month"},
......
......@@ -15,8 +15,8 @@ class RISParser(Parser):
"ST": {"type": "hyperdata", "key": "subtitle", "separator": " "},
"AU": {"type": "hyperdata", "key": "authors", "separator": "\n"},
"JO": {"type": "hyperdata", "key": "journal"},
"T2": {"type": "hyperdata", "key": "journal"},
"JO": {"type": "hyperdata", "key": "source"},
"T2": {"type": "hyperdata", "key": "source"},
# "T2": variant of JO (if together only last will be kept)
"UR": {"type": "hyperdata", "key": "doi"},
......
......@@ -143,6 +143,11 @@ class Status(APIView):
'''API endpoint that represent the current status of the node'''
renderer_classes = (JSONRenderer, BrowsableAPIRenderer)
def get(self, request, node_id):
if not request.user.is_authenticated():
# can't use @requires_auth because of positional 'self' within class
return HttpResponse('Unauthorized', status=401)
user = cache.User[request.user.id]
check_rights(request, node_id)
node = session.query(Node).filter(Node.id == node_id, Node.user_id== user.id).first()
......@@ -157,9 +162,19 @@ class Status(APIView):
return Response(context)
def post(self, request, data):
'''create a new status for node'''
if not request.user.is_authenticated():
# can't use @requires_auth because of positional 'self' within class
return HttpResponse('Unauthorized', status=401)
raise NotImplementedError
def put(self, request, data):
'''update status for node'''
if not request.user.is_authenticated():
# can't use @requires_auth because of positional 'self' within class
return HttpResponse('Unauthorized', status=401)
user = cache.User[request.user.id]
check_rights(request, node_id)
node = session.query(Node).filter(Node.id == node_id).first()
......@@ -170,6 +185,11 @@ class Status(APIView):
def delete(self, request):
'''delete status for node'''
if not request.user.is_authenticated():
# can't use @requires_auth because of positional 'self' within class
return HttpResponse('Unauthorized', status=401)
user = cache.User[request.user.id]
check_rights(request, node_id)
node = session.query(Node).filter(Node.id == node_id).first()
......@@ -187,6 +207,11 @@ class NodeListResource(APIView):
def get(self, request):
"""Displays the list of nodes corresponding to the query.
"""
if not request.user.is_authenticated():
# can't use @requires_auth because of positional 'self' within class
return HttpResponse('Unauthorized', status=401)
parameters, query, count = _query_nodes(request)
if parameters['formated'] == 'json':
......@@ -211,7 +236,7 @@ class NodeListResource(APIView):
writer = csv.writer(response, delimiter='\t', quoting=csv.QUOTE_MINIMAL)
keys = [ 'title' , 'journal'
keys = [ 'title' , 'source'
, 'publication_year', 'publication_month', 'publication_day'
, 'abstract', 'authors']
......@@ -236,10 +261,15 @@ class NodeListResource(APIView):
"""
def delete(self, request):
"""Removes the list of nodes corresponding to the query.
TODO : Should be a delete method!
"""
if not request.user.is_authenticated():
# can't use @requires_auth because of positional 'self' within class
return HttpResponse('Unauthorized', status=401)
parameters = get_parameters(request)
parameters = validate(parameters, {'ids': list} )
try :
......@@ -267,6 +297,11 @@ class NodeListHaving(APIView):
2016-09: add total counts to output json
'''
def get(self, request, corpus_id):
if not request.user.is_authenticated():
# can't use @requires_auth because of positional 'self' within class
return HttpResponse('Unauthorized', status=401)
parameters = get_parameters(request)
parameters = validate(parameters, {'score': str, 'ngram_ids' : list} )
......@@ -316,7 +351,7 @@ class NodeListHaving(APIView):
'id': node.id,
'score': score,
}
for key in ('title', 'publication_date', 'journal', 'authors', 'fields'):
for key in ('title', 'publication_date', 'source', 'authors', 'fields'):
if key in node.hyperdata:
node_dict[key] = node.hyperdata[key]
nodes_list.append(node_dict)
......@@ -332,6 +367,11 @@ class NodeResource(APIView):
# contains a check on user.id (within _query_nodes)
def get(self, request, node_id):
if not request.user.is_authenticated():
# can't use @requires_auth because of positional 'self' within class
return HttpResponse('Unauthorized', status=401)
parameters, query, count = _query_nodes(request, node_id)
if not len(query):
raise Http404()
......@@ -341,6 +381,11 @@ class NodeResource(APIView):
# contains a check on user.id (within _query_nodes)
def delete(self, request, node_id):
if not request.user.is_authenticated():
# can't use @requires_auth because of positional 'self' within class
return HttpResponse('Unauthorized', status=401)
parameters, query, count = _query_nodes(request, node_id)
if not len(query):
raise Http404()
......@@ -363,6 +408,11 @@ class NodeResource(APIView):
TODO 1 factorize with .projects.ProjectView.put and .post (thx c24b)
TODO 2 allow other changes than name
"""
if not request.user.is_authenticated():
# can't use @requires_auth because of positional 'self' within class
return HttpResponse('Unauthorized', status=401)
# contains a check on user.id (within _query_nodes)
parameters, query, count = _query_nodes(request, node_id)
......@@ -435,6 +485,11 @@ class CorpusFavorites(APIView):
(will test if docs 53 and 54 are among the favorites of corpus 2)
(returns the intersection of fav docs with [53,54])
"""
if not request.user.is_authenticated():
# can't use @requires_auth because of positional 'self' within class
return HttpResponse('Unauthorized', status=401)
fav_node = self._get_fav_node(corpus_id)
req_params = validate(
......@@ -573,12 +628,12 @@ class CorpusFavorites(APIView):
class CorpusFacet(APIView):
"""Loop through a corpus node's docs => do counts by a hyperdata field
(url: /api/nodes/<node_id>/facets?hyperfield=<journal>)
(url: /api/nodes/<node_id>/facets?hyperfield=<source>)
"""
# - old url: '^project/(\d+)/corpus/(\d+)/journals/journals.json$',
# - old view: tests.ngramstable.views.get_journals_json()
# - old url: '^project/(\d+)/corpus/(\d+)/source/sources.json$',
# - old view: tests.ngramstable.views.get_sourcess_json()
# - now generalized for various hyperdata field:
# -> journal
# -> source
# -> publication_year
# -> rubrique
# -> language...
......@@ -586,6 +641,11 @@ class CorpusFacet(APIView):
def get(self, request, node_id):
# check that the node is a corpus
# ? faster from cache than: corpus = session.query(Node)...
if not request.user.is_authenticated():
# can't use @requires_auth because of positional 'self' within class
return HttpResponse('Unauthorized', status=401)
corpus = cache.Node[node_id]
if corpus.typename != 'CORPUS':
raise ValidationException(
......@@ -597,7 +657,7 @@ class CorpusFacet(APIView):
# check that the hyperfield parameter makes sense
_facet_available_subfields = [
'journal', 'publication_year', 'rubrique',
'source', 'publication_year', 'rubrique',
'language_iso2', 'language_iso3', 'language_name',
'authors'
]
......@@ -619,8 +679,8 @@ class CorpusFacet(APIView):
'by': { subfield: xcounts }
})
def _ndocs_by_facet(self, subfield='journal'):
"""for example on 'journal'
def _ndocs_by_facet(self, subfield='source'):
"""for example on 'source'
xcounts = {'j good sci' : 25, 'nature' : 32, 'j bla bla' : 1... }"""
xcounts = defaultdict(int)
......
......@@ -20,7 +20,7 @@ urlpatterns = [ url(r'^nodes$' , nodes.NodeListResource.as_view()
#?view=docs
#Corpora
, url(r'^projects/(\d+)/corpora/(\d+)$' , corpora.CorpusView.as_view() )
#?view=journal
#?view=source
#?view=title
#?view=analytics
#Sources
......
......@@ -46,11 +46,11 @@ def docs_by_titles(request, project_id, corpus_id):
)
@requires_auth
def docs_by_journals(request, project_id, corpus_id):
def docs_by_sources(request, project_id, corpus_id):
'''
Browse journal titles for a given corpus
NB: javascript in page will GET counts from our api: facets?subfield=journal
# TODO refactor Journals_dyna_charts_and_table.js
Browse source titles for a given corpus
NB: javascript in page will GET counts from our api: facets?subfield=source
# TODO refactor Sources_dyna_charts_and_table.js
'''
# we pass our corpus to mark it's a corpora page
corpus = cache.Node[corpus_id]
......@@ -60,9 +60,9 @@ def docs_by_journals(request, project_id, corpus_id):
source_type = corpus.resources()[0]['type']
# rendered page : journals.html
# rendered page : sources.html
return render(
template_name = 'pages/corpora/journals.html',
template_name = 'pages/corpora/sources.html',
request = request,
context = {
'debug': settings.DEBUG,
......@@ -70,7 +70,7 @@ def docs_by_journals(request, project_id, corpus_id):
'project': project,
'corpus' : corpus,
'resourcename' : get_resource(source_type)['name'],
'view': 'journals'
'view': 'sources'
},
)
......@@ -79,7 +79,7 @@ def docs_by_authors(request, project_id, corpus_id):
'''
Browse authors for a given corpus
NB: javascript in page will GET counts from our api: facets?subfield=author
# TODO refactor Author && Journals_dyna_charts_and_table.js
# TODO refactor Author && Sources_dyna_charts_and_table.js
'''
# we pass our corpus to mark it's a corpora page
corpus = cache.Node[corpus_id]
......@@ -89,7 +89,7 @@ def docs_by_authors(request, project_id, corpus_id):
source_type = corpus.resources()[0]['type']
# rendered page : journals.html
# rendered page : sources.html
return render(
template_name = 'pages/corpora/authors.html',
request = request,
......
......@@ -24,10 +24,10 @@ urlpatterns = [
# corpora
url(r'^projects/(\d+)/corpora/(\d+)/?$', corpora.docs_by_titles),
# corpus by journals
url(r'^projects/(\d+)/corpora/(\d+)/journals/?$', corpora.docs_by_journals),
# corpus by sources
url(r'^projects/(\d+)/corpora/(\d+)/sources/?$', corpora.docs_by_sources),
# corpus by journals
# corpus by authors
url(r'^projects/(\d+)/corpora/(\d+)/authors/?$', corpora.docs_by_authors),
# terms table for the corpus
......
......@@ -7,6 +7,9 @@ from collections import defaultdict
from networkx.readwrite import json_graph
def filterByBridgeness(G,partition,ids,weight,bridgeness,type,field1,field2):
'''
What is bridgeness ?
'''
# Data are stored in a dict(), (== hashmap by default for Python)
data = dict()
if type == "node_link":
......
......@@ -71,8 +71,8 @@ def get_graph( request=None , corpus=None
return {'state': "mapListError", "length" : mapList_size}
# case of corpus not big enough
# ==============================
# Instantiate query for case of corpus not big enough
# ===================================================
corpus_size_query = (session.query(Node)
.filter(Node.typename=="DOCUMENT")
.filter(Node.parent_id == corpus.id)
......
......@@ -56,7 +56,6 @@ def format_html(link):
# TODO check authentication
class Graph(APIView):
'''
REST part for graphs.
......@@ -69,6 +68,10 @@ class Graph(APIView):
graph?field1=ngrams&field2=ngrams&start=''&end=''
'''
if not request.user.is_authenticated():
# can't use @requires_auth because of positional 'self' within class
return HttpResponse('Unauthorized', status=401)
# Get the node we are working with
corpus = session.query(Node).filter(Node.id==corpus_id).first()
......
......@@ -61,14 +61,20 @@ def myGraphs(request, project_id, corpus_id):
coocs_count = dict()
for cooc in coocs:
# FIXME : approximativ number of nodes (not exactly what user sees in explorer)
cooc_nodes = (session.query(Ngram.id)
# Need to be connected with Graph Clustering
cooc_nodes = (session.query(Ngram.id,func.count(Ngram.id))
.join(NodeNgramNgram, NodeNgramNgram.ngram1_id == Ngram.id)
.filter(NodeNgramNgram.node_id==cooc.id)
.filter(NodeNgramNgram.weight > 0)
.filter(NodeNgramNgram.weight >= 1)
.group_by(Ngram.id)
.all()
)
coocs_count[cooc.id] = len(set(cooc_nodes))
#for n in cooc_nodes:
# print(n)
#coocs_count[cooc.id] = len(cooc_nodes)
coocs_count[cooc.id] = len([cooc_node for cooc_node in cooc_nodes if cooc_node[1] > 1])
return render(
template_name = 'pages/corpora/myGraphs.html',
......
......@@ -143,7 +143,7 @@ var RecDict={};
var AjaxRecords = []
var Garbage = {}
var countByTitles = {} // useful for title duplicates
var countByMeta = {} // for title + date + journal duplicates
var countByMeta = {} // for title + date + source duplicates
var favorites = {}
function getRecord(rec_id) {
......@@ -197,7 +197,7 @@ function transformContent2(rec_id, trClass) {
if (elem["del"]) {
result["id"] = elem["id"]
result["short_date"] = '<strike>'+elem["short_date"]+'</strike>'
result["hyperdata.journal"] = '<strike><small><i>'+elem["hyperdata"]["journal"]+'</small></i></strike>'
result["hyperdata.source"] = '<strike><small><i>'+elem["hyperdata"]["source"]+'</small></i></strike>'
result["docurl"] = '<strike>'+elem["docurl"]+'</strike>'
result["isFavorite"] = favstatusToStar(rec_id, elem["isFavorite"], boolStrike=true)
result["rawtitle"] = elem["rawtitle"]
......@@ -211,7 +211,7 @@ function transformContent2(rec_id, trClass) {
} else {
result["id"] = elem["id"]
result["short_date"] = elem["short_date"]
result["hyperdata.journal"] = '<small><i>'+elem["hyperdata"]["journal"]+'</i></small>'
result["hyperdata.source"] = '<small><i>'+elem["hyperdata"]["source"]+'</i></small>'
result["docurl"] = elem["docurl"]
result["isFavorite"] = favstatusToStar(rec_id, elem["isFavorite"])
result["rawtitle"] = elem["rawtitle"]
......@@ -350,7 +350,7 @@ function metaSignature(docRecord) {
var keyStr = ""
keyStr = (docRecord.rawtitle
+"--"+
docRecord.hyperdata.journal
docRecord.hyperdata.source
+"--"+
docRecord.hyperdata.publication_date
)
......@@ -376,7 +376,7 @@ function Main_test(Data) {
div_table += "\t"+"\t"+'<span class="glyphicon glyphicon-calendar"></span> Date</th>'+"\n"
div_table += "\t"+"\t"+'<th data-dynatable-column="docurl">'+"\n"
div_table += "\t"+"\t"+'<span class="glyphicon glyphicon-text-size"></span> Title</th>'+"\n"
div_table += "\t"+"\t"+'<th width="100px;" data-dynatable-column="hyperdata.journal">'+"\n"
div_table += "\t"+"\t"+'<th width="100px;" data-dynatable-column="hyperdata.source">'+"\n"
div_table += "\t"+"\t"+'<span class="glyphicon glyphicon-book"></span> Source</th>'+"\n"
div_table += "\t"+"\t"+'<th data-dynatable-column="isFavorite">'+"\n"
div_table += "\t"+"\t"+'<span class="glyphicon glyphicon-star"></span>'+"\n"
......@@ -553,7 +553,7 @@ function Main_test(Data) {
sortTypes: {
signature: 'signatureSort',
docurl: 'rawtitleSort',
'hyperdata.journal': 'journalSort'
'hyperdata.source': 'sourceSort'
}
},
features: {
......@@ -628,10 +628,10 @@ function Main_test(Data) {
MyTable.data('dynatable').sorts.functions["rawtitleSort"] = makeAlphaSortFunctionOnProperty('rawtitle')
MyTable.data('dynatable').sorts.functions["signatureSort"] = makeAlphaSortFunctionOnProperty('signature')
MyTable.data('dynatable').sorts.functions["journalSort"] = function journalSort (rec1,rec2, attr, direction) {
MyTable.data('dynatable').sorts.functions["sourceSort"] = function sourceSort (rec1,rec2, attr, direction) {
// like rawtitle but nested property
if (direction == 1) return rec1.hyperdata.journal.localeCompare(rec2.hyperdata.journal)
else return rec2.hyperdata.journal.localeCompare(rec1.hyperdata.journal)
if (direction == 1) return rec1.hyperdata.source.localeCompare(rec2.hyperdata.source)
else return rec2.hyperdata.source.localeCompare(rec1.hyperdata.source)
}
// hook on page change
......
......@@ -397,7 +397,7 @@ function Main_test( data , initial) {
.title(function (d) {
var value = d.data.value.avg ? d.data.value.avg : d.data.value;
if (isNaN(value)) value = 0;
return value+" journals with "+Number(d.key)+" publications";
return value+" sources with "+Number(d.key)+" publications";
})
.xAxis();
LineChart.yAxis().ticks(5)
......@@ -493,21 +493,21 @@ console.log(window.location.href)
// match corpus_id in the url
var corpus_id ;
rematch = window.location.href.match(/corpora\/(\d+)\/journals\/?$/)
rematch = window.location.href.match(/corpora\/(\d+)\/sources\/?$/)
if (rematch) {
corpus_id = rematch[1] ;
$.ajax({
url: window.location.origin
+ "/api/nodes/"
+ corpus_id
+ "/facets?hyperfield=journal",
+ "/facets?hyperfield=source",
success: function(data){
console.log(data)
$("#content_loader").remove()
// // Initializing the Charts and Table
var result = Main_test( data.by.journal , "FirstScore" )
var result = Main_test( data.by.source , "FirstScore" )
console.log( result )
$("#content_loader").remove()
......
......@@ -524,9 +524,9 @@ function genericGetTopPapers(theids , corpus_id , thediv) {
var gquery = "https://search.iscpif.fr/?categories=general&q="+pub["title"].replace(" "+"+")
var getpubAPI = window.location.origin+"/nodeinfo/"+pub["id"]
var ifjournal="",ifauthors="",ifkeywords="",ifdate="",iftitle="";
var ifsource="",ifauthors="",ifkeywords="",ifdate="",iftitle="";
if(pub["journal"]) ifjournal = "<br>Published in <a>"+pub["journal"]+"</a>";
if(pub["source"]) ifsource = "<br>Published in <a>"+pub["source"]+"</a>";
if(pub["authors"]) {
ifauthors = "By "+pub["authors"]+"";
if(pub["authors"] == "not found") {
......@@ -542,7 +542,7 @@ function genericGetTopPapers(theids , corpus_id , thediv) {
var jsparams = 'height=700,width=800,left=10,top=10,resizable=yes,scrollbars=yes,toolbar=no,menubar=no,location=no,directories=no,status=no'
jsstuff += "wnws_buffer = window.open('"+getpubAPI+"', 'popUpWindow' , '"+jsparams+"')";
output += "<li><a onclick=\""+jsstuff+"\" target=_blank>"+pub["title"]+"</a>. "+ifauthors+". "+ifjournal+". "+ifkeywords+". "+ifdate+"\n";
output += "<li><a onclick=\""+jsstuff+"\" target=_blank>"+pub["title"]+"</a>. "+ifauthors+". "+ifsource+". "+ifkeywords+". "+ifdate+"\n";
output += '<a href="'+gquery+'" target=_blank><img title="Query the anonymous web" src="'+window.location.origin+'/static/img/searx.png"></img></a>'
output +="</li>\n";
// for(var j in pub) {
......@@ -624,9 +624,9 @@ function getTopPapers(type){
// link to matching document (with focus=selections_ids param)
var getpubAPI = window.location.origin+'/projects/'+url_mainIDs["projects"]+'/corpora/'+ url_mainIDs["corpora"] + '/documents/'+pub["id"]+'/focus='+theids.join(",")
var ifjournal="",ifauthors="",ifkeywords="",ifdate="",iftitle="";
var ifsource="",ifauthors="",ifkeywords="",ifdate="",iftitle="";
if(pub["journal"]) ifjournal = "<br>Published in <a>"+pub["journal"]+"</a>";
if(pub["source"]) ifsource = "<br>Published in <a>"+pub["source"]+"</a>";
if(pub["authors"]) {
ifauthors = "By "+pub["authors"]+"";
if(pub["authors"] == "not found") {
......@@ -642,7 +642,7 @@ function getTopPapers(type){
var jsparams = 'height=700,width=800,left=10,top=10,resizable=yes,scrollbars=yes,toolbar=no,menubar=no,location=no,directories=no,status=no'
jsstuff += "wnws_buffer = window.open('"+getpubAPI+"', 'popUpWindow' , '"+jsparams+"')";
output += "<li><a onclick=\""+jsstuff+"\" target=_blank>"+pub["title"]+"</a>. "+ifauthors+". "+ifjournal+". "+ifkeywords+". "+ifdate+"\n";
output += "<li><a onclick=\""+jsstuff+"\" target=_blank>"+pub["title"]+"</a>. "+ifauthors+". "+ifsource+". "+ifkeywords+". "+ifdate+"\n";
output += '<a href="'+gquery+'" target=_blank><img title="Query the web" src="'+window.location.origin+'/static/img/searx.png"></img></a>'
output +="</li>\n";
// for(var j in pub) {
......
......@@ -37,7 +37,7 @@
<li>From: {% if not cooc.hyperdata.start %} begin of corpus {% else %} {{cooc.hyperdata.start}} {% endif %}
, To: {% if not cooc.hyperdata.end %} end of corpus {% else %} {{cooc.hyperdata.end}} {% endif %}
</li>
<li> {{ value }} nodes with distances:
<li> ~{{ value }} nodes with distances:
<ul>
<li>
<a href="/projects/{{project.id}}/corpora/{{corpus.id}}/explorer?cooc_id={{cooc.id}}&distance=distributional&bridgeness=5">
......
......@@ -28,8 +28,8 @@
<!--<a class="btn btn-xs btn-default" role="button" href="/chart/corpus/{{ corpus.id }}/data.csv">Save</a>-->
<a class="btn btn-xs btn-default" href="javascript:volumeChart.filterAll();dc.redrawAll();">Reset</a></p>
<!-- <p style="font-size:70%">
<b>x</b>: amount of documents for the journal
<b>y</b>: number of journals with that amount
<b>x</b>: amount of documents for the source
<b>y</b>: number of sources with that amount
</p> -->
<div class="clearfix"></div>
</center>
......@@ -70,7 +70,7 @@
<div class="panel-body">
<div id="div-table">
<!-- (table id="my-ajax-table") dynamically set by Journals_dyna_chart_and_table -->
<!-- (table id="my-ajax-table") dynamically set by Sources_dyna_chart_and_table -->
</div>
</div>
......@@ -86,6 +86,6 @@
<script type="text/javascript" src="{% static "lib/jquery/dynatable/jquery.dynatable.js" %}"></script>
<!-- custom-lib for dynatable.js and dc.js -->
<script type="text/javascript" src="{% static "lib/gargantext/Journals_dyna_chart_and_table.js" %}"></script>
<script type="text/javascript" src="{% static "lib/gargantext/Sources_dyna_chart_and_table.js" %}"></script>
{% endblock %}
......@@ -117,11 +117,11 @@
</li>
<li>
<a type="button" class="btn btn-default {% if view == 'journals' %} active {% endif %}"
onclick="javascript:location.href='/projects/{{project.id}}/corpora/{{ corpus.id }}/journals'"
<a type="button" class="btn btn-default {% if view == 'sources' %} active {% endif %}"
onclick="javascript:location.href='/projects/{{project.id}}/corpora/{{ corpus.id }}/sources'"
data-target='#' href='#'>
<span class="glyphicon glyphicon-globe" aria-hidden="true"></span>
Journals
Sources
</a>
</li>
......@@ -245,7 +245,7 @@
{% else %}
<!-- TODO export journal table -->
<!-- TODO export source table -->
{% endif %}
</div>
</div>
......@@ -294,7 +294,7 @@
<p>
Gargantext
<span class="glyphicon glyphicon-registration-mark" aria-hidden="true"></span>
, version 3.0.5.3,
, version 3.0.5.4,
<a href="http://www.cnrs.fr" target="blank" title="Institution that enables this project.">
Copyrights
<span class="glyphicon glyphicon-copyright-mark" aria-hidden="true"></span>
......
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