Scarab commit: svn commit: r11365 - branches/scarab_11079_legacy_with_ant_maven1/src/webapp/WEB-INF/templates: screens/admin viewIssue

[email protected] Tue, 11 Apr 2017 11:40:52 -0700 (PDT)
Newsgroups gmane.comp.java.scarab.cvs
Message-ID <[email protected]>
Author: dabbous
Date: 2017-04-11 11:40:52-0700
New Revision: 11365

Modified:
   branches/scarab_11079_legacy_with_ant_maven1/src/webapp/WEB-INF/templates/screens/admin/ModifyModule.vm
   branches/scarab_11079_legacy_with_ant_maven1/src/webapp/WEB-INF/templates/viewIssue/ViewIssueBody.vm

Log:
add velocity extensions for autoclose feature

Modified: branches/scarab_11079_legacy_with_ant_maven1/src/webapp/WEB-INF/templates/screens/admin/ModifyModule.vm
Url: http://scarab.tigris.org/source/browse/scarab/branches/scarab_11079_legacy_with_ant_maven1/src/webapp/WEB-INF/templates/screens/admin/ModifyModule.vm?view=diff&pathrev=11365&r1=11364&r2=11365
==============================================================================
--- branches/scarab_11079_legacy_with_ant_maven1/src/webapp/WEB-INF/templates/screens/admin/ModifyModule.vm	(original)
+++ branches/scarab_11079_legacy_with_ant_maven1/src/webapp/WEB-INF/templates/screens/admin/ModifyModule.vm	2017-04-11 11:40:52-0700
@@ -62,7 +62,7 @@
 
       <div class="axial">
         <table cellpadding="3" cellspacing="2" border="1" width="100%">
-
+          <tr><th colspan="2" style="text-align:left;padding:20px;"><h4>$l10n.ModuleConfiguration</h4></th></tr>
           #* MODULE NAME *#
           <tr>
             <th>* $l10n.ModuleName</th>
@@ -162,6 +162,7 @@
             </tr>
           *#
 
+          <tr><th colspan="2" style="text-align:left;padding:20px;"><h4>$l10n.EmailConfiguration</h4></th></tr>
           #* ARCHIVE EMAIL ADDRESS *#
           <tr>
             <th>$l10n.ArchiveEmail</th>
@@ -173,6 +174,44 @@
 
 
           #if ($scarabG.Parameter.getBoolean($scarabG.ParameterName.EMAIL_ALLOW_MODULE_OVERRIDE)) 
+
+            #set ($autocloseModules = $scarabG.getTurbinePropertyValues($scarabG.Constant.AUTOCLOSE_MODULES))
+            #set ($autocloseStates = $scarabG.getTurbineProperty($scarabG.Constant.AUTOCLOSE_STATES))
+            #set ($autoclosePeriods = $scarabG.getTurbineProperty($scarabG.Constant.AUTOCLOSE_PERIODS))
+            #set ($autocloseEmail = $scarabG.getTurbineProperty($scarabG.Constant.AUTOCLOSE_EMAIL_ADDRESS))
+            #set ($autocloseModule = "Disabled")
+            
+            #foreach ($mod in $scarabG.getTurbinePropertyValues("scarab.common.autoclose.modules"))
+                #if ($moduleGroup.Code == $mod)
+                    #set ($autocloseModule = "Enabled")
+                #end
+            #end
+            #* AUTOCLOSE (text field) *#
+            <tr>
+              <th>Autoclose</th>
+              <td>
+                $scarabG.getTurbineProperty($scarabG.Constant.AUTOCLOSE_EMAIL_ADDRESS)
+              </td>
+            </tr>
+            <tr>
+              <th>Autoclose Modules</th>
+              <td>
+                $scarabG.getTurbinePropertyValues("scarab.common.autoclose.modules")
+              </td>
+            </tr>
+            <tr>
+              <th>Autoclose States</th>
+              <td>
+                $scarabG.getTurbineProperty("scarab.common.autoclose.states")
+              </td>
+            </tr>
+            <tr>
+              <th>Autoclose Periods</th>
+              <td>
+                $scarabG.getTurbineProperty("scarab.common.autoclose.periods")
+              </td>
+            </tr>
+
             #* ENABLE EMAIL (checkmark) *#
             <tr>
               <th nowrap="nowrap">$l10n.EmailEnable</th>
