Skip to content

Commit abce896

Browse files
committed
chore(/collection/info): cleanup Togglz features.
Addressed to #605 No functional changes.
1 parent 604bd1a commit abce896

File tree

2 files changed

+14
-29
lines changed

2 files changed

+14
-29
lines changed

src/main/java/ru/mystamps/web/support/togglz/Features.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,6 @@ public enum Features implements Feature {
4444
@EnabledByDefault
4545
ADD_PURCHASES_AND_SALES,
4646

47-
@Label("/collection/{slug}: show statistics of collection")
48-
@EnabledByDefault
49-
SHOW_COLLECTION_STATISTICS,
50-
51-
@Label("/collection/{slug}: show charts on collection page")
52-
@EnabledByDefault
53-
SHOW_COLLECTION_CHARTS,
54-
5547
@Label("Send mail with activation key to user")
5648
@EnabledByDefault
5749
SEND_ACTIVATION_MAIL,

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

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
<html lang="en" th:lang="${#locale.language == 'ru' ? 'ru' : 'en'}"
33
xmlns="http://www.w3.org/1999/xhtml"
44
xmlns:th="http://www.thymeleaf.org"
5-
xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3"
6-
xmlns:togglz="https://github.com/heneke/thymeleaf-extras-togglz">
5+
xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
76
<head>
87
<meta charset="utf-8" />
98
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
@@ -90,34 +89,28 @@ <h3 class="text-center" th:text="#{t_collection_of(${ownerName})}">
9089

9190
<div class="row">
9291
<div class="col-sm-2 col-md-push-4">
93-
<!--/*/
94-
<th:block togglz:active="SHOW_COLLECTION_STATISTICS" th:if="${not #lists.isEmpty(seriesOfCollection)}">
95-
/*/-->
96-
<div class="panel panel-default">
97-
<div class="panel-heading">
98-
<h4 class="panel-title" th:text="#{t_in_collection}">In this collection</h4>
99-
</div>
100-
<div class="panel-body">
101-
<p th:text="|#{t_categories_amount}: ${categoryCounter}|">Amount of categories: 1</p>
102-
<p th:text="|#{t_countries_amount}: ${countryCounter}|">Amount of countries: 1</p>
103-
<p th:text="|#{t_series_amount}: ${seriesCounter}|">Amount of series: 3</p>
104-
<p th:text="|#{t_stamps_amount}: ${stampsCounter}|">Amount of stamps: 34</p>
105-
</div>
92+
<div class="panel panel-default" th:if="${not #lists.isEmpty(seriesOfCollection)}">
93+
<div class="panel-heading">
94+
<h4 class="panel-title" th:text="#{t_in_collection}">In this collection</h4>
95+
</div>
96+
<div class="panel-body">
97+
<p th:text="|#{t_categories_amount}: ${categoryCounter}|">Amount of categories: 1</p>
98+
<p th:text="|#{t_countries_amount}: ${countryCounter}|">Amount of countries: 1</p>
99+
<p th:text="|#{t_series_amount}: ${seriesCounter}|">Amount of series: 3</p>
100+
<p th:text="|#{t_stamps_amount}: ${stampsCounter}|">Amount of stamps: 34</p>
106101
</div>
107-
<!--/*/
108-
</th:block>
109-
/*/-->
102+
</div>
110103
</div>
111104
<div class="col-sm-3 col-md-push-4">
112-
<div class="panel panel-default" togglz:active="SHOW_COLLECTION_CHARTS" th:if="${not #lists.isEmpty(seriesOfCollection)}">
105+
<div class="panel panel-default" th:if="${not #lists.isEmpty(seriesOfCollection)}">
113106
<div class="panel-heading">
114107
<h4 class="panel-title" th:text="#{t_stamps_by_countries}">Stamps by countries</h4>
115108
</div>
116109
<div id="countries-chart" class="panel-body no-padding"></div>
117110
</div>
118111
</div>
119112
<div class="col-sm-3 col-md-push-4">
120-
<div class="panel panel-default" togglz:active="SHOW_COLLECTION_CHARTS" th:if="${not #lists.isEmpty(seriesOfCollection)}">
113+
<div class="panel panel-default" th:if="${not #lists.isEmpty(seriesOfCollection)}">
121114
<div class="panel-heading">
122115
<h4 class="panel-title" th:text="#{t_stamps_by_categories}">Stamps by categories</h4>
123116
</div>
@@ -166,7 +159,7 @@ <h4 class="panel-title" th:text="#{t_stamps_by_categories}">Stamps by categories
166159
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js" th:src="${BOOTSTRAP_JS}"></script>
167160

168161
<!--/*/
169-
<th:block togglz:active="SHOW_COLLECTION_CHARTS" th:if="${not #lists.isEmpty(seriesOfCollection)}">
162+
<th:block th:if="${not #lists.isEmpty(seriesOfCollection)}">
170163
/*/-->
171164
<!-- Charts -->
172165
<script src="https://www.gstatic.com/charts/loader.js"></script>

0 commit comments

Comments
 (0)