[Bedework-commit] bedework r1887 - in trunk/deployment/webadmin: portlet/resources/default/default webapp/resources/default/default

svnadmin at bedework.org svnadmin at bedework.org
Tue Jun 3 13:56:24 EDT 2008


Author: douglm
Date: 2008-06-03 13:56:19 -0400 (Tue, 03 Jun 2008)
New Revision: 1887

Modified:
   trunk/deployment/webadmin/portlet/resources/default/default/default.xsl
   trunk/deployment/webadmin/webapp/resources/default/default/default.xsl
Log:
Switch to using a list of root users in the system parameters rather than flags in the authuser table.
Dump/restore will create that list when upgrading.

At the same time remove the alert user stuff, It was never used. 

Required a number of changes to the schema.

alter table bw_settings add column bwroot_users varchar(500)
update bw_settings set bwroot_users='root,caladmin'
update BW_AUTH set USERTYPE=192 where USERTYPE>192


Modified: trunk/deployment/webadmin/portlet/resources/default/default/default.xsl
===================================================================
--- trunk/deployment/webadmin/portlet/resources/default/default/default.xsl	2008-05-22 19:17:08 UTC (rev 1886)
+++ trunk/deployment/webadmin/portlet/resources/default/default/default.xsl	2008-06-03 17:56:19 UTC (rev 1887)
@@ -3872,6 +3872,26 @@
             </div>
           </td>
         </tr>
+        <tr>
+          <th>Locale list:</th>
+          <td>
+            <xsl:variable name="localeList" select="/bedework/system/localeList"/>
+            <input value="{$localeList}" name="localeList" class="wide"/>
+            <div class="desc">
+              Comma separated list of supported locales
+            </div>
+          </td>
+        </tr>
+        <tr>
+          <th>Root users:</th>
+          <td>
+            <xsl:variable name="rootUsers" select="/bedework/system/rootUsers"/>
+            <input value="{$rootUsers}" name="rootUsers" class="wide"/>
+            <div class="desc">
+              Comman separated list of super uses for the calendar system
+            </div>
+          </td>
+        </tr>
       </table>
       <table border="0" id="submitTable">
         <tr>
@@ -4383,12 +4403,6 @@
             <xsl:if test="publicEventUser='true'">
               publicEvent; <xsl:text> </xsl:text>
             </xsl:if>
-            <xsl:if test="superUser='true'">
-              superUser; <xsl:text> </xsl:text>
-            </xsl:if>
-            <xsl:if test="alertUser='true'">
-              alert; <xsl:text> </xsl:text>
-            </xsl:if>
           </td>
           <td>
             <xsl:variable name="account" select="account"/>
@@ -4416,28 +4430,12 @@
         </tr>
         <tr>
           <td class="fieldName">
-            Alerts:
-          </td>
-          <td>
-            <xsl:copy-of select="/bedework/formElements/form/alerts/*"/>
-          </td>
-        </tr>
-        <tr>
-          <td class="fieldName">
             Public Events:
           </td>
           <td>
             <xsl:copy-of select="/bedework/formElements/form/publicEvents/*"/>
           </td>
         </tr>
-        <tr>
-          <td class="fieldName">
-            Super User:
-          </td>
-          <td>
-            <xsl:copy-of select="/bedework/formElements/form/superUser/*"/>
-          </td>
-        </tr>
         <!--<tr>
           <td class="optional">
             Email:

Modified: trunk/deployment/webadmin/webapp/resources/default/default/default.xsl
===================================================================
--- trunk/deployment/webadmin/webapp/resources/default/default/default.xsl	2008-05-22 19:17:08 UTC (rev 1886)
+++ trunk/deployment/webadmin/webapp/resources/default/default/default.xsl	2008-06-03 17:56:19 UTC (rev 1887)
@@ -8,7 +8,7 @@
      doctype-system="http://www.w3.org/TR/html4/strict.dtd"
      standalone="yes"
      omit-xml-declaration="yes"/>
- <xsl:strip-space elements="*"/>
+ <xsl:strip-space elements="*"/>
 
   <!-- ======================================== -->
   <!--      BEDEWORK ADMIN CLIENT STYLESHEET     -->
@@ -556,7 +556,7 @@
             <span class="status">
               <xsl:value-of select="/bedework/userInfo/currentUser"/>
             </span>
