Skip to content

Commit 4ed4b6e

Browse files
author
Doug Wright
committed
REMOVED: ul, li nesting, FIX: similarItems logic
1 parent c554deb commit 4ed4b6e

2 files changed

Lines changed: 25 additions & 29 deletions

File tree

views/partials/itemCards.ejs

Lines changed: 24 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,24 @@
1-
<ul class="searchResultList">
2-
<li>
3-
<div class="col-xs-12">
4-
<span> <a href="/search?floor=<%- floor %>"> <%- floor.toLowerCase() %> </a></span> >
5-
<span> <a href="/search?floor=<%- floor %>&room=<%- room %>"> <%- room.toLowerCase() %> </a></span> >
6-
<span> <a href="/search?floor=<%- floor %>&room=<%- room %>&location=<%- location %>"> <%- location.toLowerCase() %> </a></span> >
7-
<span> <a href="/search?fixture=<%- fixture %>"> <%- fixture.toLowerCase() %> </a></span>
8-
</div>
9-
<div class="well col-xs-12">
10-
<div class="col-xs-2">
11-
<% if (picture === undefined || picture === '') { %>
12-
<img class="itemImg" src="noImg.png" />
13-
<% }else{ %>
14-
<img class="itemImg" src=" <%- picture %> " />
15-
<%}%>
16-
</div>
17-
<div class="itemTitle col-xs-8">
18-
<h4> <a href="/<%- uuid %>"> <%- fixture.toUpperCase().bold() %> </a> </h4>
19-
<span> <%- model.toLowerCase().italics() %> </span>
20-
</div>
21-
<div class="itemImg col-xs-2">
22-
<% if (status === 'broken') { %>
23-
<span class="glyphicon glyphicon-wrench" title="Status: <%- status %>" alt="<%- status %>" style="color:red"></span>
24-
<%}%>
25-
</div>
26-
</div>
27-
</li>
28-
</ul>
1+
<div class="col-xs-12">
2+
<span> <a href="/search?floor=<%- floor %>"> <%- floor.toLowerCase() %> </a></span> >
3+
<span> <a href="/search?floor=<%- floor %>&room=<%- room %>"> <%- room.toLowerCase() %> </a></span> >
4+
<span> <a href="/search?floor=<%- floor %>&room=<%- room %>&location=<%- location %>"> <%- location.toLowerCase() %> </a></span> >
5+
<span> <a href="/search?fixture=<%- fixture %>"> <%- fixture.toLowerCase() %> </a></span>
6+
</div>
7+
<div class="well col-xs-12">
8+
<div class="col-xs-2">
9+
<% if (picture === undefined || picture === '') { %>
10+
<img class="itemImg" src="noImg.png" />
11+
<% }else{ %>
12+
<img class="itemImg" src=" <%- picture %> " />
13+
<%}%>
14+
</div>
15+
<div class="itemTitle col-xs-8">
16+
<h4> <a href="/<%- uuid %>"> <%- fixture.toUpperCase().bold() %> </a> </h4>
17+
<span> <%- model.toLowerCase().italics() %> </span>
18+
</div>
19+
<div class="itemImg col-xs-2">
20+
<% if (status === 'broken') { %>
21+
<span class="glyphicon glyphicon-wrench" title="Status: <%- status %>" alt="<%- status %>" style="color:red"></span>
22+
<%}%>
23+
</div>
24+
</div>

views/partials/itemImgInfo.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</div>
1515
</article>
1616
<% } %>
17-
<% if ( similarItems ) { %>
17+
<% if ( similarItems.length > 0 ) { %>
1818
<article class="well col-xs-12">
1919
<h2>Similar Items</h2>
2020
<div>

0 commit comments

Comments
 (0)