| 11 | | |
|---|
| 12 | | <xsl:variable name="firstView">welcome</xsl:variable> |
|---|
| 13 | | <xsl:variable name="lastView" select="/bedework/propertyGroups/form/propertyGroup[position()=last()]/@name"/> |
|---|
| 14 | | <xsl:variable name="currentView"> |
|---|
| 15 | | <xsl:choose> |
|---|
| 16 | | <xsl:when test="/bedework/appvar/key='setView'"><xsl:value-of select="/bedework/appvar[key='setView']/value"/></xsl:when> |
|---|
| 17 | | <xsl:otherwise><xsl:value-of select="$firstView"/></xsl:otherwise> |
|---|
| 18 | | </xsl:choose> |
|---|
| 19 | | </xsl:variable> |
|---|
| 20 | | <xsl:variable name="currentViewPos"> |
|---|
| 21 | | <xsl:choose> |
|---|
| 22 | | <xsl:when test="$currentView = $firstView">0</xsl:when> |
|---|
| 23 | | <xsl:otherwise><xsl:for-each select="/bedework/propertyGroups/form/propertyGroup[@name=$currentView]"><xsl:number/></xsl:for-each></xsl:otherwise> |
|---|
| 24 | | </xsl:choose> |
|---|
| 25 | | </xsl:variable> |
|---|
| 26 | | <xsl:variable name="prevView"> |
|---|
| 27 | | <xsl:choose> |
|---|
| 28 | | <xsl:when test="$currentView = $firstView">$currentView</xsl:when> |
|---|
| 29 | | <xsl:otherwise><xsl:value-of select="/bedework/propertyGroups/form/propertyGroup[position()=number($currentViewPos)-1]/@name"/></xsl:otherwise> |
|---|
| 30 | | </xsl:choose> |
|---|
| 31 | | </xsl:variable> |
|---|
| 32 | | <xsl:variable name="nextView"> |
|---|
| 33 | | <xsl:choose> |
|---|
| 34 | | <xsl:when test="$currentView = $lastView">$currentView</xsl:when> |
|---|
| 35 | | <xsl:otherwise><xsl:value-of select="/bedework/propertyGroups/form/propertyGroup[position()=number($currentViewPos)+1]/@name"/></xsl:otherwise> |
|---|
| 36 | | </xsl:choose> |
|---|
| 37 | | </xsl:variable> |
|---|
| 38 | | |
|---|
| 93 | | <form action="save.do" method="POST" enctype="multipart/form-data" name="propsForm"> |
|---|
| 94 | | <div id="buttonMenuTop"> |
|---|
| 95 | | <xsl:choose> |
|---|
| 96 | | <xsl:when test="$currentView = $firstView"> |
|---|
| 97 | | <div id="buttonMenuPrev">< prev</div> |
|---|
| 98 | | </xsl:when> |
|---|
| 99 | | <xsl:otherwise> |
|---|
| 100 | | <div id="buttonMenuPrev">< <a href="javascript:setPrevView()">prev</a></div> |
|---|
| 101 | | </xsl:otherwise> |
|---|
| 102 | | </xsl:choose> |
|---|
| 103 | | <xsl:choose> |
|---|
| 104 | | <xsl:when test="$currentView = $lastView"> |
|---|
| 105 | | <div id="buttonMenuNext">next ></div> |
|---|
| 106 | | </xsl:when> |
|---|
| 107 | | <xsl:otherwise> |
|---|
| 108 | | <div id="buttonMenuNext"><a href="javascript:setNextView()">next</a> ></div> |
|---|
| 109 | | </xsl:otherwise> |
|---|
| 110 | | </xsl:choose> |
|---|
| 111 | | </div> |
|---|
| 112 | | |
|---|
| 113 | | <ul id="buttonMenu"> |
|---|
| 114 | | <li><input type="submit" name="validate" value="validate"/></li> |
|---|
| 115 | | <li><input type="submit" name="save" value="save"/></li> |
|---|
| 116 | | </ul> |
|---|
| 117 | | |
|---|
| 118 | | <select name="setappvar" onchange="submit()"> |
|---|
| 119 | | <option value="setView(welcome)">welcome</option> |
|---|
| 120 | | <xsl:for-each select="/bedework/propertyGroups/form/propertyGroup"> |
|---|
| 121 | | <xsl:variable name="groupName" select="@name"/> |
|---|
| 122 | | <xsl:choose> |
|---|
| 123 | | <xsl:when test="$currentView = $groupName"> |
|---|
| 124 | | <option name="{$groupName}" value="setView({$groupName})" selected="selected"> |
|---|
| 125 | | <xsl:value-of select="$groupName"/> |
|---|
| 126 | | </option> |
|---|
| 127 | | </xsl:when> |
|---|
| 128 | | <xsl:otherwise> |
|---|
| 129 | | <option name="{$groupName}" value="setView({$groupName})"> |
|---|
| 130 | | <xsl:value-of select="$groupName"/> |
|---|
| 131 | | </option> |
|---|
| 132 | | </xsl:otherwise> |
|---|
| 133 | | </xsl:choose> |
|---|
| 134 | | </xsl:for-each> |
|---|
| 135 | | </select> |
|---|
| 136 | | |
|---|
| 137 | | advanced: |
|---|
| 138 | | <xsl:choose> |
|---|
| 139 | | <xsl:when test="/bedework/propertyGroups/form/propertyGroup[@name='modules']/property[@name='advanced']/fieldValue='true'"> |
|---|
| 140 | | <input type="radio" name="modules.advanced" value="true" checked="checked" onclick="submit()"/> yes |
|---|
| 141 | | <input type="radio" name="modules.advanced" value="false" onclick="submit()"/> no |
|---|
| 142 | | </xsl:when> |
|---|
| 143 | | <xsl:otherwise> |
|---|
| 144 | | <input type="radio" name="modules.advanced" value="true" onclick="submit()"/> yes |
|---|
| 145 | | <input type="radio" name="modules.advanced" value="false" checked="checked" onclick="submit()"/> no |
|---|
| 146 | | </xsl:otherwise> |
|---|
| 147 | | </xsl:choose> |
|---|
| 148 | | |
|---|
| 149 | | <!-- ======================================================================= --> |
|---|
| 150 | | <!-- ========================== GENERATE CONTENT =========================== --> |
|---|
| 151 | | <!-- ======================================================================= --> |
|---|
| 152 | | |
|---|
| 153 | | <xsl:choose> |
|---|
| 154 | | <xsl:when test="$currentView = 'welcome'"> |
|---|
| 155 | | <div id="welcome"> |
|---|
| 156 | | <h1>BedeFig: Configure Bedework Properties</h1> |
|---|
| 157 | | <p> |
|---|
| 158 | | Welcome to the Bedework property configuration tool. This |
|---|
| 159 | | application allows you to review, modify, validate, and |
|---|
| 160 | | save the properties used for building a Bedework |
|---|
| 161 | | Calendar production-ready application. |
|---|
| 162 | | </p> |
|---|
| 163 | | <p> |
|---|
| 164 | | Options are grouped into pages. You can select any section |
|---|
| 165 | | at any time by using the pull-down menu above, or you may |
|---|
| 166 | | move from page to page by clicking the "next" button to the upper right. |
|---|
| 167 | | </p> |
|---|
| 168 | | <p> |
|---|
| 169 | | When you have finished reviewing and modifying properties, |
|---|
| 170 | | press "validate" to check your settings, and "save" to download |
|---|
| 171 | | a properly-configured properties file which you can use to build |
|---|
| 172 | | a production-ready version of the Bedework Calendar application. |
|---|
| 173 | | </p> |
|---|
| 174 | | </div> |
|---|
| 175 | | </xsl:when> |
|---|
| 176 | | <xsl:otherwise> |
|---|
| 177 | | <xsl:apply-templates select="/bedework/propertyGroups/form/propertyGroup[@name=$currentView]"/> |
|---|
| 178 | | </xsl:otherwise> |
|---|
| 179 | | </xsl:choose> |
|---|
| 180 | | |
|---|
| 181 | | |
|---|
| 182 | | <!-- ======================================================================= --> |
|---|
| 183 | | <!-- ======================================================================= --> |
|---|
| 184 | | <!-- ======================================================================= --> |
|---|
| 185 | | </form> |
|---|
| | 67 | <xsl:call-template name="main"/> |
|---|
| 188 | | <form action="save.do" method="POST" enctype="multipart/form-data" name="downloadForm"> |
|---|
| 189 | | <input type="hidden" name="contentType" value="text/text"/> |
|---|
| 190 | | <input type="hidden" name="contentName" value="myBedework.properties"/> |
|---|
| 191 | | <input type="hidden" name="skinName" value="outputText"/> |
|---|
| 192 | | <input type="hidden" name="refreshXslt" value="yes"/> |
|---|
| 193 | | <ul id="buttonMenu"> |
|---|
| 194 | | <li><input type="submit" name="save" value="download file"/></li> |
|---|
| 195 | | <li><a href="setup.do">return</a></li> |
|---|
| 196 | | </ul> |
|---|
| 197 | | </form> |
|---|
| 198 | | <h1>Your Configured Properties File:</h1> |
|---|
| 199 | | <div id="propFile"> |
|---|
| 200 | | <xsl:for-each select="/bedework/propertyGroups/propertyGroup"> |
|---|
| 201 | | #<br/> |
|---|
| 202 | | # <xsl:value-of select="@name"/><br/> |
|---|
| 203 | | #<br/> |
|---|
| 204 | | <xsl:for-each select="property"> |
|---|
| 205 | | <xsl:value-of select="@name"/>=<xsl:value-of select="."/><br/> |
|---|
| 206 | | </xsl:for-each> |
|---|
| 207 | | <br/> |
|---|
| 208 | | </xsl:for-each> |
|---|
| 209 | | </div> |
|---|
| | 70 | <xsl:call-template name='save'/> |
|---|
| | 92 | </xsl:template> |
|---|
| | 93 | |
|---|
| | 94 | <xsl:template name="main"> |
|---|
| | 95 | <h1>BedeFig: Configure Bedework Properties</h1> |
|---|
| | 96 | <p> |
|---|
| | 97 | Welcome to the Bedework property configuration tool. This |
|---|
| | 98 | application allows you to review, modify, validate, and |
|---|
| | 99 | save the properties used for building a Bedework |
|---|
| | 100 | Calendar production-ready application. |
|---|
| | 101 | </p> |
|---|
| | 102 | <p> |
|---|
| | 103 | Options are grouped into pages. You can select any section |
|---|
| | 104 | at any time by using the pull-down menu above, or you may |
|---|
| | 105 | move from page to page by clicking the "next" button to the upper right. |
|---|
| | 106 | </p> |
|---|
| | 107 | <p> |
|---|
| | 108 | When you have finished reviewing and modifying properties, |
|---|
| | 109 | press "validate" to check your settings, and "save" to download |
|---|
| | 110 | a properly-configured properties file which you can use to build |
|---|
| | 111 | a production-ready version of the Bedework Calendar application. |
|---|
| | 112 | </p> |
|---|
| | 113 | </xsl:template> |
|---|
| | 114 | |
|---|
| | 115 | <xsl:template name="save"> |
|---|
| | 116 | <form action="save.do" method="POST" enctype="multipart/form-data" name="downloadForm"> |
|---|
| | 117 | <input type="hidden" name="contentType" value="text/text"/> |
|---|
| | 118 | <input type="hidden" name="contentName" value="myBedework.properties"/> |
|---|
| | 119 | <input type="hidden" name="skinName" value="outputText"/> |
|---|
| | 120 | <input type="hidden" name="refreshXslt" value="yes"/> |
|---|
| | 121 | <ul id="buttonMenu"> |
|---|
| | 122 | <li><input type="submit" name="save" value="download file"/></li> |
|---|
| | 123 | <li><a href="setup.do">return</a></li> |
|---|
| | 124 | </ul> |
|---|
| | 125 | </form> |
|---|
| | 126 | <h1>Your Configured Properties File:</h1> |
|---|
| | 127 | <div id="propFile"> |
|---|
| | 128 | <xsl:for-each select="/bedework/propertyGroups/propertyGroup"> |
|---|
| | 129 | #<br/> |
|---|
| | 130 | # <xsl:value-of select="@name"/><br/> |
|---|
| | 131 | #<br/> |
|---|
| | 132 | <xsl:for-each select="property"> |
|---|
| | 133 | <xsl:value-of select="@name"/>=<xsl:value-of select="."/><br/> |
|---|
| | 134 | </xsl:for-each> |
|---|
| | 135 | <br/> |
|---|
| | 136 | </xsl:for-each> |
|---|
| | 137 | </div> |
|---|