Skip to content

Commit 44a1dbf

Browse files
committed
render SeriesSalesList component only when USE_REACT feature is active.
1 parent cf3747a commit 44a1dbf

File tree

1 file changed

+33
-15
lines changed
  • src/main/webapp/WEB-INF/views/series

1 file changed

+33
-15
lines changed

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

+33-15
Original file line numberDiff line numberDiff line change
@@ -1121,8 +1121,6 @@ <h5 th:text="#{t_add_info_who_selling_series}">Add info about selling/buying thi
11211121
<script src="../../../../../../target/classes/js/components/AddReleaseYearForm.js" th:src="${RELEASE_YEAR_FORM_JS}"></script>
11221122
<script src="../../../../../../target/classes/js/components/AddCatalogPriceForm.js" th:src="${CATALOG_PRICE_FORM_JS}"></script>
11231123
<script src="../../../../../../target/classes/js/components/AddCatalogNumbersForm.js" th:src="${CATALOG_NUMBERS_FORM_JS}"></script>
1124-
<script src="../../../../../../target/classes/js/components/SeriesSalesList.js" th:src="${SERIES_SALES_LIST_JS}"></script>
1125-
11261124

11271125
<script th:inline="javascript">
11281126
/*[+
@@ -1161,12 +1159,6 @@ <h5 th:text="#{t_add_info_who_selling_series}">Add info about selling/buying thi
11611159
't_add': [[ #{t_add} ]]
11621160
}
11631161
};
1164-
var seriesSalesListProps = {
1165-
'url': [[ '__@{${INFO_SERIES_PAGE}(id=${series.id})}__' ]],
1166-
'l10n': {
1167-
't_server_error': [[ #{t_server_error} ]],
1168-
}
1169-
};
11701162
+]*/
11711163

11721164
/*[- */
@@ -1184,17 +1176,10 @@ <h5 th:text="#{t_add_info_who_selling_series}">Add info about selling/buying thi
11841176
'url': '/series/100',
11851177
'l10n': {}
11861178
};
1187-
1188-
var seriesSalesListProps = {
1189-
'url': '/series/100',
1190-
'l10n': {}
1191-
};
11921179
/* -]*/
11931180

11941181
renderComponent(AddCatalogPriceForm, addCatalogPriceProps, 'add-catalog-price');
11951182
renderComponent(AddCatalogNumbersForm, addCatalogNumbersProps, 'add-catalog-numbers');
1196-
renderComponent(SeriesSalesList, seriesSalesListProps, 'series-sales-list');
1197-
11981183

11991184
/*[# th:if="${series.releaseYear == null}"]*/
12001185
/*[+
@@ -1222,6 +1207,39 @@ <h5 th:text="#{t_add_info_who_selling_series}">Add info about selling/buying thi
12221207
</th:block>
12231208
/*/-->
12241209

1210+
<!--/*/
1211+
<th:block sec:authorize="hasAuthority('VIEW_SERIES_SALES')" togglz:active="USE_REACT">
1212+
/*/-->
1213+
<script src="../../../../../../target/classes/js/components/SeriesSalesList.js" th:src="${SERIES_SALES_LIST_JS}"></script>
1214+
1215+
<script th:inline="javascript">
1216+
/*[+
1217+
var seriesSalesListProps = {
1218+
'url': [[ '__@{${INFO_SERIES_PAGE}(id=${series.id})}__' ]],
1219+
'l10n': {
1220+
't_server_error': [[ #{t_server_error} ]],
1221+
't_who_selling_series': [[ #{t_who_selling_series} ]],
1222+
't_sold_to': [[ #{t_sold_to} ]],
1223+
't_sold_for': [[ #{t_sold_for} ]],
1224+
't_was_selling': [[ #{t_was_selling} ]],
1225+
't_cancelled': [[ #{t_cancelled} ]]
1226+
}
1227+
};
1228+
+]*/
1229+
1230+
/*[- */
1231+
var seriesSalesListProps = {
1232+
'url': '/series/100',
1233+
'l10n': {}
1234+
};
1235+
/* -]*/
1236+
1237+
renderComponent(SeriesSalesList, seriesSalesListProps, 'series-sales-list');
1238+
</script>
1239+
<!--/*/
1240+
</th:block>
1241+
/*/-->
1242+
12251243
<!--/*/
12261244
<th:block sec:authorize="hasAuthority('ADD_COMMENTS_TO_SERIES')" th:if="${series.comment == null}">
12271245
/*/-->

0 commit comments

Comments
 (0)