Closed Bug 306757 Opened 19 years ago Closed 19 years ago

templatize ($action eq 'new') at editproducts.cgi

Categories

(Bugzilla :: Administration, task)

2.21
task
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.22

People

(Reporter: gabriel.sales, Assigned: gabriel.sales)

References

Details

Attachments

(1 file, 3 obsolete files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050725 Firefox/1.0.6 (Ubuntu package 1.0.6)
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050725 Firefox/1.0.6 (Ubuntu package 1.0.6)

Open as a blocker of 190196

Reproducible: Always
Blocks: 190196
Assignee: administration → gabriel
Severity: normal → enhancement
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Linux → All
Hardware: PC → All
Target Milestone: --- → Bugzilla 2.22
Version: unspecified → 2.21
Blocks: 307524
Create 3 new User Errors and put the created template.
Attachment #195306 - Flags: review?(LpSolit)
Comment on attachment 195306 [details] [diff] [review]
v1-create user errors and created template

Maybe it's just me, but I'd like to see more text moved inside <a></a> in
created.html.tmpl. Instead of two links "add" and "add", I think "add a new
product" and "add components to this new product" is more descriptive to the
link.

Other templates creating edit*.cgi footers give a bad example there imho.
Comment on attachment 195306 [details] [diff] [review]
v1-create user errors and created template

>Index: editproducts.cgi

>-    # Make versioncache flush
>-    unlink "$datadir/versioncache";

You are not allowed to remove this line! versioncache *has to* be deleted when
inserting a new product, else GenerateVersionTable() in globals.pl will be
unable to regenerate it with updated data.


>-    print "<div style='border: 1px red solid; padding: 1ex;'><b>You will need to    
>-           <a href=\"editcomponents.cgi?action=add&product=" .
>-           url_quote($product) . "\">add at least one 
>-           component</a> before you can enter bugs against this product.</b></div>";

This warning has been recently added, so I ask you to move it in the template
instead of removing it.



>Index: template/en/default/admin/products/created.html.tmpl

>+  # Contributor(s): Jack Nerad     <jnerad@bellsouth.net>

Who is he??? You are the one who wrote this template, so add your name instead.


>+OK, done.

Maybe enclose it in a <div></div>. And you could also be a little bit more
explicit:

"The product '[% product FILTER html %]' has been created."


Hey... where is the warning which was in editproducts.cgi?? (see my comment
above)


>+  <a href="editproducts.cgi?action=add">add</a> a new product,
>+  <a href="editcomponents.cgi?action=add&product=[% product FILTER url_quote %][% classhtmlvar FILTER url_quote %]">
>+    add
>+  </a> components to this new product.

As I told you already, use [% PROCESS admin/products/footer.html.tmpl %]
instead.
Attachment #195306 - Flags: review?(LpSolit) → review-
Another comment I forgot in my review:

CheckClassification() must be updated to CheckClassificationNew().
Attached patch v2-fixed errors (obsolete) β€” β€” Splinter Review
There's no parameter to send to products/footer to add a 'add component' link.
Is necessary add one, or one link is enough?
Attachment #195306 - Attachment is obsolete: true
Attachment #195408 - Flags: review?(LpSolit)
Attached patch v2-fix bug words (obsolete) β€” β€” Splinter Review
bug words
Attachment #195408 - Attachment is obsolete: true
Attachment #195410 - Flags: review?(LpSolit)
Attachment #195408 - Flags: review?(LpSolit)
Comment on attachment 195410 [details] [diff] [review]
v2-fix bug words

>Index: template/en/default/admin/products/created.html.tmpl

>+[% PROCESS "admin/products/footer.html.tmpl" %]

footer.html.tmpl uses 'name' instead of 'product' for the product name. So you
should pass 'name = product' as a param. Either you update your patch or I fix
this on checkin (I prefer a new patch).

Anyway, the patch works fine. r=LpSolit
Attachment #195410 - Flags: review?(LpSolit) → review+
Status: NEW → ASSIGNED
Flags: approval?
Attached patch v2-fix add param β€” β€” Splinter Review
done.
Attachment #195410 - Attachment is obsolete: true
Comment on attachment 195727 [details] [diff] [review]
v2-fix add param

r=LpSolit
Attachment #195727 - Flags: review+
Flags: approval? → approval+
Checking in editproducts.cgi;
/cvsroot/mozilla/webtools/bugzilla/editproducts.cgi,v  <--  editproducts.cgi
new revision: 1.97; previous revision: 1.96
done
RCS file:
/cvsroot/mozilla/webtools/bugzilla/template/en/default/admin/products/created.html.tmpl,v
done
Checking in template/en/default/admin/products/created.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/admin/products/created.html.tmpl,v
 <--  created.html.tmpl
initial revision: 1.1
done
Checking in template/en/default/global/user-error.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/global/user-error.html.tmpl,v
 <--  user-error.html.tmpl
new revision: 1.127; previous revision: 1.126
done
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: