Skip to content

Commit 102d5f8

Browse files
committed
refactor(series/info.html): put a series info into its own row.
Refactoring is required for #970 No functional changes.
1 parent f22dfff commit 102d5f8

File tree

1 file changed

+196
-192
lines changed
  • src/main/webapp/WEB-INF/views/series

1 file changed

+196
-192
lines changed

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

Lines changed: 196 additions & 192 deletions
Original file line numberDiff line numberDiff line change
@@ -140,200 +140,204 @@
140140
</div>
141141

142142
<div class="col-sm-4">
143-
<dl class="dl-horizontal">
144-
<dt th:text="#{t_category}">
145-
Category
146-
</dt>
147-
<dd id="category_name">
148-
<a href="../category/info.html"
149-
th:href="@{${INFO_CATEGORY_PAGE}(slug=${series.category.slug})}"
150-
th:text="${series.category.name}">
151-
Animals
152-
</a>
153-
</dd>
154-
155-
<!--/*/ <th:block th:if="${series.country != null}"> /*/-->
156-
<dt th:text="#{t_country}">
157-
Country
158-
</dt>
159-
<dd id="country_name">
160-
<a href="../country/info.html"
161-
th:href="@{${INFO_COUNTRY_PAGE}(slug=${series.country.slug})}"
162-
th:text="${series.country.name}">
163-
Italy
164-
</a>
165-
</dd>
166-
<!--/*/ </th:block> /*/-->
167-
168-
<!--/*/ <th:block th:if="${series.releaseYear != null}"> /*/-->
169-
<dt th:text="#{t_issue_date}">
170-
Date of release
171-
</dt>
172-
<dd id="issue_date">
173-
<span th:if="${series.releaseDay != null}"
174-
th:text="|${#numbers.formatInteger(series.releaseDay, 2)}.|"
175-
th:remove="tag">
176-
01.
177-
</span><span th:if="${series.releaseMonth != null}"
178-
th:text="|${#numbers.formatInteger(series.releaseMonth, 2)}.|"
179-
th:remove="tag">
180-
02.
181-
</span><span th:if="${series.releaseYear != null}"
182-
th:text="${series.releaseYear}"
183-
th:remove="tag">
184-
1999
185-
</span>
186-
</dd>
187-
<!--/*/ </th:block> /*/-->
188-
189-
<dt th:text="#{t_quantity}">
190-
Quantity
191-
</dt>
192-
<dd id="quantity" th:text="${series.quantity}">
193-
7
194-
</dd>
195-
196-
<dt th:text="#{t_perforated}">
197-
Perforated
198-
</dt>
199-
<dd id="perforated">
200-
<!--/*/ <th:block th:if="${series.perforated}"> /*/-->
201-
<span th:text="#{t_yes}">Yes</span> <i class="glyphicon glyphicon-ok"></i>
143+
<div class="row">
144+
<div class="col-sm-12">
145+
<dl class="dl-horizontal">
146+
<dt th:text="#{t_category}">
147+
Category
148+
</dt>
149+
<dd id="category_name">
150+
<a href="../category/info.html"
151+
th:href="@{${INFO_CATEGORY_PAGE}(slug=${series.category.slug})}"
152+
th:text="${series.category.name}">
153+
Animals
154+
</a>
155+
</dd>
156+
157+
<!--/*/ <th:block th:if="${series.country != null}"> /*/-->
158+
<dt th:text="#{t_country}">
159+
Country
160+
</dt>
161+
<dd id="country_name">
162+
<a href="../country/info.html"
163+
th:href="@{${INFO_COUNTRY_PAGE}(slug=${series.country.slug})}"
164+
th:text="${series.country.name}">
165+
Italy
166+
</a>
167+
</dd>
202168
<!--/*/ </th:block> /*/-->
203169

204-
<!--/*/
205-
<th:block th:if="${not series.perforated}">
206-
<span th:text="#{t_no}">No</span> <i class="glyphicon glyphicon-remove"></i>
207-
</th:block>
208-
/*/-->
209-
</dd>
210-
211-
<!--/*/ <th:block th:if="${not #strings.isEmpty(michelNumbers) or series.michel.price != null}"> /*/-->
212-
<dt th:text="#{t_michel}">
213-
Michel
214-
</dt>
215-
<dd id="michel_catalog_info"
216-
th:with="showNumbers=${not #strings.isEmpty(michelNumbers)},showPrice=${series.michel.price != null}">
217-
<span th:if="${showNumbers}" th:text="|#${michelNumbers}|" th:remove="tag">
218-
#101-104
219-
</span>
220-
<span th:if="${showPrice}"
221-
th:with="showBrackets=${showNumbers and showPrice}"
222-
th:text="${showBrackets ? '(' : ''} + ${series.michel.formattedPrice} + ' EUR' +${showBrackets ? ')' : ''}"
223-
th:remove="tag">
224-
(10 EUR)
225-
</span>
226-
</dd>
227-
<!--/*/ </th:block> /*/-->
228-
229-
<!--/*/ <th:block th:if="${not #strings.isEmpty(scottNumbers) or series.scott.price != null}"> /*/-->
230-
<dt th:text="#{t_scott}">
231-
Scott
232-
</dt>
233-
<dd id="scott_catalog_info"
234-
th:with="showNumbers=${not #strings.isEmpty(scottNumbers)},showPrice=${series.scott.price != null}">
235-
<span th:if="${showNumbers}" th:text="|#${scottNumbers}|" th:remove="tag"></span>
236-
<span th:if="${showPrice}"
237-
th:with="price=${#numbers.formatDecimal(series.scott.price, 1, 1)},showBrackets=${showNumbers and showPrice}"
238-
th:text="${showBrackets ? '(' : ''} + ${series.scott.formattedPrice} + ' USD' + ${showBrackets ? ')' : ''}"
239-
th:remove="tag">
240-
12 USD
241-
</span>
242-
</dd>
243-
<!--/*/ </th:block> /*/-->
244-
245-
<!--/*/ <th:block th:if="${not #strings.isEmpty(yvertNumbers) or series.yvert.price != null}"> /*/-->
246-
<dt th:text="#{t_yvert}">
247-
Yvert
248-
</dt>
249-
<dd id="yvert_catalog_info"
250-
th:with="showNumbers=${not #strings.isEmpty(yvertNumbers)},showPrice=${series.yvert.price != null}">
251-
<span th:if="${showNumbers}" th:text="|#${yvertNumbers}|" th:remove="tag">
252-
#13, 17, 20
253-
</span>
254-
<span th:if="${showPrice}"
255-
th:with="showBrackets=${showNumbers and showPrice}"
256-
th:text="${showBrackets ? '(' : ''} + ${series.yvert.formattedPrice} + ' EUR' + ${showBrackets ? ')' : ''}"
257-
th:remove="tag">
258-
(7 EUR)
259-
</span>
260-
</dd>
261-
<!--/*/ </th:block> /*/-->
262-
263-
<!--/*/ <th:block th:if="${not #strings.isEmpty(gibbonsNumbers) or series.gibbons.price != null}"> /*/-->
264-
<dt th:text="#{t_sg}">
265-
Gibbons
266-
</dt>
267-
<dd id="gibbons_catalog_info"
268-
th:with="showNumbers=${not #strings.isEmpty(gibbonsNumbers)},showPrice=${series.gibbons.price != null}">
269-
<span th:if="${showNumbers}" th:text="|#${gibbonsNumbers}|" th:remove="tag">
270-
#77, 79-83
271-
</span>
272-
<span th:if="${showPrice}"
273-
th:with="showBrackets=${showNumbers and showPrice}"
274-
th:text="${showBrackets ? '(' : ''} + ${series.gibbons.formattedPrice} + ' GBP' + ${showBrackets ? ')' : ''}"
275-
th:remove="tag">
276-
</span>
277-
</dd>
278-
<!--/*/ </th:block> /*/-->
279-
280-
<!--/*/ <th:block th:if="${not #strings.isEmpty(solovyovNumbers) or series.solovyov.price != null}"> /*/-->
281-
<dt th:text="#{t_solovyov}">
282-
Solovyov
283-
</dt>
284-
<dd id="solovyov_catalog_info"
285-
th:with="showNumbers=${not #strings.isEmpty(solovyovNumbers)},showPrice=${series.solovyov.price != null}">
286-
<span th:if="${showNumbers}" th:text="|#${solovyovNumbers}|" th:remove="tag">
287-
#90, 93-95 (90 RUB)
288-
</span>
289-
<span th:if="${showPrice}"
290-
th:with="showBrackets=${showNumbers and showPrice}"
291-
th:text="${showBrackets ? '(' : ''} + ${series.solovyov.formattedPrice} + ' RUB' + ${showBrackets ? ')' : ''}"
292-
th:remove="tag">
293-
</span>
294-
</dd>
295-
<!--/*/ </th:block> /*/-->
296-
297-
<!--/*/ <th:block th:if="${not #strings.isEmpty(zagorskiNumbers) or series.zagorski.price != null}"> /*/-->
298-
<dt th:text="#{t_zagorski}">
299-
Zagorski
300-
</dt>
301-
<dd id="zagorski_catalog_info"
302-
th:with="showNumbers=${not #strings.isEmpty(zagorskiNumbers)},showPrice=${series.zagorski.price != null}">
303-
<span th:if="${showNumbers}" th:text="|#${zagorskiNumbers}|" th:remove="tag">
304-
#102, 111-113 (100 RUB)
305-
</span>
306-
<span th:if="${showPrice}"
307-
th:with="showBrackets=${showNumbers and showPrice}"
308-
th:text="${showBrackets ? '(' : ''} + ${series.zagorski.formattedPrice} + ' RUB' + ${showBrackets ? ')' : ''}"
309-
th:remove="tag">
310-
</span>
311-
</dd>
312-
<!--/*/ </th:block> /*/-->
313-
314-
<!--/*/ <th:block th:if="${importInfo != null}"> /*/-->
315-
<dt th:text="#{t_imported_from}">
316-
Imported from
317-
</dt>
318-
<dd id="import-info">
319-
<a id="import-request-link"
320-
href="./import/info.html"
321-
th:href="@{${REQUEST_IMPORT_PAGE}(id=${importInfo.requestId})}"
322-
th:text="${#uris.unescapePath(importInfo.url)}">
323-
http://example.com/my-first-series.html
324-
</a>
325-
</dd>
326-
<!--/*/ </th:block> /*/-->
327-
328-
<!--/*/ <th:block th:if="${series.comment != null and #authorization.expression('hasAuthority(''ADD_COMMENTS_TO_SERIES'')')}"> /*/-->
329-
<dt th:text="#{t_comment}">
330-
Comment
331-
</dt>
332-
<dd id="comment" th:utext="${#strings.replace(#strings.escapeXml(series.comment), T(java.lang.System).getProperty('line.separator'), '&lt;br /&gt;')}">
333-
My favorite series.
334-
</dd>
335-
<!--/*/ </th:block> /*/-->
336-
</dl>
170+
<!--/*/ <th:block th:if="${series.releaseYear != null}"> /*/-->
171+
<dt th:text="#{t_issue_date}">
172+
Date of release
173+
</dt>
174+
<dd id="issue_date">
175+
<span th:if="${series.releaseDay != null}"
176+
th:text="|${#numbers.formatInteger(series.releaseDay, 2)}.|"
177+
th:remove="tag">
178+
01.
179+
</span><span th:if="${series.releaseMonth != null}"
180+
th:text="|${#numbers.formatInteger(series.releaseMonth, 2)}.|"
181+
th:remove="tag">
182+
02.
183+
</span><span th:if="${series.releaseYear != null}"
184+
th:text="${series.releaseYear}"
185+
th:remove="tag">
186+
1999
187+
</span>
188+
</dd>
189+
<!--/*/ </th:block> /*/-->
190+
191+
<dt th:text="#{t_quantity}">
192+
Quantity
193+
</dt>
194+
<dd id="quantity" th:text="${series.quantity}">
195+
7
196+
</dd>
197+
198+
<dt th:text="#{t_perforated}">
199+
Perforated
200+
</dt>
201+
<dd id="perforated">
202+
<!--/*/ <th:block th:if="${series.perforated}"> /*/-->
203+
<span th:text="#{t_yes}">Yes</span> <i class="glyphicon glyphicon-ok"></i>
204+
<!--/*/ </th:block> /*/-->
205+
206+
<!--/*/
207+
<th:block th:if="${not series.perforated}">
208+
<span th:text="#{t_no}">No</span> <i class="glyphicon glyphicon-remove"></i>
209+
</th:block>
210+
/*/-->
211+
</dd>
212+
213+
<!--/*/ <th:block th:if="${not #strings.isEmpty(michelNumbers) or series.michel.price != null}"> /*/-->
214+
<dt th:text="#{t_michel}">
215+
Michel
216+
</dt>
217+
<dd id="michel_catalog_info"
218+
th:with="showNumbers=${not #strings.isEmpty(michelNumbers)},showPrice=${series.michel.price != null}">
219+
<span th:if="${showNumbers}" th:text="|#${michelNumbers}|" th:remove="tag">
220+
#101-104
221+
</span>
222+
<span th:if="${showPrice}"
223+
th:with="showBrackets=${showNumbers and showPrice}"
224+
th:text="${showBrackets ? '(' : ''} + ${series.michel.formattedPrice} + ' EUR' +${showBrackets ? ')' : ''}"
225+
th:remove="tag">
226+
(10 EUR)
227+
</span>
228+
</dd>
229+
<!--/*/ </th:block> /*/-->
230+
231+
<!--/*/ <th:block th:if="${not #strings.isEmpty(scottNumbers) or series.scott.price != null}"> /*/-->
232+
<dt th:text="#{t_scott}">
233+
Scott
234+
</dt>
235+
<dd id="scott_catalog_info"
236+
th:with="showNumbers=${not #strings.isEmpty(scottNumbers)},showPrice=${series.scott.price != null}">
237+
<span th:if="${showNumbers}" th:text="|#${scottNumbers}|" th:remove="tag"></span>
238+
<span th:if="${showPrice}"
239+
th:with="price=${#numbers.formatDecimal(series.scott.price, 1, 1)},showBrackets=${showNumbers and showPrice}"
240+
th:text="${showBrackets ? '(' : ''} + ${series.scott.formattedPrice} + ' USD' + ${showBrackets ? ')' : ''}"
241+
th:remove="tag">
242+
12 USD
243+
</span>
244+
</dd>
245+
<!--/*/ </th:block> /*/-->
246+
247+
<!--/*/ <th:block th:if="${not #strings.isEmpty(yvertNumbers) or series.yvert.price != null}"> /*/-->
248+
<dt th:text="#{t_yvert}">
249+
Yvert
250+
</dt>
251+
<dd id="yvert_catalog_info"
252+
th:with="showNumbers=${not #strings.isEmpty(yvertNumbers)},showPrice=${series.yvert.price != null}">
253+
<span th:if="${showNumbers}" th:text="|#${yvertNumbers}|" th:remove="tag">
254+
#13, 17, 20
255+
</span>
256+
<span th:if="${showPrice}"
257+
th:with="showBrackets=${showNumbers and showPrice}"
258+
th:text="${showBrackets ? '(' : ''} + ${series.yvert.formattedPrice} + ' EUR' + ${showBrackets ? ')' : ''}"
259+
th:remove="tag">
260+
(7 EUR)
261+
</span>
262+
</dd>
263+
<!--/*/ </th:block> /*/-->
264+
265+
<!--/*/ <th:block th:if="${not #strings.isEmpty(gibbonsNumbers) or series.gibbons.price != null}"> /*/-->
266+
<dt th:text="#{t_sg}">
267+
Gibbons
268+
</dt>
269+
<dd id="gibbons_catalog_info"
270+
th:with="showNumbers=${not #strings.isEmpty(gibbonsNumbers)},showPrice=${series.gibbons.price != null}">
271+
<span th:if="${showNumbers}" th:text="|#${gibbonsNumbers}|" th:remove="tag">
272+
#77, 79-83
273+
</span>
274+
<span th:if="${showPrice}"
275+
th:with="showBrackets=${showNumbers and showPrice}"
276+
th:text="${showBrackets ? '(' : ''} + ${series.gibbons.formattedPrice} + ' GBP' + ${showBrackets ? ')' : ''}"
277+
th:remove="tag">
278+
</span>
279+
</dd>
280+
<!--/*/ </th:block> /*/-->
281+
282+
<!--/*/ <th:block th:if="${not #strings.isEmpty(solovyovNumbers) or series.solovyov.price != null}"> /*/-->
283+
<dt th:text="#{t_solovyov}">
284+
Solovyov
285+
</dt>
286+
<dd id="solovyov_catalog_info"
287+
th:with="showNumbers=${not #strings.isEmpty(solovyovNumbers)},showPrice=${series.solovyov.price != null}">
288+
<span th:if="${showNumbers}" th:text="|#${solovyovNumbers}|" th:remove="tag">
289+
#90, 93-95 (90 RUB)
290+
</span>
291+
<span th:if="${showPrice}"
292+
th:with="showBrackets=${showNumbers and showPrice}"
293+
th:text="${showBrackets ? '(' : ''} + ${series.solovyov.formattedPrice} + ' RUB' + ${showBrackets ? ')' : ''}"
294+
th:remove="tag">
295+
</span>
296+
</dd>
297+
<!--/*/ </th:block> /*/-->
298+
299+
<!--/*/ <th:block th:if="${not #strings.isEmpty(zagorskiNumbers) or series.zagorski.price != null}"> /*/-->
300+
<dt th:text="#{t_zagorski}">
301+
Zagorski
302+
</dt>
303+
<dd id="zagorski_catalog_info"
304+
th:with="showNumbers=${not #strings.isEmpty(zagorskiNumbers)},showPrice=${series.zagorski.price != null}">
305+
<span th:if="${showNumbers}" th:text="|#${zagorskiNumbers}|" th:remove="tag">
306+
#102, 111-113 (100 RUB)
307+
</span>
308+
<span th:if="${showPrice}"
309+
th:with="showBrackets=${showNumbers and showPrice}"
310+
th:text="${showBrackets ? '(' : ''} + ${series.zagorski.formattedPrice} + ' RUB' + ${showBrackets ? ')' : ''}"
311+
th:remove="tag">
312+
</span>
313+
</dd>
314+
<!--/*/ </th:block> /*/-->
315+
316+
<!--/*/ <th:block th:if="${importInfo != null}"> /*/-->
317+
<dt th:text="#{t_imported_from}">
318+
Imported from
319+
</dt>
320+
<dd id="import-info">
321+
<a id="import-request-link"
322+
href="./import/info.html"
323+
th:href="@{${REQUEST_IMPORT_PAGE}(id=${importInfo.requestId})}"
324+
th:text="${#uris.unescapePath(importInfo.url)}">
325+
http://example.com/my-first-series.html
326+
</a>
327+
</dd>
328+
<!--/*/ </th:block> /*/-->
329+
330+
<!--/*/ <th:block th:if="${series.comment != null and #authorization.expression('hasAuthority(''ADD_COMMENTS_TO_SERIES'')')}"> /*/-->
331+
<dt th:text="#{t_comment}">
332+
Comment
333+
</dt>
334+
<dd id="comment" th:utext="${#strings.replace(#strings.escapeXml(series.comment), T(java.lang.System).getProperty('line.separator'), '&lt;br /&gt;')}">
335+
My favorite series.
336+
</dd>
337+
<!--/*/ </th:block> /*/-->
338+
</dl>
339+
</div>
340+
</div>
337341
</div>
338342

339343
<div class="col-sm-4">

0 commit comments

Comments
 (0)