Skip to content

Commit

Permalink
Adjusted search results for long file names
Browse files Browse the repository at this point in the history
  • Loading branch information
clash99 authored and amplifi committed May 2, 2017
1 parent 270133b commit a39538b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 21 deletions.
7 changes: 1 addition & 6 deletions cadasta/core/static/css/single.scss
Original file line number Diff line number Diff line change
Expand Up @@ -488,19 +488,14 @@
}

#search-results.table {
h4 {
margin-bottom: 12px;
}
img.thumb-60 {
margin-left: 24px;
}
img.thumb-60 ~ table {
width: calc(100% - 100px);
}
table.entity-attributes {
background: transparent;
border: 0;
margin-bottom: 4px;
word-break: break-all;
td {
border: 0;
padding-top: 2px;
Expand Down
38 changes: 23 additions & 15 deletions cadasta/templates/search/search_result_item.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
{% load i18n %}

<h4>
<span class="entity">{{ result.entity_type }}</span>
<a href="{{ result.url }}">{{ result.main_label }}</a>
</h4>
{% if result.image %}
<img src="{{ result.image }}" class="thumb-60 pull-left">
{% endif %}
<table class="table entity-attributes">
{% for attr in result.attributes %}
<tr>
<td class="col-md-3"><strong>{{ attr.0 }}</strong></td>
<td class="col-md-9">{{ attr.1 }}</td>
</tr>
{% endfor %}
</table>
<div class="search-result-item">
<h4>
<span class="entity">{{ result.entity_type }}</span>
<a href="{{ result.url }}">{{ result.main_label }}</a>
</h4>
<div class="media">
{% if result.image %}
<div class="media-left">
<img src="{{ result.image }}" class="thumb-60">
</div>
{% endif %}
<div class="media-body">
<table class="table entity-attributes">
{% for attr in result.attributes %}
<tr>
<td class="col-md-3"><strong>{{ attr.0 }}</strong></td>
<td class="col-md-9">{{ attr.1 }}</td>
</tr>
{% endfor %}
</table>
</div>
</div>
</div>

0 comments on commit a39538b

Please sign in to comment.