changeset 572:1caaefd76375

0.6dev: Don't provide option to enable a build configuration without a recipe. Closes #168.
author osimons
date Sun, 05 Jul 2009 12:10:56 +0000
parents bed75f6c3e57
children 1e9ec4fa31ef
files bitten/admin.py bitten/templates/bitten_admin_configs.html
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/bitten/admin.py
+++ b/bitten/admin.py
@@ -202,6 +202,7 @@
                     'active': config.active, 'path': config.path,
                     'min_rev': config.min_rev, 'max_rev': config.max_rev,
                     'href': req.href.admin('bitten', 'configs', config.name),
+                    'recipe': config.recipe and True or False
                 })
             data['configs'] = configs
 
--- a/bitten/templates/bitten_admin_configs.html
+++ b/bitten/templates/bitten_admin_configs.html
@@ -227,10 +227,12 @@
           </td>
           <td class="path"><code>$config.path</code></td>
           <td class="active">
-            <input type="checkbox" name="active"
+            <input py:if="config.recipe"
+                   type="checkbox" name="active"
                    value="$config.name"
                    checked="${config.active and 'checked'
                               or None}" />
+            ${config.recipe == False and 'No recipe' or ''}
           </td>
         </tr>
       </tbody></table>
Copyright (C) 2012-2017 Edgewall Software