@@ -207,6 +246,7 @@
           #end
 
           #* RENDER ENGINE *#
+          <tr><th colspan="2" style="text-align:left;padding:20px;"><h4>$l10n.MiscConfiguration</h4></th></tr>
           <tr>
             <th nowrap="nowrap">$l10n.RenderEngine</th>
             <td> 

Modified: branches/scarab_11079_legacy_with_ant_maven1/src/webapp/WEB-INF/templates/viewIssue/ViewIssueBody.vm
Url: http://scarab.tigris.org/source/browse/scarab/branches/scarab_11079_legacy_with_ant_maven1/src/webapp/WEB-INF/templates/viewIssue/ViewIssueBody.vm?view=diff&pathrev=11365&r1=11364&r2=11365
==============================================================================
--- branches/scarab_11079_legacy_with_ant_maven1/src/webapp/WEB-INF/templates/viewIssue/ViewIssueBody.vm	(original)
+++ branches/scarab_11079_legacy_with_ant_maven1/src/webapp/WEB-INF/templates/viewIssue/ViewIssueBody.vm	2017-04-11 11:40:52-0700
@@ -2,6 +2,7 @@
 #set ($issueType      = $currentIssue.IssueType)
 #set ($fullHistory    = $data.Parameters.getString("fullhistory",""))
 #set ($fullComments   = $data.Parameters.getString("fullcomments",""))
+#set ($changedUserId  = $data.Parameters.getString("add_user",""))
 #set ($rmit           = $module.getRModuleIssueType($issueType))
 #set ($permission     = $scarabG.getRequiredModifyPermission($currentIssue) )
 #set ($canEdit        = $scarabR.hasPermission($permission, $module) && $rmit.Active)
@@ -89,6 +90,15 @@
 ## This macro is called from the initialisation code below.
 ## --------------------------------------------------------------
 
+#macro (isSelected $userId $assignedUserId $changedUserId)
+#if ($changedUserId != '')
+  #set ($b=($userId == $changedUserId))
+#else 
+  #set ($b=($userId == $assignedUserId))
+#end
+#if ($b)selected=selected#end
+#end
+
 #macro (assignedUsers $myself $isEditAttributes)
     #set ($users = $module.getUsers("Issue | Edit"))
     #if ($isEditAttributes)
@@ -112,8 +122,8 @@
 
       #foreach ($user in $users)
         #if (!$archivingScarabUsers.contains($user))
-          #set ($selected = ($user.UserId == $assignedUserId))
-          <option value="$user.UserId" #selected($selected) >$user.Name</option> 
+          #set ($selected = "#isSelected($user.UserId $assignedUserId $changedUserId)" )
+          <option value="$user.UserId" $selected >$user.Name</option> 
         #end
       #end
       </select>
@@ -191,12 +201,12 @@
 ## Toggles event handler, which makes it possible to the user
 ## to switch current tab on or off.
 #macro (tabHeading $tabId $title)
-	#if($tab.equals("all"))
-		#set($imgName = $tabId.concat(".state"))
-		<h3 onClick=smartToggleVisibility('$tabId')><img name="$imgName" src="$staticLink.setPath($iconCollapse)"/>$title</h3>
-	#else
-		<h3>$title</h3>
-	#end
+    #if($tab.equals("all"))
+        #set($imgName = $tabId.concat(".state"))
+        <h3 onClick=smartToggleVisibility('$tabId')><img name="$imgName" src="$staticLink.setPath($iconCollapse)"/>$title</h3>
+    #else
+        <h3>$title</h3>
+    #end
 #end
 
 <input type="hidden" name="action" value="ModifyIssue" />

------------------------------------------------------
http://scarab.tigris.org/ds/viewMessage.do?dsForumId=3577&dsMessageId=3228472