Ignore:
Timestamp:
29 Dec 2014, 06:35:45 (10 years ago)
Author:
Henrik Bettermann
Message:

Show contract category title on products container pages.

Location:
main/waeup.ikoba/trunk/src/waeup/ikoba/products
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/trunk/src/waeup/ikoba/products/browser_templates/containermanagepage.pt

    r12068 r12334  
    3838            <th i18n:translate="">Title
    3939            </th>
     40            <th i18n:translate="">Category
     41            </th>
    4042          </tr>
    4143        </thead>
    4244        <tbody>
    43           <tr tal:repeat="prod context/values"> <td>
     45          <tr tal:repeat="prod context/values">
     46            <td>
    4447              <input type="checkbox" name="val_id"
    45                      tal:attributes="value prod/product_id" /> </td> <td>
     48                     tal:attributes="value prod/product_id" />
     49            </td>
     50            <td>
    4651              <a tal:attributes="href python: view.url(prod)"
    47                  tal:content="prod/__name__"> ID</a> </td> <td>
    48               <span tal:content="prod/title">TITLE
    49               </span> </td>
     52                 tal:content="prod/__name__"> ID</a>
     53            </td>
     54            <td>
     55              <span tal:content="prod/title">TITLE</span>
     56            </td>
     57            <td>
     58              <span tal:content="prod/contract_category_title">CATEGORY</span>
     59            </td>
    5060          </tr>
    5161        </tbody>
  • main/waeup.ikoba/trunk/src/waeup/ikoba/products/browser_templates/containerpage.pt

    r12067 r12334  
    88      <th i18n:translate="">Product Id</th>
    99      <th i18n:translate="">Title</th>
     10      <th i18n:translate="">Category</th>
    1011    </tr>
    1112  </thead>
     
    1516          <span tal:content="value/product_id">ID</span></a></td>
    1617      <td tal:content="value/title">TITLE</td>
     18      <td tal:content="value/contract_category_title">CATEGORY</td>
    1719    </tr>
    1820  </tbody>
  • main/waeup.ikoba/trunk/src/waeup/ikoba/products/product.py

    r12195 r12334  
    4646        ]
    4747
     48    @property
     49    def contract_category_title(self):
     50        cc_dict = getUtility(IIkobaUtils).CON_CATS_DICT
     51        return cc_dict[self.contract_category]
     52
    4853Product = attrs_to_fields(Product)
    4954
Note: See TracChangeset for help on using the changeset viewer.