Skip to content

Do not show null links in buyers/sellers list. #466

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
<insert tableName="transaction_participants">
<column name="id" value="3"/>
<column name="name" value="Duncan MacLeod"/>
<column name="url" value="http://example.com/duncan-macleod"/>
</insert>
</changeSet>

Expand Down
7 changes: 4 additions & 3 deletions src/main/webapp/WEB-INF/views/series/info.html
Original file line number Diff line number Diff line change
Expand Up @@ -265,16 +265,17 @@ <h5 th:text="#{t_who_selling_series}">Who was selling/buying this series:</h5>
<!--/*/
<span th:if="${transaction.date != null}" th:remove="tag" th:text="${#dates.format(transaction.date, 'dd.MM.yyyy')}"></span>
/*/-->
<a href="http://example.com/james-alan-hetfield" rel="nofollow" th:href="${transaction.sellerUrl}" th:text="${transaction.sellerName}">James Alan Hetfield</a>
<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>
<span th:if="${transaction.buyerName == null}" th:remove="tag" th:text="#{t_was_selling_for}">was selling for</span>
<!--/*/
<th:block th:if="${transaction.buyerName != null}">
<span th:text="#{t_sold_to}" th:remove="tag">sold to</span>
<a href="http://example.com/eicca-toppinen" rel="nofollow" th:href="${transaction.buyerUrl}" th:text="${transaction.buyerName}">Eicca Toppinen</a>
<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>
<span th:text="#{t_sold_for}" th:remove="tag">for</span>
</th:block>
/*/-->
<a href="http://example.com/james-alan-hetfield/selling-stamps" rel="nofollow"
th:remove="${transaction.transactionUrl == null} ? tag"
th:href="${transaction.transactionUrl}"
th:text="${firstPrice + optionalSecondPrice}">100 USD</a>
</li>
Expand All @@ -291,7 +292,7 @@ <h5 th:text="#{t_who_selling_series}">Who was selling/buying this series:</h5>
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>
</li>
<li>
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>
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>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А имя зачем попутно поменял? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Дык...по логике у Курта есть урл. Как так может быть, что в предыдущей строке урл есть, а в следующей его уже нет? :)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Понял. Согласен.

</li>
</ul>
</div>
Expand Down