Skip to content

Commit 252dc70

Browse files
cssruphp-coder
authored andcommitted
/series/info: don't show empty links for buyer/seller/transaction.
Fix #460
1 parent 0640917 commit 252dc70

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Diff for: src/main/resources/liquibase/version/0.4/2016-08-22--series_sales.xml

-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
<insert tableName="transaction_participants">
6666
<column name="id" value="3"/>
6767
<column name="name" value="Duncan MacLeod"/>
68-
<column name="url" value="http://example.com/duncan-macleod"/>
6968
</insert>
7069
</changeSet>
7170

Diff for: src/main/webapp/WEB-INF/views/series/info.html

+4-3
Original file line numberDiff line numberDiff line change
@@ -265,16 +265,17 @@ <h5 th:text="#{t_who_selling_series}">Who was selling/buying this series:</h5>
265265
<!--/*/
266266
<span th:if="${transaction.date != null}" th:remove="tag" th:text="${#dates.format(transaction.date, 'dd.MM.yyyy')}"></span>
267267
/*/-->
268-
<a href="http://example.com/james-alan-hetfield" rel="nofollow" th:href="${transaction.sellerUrl}" th:text="${transaction.sellerName}">James Alan Hetfield</a>
268+
<a href="http://example.com/james-alan-hetfield" rel="nofollow" th:remove="${transaction.sellerUrl == null} ? tag" th:href="${transaction.sellerUrl}" th:text="${transaction.sellerName}">James Alan Hetfield</a>
269269
<span th:if="${transaction.buyerName == null}" th:remove="tag" th:text="#{t_was_selling_for}">was selling for</span>
270270
<!--/*/
271271
<th:block th:if="${transaction.buyerName != null}">
272272
<span th:text="#{t_sold_to}" th:remove="tag">sold to</span>
273-
<a href="http://example.com/eicca-toppinen" rel="nofollow" th:href="${transaction.buyerUrl}" th:text="${transaction.buyerName}">Eicca Toppinen</a>
273+
<a href="http://example.com/eicca-toppinen" rel="nofollow" th:remove="${transaction.buyerUrl == null} ? tag" th:href="${transaction.buyerUrl}" th:text="${transaction.buyerName}">Eicca Toppinen</a>
274274
<span th:text="#{t_sold_for}" th:remove="tag">for</span>
275275
</th:block>
276276
/*/-->
277277
<a href="http://example.com/james-alan-hetfield/selling-stamps" rel="nofollow"
278+
th:remove="${transaction.transactionUrl == null} ? tag"
278279
th:href="${transaction.transactionUrl}"
279280
th:text="${firstPrice + optionalSecondPrice}">100 USD</a>
280281
</li>
@@ -291,7 +292,7 @@ <h5 th:text="#{t_who_selling_series}">Who was selling/buying this series:</h5>
291292
03.03.2003 <a href="http://example.com/eicca-toppinen" rel="nofollow">Eicca Toppinen</a> sold to <a href="http://example.com/kurt-cobain" rel="nofollow">Kurt Cobain</a> for <a href="http://example.com/eicca-toppinen/selling-stamps" rel="nofollow">300 USD</a>
292293
</li>
293294
<li>
294-
03.03.2003 <a href="http://example.com/eicca-toppinen" rel="nofollow">Eicca Toppinen</a> sold to <a href="http://example.com/kurt-cobain" rel="nofollow">Kurt Cobain</a> for <a href="http://example.com/eicca-toppinen/selling-stamps" rel="nofollow">300 USD (1560 RUB)</a>
295+
03.03.2003 <a href="http://example.com/eicca-toppinen" rel="nofollow">Eicca Toppinen</a> sold to Michael Jackson for <a href="http://example.com/eicca-toppinen/selling-stamps" rel="nofollow">300 USD (1560 RUB)</a>
295296
</li>
296297
</ul>
297298
</div>

0 commit comments

Comments
 (0)