Skip to content

Commit

Permalink
Add "all results" link to item page #295 / #360
Browse files Browse the repository at this point in the history
* Add "All results" link to item page
  * display tooltip when hovering text itself (not the whole box)
  • Loading branch information
Inna-r authored and OriHoch committed May 8, 2017
1 parent c335d1c commit ed42766
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 5 deletions.
4 changes: 4 additions & 0 deletions scss/_placeholders.scss
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,10 @@
width: 15px;
height: 15px;
}
.search-icon {
width: 18px;
height: 18px;
}
}

%bhs-fieldset {
Expand Down
29 changes: 24 additions & 5 deletions scss/main/_item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -670,20 +670,39 @@
top: 1em;
}
p.vertical-middle {
max-width: 80%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
.he & {
margin-right: 2em;
}
.en & {
margin-left: 2em;
}
}
&:hover {
%item-type {
width: 28px;

&.search {
.en & {
padding-right: 10px;
}
.he & {
padding-left: 10px;
}
p.vertical-middle {
margin: 0;
}

.item-type {
.en & {
float: right;
}
.type-desc-container {
width: 0;
.he & {
float: left;
@include flip ();

}
}
}
}
}
Expand Down
18 changes: 18 additions & 0 deletions templates/item/right_side.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,24 @@
<leaflet preview-data="itemController.item_data" id="mapid"></leaflet>
</div>

<div class="search-results">
<div class="search-results__header">
<en>All Search Results for:</en>
<he>לכל התוצאות עבור:</he>
</div>
<div class="search-results__field search"
ui-sref="general-search({q: itemController.item_data.Header.{{itemController.proper_lang}}})">
<p class="vertical-middle" ng-attr-title="{{itemController.item_data.Header[itemController.proper_lang]}}">
<en>{{itemController.item_data.Header.En}}</en>
<he>{{itemController.item_data.Header.He}}</he>
</p>
<div class="item-type">
<div class="search-icon">
<ng-include src="'templates/svgs/search_icon.svg'"></ng-include>
</div>
</div>
</div>
</div>
<div class="related" ng-show="itemController.related_data.length > 0">
<div class="related__header">
<en>Related Items:</en>
Expand Down
1 change: 1 addition & 0 deletions templates/svgs/search_icon.svg
Loading
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 ed42766

Please sign in to comment.