Scarab commit: svn commit: r10796 - trunk/src/webapp: WEB-INF/templates/layouts WEB-INF/templates/macros WEB-INF/templates/screens/admin WEB-INF/templates/viewIssue skins
Hussayn Dabbous <[email protected]>
| Newsgroups | gmane.comp.java.scarab.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: dabbous
Date: 2009-07-12 16:01:34-0700
New Revision: 10796
Modified:
trunk/src/webapp/WEB-INF/templates/layouts/Default.vm
trunk/src/webapp/WEB-INF/templates/macros/GlobalMacros.vm
trunk/src/webapp/WEB-INF/templates/macros/ViewIssueMacro.vm
trunk/src/webapp/WEB-INF/templates/screens/admin/ArtifactTypeEdit.vm
trunk/src/webapp/WEB-INF/templates/viewIssue/ViewIssueTab1.vm
trunk/src/webapp/skins/custom.css
Log:
SCB2979: added some more hooks for future enhancements.
added initial support for "associated attributes" 2 associated attributes may appear side by side on one row. very experimental (work in progress)
recreated the two rows header for the attributes tab. But now added the assigned user right there as i believe this is a very important information.
Modified: trunk/src/webapp/WEB-INF/templates/layouts/Default.vm
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/webapp/WEB-INF/templates/layouts/Default.vm?view=diff&pathrev=10796&r1=10795&r2=10796
==============================================================================
--- trunk/src/webapp/WEB-INF/templates/layouts/Default.vm (original)
+++ trunk/src/webapp/WEB-INF/templates/layouts/Default.vm 2009-07-12 16:01:34-0700
@@ -80,7 +80,7 @@
<body marginwidth="0"
marginheight="0"
class="scb_page"
- #if($hide_bars || $autoresize) onload="initializeAll()" #else onload="initializeTreeview()" #end>
+ onload="initializeAll()">
<div id="datePopupDiv" class="scb_calendar"></div>
@@ -318,4 +318,5 @@
#end
</body>
+
</html>
\ No newline at end of file
Modified: trunk/src/webapp/WEB-INF/templates/macros/GlobalMacros.vm
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/webapp/WEB-INF/templates/macros/GlobalMacros.vm?view=diff&pathrev=10796&r1=10795&r2=10796
==============================================================================
--- trunk/src/webapp/WEB-INF/templates/macros/GlobalMacros.vm (original)
+++ trunk/src/webapp/WEB-INF/templates/macros/GlobalMacros.vm 2009-07-12 16:01:34-0700
@@ -63,7 +63,7 @@
#if ($count.trim() == "0" )
<input id="$attVal.RModuleAttribute.DisplayValue" type="hidden" name="$attrInput.get($optionFieldName).Key" value="$newValues"/>
- $newValues
+ <span id="$attVal.RModuleAttribute.DisplayValue:Display">$newValues</span>
#elseif ($count.trim() == "1" )
#foreach ($option in $module.getOptionTree($attr, $issueType, false))
@@ -80,16 +80,11 @@
name="${attrInput.get($optionFieldName).Key}_tmp"
onclick="$oc" ${checked} />
#else
- <input type="hidden" name="$attrInput.get($optionFieldName).Key" value="$option.optionId"/>
+ <input id="$attVal.RModuleAttribute.DisplayValue" type="hidden" name="$attrInput.get($optionFieldName).Key" value="$option.optionId"/>
#end
-
- #if ($option.Active)
- $option.DisplayValue
- #else
- [I] $option.DisplayValue
+ #if (!$option.Active)[I]#end <span id="$attVal.RModuleAttribute.DisplayValue:Display">$option.DisplayValue</span>
#end
#end
- #end
#else
@@ -154,7 +149,7 @@
</select>
#end
-#macro (attrValueText $attrValue $size $hint)
+#macro (attrValueText $attVal $attrValue $size $hint)
#set ($attrInput = $intake.AttributeValue.mapTo($attrValue))
#if ($attVal.Attribute.AttributeType.Name == "long-string")
#textAreaMedium("$attrInput.Value.Key" $attrInput.Value)
@@ -199,7 +194,7 @@
#end
#end
-#macro (templateAttrValueText $attrValue $size $templAttrValue)
+#macro (templateAttrValueText $attVal $attrValue $size $templAttrValue)
#set ($attrInput = $intake.AttributeValue.mapTo($attrValue))
#set ($value = $templAttrValue.Value)
#set ($currentValue = "")
@@ -1055,6 +1050,7 @@
#if (!$group.Attributes.isEmpty() && $group.isVisible4User($user))
<h4>$group.Name #asterisk()</h4>
<table cellpadding="3" cellspacing="2" border="0" width="100%">
+ #set ($appendToNextLine = "")
#foreach ($att in $group.Attributes)
#set ($rma = $module.getRModuleAttribute($att, $issueType))
#if ($rma.Active)
@@ -1072,6 +1068,12 @@
#else
#set ($field = "Value")
#end
+
+ #set ($index = $attVal.RModuleAttribute.DisplayValue.indexOf(":") + 1)
+ #if ($index > 1)
+ #set ($displayValue = $attVal.RModuleAttribute.DisplayValue.substring($index))
+ #set ($appendToNextLine = [$attVal, $att, $field, $displayValue])
+ #else
<tr>
<th> #if ($attVal.isRequired()) #showAsterisk() #end
$attVal.RModuleAttribute.DisplayValue
@@ -1096,17 +1098,60 @@
## this may leave the previous value, if RHS is null
#set ($templAttVal = $templ.getAttributeValue($att))
#if ($templAttVal.Value)
- #templateAttrValueText ( $attVal $fieldSize $templAttVal )
+ #templateAttrValueText ( $attVal $attVal $fieldSize $templAttVal )
#else
- #attrValueText ( $attVal $fieldSize $fieldHint)
+ #attrValueText ( $attVal $attVal $fieldSize $fieldHint)
#end
#else
- #attrValueText ( $attVal $fieldSize $fieldHint)
+ #attrValueText ( $attVal $attVal $fieldSize $fieldHint)
#end
#end
#attrValueErrorMsg ($attVal $field)
+
+ #if ($appendToNextLine != "")
+ #set ($visibility="hidden")
+ #if ($appendToNextLine.get(0).isRequired())
+ #set ($visibility="block")
+ #end
+
+ <span id="$appendToNextLine.get(3)" style="visibility:$visibility;">
+ #if ($appendToNextLine.get(0).isRequired()) #showAsterisk() #end
+ $appendToNextLine.get(3)
+
+ #if ($appendToNextLine.get(0).Attribute.isOptionAttribute())
+ #if ($templ)
+ #set ($templAttVal = $scarabR.getNewAttributeValue($appendToNextLine.get(1), $templ))
+ ## this may leave the previous value, if RHS is null
+ #set ($templAttVal = $templ.getAttributeValue($appendToNextLine.get(1)))
+ #templateAttrValueLeafSelect ($appendToNextLine.get(0) $templAttVal $field "" false)
+ #else
+ #attrValueLeafSelect ($appendToNextLine.get(0) $appendToNextLine.get(2) "" false $appendToNextLine.get(0).isRequired())
+ #end
+ #else
+ #set ($fieldSize = 0)
+ #set ($fieldSize = $!$appendToNextLine.get(0).Attribute.FieldSize)
+ #set ($fieldHint = "")
+ #set ($fieldHint = $!$appendToNextLine.get(0).Attribute.Hint)
+ #if ($templ)
+ #set ($templAttVal = $scarabR.getNewAttributeValue($appendToNextLine.get(1), $templ))
+ ## this may leave the previous value, if RHS is null
+ #set ($templAttVal = $templ.getAttributeValue($appendToNextLine.get(1)))
+ #if ($templAttVal.Value)
+ #templateAttrValueText ( $appendToNextLine.get(0) $appendToNextLine.get(0) $fieldSize $templAttVal )
+ #else
+ #attrValueText ( $appendToNextLine.get(0) $appendToNextLine.get(0) $fieldSize $fieldHint)
+ #end
+ #else
+ #attrValueText ( $appendToNextLine.get(0) $appendToNextLine.get(0) $fieldSize $fieldHint)
+ #end
+ #end
+ #attrValueErrorMsg ($appendToNextLine.get(0) $field)
+ </span>
+ #end
</td>
</tr>
+ #set ($appendToNextLine = "")
+ #end
#end
#end
#end
Modified: trunk/src/webapp/WEB-INF/templates/macros/ViewIssueMacro.vm
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/webapp/WEB-INF/templates/macros/ViewIssueMacro.vm?view=diff&pathrev=10796&r1=10795&r2=10796
==============================================================================
--- trunk/src/webapp/WEB-INF/templates/macros/ViewIssueMacro.vm (original)
+++ trunk/src/webapp/WEB-INF/templates/macros/ViewIssueMacro.vm 2009-07-12 16:01:34-0700
@@ -36,3 +36,8 @@
- <small>$format.getDate($scarabR.getDateFormat($l10n.ShortDateTimePattern), $date)</small>
#end
+#macro (userTimeStamp_td $user $date)
+ <td> <a href="mailto:$user.Email">$!user.Name</a> </td>
+ <td> <small>$format.getDate($scarabR.getDateFormat($l10n.ShortDateTimePattern), $date)</small> </td>
+#end
+
Modified: trunk/src/webapp/WEB-INF/templates/screens/admin/ArtifactTypeEdit.vm
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/webapp/WEB-INF/templates/screens/admin/ArtifactTypeEdit.vm?view=diff&pathrev=10796&r1=10795&r2=10796
==============================================================================
--- trunk/src/webapp/WEB-INF/templates/screens/admin/ArtifactTypeEdit.vm (original)
+++ trunk/src/webapp/WEB-INF/templates/screens/admin/ArtifactTypeEdit.vm 2009-07-12 16:01:34-0700
@@ -40,7 +40,11 @@
<h3>$l10n.IssueTypeInfo</h3>
<div class="axial">
- <table border="0" cellspacing="2" cellpadding="3">
+ <table border="0" cellspacing="2" cellpadding="3">
+
+ ## ==================================================
+ ## The Issue type name
+ ## ==================================================
<tr>
<th> * $l10n.Name</th>
<td>
@@ -57,6 +61,11 @@
#end
</td>
</tr>
+
+
+ ## ==================================================
+ ## Issue type description
+ ## ==================================================
<tr>
<th>$l10n.Description</th>
<td>
@@ -72,26 +81,35 @@
#end
</td>
</tr>
-<tr>
- <th><a title="$l10n.BlockingWhenTooltip">$l10n.BlockingWhen</a></th>
- <td >
- #if ($rma.required)
- <div class="textDisabled">
- #else
- <div>
- #end
- #if ($rmit.isConditioned())
- #foreach ($o in $rmit.Conditions)
- $o.attributeOption.attribute.name = $o.attributeOption.name<br/>
- #end
- #else
- <em>$l10n.NoConditionsDefined</em>
- #end
- </div>
- </td>
-</tr>
- </table>
+
+
+ ## ==================================================
+ ## Blocking when ...
+ ## ==================================================
+ <tr>
+ <th><a title="$l10n.BlockingWhenTooltip">$l10n.BlockingWhen</a></th>
+ <td >
+ #if ($rma.required)
+ <div class="textDisabled">
+ #else
+ <div>
+ #end
+
+ #if ($rmit.isConditioned())
+ #foreach ($o in $rmit.Conditions)
+ $o.attributeOption.attribute.name = $o.attributeOption.name<br/>
+ #end
+ #else
+ <em>$l10n.NoConditionsDefined</em>
+ #end
+ </div>
+ </td>
+ </tr>
+
+
+ </table>
</div>
+
<div class="functnbar3">
<input type="button" value="$l10n.EditConditions" onClick="location.href='$link.setPage("admin,ConditionEdit.vm").addPathInfo("$scarabG.Constant.CANCEL_TEMPLATE","admin,ArtifactTypeEdit.vm").addPathInfo("obj_type", $scarabG.Constant.BLOCKED_MODULE_ISSUE_TYPE_OBJECT).addPathInfo("moduleId", $module.moduleId).addPathInfo("issueTypeId", $issueType.issueTypeId)'" />
</div>
@@ -133,7 +151,9 @@
</div>
*#
+ ## ==================================================
## LIST GROUPS
+ ## ==================================================
<h3>$l10n.AttributeGroups</h3>
#set ($maxNum = $groups.size())
Modified: trunk/src/webapp/WEB-INF/templates/viewIssue/ViewIssueTab1.vm
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/webapp/WEB-INF/templates/viewIssue/ViewIssueTab1.vm?view=diff&pathrev=10796&r1=10795&r2=10796
==============================================================================
--- trunk/src/webapp/WEB-INF/templates/viewIssue/ViewIssueTab1.vm (original)
+++ trunk/src/webapp/WEB-INF/templates/viewIssue/ViewIssueTab1.vm 2009-07-12 16:01:34-0700
@@ -16,32 +16,64 @@
## Date of last change
## -------------------------------------------------------------------
- <div class="axial2">
+
+ ## ===============================================================================
+ ## The Tab header
+ ## ===============================================================================
+
+
+ <div class="header">
+ <div class="group">
+ <table>
+ <tr>
+ <th>$currentIssue.RModuleIssueType.DisplayName</th>
+ <td>$currentIssue.UniqueId</td>
+ </tr>
+ <tr>
+ <th>$assignedRMA.DisplayValue</th>
+ <td> #assignedUsers( $myself $isEditAttributes )</td>
+ </tr>
+ </table>
+
+ </div>
- <table cellpadding="3" cellspacing="2" border="0" width="100%">
- <tr>
- <th>$currentIssue.RModuleIssueType.DisplayName</th>
- <td>$currentIssue.UniqueId<br/>
- #if ($currentIssue.isBlocked())
- <a class="blockedmark" STYLE="text-decoration: none" title="$l10n.IssueCurrentlyBlocked" href='$tabLink.addPathInfo("tab", "6")'>$l10n.BlockedWarning</a>
- #end
- #if ($currentIssue.isBlockingAnyIssue())
- <a class="blockingmark" STYLE="text-decoration: none" title="$l10n.IssueDoesBlockOtherIssues" href='$tabLink.addPathInfo("tab", "6")'>$l10n.BlockingWarning</a>
- #end
- </td>
- <th>$assignedRMA.DisplayValue</th>
- <td>#assignedUsers( $myself $isEditAttributes )</td>
- <th>$l10n.DateCommitted</th>
- <td>#userTimeStamp( $currentIssue.CreatedBy $currentIssue.CreatedDate)</td>
- <th>$l10n.LastModified</th>
- <td>#userTimeStamp( $currentIssue.ModifiedBy $currentIssue.ModifiedDate)</td>
- </tr>
- </table>
+ <div class="group">
+ <table>
+ <tr>
+ <th>$l10n.DateCommitted</th>
+ #userTimeStamp_td( $currentIssue.CreatedBy $currentIssue.CreatedDate)
+ </tr>
+ <tr>
+ <th>$l10n.LastModified</th>
+ #userTimeStamp_td( $currentIssue.ModifiedBy $currentIssue.ModifiedDate)
+ </tr>
+ </table>
+ </div>
+
+ <div class="group">
+ <table>
+ #if ($currentIssue.isBlocked())
+ <tr>
+ <td>
+ <a class="blockedmark" STYLE="text-decoration: none" title="$l10n.IssueCurrentlyBlocked" href='$tabLink.addPathInfo("tab", "6")'>$l10n.BlockedWarning</a>
+ </td>
+ </tr>
+ #end
+ #if ($currentIssue.isBlockingAnyIssue())
+ <tr>
+ <td>
+ <a class="blockingmark" STYLE="text-decoration: none" title="$l10n.IssueDoesBlockOtherIssues" href='$tabLink.addPathInfo("tab", "6")'>$l10n.BlockingWarning</a>
+ </td>
+ </tr>
+ #end
+ </table>
+ </div>
</div>
-
-
+ ## ===============================================================================
+ ## The Attribute-groups area
+ ## ===============================================================================
<div class="axial">
#foreach ($group in $issueType.getAttributeGroups($module, true))
@@ -49,6 +81,7 @@
#if ($attributes && !$attributes.isEmpty() && $group.isVisible4User($user))
<h4>$group.Name #if ($isEditAttributes)#asterisk()#end</h4>
<table cellpadding="3" cellspacing="2" border="0" width="100%">
+ #set ($appendToNextLine = "")
#foreach ($att in $attributes)
#set ($rma = $module.getRModuleAttribute($att, $issueType))
#if ($rma.Active)
@@ -70,27 +103,69 @@
#if ($!attVal.Attribute.Description.startsWith("hint:"))
#set ($fieldExtraHeader = "$!attVal.Attribute.Description.substring(5)")
#end
- <tr>
- <th style="white-space:nowrap;">
- #if ($rma.getRequired())#showAsterisk() #end$rma.DisplayValue
- #if($fieldExtraHeader)
- <pre>$fieldExtraHeader</pre>
- #end
- </th>
- <td>
- #if ($att.isOptionAttribute())
- #attrValueLeafSelect ($attVal $field "" false $attVal.isRequired())
- #attrValueErrorMsg ($attVal $field)
- #elseif ($att.isIntegerAttribute())
- #attrValueErrorMsg($attVal "NumericValue")
- #attrValueText($attrInput.NumericValue $fieldSize $fieldHint)
- #else
- #attrValueErrorMsg($attVal "Value")
- #attrValueText($attrInput.Value $fieldSize $fieldHint)
+
+ #set ($index = $rma.DisplayValue.indexOf(":") + 1)
+ #if ($index > 1)
+ #set ($displayValue = $rma.DisplayValue.substring($index))
+ #set ($appendToNextLine = [$rma.getRequired(), $displayValue, $fieldExtraHeader, $att, $attVal, $field, $fieldSize, $fieldHint, $attrInput])
+ #else
+ <tr>
+ <th style="white-space:nowrap;">
+ #if ($rma.getRequired())#showAsterisk()#end$rma.DisplayValue
+ #if($fieldExtraHeader)
+ <pre>$fieldExtraHeader</pre>
+ #end
+ </th>
+ <td>
+ #if ($att.isOptionAttribute())
+ #attrValueLeafSelect ($attVal $field "" false $attVal.isRequired())
+ #attrValueErrorMsg ($attVal $field)
+ #elseif ($att.isIntegerAttribute())
+ #attrValueErrorMsg($attVal "NumericValue")
+ #attrValueText($attVal $attrInput.NumericValue $fieldSize $fieldHint)
+ #else
+ #attrValueErrorMsg($attVal "Value")
+ #attrValueText($attVal $attrInput.Value $fieldSize $fieldHint)
+ #end
+
+ #if ($appendToNextLine != "")
+ #set ($visibility="hidden")
+ #if ($appendToNextLine.get(0))
+ #set ($visibility="block")
+ #end
+ <span id="$appendToNextLine.get(1)" style="visibility:$visibility;">
+ #if ($appendToNextLine.get(0))#showAsterisk()#end $appendToNextLine.get(1)
+ #if($appendToNextLine.get(2))
+ <pre>$appendToNextLine.get(2)</pre>
+ #end
+
+ #if ($appendToNextLine.get(3).isOptionAttribute())
+ #attrValueLeafSelect ($appendToNextLine.get(4) $appendToNextLine.get(5) "" false $appendToNextLine.get(4).isRequired())
+ #attrValueErrorMsg ($appendToNextLine.get(4) $appendToNextLine.get(4))
+ #elseif ($appendToNextLine.get(3).isIntegerAttribute())
+ #attrValueErrorMsg($appendToNextLine.get(4) "NumericValue")
+ #attrValueText($appendToNextLine.get(4) $appendToNextLine.get(8).NumericValue $appendToNextLine.get(6) $appendToNextLine.get(7))
+ #else
+ #attrValueErrorMsg($appendToNextLine.get(4) "Value")
+ #attrValueText($appendToNextLine.get(4) $appendToNextLine.get(8).Value $appendToNextLine.get(6) $appendToNextLine.get(7))
+ #end
+ </span>
#end
- </td>
- </tr>
+ </td>
+
+ </tr>
+ #set ($appendToNextLine = "")
+
+ #end
#elseif ($attVal.isSet())
+
+ #set ($displayValue = $attVal.RModuleAttribute.DisplayValue)
+ #set ($index = $displayValue.indexOf(":") + 1)
+ #if ($index > 1)
+ #set ($displayValue = $displayValue.substring($index))
+ #end
+
+
#set ($display = true)
#set ($isOptionAttr = $attVal.Attribute.isOptionAttribute())
#set ($fieldStyle = "")
@@ -103,7 +178,7 @@
#end
#if ($display)
<tr>
- <th>$attVal.RModuleAttribute.DisplayValue</th>
+ <th>$displayValue</th>
<td $fieldStyle >
#set ($attrInput = $intake.AttributeValue.mapTo($attVal))
@@ -111,8 +186,8 @@
## depends on the attribute type.
#if ($isOptionAttr)
#if (!$attVal.AttributeOption)
- --
- #else
+ --
+ #else
#if ($module.getRModuleOption($attVal.AttributeOption, $issueType).Active)
$!module.getRModuleOption($attVal.AttributeOption, $issueType).DisplayValue
#else
@@ -135,6 +210,7 @@
</tr>
#end
#end
+
#else
#set ($allAttrValues = $currentIssue.getModuleAttributeValuesMap(false))
#set ($attVal = $allAttrValues.get($att.getName().toUpperCase()))
@@ -165,6 +241,11 @@
#end
</div>
+
+ ## ===============================================================================
+ ## The reason field (if visible)
+ ## ===============================================================================
+
#set ($reasonIsVisible = $module.isIssueReasonVisible() )
#if ($isEditAttributes)
#set ($attCommentGroup = $intake.Attachment.setKey("attCommentKey$currentIssue.QueryKey"))
@@ -194,6 +275,10 @@
<input type="hidden" name="$attCommentGroup.Name.Key" value="comment" />
#end
+ ## ===============================================================================
+ ## The local function bar for this Tab
+ ## ===============================================================================
+
#if($canEdit)
<div class="functnbar3">
#if(!$isEditAttributes)
Modified: trunk/src/webapp/skins/custom.css
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/webapp/skins/custom.css?view=diff&pathrev=10796&r1=10795&r2=10796
==============================================================================
--- trunk/src/webapp/skins/custom.css (original)
+++ trunk/src/webapp/skins/custom.css 2009-07-12 16:01:34-0700
@@ -121,4 +121,10 @@
.asterisk {
color:red;
+}
+
+// experimental stuff will be removed later.
+
+.wiedervorlagedatum {
+ color:red;
}
\ No newline at end of file
------------------------------------------------------
http://scarab.tigris.org/ds/viewMessage.do?dsForumId=3577&dsMessageId=2370803