-            &#160;
+            &#160;
             <xsl:if test="/bedework/userInfo/group">
               Group:
               <span class="status">
@@ -1037,29 +1037,29 @@
     <xsl:variable name="guid" select="guid"/>
     <xsl:variable name="recurrenceId" select="recurrenceId"/>
 
-    <h2>Event Information</h2>
+    <h2>Event Information</h2>
 
     <!-- if a submitted event has comments, display them -->
     <xsl:if test="form/xproperties/node()[name()='X-BEDEWORK-LOCATION' or name()='X-BEDEWORK-CONTACT' or name()='X-BEDEWORK-CATEGORIES' or name()='X-BEDEWORK-SUBMIT-COMMENT']">
       <script type="text/javascript">
-        bwSubmitComment = new bwSubmitComment(
-          '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-LOCATION']/values/text"/></xsl:call-template>',
-          '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-LOCATION']/parameters/node()[name()='X-BEDEWORK-PARAM-SUBADDRESS']"/></xsl:call-template>',
-          '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-LOCATION']/parameters/node()[name()='X-BEDEWORK-PARAM-URL']"/></xsl:call-template>',
-          '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-CONTACT']/values/text"/></xsl:call-template>',
-          '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-CONTACT']/parameters/node()[name()='X-BEDEWORK-PARAM-PHONE']"/></xsl:call-template>',
-          '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-CONTACT']/parameters/node()[name()='X-BEDEWORK-PARAM-URL']"/></xsl:call-template>',
-          '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-CONTACT']/parameters/node()[name()='X-BEDEWORK-PARAM-EMAIL']"/></xsl:call-template>',
-          '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-CATEGORIES']/values/text"/></xsl:call-template>',
+        bwSubmitComment = new bwSubmitComment(
+          '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-LOCATION']/values/text"/></xsl:call-template>',
+          '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-LOCATION']/parameters/node()[name()='X-BEDEWORK-PARAM-SUBADDRESS']"/></xsl:call-template>',
+          '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-LOCATION']/parameters/node()[name()='X-BEDEWORK-PARAM-URL']"/></xsl:call-template>',
+          '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-CONTACT']/values/text"/></xsl:call-template>',
+          '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-CONTACT']/parameters/node()[name()='X-BEDEWORK-PARAM-PHONE']"/></xsl:call-template>',
+          '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-CONTACT']/parameters/node()[name()='X-BEDEWORK-PARAM-URL']"/></xsl:call-template>',
+          '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-CONTACT']/parameters/node()[name()='X-BEDEWORK-PARAM-EMAIL']"/></xsl:call-template>',
+          '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-CATEGORIES']/values/text"/></xsl:call-template>',
           '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-SUBMIT-COMMENT']/values/text"/></xsl:call-template>');
       </script>
 
       <div id="bwSubmittedEventCommentBlock">
-        <div id="bwSubmittedBy">Submitted by <xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-SUBMITTEDBY']/values/text"/></div>
+        <div id="bwSubmittedBy">Submitted by <xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-SUBMITTEDBY']/values/text"/></div>
         <h4>Comments from Submitter</h4>
         <a href="javascript:toggleVisibility('bwSubmittedEventComment','visible');" class="toggle">show/hide</a>
-        <a href="javascript:bwSubmitComment.launch();" class="toggle">pop-up</a>
-        <div id="bwSubmittedEventComment">
+        <a href="javascript:bwSubmitComment.launch();" class="toggle">pop-up</a>
+        <div id="bwSubmittedEventComment">
           <xsl:if test="/bedework/page = 'modEvent'"><xsl:attribute name="class">invisible</xsl:attribute></xsl:if>
         </div>
       </div>
@@ -1067,12 +1067,12 @@
         bwSubmitComment.display('bwSubmittedEventComment');
       </script>
     </xsl:if>
