From 4374ee31d841496880373f04e04c96d2f16132ab Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Thu, 17 Mar 2005 22:47:05 +0000 Subject: Bug 282384: Templatize the 'select classification' bit of editproducts - Patch by GavinS r=LpSolit, a=justdave --- .../en/default/admin/products/footer.html.tmpl | 8 +-- .../admin/products/list-classifications.html.tmpl | 72 ++++++++++++++++++++++ 2 files changed, 75 insertions(+), 5 deletions(-) create mode 100644 template/en/default/admin/products/list-classifications.html.tmpl (limited to 'template/en/default') diff --git a/template/en/default/admin/products/footer.html.tmpl b/template/en/default/admin/products/footer.html.tmpl index 0276437f3..ecf23951f 100644 --- a/template/en/default/admin/products/footer.html.tmpl +++ b/template/en/default/admin/products/footer.html.tmpl @@ -43,11 +43,9 @@ [% UNLESS no_add_product_link %] Add a product - - - [%# Strictly speaking, we should not have to check for a - classification if they are enabled, but I'm just being paranoid %] + href="editproducts.cgi?action=add">Add a product[% -%] +[%# Strictly speaking, we should not have to check for a + classification if they are enabled, but I'm just being paranoid %] [% IF Param('useclassification') && classification %] ( + #%] + +[%# INTERFACE: + # classifications: array of hashes having the following properties: + # - name: string; The name of the classification + # - description: string; The classification description (html allowed) + # - product_count: number; The number of products in this classification + # + #%] + +[% PROCESS global/variables.none.tmpl %] + +[% PROCESS global/header.html.tmpl + title = "Select Classification" +%] + +[% edit_contentlink = BLOCK %] + editproducts.cgi?classification=%%name%% +[% END %] +[% add_contentlink = BLOCK %] + editproducts.cgi?action=add&classification=%%name%% +[% END %] + +[% columns = [ + { + name => "name" + heading => "Edit products of..." + contentlink => edit_contentlink + }, + { + name => "description" + heading => "Description" + allow_html_content => 1 + }, + { + name => "product_count" + align => "right" + heading => "Product Count" + }, + { + heading => "Action..." + content => "Add product" + contentlink => add_contentlink + }, + ] +%] + +[% PROCESS admin/table.html.tmpl + columns = columns + data = classifications +%] + +

+ +[%# No need for the standard edit products footer, as we have an 'add' + link in the table %] + +[% PROCESS global/footer.html.tmpl %] -- cgit v1.2.3-24-g4f1b