Skip to content

Commit

Permalink
Revert "adding timeline of concept versions"
Browse files Browse the repository at this point in the history
This reverts commit c24a834.
  • Loading branch information
CLARVIE committed Oct 20, 2017
1 parent 533b276 commit 189e074
Show file tree
Hide file tree
Showing 10 changed files with 1,763 additions and 2,276 deletions.
57 changes: 1 addition & 56 deletions controller/RestController.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,62 +96,7 @@ public function vocabularies($request)

return $this->returnJson($ret);
}
//gives the history of thesaurus versions
public function history($request){

$vocabMatch=array();
$vocabId= $request->getVocab()->getId();
$uriConcept=$request->getUri();
$vocabVersion=$request->getVocab()->getConfig()->version();
$vocabVersionDate=$request->getVocab()->getConfig()->versionDate();
$lang = $request->getLang();
$graph=array();
$graph['uri']=$uriConcept;
foreach ($this->model->getVocabularies() as $voc) {
if($voc->getConceptInfo($uriConcept, $lang)!=null){
array_push($vocabMatch, $voc);
}
}
foreach ($vocabMatch as $v) {
$iscurrent=false;
if($v->getId()==$vocabId)
{
$iscurrent=true;
}
$graph['hasVersion'][]=array(
'skosmosVocab'=>$v->getId(),
'version'=>$v->getConfig()->version(),
'createdOn'=>$v->getConfig()->versionDate(),
'iscurrent'=>$iscurrent
);
}

$ret = array_merge_recursive($this->context, array(
'@context' => array(
'rdfs' => 'http://www.w3.org/2000/01/rdf-schema#',
'onki' => 'http://schema.onki.fi/onki#',
'dct' => 'http://purl.org/dc/terms/',
'dcterms' =>'http://purl.org/dc/terms/',
'altLabel' => 'skos:altLabel',
'broader' => 'skos:broader',
'dc11' => 'http://purl.org/dc/elements/1.1/',
'dct' => 'http://purl.org/dc/terms/',
'graph' => '@graph',
'pav' => 'http://purl.org/pav/',
'hiddenLabel' => 'skos:hiddenLabel',
'inScheme' => 'skos:inScheme',
'isothes' => 'http://purl.org/iso25964/skos-thes#',
'prefLabel' => 'skos:prefLabel',
'owl'=>'http://www.w3.org/2002/07/owl#',
'lang'=>'@language',
'related'=>'skos:related',
'value'=>'@value'
),
'graph' => array($graph))
);

return $this->returnJson($ret);
}

private function constructSearchParameters($request)
{
$parameters = new ConceptSearchParameters($request, $this->model->getConfig(), true);
Expand Down
7 changes: 0 additions & 7 deletions model/Vocabulary.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,6 @@ public function getInfo($lang = null)
if (isset($ret['owl:versionInfo'])) { // if version info availible for vocabulary convert it to a more readable format
$ret['owl:versionInfo'][0] = $this->parseVersionInfo($ret['owl:versionInfo'][0]);
}

if (isset($ret['pav:hasVersion'])) { // if version info availible for vocabulary convert it to a more readable format
$ret['pav:hasVersion']['pav:version'] []= $this->parseVersionInfo($ret['pav:hasVersion'][0]);
}

// remove duplicate values
foreach (array_keys($ret) as $prop) {
$ret[$prop] = array_unique($ret[$prop]);
Expand Down Expand Up @@ -614,6 +609,4 @@ public function getShortName() {
public function getId() {
return $this->config->getId();
}


}
8 changes: 0 additions & 8 deletions model/VocabularyConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,6 @@ public function getTitle($lang = null)
{
return $this->getLiteral('dc:title', $lang);
}
public function version($lang = null)
{
return $this->getLiteral('pav:hasVersion');
}
public function versionDate($lang = null)
{
return $this->getLiteral('pav:createdOn');
}

/**
* Returns a boolean value set in the vocabularies.ttl config.
Expand Down
222 changes: 0 additions & 222 deletions resource/css/stylesheet.css

This file was deleted.

14 changes: 3 additions & 11 deletions resource/js/docready.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

$(function() { // DOCUMENT READY

var spinner = '<div class="loading-spinner"><span class="spinner-text">'+ loading_text + '</span><span class="spinner" /></div>';
var searchString = ''; // stores the search field's value before autocomplete selection changes it
var selectedVocabs = [];
Expand Down Expand Up @@ -281,17 +280,10 @@ $(function() { // DOCUMENT READY
updateTitle(data);
updateTopbarLang(data);
makeCallbacks(data);
var uri = $('.uri-input-box').html();
getConceptVersions(uri,lang);
// take the content language buttons from the response
$('.header-float .dropdown-menu').empty().append($('.header-float .dropdown-menu', data).html());

}

});



return false;
}
);
Expand Down Expand Up @@ -369,9 +361,9 @@ $(function() { // DOCUMENT READY
return false;
}
var uri = $('.uri-input-box').html();
var redirectUrl = vocab + '/' + lang + '/page/?uri=' + uri;
var base_href = $('base').attr('href'); // see #315, #633
var redirectUrl = base_href + vocab + '/' + lang + '/page/?uri=' + uri;
window.location.replace(encodeURI(redirectUrl));

return false;
}
);
Expand Down
2 changes: 0 additions & 2 deletions resource/js/hierarchy.js
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,6 @@ function getTreeConfiguration() {
nodeId = node.uri;
json_url = (rest_base_url + vocab + '/children');
}

$.ajax({
data: params,
url: json_url,
Expand All @@ -522,7 +521,6 @@ function getTreeConfiguration() {
}
}
});

}
}
});
Expand Down
Loading

0 comments on commit 189e074

Please sign in to comment.