[jifty-devel] label-text patch for ModelBuilder in virtual-models branch

Jesse Vincent jesse at bestpractical.com
Thu Feb 22 13:46:40 EST 2007




On Wed, Feb 21, 2007 at 07:32:22PM -0500, Edgar Whipple wrote:
> The attached patch modifies the template fragments for the ModelBuilder
> plugin in the virtual-models branch of Jifty. It corrects the column
> name 'label' to 'label_text'. With this patch in place, ModelBuilder can
> correctly set, save, and retrieve column labels.
> 
> The patch is made from the root of the virtual-models branch. If theres
> a better starting point for patches posted for review, please let me
> know.
> 
> The patch is short and simple, but I'd appreciate feedback before I (try
> to) commit it.
> 


Please do try to commit it ;)

The change in column name was due to a DB limit on columns called
"label". Sorry I missed this code in the fix.

Thanks!

> -Edgar

> === plugins/ModelBuilder/share/web/templates/__jifty/builder/model/fragments/column/new
> ==================================================================
> --- plugins/ModelBuilder/share/web/templates/__jifty/builder/model/fragments/column/new	(revision 2616)
> +++ plugins/ModelBuilder/share/web/templates/__jifty/builder/model/fragments/column/new	(local)
> @@ -6,7 +6,7 @@
>  <% $create->hidden( model_class => $model_class ) %>
>  
>  <% $create->form_field('name') %>
> -<% $create->form_field('label') %>
> +<% $create->form_field('label_text') %>
>  <% $create->form_field('storage_type', mandatory => 1) %>
>  <% $create->form_field('default_value') %>
>  <% $create->form_field('mandatory') %>
> === plugins/ModelBuilder/share/web/templates/__jifty/builder/model/fragments/column/update
> ==================================================================
> --- plugins/ModelBuilder/share/web/templates/__jifty/builder/model/fragments/column/update	(revision 2616)
> +++ plugins/ModelBuilder/share/web/templates/__jifty/builder/model/fragments/column/update	(local)
> @@ -22,7 +22,7 @@
>  %# XXX See ./new for comments on field order.
>  
>  <% $update->form_field('name') %>
> -<% $update->form_field('label') %>
> +<% $update->form_field('label_text') %>
>  <% $update->form_field('storage_type', mandatory => 1) %>
>  <% $update->form_field('default_value') %>
>  <% $update->form_field('mandatory') %>
> === plugins/ModelBuilder/share/web/templates/__jifty/builder/model/fragments/column/view
> ==================================================================
> --- plugins/ModelBuilder/share/web/templates/__jifty/builder/model/fragments/column/view	(revision 2616)
> +++ plugins/ModelBuilder/share/web/templates/__jifty/builder/model/fragments/column/view	(local)
> @@ -20,7 +20,7 @@
>  <% $delete->hidden( id => $id ) %>
>  
>  <% $update->form_value('name') %>
> -<% $update->form_value('label') %>
> +<% $update->form_value('label_text') %>
>  <% $update->form_value('storage_type') %>
>  <hr/>
>  </div>

> _______________________________________________
> jifty-devel mailing list
> jifty-devel at lists.jifty.org
> http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel


-- 


More information about the jifty-devel mailing list