setup-sidebar.jsp 2.61 KB
Newer Older
Matt Tucker's avatar
Matt Tucker committed
1 2 3 4 5 6 7
<%--
  -	$RCSfile$
  -	$Revision$
  -	$Date$
--%>

<%@ page import="org.jivesoftware.util.*" %>
8
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %>
Matt Tucker's avatar
Matt Tucker committed
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
<%!
    final String INCOMPLETE = "incomplete";
    final String IN_PROGRESS = "in_progress";
    final String DONE = "done";
%>

<%  // Get sidebar values from the session:

    String step1 = (String)session.getAttribute("jive.setup.sidebar.1");
    String step2 = (String)session.getAttribute("jive.setup.sidebar.2");
    String step3 = (String)session.getAttribute("jive.setup.sidebar.3");
    String step4 = (String)session.getAttribute("jive.setup.sidebar.4");

    if (step1 == null) { step1 = IN_PROGRESS; }
    if (step2 == null) { step2 = INCOMPLETE; }
    if (step3 == null) { step3 = INCOMPLETE; }
    if (step4 == null) { step4 = INCOMPLETE; }

    String[] items = {step1, step2, step3, step4};
    String[] names = {
Matt Tucker's avatar
Matt Tucker committed
29
        "Setup Checklist", "Server Settings", "Datasource Settings", "Admin Account"
Matt Tucker's avatar
Matt Tucker committed
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
    };
    String[] links = {
        "setup-index.jsp",
        "setup-host-settings.jsp",
        "setup-datasource-settings.jsp",
        "setup-admin-settings.jsp"
    };
%>

<table bgcolor="#cccccc" cellpadding="0" cellspacing="0" border="0" width="200">
<tr><td>
<table bgcolor="#cccccc" cellpadding="3" cellspacing="1" border="0" width="200">
<tr bgcolor="#eeeeee">
    <td align="center">
        <span style="padding:6px">
45
        <b><fmt:message key="setup.sidebar.title" /></b>
Matt Tucker's avatar
Matt Tucker committed
46 47 48 49 50 51 52 53 54 55
        </span>
    </td>
</tr>
<tr bgcolor="#ffffff">
    <td>
        <table cellpadding="5" cellspacing="0" border="0" width="100%">
        <%  for (int i=0; i<items.length; i++) { %>
            <tr>
            <%  if (INCOMPLETE.equals(items[i])) { %>

Matt Tucker's avatar
Matt Tucker committed
56
                <td width="1%"><img src="images/bullet-red-14x14.gif" width="14" height="14" border="0"></td>
Matt Tucker's avatar
Matt Tucker committed
57 58 59 60 61 62
                <td width="99%">
                        <%= names[i] %>
                </td>

            <%  } else if (IN_PROGRESS.equals(items[i])) { %>

Matt Tucker's avatar
Matt Tucker committed
63
                <td width="1%"><img src="images/bullet-yellow-14x14.gif" width="14" height="14" border="0"></td>
Matt Tucker's avatar
Matt Tucker committed
64 65 66 67 68 69
                <td width="99%">
                        <a href="<%= links[i] %>"><%= names[i] %></a>
                </td>

            <%  } else { %>

Matt Tucker's avatar
Matt Tucker committed
70
                <td width="1%"><img src="images/bullet-green-14x14.gif" width="14" height="14" border="0"></td>
Matt Tucker's avatar
Matt Tucker committed
71 72 73 74 75 76 77 78 79 80 81 82 83 84
                <td width="99%">
                        <a href="<%= links[i] %>"><%= names[i] %></a>
                </td>

            <%  } %>
            </tr>
        <%  } %>
        <tr><td colspan="2"><br><br><br><br></td></tr>
        </table>
    </td>
</tr>
</table>
</td></tr>
</table>