fixed template path ordering so i.e. /tablename/list is used before /list when provided with a tablename
fixed template path with array refs
fix to template being reset from path in plain templates (i.e. where no model), may affect those relying on the bug ( bug 23722 )
+ added search_columns method to base cdbi model class, provides display_columns unless over-ridden
2.11 Mon 31 July 2006
}
# less frequent path - perhaps output has been set to an error message
- return OK if $self->output;
+ if ($self->output) {
+ $self->{content_type} ||= $self->__get_mime_type();
+ $self->{document_encoding} ||= "utf-8";
+ return OK;
+ }
# normal path - no output has been generated yet
my $processed_view_ok = $self->__call_process_view;
my ($self) = @_;
# It's just a plain template
+ $self->build_form_elements(0);
$self->model_class(undef);
unless ($self->template) {
}
}
+=head2 search_columns
+
+ $class->search_columns;
+
+Returns a list of columns suitable for searching - used in factory templates, over-ridden in
+classes. Provides same list as display_columns unless over-ridden.
+
+=cut
+
+sub search_columns {
+ my $class = shift;
+ return $class->display_columns;
+}
+
+
=head2 related_meta
$class->related_meta($col);
if (ref $errors) {
# pass errors to template
$r->template_args->{errors} = $errors;
- foreach my $error (keys %$errors) {
- $r->template_args->{errors}{ucfirst($error)} = $errors->{$error}
- }
-
# Set it up as it was:
$r->template_args->{cgi_params} = $r->params;
$r->template("edit");