0001-portal-agent-limit-search-results-26642.patch
data/themes/gadjo/static/css/agent-portal.scss | ||
---|---|---|
115 | 115 |
text-align: center; |
116 | 116 |
} |
117 | 117 |
padding-left: 3rem; |
118 |
&.hidden { |
|
119 |
display: none; |
|
120 |
} |
|
118 | 121 |
} |
119 | 122 |
div.combo-search-results-users div.links-list li::before { |
120 | 123 |
content: "\f007"; // user |
... | ... | |
125 | 128 |
div.combo-search-results-tracking-code div.links-list li::before { |
126 | 129 |
content: "\f02a"; // barcode |
127 | 130 |
} |
131 |
div div.links-list li.see-more::before { |
|
132 |
content: "\f067"; // plus |
|
133 |
} |
|
134 |
div.combo-search-results.expanded div.links-list { |
|
135 |
li.hidden { |
|
136 |
display: block; |
|
137 |
} |
|
138 |
li.see-more { |
|
139 |
&::before { |
|
140 |
content: "\f068"; // minus |
|
141 |
} |
|
142 |
} |
|
143 |
} |
|
128 | 144 |
} |
129 | 145 | |
130 | 146 |
div.links-list { |
data/themes/gadjo/static/js/agent-portal.js | ||
---|---|---|
30 | 30 |
/* mark our location in publik menu */ |
31 | 31 |
$('#portal-agent-home').addClass('active'); |
32 | 32 |
}); |
33 |
$('div.searchcell').delegate('li.see-more a', 'click', function() { |
|
34 |
$(this).parents('.combo-search-results').toggleClass('expanded'); |
|
35 |
return false; |
|
36 |
}); |
|
33 | 37 |
}); |
data/themes/gadjo/templates/combo/search-cell-results.html | ||
---|---|---|
1 |
{% if results.data %} |
|
2 |
{% if cell.has_multiple_search_services %}<p class="search-service-label">{{ search_service.label }}</p>{% endif %} |
|
3 |
<div class="links-list"> |
|
4 |
<ul> |
|
5 |
{% for item in results.data %} |
|
6 |
{% if forloop.counter == 6 %}<li class="see-more"><a href="#">voir tous les résultats</a></li>{% endif %} |
|
7 |
<li {% if forloop.counter > 5 %}class="hidden"{% endif %}><a href="{{ item.url }}">{{ item.text }}</a> |
|
8 |
{% if item.description %}<div>{{ item.description|safe }}</div>{% endif %} |
|
9 |
</li> |
|
10 |
{% endfor %} |
|
11 |
</ul> |
|
12 |
</div> |
|
13 |
{% endif %} |
|
0 |
- |