Skip to content

Commit

Permalink
[FEATURE] Test of configuration for the social buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
maximesinclair committed Jan 9, 2014
1 parent ae95580 commit 567a92f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response)
return;
}

public void init(ServletConfig config) throws ServletException {
config.getServletContext().setAttribute("cfg", Configuration.get());
}
public void init(ServletConfig config) throws ServletException {
config.getServletContext().setAttribute("cfg", Configuration.get());
}

private Transcoder getTranscoder() {
return TranscoderUtil.getDefaultTranscoder();
Expand Down
9 changes: 6 additions & 3 deletions src/main/webapp/index.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
<div id="header">
<%-- PAGE TITLE --%>
<h1>PlantUML Server</h1>
<p>This application provides a servlet which serves images created by <a href="http://plantuml.sourceforge.net">PlantUML</a>.</p>
<c:if test="${cfg['SHOW_SOCIAL_BUTTONS'] == 'on' }">
<p>SOCIAL BUTTONS</p>
<c:if test="${cfg['SHOW_SOCIAL_BUTTONS'] eq 'on' }">
<%@ include file="resource/socialbuttons1.html" %>
</c:if>
<p>This application provides a servlet which serves images created by <a href="http://plantuml.sourceforge.net">PlantUML</a>.</p>
</div>
<div id="content">
<%-- CONTENT --%>
Expand All @@ -62,6 +62,9 @@
<c:if test="${!empty mapurl}">
<a href="${mapurl}">View Map Data</a>
</c:if>
<c:if test="${cfg['SHOW_SOCIAL_BUTTONS'] == 'on' }">
<%@ include file="resource/socialbuttons2.jspf" %>
</c:if>
<p id="diagram">
<c:choose>
<c:when test="${!empty mapurl}">
Expand Down

0 comments on commit 567a92f

Please sign in to comment.