Skip to content

Commit

Permalink
#56: Larger pictograms, now 48x48px.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkalus committed Sep 9, 2021
1 parent 0125229 commit 613df01
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/segrada/service/PictogramService.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public void saveBinaryDataToService(IPictogram entity) {
// crop image to square
manipulator.cropImageToSquare();
// create thumbnail
manipulator.createThumbnail(24, true);
manipulator.createThumbnail(48, true);
// change file ending, if necessary
if (!pictogram.getFileName().endsWith(".png"))
pictogram.setFileName(pictogram.getFileName().substring(0, pictogram.getFileName().lastIndexOf(".")) + ".png");
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/WEB-INF/templates/pictogram/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ <h4 class="sg-control-header"><i class="fa fa-university"></i> <span th:text="#{
</tr>
<tr th:each="entity : ${entities}" th:attr="data-data-dblclick=@{/pictogram/show/{uid}(uid=${entity.uid})}">
<td th:text="${entity.title}">Name</td>
<td class="text-center"><img src="#" th:src="@{/pictogram/file/{uid}(uid=${entity.uid})}" th:alt-title="${entity.title}" alt="" width="24" height="24" /></td>
<td class="text-center"><img src="#" th:src="@{/pictogram/file/{uid}(uid=${entity.uid})}" th:alt-title="${entity.title}" alt="" width="48" height="48" /></td>
<td class="text-right">
<div class="sg-data-icon-bar" role="group" aria-label="Actions" sg:strip-whitespace>
<a class="sg-data-icon sg-data-add" href="#" th:title="#{Show}" th:href="@{/pictogram/show/{uid}(uid=${entity.uid})}"><i class="fa fa-eye"></i></a>
Expand Down
6 changes: 5 additions & 1 deletion src/main/webapp/WEB-INF/templates/pictogram/show.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@
<div class="container">
<div class="sg-data sg-pictogram" th:id="${'pictogram-' + entity.uid}">
<div th:replace="partials/common :: headerboxright (type=#{Pictogram},base='pictogram',entity=${entity},access='PICTOGRAM')"></div>
<h4 class="sg-data-header"><span class="fa fa-university" th:title="#{Pictogram}"></span> <img src="#" th:src="@{/pictogram/file/{uid}(uid=${entity.uid})}" th:alt-title="${entity.title}" alt="" width="24" height="24" /> <span th:text="${entity.title}">Pictogram</span></h4>
<h4 class="sg-data-header"><span class="fa fa-university" th:title="#{Pictogram}"></span> <span th:text="${entity.title}">Pictogram</span></h4>

<div style="margin-bottom:10px">
<img src="#" th:src="@{/pictogram/file/{uid}(uid=${entity.uid})}" th:alt-title="${entity.title}" alt="" width="48" height="48" />
</div>

<!--TODO: show all relation types, files, comments, sources, relations and nodes with this pictogram -->

Expand Down

0 comments on commit 613df01

Please sign in to comment.