Skip to content

Commit 6826b24

Browse files
committed
Add links to series creation page to various category/country related pages.
User experience change.
1 parent 0c179ca commit 6826b24

File tree

4 files changed

+55
-16
lines changed

4 files changed

+55
-16
lines changed

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

+15-4
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
3434
--><div id="user_bar" class="col-sm-2 vcenter">
3535
<ul class="list-unstyled">
36-
<!--/*/
36+
3737
<li sec:authorize="isAuthenticated()">
3838
<i class="glyphicon glyphicon-user"></i>
3939
<a sec:authentication="principal.userName"
@@ -44,20 +44,21 @@
4444
John Doe
4545
</a>
4646
</li>
47-
/*/-->
47+
<!--/*/
4848
<li sec:authorize="isAnonymous()">
4949
<a href="../account/auth.html" th:href="@{${AUTHENTICATION_PAGE}}" th:text="#{t_enter}">Sign in</a>
5050
</li>
51-
<!--/*/
51+
/*/-->
5252
<li sec:authorize="isAuthenticated()">
5353
<form id="logout-form" method="get" action="../site/index.html" class="no-margin" th:method="post" th:action="@{${LOGOUT_PAGE}}">
5454
<i class="glyphicon glyphicon-share"></i>&nbsp;<input type="submit" value="Sign out" class="btn btn-link no-padding" th:value="#{t_logout}" />
5555
</form>
5656
</li>
57-
/*/-->
57+
<!--/*/
5858
<li sec:authorize="isAnonymous()">
5959
<a href="../account/register.html" th:href="@{${REGISTRATION_PAGE}}" th:text="#{t_register}">Register</a>
6060
</li>
61+
/*/-->
6162
</ul>
6263
</div>
6364
</div>
@@ -67,6 +68,16 @@ <h3 id="page-header" th:text="${categoryName}">
6768
Animals
6869
</h3>
6970

71+
<div class="text-center" sec:authorize="hasAuthority('CREATE_CATEGORY')">
72+
<a href="../series/add.html"
73+
class="btn btn-default btn-xs"
74+
th:unless="${justAddedCategory}"
75+
th:href="@{${ADD_SERIES_PAGE}(category=${categorySlug})}"
76+
th:text="${#strings.capitalize('__#{t_add_series}__')}">
77+
Add a stamp series
78+
</a>
79+
</div>
80+
7081
<!--/*/
7182
<div id="msg-success"
7283
class="alert alert-success text-center col-sm-4 col-sm-offset-4"

src/main/webapp/WEB-INF/views/category/list.html

+13-4
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
3131
--><div id="user_bar" class="col-sm-2 vcenter">
3232
<ul class="list-unstyled">
33-
<!--/*/
3433
<li sec:authorize="isAuthenticated()">
3534
<i class="glyphicon glyphicon-user"></i>
3635
<a sec:authentication="principal.userName"
@@ -41,20 +40,21 @@
4140
John Doe
4241
</a>
4342
</li>
44-
/*/-->
43+
<!--/*/
4544
<li sec:authorize="isAnonymous()">
4645
<a href="../account/auth.html" th:href="@{${AUTHENTICATION_PAGE}}" th:text="#{t_enter}">Sign in</a>
4746
</li>
48-
<!--/*/
47+
/*/-->
4948
<li sec:authorize="isAuthenticated()">
5049
<form id="logout-form" method="get" action="../site/index.html" class="no-margin" th:method="post" th:action="@{${LOGOUT_PAGE}}">
5150
<i class="glyphicon glyphicon-share"></i>&nbsp;<input type="submit" value="Sign out" class="btn btn-link no-padding" th:value="#{t_logout}" />
5251
</form>
5352
</li>
54-
/*/-->
53+
<!--/*/
5554
<li sec:authorize="isAnonymous()">
5655
<a href="../account/register.html" th:href="@{${REGISTRATION_PAGE}}" th:text="#{t_register}">Register</a>
5756
</li>
57+
/*/-->
5858
</ul>
5959
</div>
6060
</div>
@@ -64,6 +64,15 @@ <h3 th:text="${#strings.capitalize(category_list)}">
6464
Category list
6565
</h3>
6666

67+
<div class="text-center" sec:authorize="hasAuthority('CREATE_CATEGORY')">
68+
<a href="../series/add.html"
69+
class="btn btn-default btn-xs"
70+
th:href="@{${ADD_SERIES_PAGE}}"
71+
th:text="${#strings.capitalize('__#{t_add_series}__')}">
72+
Add a stamp series
73+
</a>
74+
</div>
75+
6776
<ul th:if="${not #lists.isEmpty(categories)}">
6877
<li th:each="category: ${categories}">
6978
<a href="../category/info.html" th:href="@{${INFO_CATEGORY_PAGE}(slug=${category.slug})}" th:text="${category.name}">Animals</a>

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

+14-4
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
3434
--><div id="user_bar" class="col-sm-2 vcenter">
3535
<ul class="list-unstyled">
36-
<!--/*/
3736
<li sec:authorize="isAuthenticated()">
3837
<i class="glyphicon glyphicon-user"></i>
3938
<a sec:authentication="principal.userName"
@@ -44,20 +43,21 @@
4443
John Doe
4544
</a>
4645
</li>
47-
/*/-->
46+
<!--/*/
4847
<li sec:authorize="isAnonymous()">
4948
<a href="../account/auth.html" th:href="@{${AUTHENTICATION_PAGE}}" th:text="#{t_enter}">Sign in</a>
5049
</li>
51-
<!--/*/
50+
/*/-->
5251
<li sec:authorize="isAuthenticated()">
5352
<form id="logout-form" method="get" action="../site/index.html" class="no-margin" th:method="post" th:action="@{${LOGOUT_PAGE}}">
5453
<i class="glyphicon glyphicon-share"></i>&nbsp;<input type="submit" value="Sign out" class="btn btn-link no-padding" th:value="#{t_logout}" />
5554
</form>
5655
</li>
57-
/*/-->
56+
<!--/*/
5857
<li sec:authorize="isAnonymous()">
5958
<a href="../account/register.html" th:href="@{${REGISTRATION_PAGE}}" th:text="#{t_register}">Register</a>
6059
</li>
60+
/*/-->
6161
</ul>
6262
</div>
6363
</div>
@@ -67,6 +67,16 @@ <h3 id="page-header" th:text="${#strings.capitalize(header)}">
6767
Stamps of Italy
6868
</h3>
6969

70+
<div class="text-center" sec:authorize="hasAuthority('CREATE_COUNTRY')">
71+
<a href="../series/add.html"
72+
class="btn btn-default btn-xs"
73+
th:unless="${justAddedCountry}"
74+
th:href="@{${ADD_SERIES_PAGE}(country=${countrySlug})}"
75+
th:text="${#strings.capitalize('__#{t_add_series}__')}">
76+
Add a stamp series
77+
</a>
78+
</div>
79+
7080
<!--/*/
7181
<div id="msg-success"
7282
class="alert alert-success text-center col-sm-4 col-sm-offset-4"

