Skip to content

Commit

Permalink
Eine Admintabelle durch Grid ersetzt
Browse files Browse the repository at this point in the history
  • Loading branch information
schipplock committed Jan 7, 2024
1 parent 1905a51 commit 9a917cd
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 38 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ FROM base

COPY docker/entrypoint.sh /bin/entrypoint.sh
COPY docker/postgresql-42.7.1.jar $JBOSS_HOME/standalone/deployments/postgresql-driver.jar
COPY --from=build-war /src/target/tilstory-0.0.7.war $JBOSS_HOME/standalone/deployments/tilstory.war
COPY --from=build-war /src/target/tilstory-0.0.8.war $JBOSS_HOME/standalone/deployments/tilstory.war
COPY docker/standalone.xml $JBOSS_HOME/standalone/configuration/standalone.xml
COPY docker/application.keystore $JBOSS_HOME/standalone/configuration/application.keystore

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ Meine Blogsoftware. TIL = Today I learned.
## Das Image bauen

```bash
docker build --network=host --force-rm -t ghcr.io/schipplock/tilstory:v0.0.7 .
docker build --network=host --force-rm -t ghcr.io/schipplock/tilstory:v0.0.8 .
```
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ services:
- flywaydb

tilstory-app:
image: ghcr.io/schipplock/tilstory:v0.0.7
image: ghcr.io/schipplock/tilstory:v0.0.8
container_name: tilstory-app
networks:
local-net:
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ limitations under the License.
<groupId>de.schipplock.web</groupId>
<artifactId>tilstory</artifactId>
<packaging>war</packaging>
<version>0.0.7</version>
<version>0.0.8</version>
<name>TILstory</name>
<description>Today I learned - blogging tool</description>
<url>https://github.com/schipplock/tilstory</url>
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/WEB-INF/includes/admin/header.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<h1># <a href="${pageContext.request.contextPath}/">${settings:name()}</a></h1>
<h2>Kurze Texte von ${settings:author()}</h2>
<h3>
<a href="https://github.com/schipplock/tilstory" target="_blank">TILStory 0.0.7</a> |
<a href="https://github.com/schipplock/tilstory" target="_blank">TILStory 0.0.8</a> |
<a href="${pageContext.request.contextPath}/rss.jsp">rss</a>
</h3>
</header>
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/WEB-INF/includes/header.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<h1># <a href="${pageContext.request.contextPath}/">${settings:name()}</a></h1>
<h2>Kurze Texte von ${settings:author()}</h2>
<h3>
<a href="https://github.com/schipplock/tilstory" target="_blank">TILStory 0.0.7</a> |
<a href="https://github.com/schipplock/tilstory" target="_blank">TILStory 0.0.8</a> |
<a href="${pageContext.request.contextPath}/rss.jsp">rss</a>
</h3>
</header>
42 changes: 10 additions & 32 deletions src/main/webapp/admin.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -104,41 +104,19 @@
</c:if>

<c:if test="${posts.getRowCount() > 0}">
<section class="container">
<h2>Beiträge</h2>
</section>

<table style="width:100%" class="styled-table">
<tbody>
<c:forEach var="post" items="${posts.rows}">
<tr>
<td style="text-align:center">
<section class="post postcontentless post-list" id="post${post.rows[0].guid}">
<h1 class="subject">
<c:if test="${not post.draft}"><b style="cursor:default" title="veröffentlicht, für alle sichtbar">🟢</b></c:if>
<c:if test="${post.draft}"><b style="cursor:default" title="noch nicht veröffentlicht, für niemanden sichtbar">🔴</b></c:if>
</td>
<td style="width:75%">${post.subject}</td>
<td style="width:15%">
<table>
<tr>
<td>
<form method="get" action="">
<input type="hidden" name="id" value="${post.id}" />
<button type="submit" title="bearbeiten" style="width:25px">✎</button>
</form>
</td>
<td>
<form method="post" action="${pageContext.request.contextPath}/post" enctype="multipart/form-data" onsubmit="return confirm('Den Beitrag unwiderruflich löschen?')">
<input type="hidden" name="_method" value="DELETE" />
<input type="hidden" name="id" value="${post.id}" />
<button type="submit" id="delete" title="l&ouml;schen" style="width:25px">␡</button>
</form>
</td>
</tr>
</table>
</td>
</tr>
<a href="${pageContext.request.contextPath}/admin.jsp?id=${post.id}">#${post.id}:&nbsp;${post.subject}</a>
</h1>
<form method="post" action="${pageContext.request.contextPath}/post" enctype="multipart/form-data" onsubmit="return confirm('Den Beitrag unwiderruflich löschen?')">
<input type="hidden" name="_method" value="DELETE" />
<input type="hidden" name="id" value="${post.id}" />
<button type="submit" class="delete-button" title="l&ouml;schen">löschen</button>
</form>
</section>
</c:forEach>
</tbody>
</table>
</c:if>
<jsp:include page="/WEB-INF/includes/admin/footer.jsp" />
18 changes: 18 additions & 0 deletions src/main/webapp/css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,22 @@ section.container h2 {
background-color: #750808;
color: #ffffff;
text-align: center;
}

.post-list {
display: grid;
grid-template-columns: 5fr 1fr;
grid-template-rows: 1fr;
grid-column-gap: 5px;
grid-row-gap: 0;
}

.delete-button {
font-size: 1em;
color: #fff;
font-weight: bold;
width: 100%;
border-color: red;
background-color: red;
border-top-style: solid;
}

0 comments on commit 9a917cd

Please sign in to comment.