[Spacewalk-devel] [PATCH] Hide the 'delete note' link on creation of system notes

2011-03-01 Thread Johannes Renner
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello,

Attached is a small patch for the jsp page that is used for editing
system notes. It hides the delete note link when a system note is
currently being created. This is done by including the toolbar within
the c:choose element. Clicking this link during the creation of a
new note will otherwise lead to internal server error (NPE), because
(of course) the nid is still null.

Regards,
Johannes Renner

- -- 
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNbMnuAAoJEGYafiwbDR5pQVAH/i2Wrx2jaO3ZvQBTWKSqxVkX
rlCIJrAXEXrYyBF/IkPgBCZ9BZ26A4sQo494Sb8stTAZZ+WdLsERgVqOoa3bSxBw
5+qOnogY581FPuEn/3OnP0hQ+JV8tktUb33L4qw7pJCtz0TTEEs3uwZt8XZ5/a/I
nH66i/Yil4DebmytXDZrvcwFmWCdCeIcDSxpERXHzwT64OcAfCIM/Aes4Lwq/J8l
KgXyqpV3y2zgA+ID1m2gsSQ7waKWVfLDdZt90nB0Fv1GpScmFBHB6d4yCkY31ER/
xJ9vDuID3c/Fq8St1ffh3sReCWTZzIeFX5E9FNBlvJfXAJCcJPzZHa31avTsDu4=
=MqUC
-END PGP SIGNATURE-
From ea324e8b7b6907f24d010b7b4439bc1e00e8f8bf Mon Sep 17 00:00:00 2001
From: Johannes Renner jren...@suse.de
Date: Thu, 17 Feb 2011 11:20:52 +0100
Subject: [PATCH] do not show delete link on creation of notes (bnc#672090)

---
 .../webapp/WEB-INF/pages/systems/sdc/note_edit.jsp |   15 ---
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/java/code/webapp/WEB-INF/pages/systems/sdc/note_edit.jsp b/java/code/webapp/WEB-INF/pages/systems/sdc/note_edit.jsp
index 408780d..87d60f4 100644
--- a/java/code/webapp/WEB-INF/pages/systems/sdc/note_edit.jsp
+++ b/java/code/webapp/WEB-INF/pages/systems/sdc/note_edit.jsp
@@ -9,18 +9,19 @@
 
 %@ include file=/WEB-INF/pages/common/fragments/systems/system-header.jspf %
 
-rhn:toolbar base=h2 img=/img/rhn-icon-note.gif
-   deletionUrl=/rhn/systems/details/DeleteNote.do?sid=${system.id}nid=${n.id}
-   deletionType=note
-  
-  bean:message key=sdc.details.notes.header/
-/rhn:toolbar
-
 c:choose
   c:when test=${empty param.nid}
+rhn:toolbar base=h2 img=/img/rhn-icon-note.gif
+  bean:message key=sdc.details.notes.header/
+/rhn:toolbar
 c:set var=urlParam scope=request value=sid=${system.id}/
   /c:when
   c:otherwise
+rhn:toolbar base=h2 img=/img/rhn-icon-note.gif
+deletionUrl=/rhn/systems/details/DeleteNote.do?sid=${system.id}nid=${n.id}
+deletionType=note
+  bean:message key=sdc.details.notes.header/
+/rhn:toolbar
 c:set var=urlParam scope=request value=sid=${system.id}nid=${n.id}/
   /c:otherwise
 /c:choose
-- 
1.7.1



hide-delete-link-on-creation-of-notes.patch.sig
Description: PGP signature
___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Re: [Spacewalk-devel] [PATCH] Hide the 'delete note' link on creation of system notes

2011-03-01 Thread Jan Pazdziora
On Tue, Mar 01, 2011 at 11:26:57AM +0100, Johannes Renner wrote:
 
 Attached is a small patch for the jsp page that is used for editing
 system notes. It hides the delete note link when a system note is
 currently being created. This is done by including the toolbar within
 the c:choose element. Clicking this link during the creation of a
 new note will otherwise lead to internal server error (NPE), because
 (of course) the nid is still null.

Pushed to Spacewalk master, thanks.

By the way: will you be submitting the patch for the Has Signed
Metadata feature as well?

-- 
Jan Pazdziora
Principal Software Engineer, Satellite Engineering, Red Hat

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] [PATCH] Hide the 'delete note' link on creation of system notes

2011-03-01 Thread Jan Pazdziora
On Tue, Mar 01, 2011 at 11:26:57AM +0100, Johannes Renner wrote:

 From ea324e8b7b6907f24d010b7b4439bc1e00e8f8bf Mon Sep 17 00:00:00 2001
 From: Johannes Renner jren...@suse.de
 Date: Thu, 17 Feb 2011 11:20:52 +0100
 Subject: [PATCH] do not show delete link on creation of notes (bnc#672090)

One note here -- we really like the bugzillas to be public when
they are referenced in the git commits.

Is the bnc#672090 going to be flipped to public eventually?

-- 
Jan Pazdziora
Principal Software Engineer, Satellite Engineering, Red Hat

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] [PATCH] Hide the 'delete note' link on creation of system notes

2011-03-01 Thread Johannes Renner
On 03/01/2011 02:29 PM, Jan Pazdziora wrote:
 By the way: will you be submitting the patch for the Has Signed
 Metadata feature as well?

Yes, this one is also going to be submitted, but unfortunately I can't
tell you exactly when. The problem is that this is currently not a
single patch, but rather a set of patches that will need to be collected
and aggregated first. So, as soon as we have done that and tested it
against the master branch it will also be submitted here.

Greetings,
Johannes

-- 
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel