Skip to content

Commit

Permalink
Improvements for page template
Browse files Browse the repository at this point in the history
  • Loading branch information
litvinovg committed Nov 8, 2024
1 parent 6e8dd2e commit 8fbfcac
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 33 deletions.
10 changes: 8 additions & 2 deletions webapp/src/main/webapp/css/search-results.css
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
display: inline-block;
}

.tab > a {
.tab > a:not(.more-facets-link):not(.less-facets-link){
padding: 10px 15px;
position: relative;
display: block;
Expand Down Expand Up @@ -255,5 +255,11 @@ a.hidden-search-option {
}

.extended-search-input-group {
display: none;
display: none;
}

#search-form-footer select {
border: 1px solid #e0dfdf;
margin-left: .5em;
height : 3em;
}
4 changes: 4 additions & 0 deletions webapp/src/main/webapp/css/search.css
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ span#searchHelp {
font-size:.825em;
padding-right:32px
}

.tab a:hover {
text-decoration: none;
}
img#downloadIcon {
cursor: pointer;
margin-left: 6px;
Expand Down
6 changes: 5 additions & 1 deletion webapp/src/main/webapp/css/search/custom_filters.css
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,8 @@
#browsing-options {
border-bottom: 1px solid #dde4e3;
border-top: 1px solid #dde4e3;
}
}

.facet-values label{
cursor:pointer;
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,38 +15,14 @@
<section id="browse-by" role="region">
<nav role="navigation">
<ul id="browse-classes">
<#if additionalFilters?? && additionalFilters?is_sequence>
<#if additionalFilters?has_content && additionalFilters?is_sequence >
<#list additionalFilters as filterId>
<#if filterGenericInfo.filters[filterId]?? >
<#assign filter = filterGenericInfo.filters[filterId] >
<#if ( user.loggedIn || filter.public ) && (!filter.hidden || !f.facetsRequired ) >
<li class="filter-tab">
<a href="#" <#if filter.selected || (filters[filterId]?? && filters[filterId].selected)> class="selected" </#if> >${filter.name?html}</a>
<#if filter.type == "RangeFilter">
<ul>
<#if filters[filterId]?? && filters[filterId].selected>
<li class="li-selected">
<a href="#" class="selected">
<@sl.userSelectedInput filters[filterId] "filter-form" />
</a>
</li>
</#if>
<li <#if filter.selected || (filters[filterId]?? && filters[filterId].selected)> class="li-selected" </#if>>
<@sl.rangeFilter filters[filterId] 'filter-form'/>
</li>
</ul>
<#else>
<ul id="facet-values">
<@filterFacets filter />
</ul>
</#if>
</li>
</#if>
</#if>
<@filterTab filterId />
</#list>
<@filterTab searchFilter />
<#else>
<@filterFacets filterGenericInfo.filters[searchFilter] />
</#if>
<div class="divider" style="border-top: 0.5rem solid #fff;margin: -2px;"></div>
<@filterFacets filterGenericInfo.filters[searchFilter] />
</ul>
<@alphabeticalIndexLinks />
</nav>
Expand All @@ -72,6 +48,35 @@

</#if>

<#macro filterTab filterId>
<#if filterGenericInfo.filters[filterId]?? >
<#assign filter = filterGenericInfo.filters[filterId] >
<#if ( user.loggedIn || filter.public ) && !filter.hidden >
<li class="filter-tab">
<a href="#">${filter.name?html}</a>
<#if filter.type == "RangeFilter">
<ul>
<#if filters[filterId]?? && filters[filterId].selected>
<li class="li-selected">
<a href="#" class="selected">
<@sl.userSelectedInput filters[filterId] "filter-form" />
</a>
</li>
</#if>
<li <#if filter.selected || (filters[filterId]?? && filters[filterId].selected)> class="li-selected" </#if>>
<@sl.rangeFilter filters[filterId] 'filter-form'/>
</li>
</ul>
<#else>
<ul class="facet-values">
<@filterFacets filter />
</ul>
</#if>
</li>
</#if>
</#if>
</#macro>

<#macro filteredResults>
<ul role="list">
<#if individuals??>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,13 +265,15 @@
<#macro getInput filter filterValue valueID valueNumber form="search-form">
<#assign checked = "" >
<#assign class = "" >
<#assign inputName = "filters_" + valueID >
<#if filterValue.selected>
<#assign checked = " checked=\"checked\" " >
<#assign class = "selected-input" >
</#if>
<#assign type = "checkbox" >
<#if !filter.multivalued>
<#assign type = "radio" >
<#assign inputName = "filters_" + filter.id >
</#if>
<#assign filterName = filter.id >
<#if filter.multivalued>
Expand All @@ -283,7 +285,7 @@
type="${type}"
id="${valueID?html}"
value="${filter.id?html + ":" + filterValue.id?html}"
name="filters_${valueID?html}"
name="${inputName?html}"
style="display:none;"
${checked}
class="${class}"
Expand Down

0 comments on commit 8fbfcac

Please sign in to comment.