Scarab commit: svn commit: r10715 - branches/release/0.22/src/webapp/WEB-INF/templates/navigations

Johannes Höchstädter <[email protected]>
Newsgroups gmane.comp.java.scarab.cvs
Message-ID <[email protected]>
Author: jhoech
Date: 2009-04-29 07:00:31-0700
New Revision: 10715

Modified:
   branches/release/0.22/src/webapp/WEB-INF/templates/navigations/Administration.vm
   branches/release/0.22/src/webapp/WEB-INF/templates/navigations/ModuleAdmin.vm

Log:
FIX - link for approval screen moved, it is now sub menu for current module, because approval screen is dependent to module
  ENH - code revised for module admin menu

Modified: branches/release/0.22/src/webapp/WEB-INF/templates/navigations/Administration.vm
Url: http://scarab.tigris.org/source/browse/scarab/branches/release/0.22/src/webapp/WEB-INF/templates/navigations/Administration.vm?view=diff&pathrev=10715&r1=10714&r2=10715
==============================================================================
--- branches/release/0.22/src/webapp/WEB-INF/templates/navigations/Administration.vm	(original)
+++ branches/release/0.22/src/webapp/WEB-INF/templates/navigations/Administration.vm	2009-04-29 07:00:31-0700
@@ -31,24 +31,35 @@
     #end
    #end
 
-   #if ($allowA)
-    <div>$link.setPage("admin,Approval.vm").setPathInfo($scarabG.Constant.CURRENT_ADMIN_MENU, "2").setLabel("$l10n.Approve")</div>
-   #end
+   ## obsolete old menu
+   ## #if ($allowA)
+   ## <div>$link.setPage("admin,Approval.vm").setPathInfo($scarabG.Constant.CURRENT_ADMIN_MENU, "2").setLabel("$l10n.Approve")</div>
+   ## #end
 
-   #if ($allowMAT || $allowMM || $allowXML)
-    #if ($adminMenu.equals("3"))
-     <div><strong>$l10n.CurrentModule</strong>
-       $renderer.render("navigations", "ModuleAdmin.vm")
-     </div>
-    #else
-     #if ($allowMAT && ! $allowMM)
-      <div>$link.setPage("admin,ManageArtifactTypes.vm").setPathInfo($scarabG.Constant.CURRENT_ADMIN_MENU, "3").setLabel("$l10n.CurrentModule")</div>
-     #else
-       #if (!$data.user.CurrentModule.isGlobalModule())
-      <div>$link.setPage("admin,ManageArtifactTypes.vm").setPathInfo($scarabG.Constant.CURRENT_ADMIN_MENU, "3").setLabel("$l10n.CurrentModule")</div>
-       #end
-     #end
-    #end
+   #if ($allowA || $allowMAT || $allowMM || $allowXML)
+	    #if ($adminMenu.equals("3"))
+	     <div><strong>$l10n.CurrentModule</strong>
+	       $renderer.render("navigations", "ModuleAdmin.vm")
+	     </div>
+	    #else
+		     #if ($allowMM)
+		      	<div>$link.setPage("SelectModule.vm").setPathInfo($scarabG.Constant.CURRENT_ADMIN_MENU, "3").setLabel("$l10n.CurrentModule")</div>
+		     #else
+				#if ($allowMAT)
+		      		<div>$link.setPage("admin,ManageArtifactTypes.vm").setPathInfo($scarabG.Constant.CURRENT_ADMIN_MENU, "3").setLabel("$l10n.CurrentModule")</div>
+		     	#else
+					#if ($allowXML)
+		      			<div>$link.setPage("admin,XMLImportIssues.vm").setPathInfo($scarabG.Constant.CURRENT_ADMIN_MENU, "3").setLabel("$l10n.CurrentModule")</div>
+			     	#else
+						#if ($allowA)
+			      			<div>$link.setPage("admin,Approval.vm").setPathInfo($scarabG.Constant.CURRENT_ADMIN_MENU, "3").setLabel("$l10n.CurrentModule")</div>
+				     	#else
+							## nothing, should never happen
+				     	#end
+			     	#end
+		     	#end
+		     #end
+	    #end
    #end
 
    #if ($allowMR || $allowAR)

Modified: branches/release/0.22/src/webapp/WEB-INF/templates/navigations/ModuleAdmin.vm
Url: http://scarab.tigris.org/source/browse/scarab/branches/release/0.22/src/webapp/WEB-INF/templates/navigations/ModuleAdmin.vm?view=diff&pathrev=10715&r1=10714&r2=10715
==============================================================================
--- branches/release/0.22/src/webapp/WEB-INF/templates/navigations/ModuleAdmin.vm	(original)
+++ branches/release/0.22/src/webapp/WEB-INF/templates/navigations/ModuleAdmin.vm	2009-04-29 07:00:31-0700
@@ -1,5 +1,19 @@
+#set ($allowA = $link.isAllowed("admin,Approval.vm"))
+#set ($allowXML = $link.isAllowed("admin,XMLExportIssues.vm"))
+#set ($allowMAT = $link.isAllowed("admin,ManageArtifactTypes.vm"))
+#set ($allowMM = $link.isAllowed("admin,ManageModules.vm"))
+
+#if ($allowMAT)
  <div>$link.setPage("admin,ManageArtifactTypes.vm").setLabel("$l10n.NavManageIssueTypes")</div>
+#end
+#if ($allowXML)
  <div>$link.setPage("admin,XMLImportIssues.vm").setLabel("$l10n.XMLImportIssues")</div>
  <div>$link.setPage("admin,XMLExportIssues.vm").setLabel("$l10n.XMLExportIssues")</div>
  <div>$link.setPage("admin,XMLExportSettings.vm").setLabel("$l10n.XMLExportSettings")</div>
+#end
+#if ($allowMM)
  <div>$link.setPage("SelectModule.vm").setLabel("$l10n.ChangeModule")</div>
+#end
+#if ($allowA)
+	<div>$link.setPage("admin,Approval.vm").setLabel("$l10n.Approve")</div>
+#end
\ No newline at end of file

------------------------------------------------------
http://scarab.tigris.org/ds/viewMessage.do?dsForumId=3577&dsMessageId=1980309
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.