Skip to content

Commit

Permalink
Changed RI switch buttons to tabs.
Browse files Browse the repository at this point in the history
  • Loading branch information
margaretha committed Apr 5, 2024
1 parent abd4149 commit 23f0078
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 19 deletions.
4 changes: 4 additions & 0 deletions SIS/clarin/model/centre.xqm
Expand Up @@ -48,4 +48,8 @@ declare function centre:get-centre-by-research-infrastructure($ri as xs:string,

declare function centre:get-distinct-research-infrastructures(){
fn:distinct-values($centre:centres/nodeInfo/ri)
};

declare function centre:get-deposition-centres($ri){
$centre:centres[nodeInfo/ri=$ri and @deposition=1]
};
4 changes: 4 additions & 0 deletions SIS/clarin/modules/centre.xql
Expand Up @@ -21,6 +21,10 @@ declare function cm:get-centre-by-research-infrastructure($ri as xs:string, $sta
centre:get-centre-by-research-infrastructure($ri, $status)
};

declare function cm:get-deposition-centres($ri as xs:string){
centre:get-deposition-centres($ri)
};

declare function cm:count-number-of-centres-with-recommendations($centres) {
let $centre-with-recommendations :=
for $c in $centres
Expand Down
29 changes: 23 additions & 6 deletions SIS/clarin/modules/menu.xql
Expand Up @@ -10,20 +10,37 @@ import module namespace centre = "http://clarin.ids-mannheim.de/standards/centre
:)

declare function menu:setResearchInfrastructure() {
<input id="all-RI-ID" class="ri" type="button" value="All"
onclick="setSessionCookie('ri','all')"/>,
<span class="tooltip">
<input id="all-RI-ID" class="ri" type="button" value="All"
onclick="setSessionCookie('ri','all')"/>
<span
class="tooltiptext" style="width:300px; left: 10%; top: 180%;
background-color: #9f9f9f; opacity:1;text-align:left;">Show all info regardless research infrastructures.
</span>
</span>,
for $ri in centre:get-distinct-research-infrastructures()
return
<input id="{$ri}-RI-ID" class="ri" type="button" value="{$ri}"
(<span class="tooltip">
<input id="{$ri}-RI-ID" class="ri" type="button" value="{$ri}"
onclick="setSessionCookie('ri','{$ri}')"/>
<span
class="tooltiptext" style="width:300px; left: 10%; top: 180%;
background-color: #9f9f9f;text-align:left;opacity:1;">Switch to {$ri} environment and show only
relevant info to {$ri}, e.g. format recommendations by {$ri} centres.
</span>
</span>
)
};


declare function menu:view() {
<div class="ri-tab-line">
<!--<table>
<tr><td style="white-space: pre-wrap;"></td></tr>
</table>-->
{menu:setResearchInfrastructure()}
</div>,
<div class="menu" style="margin-left:20px;">
<table>
<tr><td style="white-space: pre-wrap;">{menu:setResearchInfrastructure()}</td></tr>
</table>
<table style="font-size:13.5px; width:210px">
<tr>
<td colspan="3" class="tdmenu">
Expand Down
47 changes: 34 additions & 13 deletions SIS/clarin/resources/css/style.css
Expand Up @@ -25,8 +25,8 @@ div#all {
background:white URL(../images/bannerNeu.png) no-repeat bottom center;
color:#111;
min-height:185px;
margin:0em 10px 0 10px;
padding:12px;
margin:0 10px 0 10px;
padding-top:20px;
text-align:left;
font-weight:normal;
line-height:1.5em;
Expand Down Expand Up @@ -72,20 +72,41 @@ li{
margin-left:2px;
}

.ri{
background-color:white;
border: 1px solid #DDDDDD;
border-radius:3px;
width:65px;
padding:2px;
div.ri-tab-line {
margin: 0px 35px 5px 35px;
border-bottom: 1px solid #AAA;
background:white URL(../images/bannerNeu-lastline.png) repeat-y bottom center;
}

.ri{
position:relative;
top:2px;
background-color:transparent;
border:transparent;
/* border: 1px solid #AAA;
border-color: transparent transparent #AAA transparent;
*/
width:100px;
padding:5px 7px;
text-align:center;
color:grey;
margin-left:2px;
color:white;
margin:0px;
}

.ri:hover{
background-color: #FFFFFFDD;
color:grey;
}

.ri-active{
background-color: darkred;
color:white;
border-color: #DDD;
background-color:white;
border-bottom-color: transparent;
color:grey;
}

.ri-active:hover{
background-color:white;
}

.content{
Expand Down Expand Up @@ -337,7 +358,7 @@ th {
/* Position the tooltip text*/
position: absolute;
top:100%;
z-index: 10;
z-index: 1;
}

.tooltip:hover .tooltiptext {
Expand Down
Binary file added SIS/clarin/resources/images/bannerNeu-lastline.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 23f0078

Please sign in to comment.