EnsEMBL::Web::Component::Interface List
Included librariesPackage variablesGeneral documentationMethods
Toolbar
WebCvsRaw content
Package variables
No package variables defined.
Included modules
EnsEMBL::Web::Document::SpreadSheet
EnsEMBL::Web::Form
Inherit
EnsEMBL::Web::Component::Interface
Synopsis
No synopsis!
Description
No description!
Methods
_init
No description
Code
caption
No description
Code
content
No description
Code
Methods description
None available.
Methods code
_initdescriptionprevnextTop
sub _init {
  my $self = shift;
  $self->cacheable( 0 );
  $self->ajaxable(  0 );
}
captiondescriptionprevnextTop
sub caption {
  my $self = shift;
  return $self->object->interface->caption('list') || 'All Records';
}
contentdescriptionprevnextTop
sub content {
  my $self = shift;
  my $object = $self->object;
  my $object_type = $ENV{'ENSEMBL_TYPE'};
  my $columns = $object->interface->option_columns || $object->interface->element_order;
  my @records;
  if ($object_type eq 'Help') {
    @records = $object->interface->record_list;
  }
  else {
    @records = sort {$a->team cmp $b->team}
          $object->interface->data->search('release_id' => $object->species_defs->ENSEMBL_VERSION);
  }

  my $table = new EnsEMBL::Web::Document::SpreadSheet( [], [], {'margin' => '0px'} );
  my $width = int(95/scalar(@$columns));
my $edit_image = '<img src="/i/edit.gif" alt="[Edit]" title="Edit this record" />'; $table->add_columns({ 'key' => 'edit_link', 'title' => 'Edit', 'width' => '5%', 'align' => 'left' }); foreach my $column (@$columns) { $table->add_columns({ 'key' => $column, 'title' => ucfirst($column), 'width' => $width.'%', 'align' => 'left' }); } foreach my $record (@records) { my $id = $record->id; my $url = "/$object_type/"; if ($object_type eq 'Help') { $url .= ucfirst($record->type); } else { $url .= $ENV{'ENSEMBL_ACTION'}; } my $row = {'edit_link' => qq(<a href="$url/Edit?id=$id" class="modal_link">$edit_image</a>)}; foreach my $column (@$columns) { $row->{$column} = $record->$column || '&nbsp;'; } $table->add_row($row); } return $table->render; } 1;
}
General documentation
No general documentation available.