-
-    <xsl:variable name="submitter">
-      <xsl:choose>
-        <xsl:when test="form/xproperties/node()[name()='X-BEDEWORK-SUBMITTEDBY']"><xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-SUBMITTEDBY']/values/text"/></xsl:when>
-        <xsl:otherwise><xsl:value-of select="/bedework/userInfo/currentUser"/> for <xsl:value-of select="/bedework/userInfo/group"/> (<xsl:value-of select="/bedework/userInfo/user"/>)</xsl:otherwise>
-      </xsl:choose>
+
+    <xsl:variable name="submitter">
+      <xsl:choose>
+        <xsl:when test="form/xproperties/node()[name()='X-BEDEWORK-SUBMITTEDBY']"><xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-SUBMITTEDBY']/values/text"/></xsl:when>
+        <xsl:otherwise><xsl:value-of select="/bedework/userInfo/currentUser"/> for <xsl:value-of select="/bedework/userInfo/group"/> (<xsl:value-of select="/bedework/userInfo/user"/>)</xsl:otherwise>
+      </xsl:choose>
     </xsl:variable>
     <form name="eventForm" method="post" onsubmit="setEventFields(this,{$portalFriendly},'{$submitter}')">
       <xsl:choose>
@@ -2095,7 +2095,7 @@
           <td>
             <input type="text" name="xBwImageHolder" value="" class="edit" size="30">
               <xsl:attribute name="value"><xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-IMAGE']/values/text"/></xsl:attribute>
-            </input>
+            </input>
             <xsl:text> </xsl:text>
             <span class="fieldInfo">(optional: to include an image with the event description)</span>
           </td>
@@ -2330,11 +2330,11 @@
             </td>
           </tr>
         </xsl:if>
-      </table>
-      <xsl:if test="not(starts-with(form/calendar/path,$submissionsRootUnencoded))">
-        <!-- don't create two instances of the submit buttons on pending events;
+      </table>
+      <xsl:if test="not(starts-with(form/calendar/path,$submissionsRootUnencoded))">
+        <!-- don't create two instances of the submit buttons on pending events;
              the publishing buttons require numerous unique ids -->
-        <xsl:call-template name="submitEventButtons"/>
+        <xsl:call-template name="submitEventButtons"/>
       </xsl:if>
     </form>
   </xsl:template>
@@ -5666,12 +5666,6 @@
             <xsl:if test="publicEventUser='true'">
               publicEvent; <xsl:text> </xsl:text>
             </xsl:if>
-            <xsl:if test="superUser='true'">
-              superUser; <xsl:text> </xsl:text>
-            </xsl:if>
-            <xsl:if test="alertUser='true'">
-              alert; <xsl:text> </xsl:text>
-            </xsl:if>
           </td>
           <td>
             <xsl:variable name="account" select="account"/>
@@ -5699,28 +5693,12 @@
         </tr>
         <tr>
           <td class="fieldName">
-            Alerts:
-          </td>
-          <td>
-            <xsl:copy-of select="/bedework/formElements/form/alerts/*"/>
-          </td>
-        </tr>
-        <tr>
-          <td class="fieldName">
             Public Events:
           </td>
           <td>
             <xsl:copy-of select="/bedework/formElements/form/publicEvents/*"/>
           </td>
         </tr>
-        <tr>
-          <td class="fieldName">
-            Super User:
-          </td>
-          <td>
-            <xsl:copy-of select="/bedework/formElements/form/superUser/*"/>
-          </td>
-        </tr>
         <!--<tr>
           <td class="optional">
             Email:
@@ -6433,24 +6411,24 @@
       <a href="?noxslt=yes">show XML</a> |
       <a href="?refreshXslt=yes">refresh XSLT</a>
     </div>
-  </xsl:template>
-
-  <!--==== Utility Templates ====-->
-  <xsl:template name="escapeApos">
-    <xsl:param name="str"/>
-    <xsl:variable name="apos" select='"&apos;"'/>
-    <xsl:choose>
-      <xsl:when test="contains($str, $apos)">
-         <xsl:value-of select="substring-before($str, $apos)" />
-         <xsl:text>\'</xsl:text>
-         <xsl:call-template name="escapeApos">
-            <xsl:with-param name="str" select="substring-after($str, $apos)" />
-         </xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-         <xsl:value-of select="$str" />
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
+  </xsl:template>
 
+  <!--==== Utility Templates ====-->
+  <xsl:template name="escapeApos">
+    <xsl:param name="str"/>
+    <xsl:variable name="apos" select='"&apos;"'/>
+    <xsl:choose>
+      <xsl:when test="contains($str, $apos)">
+         <xsl:value-of select="substring-before($str, $apos)" />
+         <xsl:text>\'</xsl:text>
+         <xsl:call-template name="escapeApos">
+            <xsl:with-param name="str" select="substring-after($str, $apos)" />
+         </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+         <xsl:value-of select="$str" />
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
 </xsl:stylesheet>



More information about the Bedework-commit mailing list