Skip to content

Commit

Permalink
ontology v2 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
nczirjak-acdh committed Feb 16, 2021
1 parent 23d2675 commit f7e8147
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion acdh_repo_gui.libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repo-styles:
js/jstree.min.js: {}
js/dataTables.bootstrap4.min.js: {}
js/datatable_init.js: {}
js/acdh_repo_gui_pager.js: {}
js/acdh_repo_gui_pager.js: {}
dependencies:
- core/drupal
- core/drupal.form
Expand Down
5 changes: 2 additions & 3 deletions js/acdh_repo_gui_pager.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ jQuery(function($) {
searchStr = searchValues[0];
}
if(searchValues[1]){
urlOrder = searchValues[1];
urlOrder = searchValues[1];
}
if(searchValues[2]){
urlLimit = searchValues[2];
Expand Down Expand Up @@ -341,8 +341,7 @@ jQuery(function($) {
let newUrlOrder = "&order="+orderBy;
let cleanPath = getCleanPath();
newurl = window.location.protocol + "//" + window.location.host + cleanPath + newUrlPage + newUrlLimit + newUrlOrder;
window.history.pushState({path:newurl},'',newurl);

window.history.pushState({path:newurl},'',newurl);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/Helper/RootViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ private function formatResultToGui(array $data)
$this->createObj(
$v->id,
'http://www.w3.org/1999/02/22-rdf-syntax-ns#type',
$this->repo->getSchema()->__get('drupal')->vocabsNamespace."Collection",
$this->repo->getSchema()->__get('drupal')->vocabsNamespace."Collection"
$this->repo->getSchema()->__get('drupal')->vocabsNamespace."TopCollection",
$this->repo->getSchema()->__get('drupal')->vocabsNamespace."TopCollection"
)
);
}
Expand Down
2 changes: 1 addition & 1 deletion templates/acdh-repo-gui-child.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
</span>
</div>
</div>
{% if data.acdhType|lower == "collection" %}
{% if data.acdhType|lower == "collection" or data.acdhType|lower == "topcollection" %}
<div class="res-el res-info col-block col-lg-12">
<div class="result-basic-info" >
<div class="res-act-button res-act-button-reverse res-act-button-treeview basic" style="text-align:left; margin-bottom:5px;">
Expand Down
10 changes: 6 additions & 4 deletions templates/acdh-repo-gui-detail.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -90,21 +90,23 @@
{{ include('/modules/contrib/arche-gui/templates/acdh-repo-gui-detail-summary-block.html.twig', {'basic': basic } ) }}

<!-- RELATED PUBLICATIONS AND RESOURCES BLOCK -->
{% if basic.getAcdhType()|lower == 'collection' or basic.getAcdhType()|lower == 'resource' or basic.getAcdhType()|lower == 'project'
or basic.getAcdhType()|lower == 'publication' %}
{% if basic.getAcdhType()|lower == 'topcollection' or basic.getAcdhType()|lower == 'collection' or basic.getAcdhType()|lower == 'resource'
or basic.getAcdhType()|lower == 'project' or basic.getAcdhType()|lower == 'publication' %}
<!-- Related Publication(s) and Resource(s) VIEW -->
{{ include('/modules/contrib/arche-gui/templates/acdh-repo-gui-detail-related-pub-res-view.html.twig') }}
{% endif%}

<!-- CITE BLOCK -->
{% if basic.getAcdhType()|lower == 'collection' or basic.getAcdhType()|lower == 'resource' or basic.getAcdhType()|lower == 'project'
{% if basic.getAcdhType()|lower == 'topcollection' or basic.getAcdhType()|lower == 'collection' or
basic.getAcdhType()|lower == 'resource' or basic.getAcdhType()|lower == 'project'
or basic.getAcdhType()|lower == 'publication' or basic.getAcdhType()|lower == 'metadata' %}
{% if extra.citeWidgetData %}
{{ include('/modules/contrib/arche-gui/templates/acdh-repo-gui-detail-cite-block.html.twig', {'result': extra.citeWidgetData } ) }}
{% endif%}
{% endif%}

{% if basic.getAcdhType()|lower == 'collection' or
{% if basic.getAcdhType()|lower == 'topcollection' or
basic.getAcdhType()|lower == 'collection' or
basic.getAcdhType()|lower == 'organisation' or
basic.getAcdhType()|lower == 'project' or
basic.getAcdhType()|lower == 'publication' or
Expand Down
2 changes: 1 addition & 1 deletion templates/acdh-repo-gui-main-page-left-block.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<div class="res-property">
<i class="material-icons">&#xE54E;</i>
{{ "Type"|trans }}:
<span class="res-rdfType"><a href="{{ url('<front>') }}search/type=Collection&payload=false/titleasc/10/1">{{ "Collection"|trans }} </a></span>
<span class="res-rdfType"><a href="{{ url('<front>') }}search/type=TopCollection&payload=false/titleasc/10/1">{{ "TopCollection"|trans }} </a></span>
</div>

{% if item.getData('acdh:hasAvailableDate') %}
Expand Down
2 changes: 1 addition & 1 deletion templates/acdh-repo-gui-main.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<span class="res-rdfType"><a href="/browser/search/type={{ item.getAcdhType() }}&payload=false/titleasc/10/1">{{ item.getAcdhType()|trans }}</a></span>
</div>
<!-- if the type is metdata/resource/collection/project then we will display the availabledate -->
{% if item.getAcdhType() == 'Metadata' or item.getAcdhType() == 'Resource' or item.getAcdhType() == 'Collection' or item.getAcdhType() == 'Project' %}
{% if item.getAcdhType() == 'Metadata' or item.getAcdhType() == 'Resource' or item.getAcdhType() == 'TopCollection' or item.getAcdhType() == 'Collection' or item.getAcdhType() == 'Project' %}
{% if item.getData('acdh:hasAvailableDate') %}
{{ item.getPropTitle('acdh:hasAvailableDate') }}
<div class="res-property">
Expand Down
2 changes: 1 addition & 1 deletion templates/acdh-repo-gui-search-full.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<span class="res-rdfType"><a href="/browser/search/type={{ item.getAcdhType() }}&payload=false/titleasc/10/1">{{ item.getAcdhType()|trans }}</a></span>
</div>
<!-- if the type is metdata/resource/collection/project then we will display the availabledate -->
{% if item.getAcdhType() == 'Metadata' or item.getAcdhType() == 'Resource' or item.getAcdhType() == 'Collection' or item.getAcdhType() == 'Project' %}
{% if item.getAcdhType() == 'Metadata' or item.getAcdhType() == 'Resource' or item.getAcdhType() == 'TopCollection' or item.getAcdhType() == 'Collection' or item.getAcdhType() == 'Project' %}
{% if item.getData('acdh:hasAvailableDate') %}
{{ item.getPropTitle('acdh:hasAvailableDate') }}
<div class="res-property">
Expand Down

0 comments on commit f7e8147

Please sign in to comment.