Author: matevz Date: Thu Aug 22 11:39:11 2013 New Revision: 1516421 URL: http://svn.apache.org/r1516421 Log: #637 - Ticket product menu should display Product name rather than Product prefix
Modified: bloodhound/trunk/bloodhound_theme/bhtheme/templates/bloodhound_theme.html bloodhound/trunk/bloodhound_theme/bhtheme/theme.py Modified: bloodhound/trunk/bloodhound_theme/bhtheme/templates/bloodhound_theme.html URL: http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bloodhound_theme.html?rev=1516421&r1=1516420&r2=1516421&view=diff ============================================================================== --- bloodhound/trunk/bloodhound_theme/bhtheme/templates/bloodhound_theme.html (original) +++ bloodhound/trunk/bloodhound_theme/bhtheme/templates/bloodhound_theme.html Thu Aug 22 11:39:11 2013 @@ -118,10 +118,11 @@ <select id="field-${field.name}" name="field_${field.name}" class="input-block-level" data-empty="true" data-field="${field.name}"> <option py:if="field.optional"></option> - <option py:for="option in field.options" + <option py:for="idx,option in enumerate(field.options)" + py:with="description = field.options_desc[idx] if field.options_desc else option" selected="${field.value == option or None}" value = "$option" - py:content="option"></option> + py:content="description"></option> <optgroup py:for="optgroup in field.optgroups" py:if="optgroup.options" label="${optgroup.label}"> Modified: bloodhound/trunk/bloodhound_theme/bhtheme/theme.py URL: http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_theme/bhtheme/theme.py?rev=1516421&r1=1516420&r2=1516421&view=diff ============================================================================== --- bloodhound/trunk/bloodhound_theme/bhtheme/theme.py (original) +++ bloodhound/trunk/bloodhound_theme/bhtheme/theme.py Thu Aug 22 11:39:11 2013 @@ -494,7 +494,10 @@ class QuickCreateTicketDialog(Component) product_field['value'] = product_field['options'][0] else: product_field['value'] = default_prefix - + product_field['options_desc'] = [ + ProductEnvironment.lookup_env(self.env, p).product.name + for p in product_field['options'] + ] data['qct'] = { 'fields': [all_fields[k] for k in self.qct_fields if k in all_fields],