src/main/webapp/WEB-INF/views/country/list.html

+13-4
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
3131
--><div id="user_bar" class="col-sm-2 vcenter">
3232
<ul class="list-unstyled">
33-
<!--/*/
3433
<li sec:authorize="isAuthenticated()">
3534
<i class="glyphicon glyphicon-user"></i>
3635
<a sec:authentication="principal.userName"
@@ -41,20 +40,21 @@
4140
John Doe
4241
</a>
4342
</li>
44-
/*/-->
43+
<!--/*/
4544
<li sec:authorize="isAnonymous()">
4645
<a href="../account/auth.html" th:href="@{${AUTHENTICATION_PAGE}}" th:text="#{t_enter}">Sign in</a>
4746
</li>
48-
<!--/*/
47+
/*/-->
4948
<li sec:authorize="isAuthenticated()">
5049
<form id="logout-form" method="get" action="../site/index.html" class="no-margin" th:method="post" th:action="@{${LOGOUT_PAGE}}">
5150
<i class="glyphicon glyphicon-share"></i>&nbsp;<input type="submit" value="Sign out" class="btn btn-link no-padding" th:value="#{t_logout}" />
5251
</form>
5352
</li>
54-
/*/-->
53+
<!--/*/
5554
<li sec:authorize="isAnonymous()">
5655
<a href="../account/register.html" th:href="@{${REGISTRATION_PAGE}}" th:text="#{t_register}">Register</a>
5756
</li>
57+
/*/-->
5858
</ul>
5959
</div>
6060
</div>
@@ -64,6 +64,15 @@ <h3 th:text="${#strings.capitalize(country_list)}">
6464
Country list
6565
</h3>
6666

67+
<div class="text-center" sec:authorize="hasAuthority('CREATE_COUNTRY')">
68+
<a href="../series/add.html"
69+
class="btn btn-default btn-xs"
70+
th:href="@{${ADD_SERIES_PAGE}}"
71+
th:text="${#strings.capitalize('__#{t_add_series}__')}">
72+
Add a stamp series
73+
</a>
74+
</div>
75+
6776
<ul th:if="${not #lists.isEmpty(countries)}">
6877
<li th:each="country : ${countries}">
6978
<a href="../country/info.html" th:href="@{${INFO_COUNTRY_PAGE}(slug=${country.slug})}" th:text="${country.name}">Italy</a>

0 commit comments

Comments
 (0)