Changeset 11653 for trunk


Ignore:
Timestamp:
2006-04-19T13:23:41+12:00 (18 years ago)
Author:
kjdon
Message:

added a new opiton for DateList: no_special_formatting, which makes greenstone think its not a datelist and so it doens't display the year and month info in the vlist

Location:
trunk/gsdl/perllib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/classify/DateList.pm

    r11540 r11653  
    7171    'desc' => "{DateList.nogroup}",
    7272    'type' => "flag",
     73    'reqd' => "no" },
     74      { 'name' => "no_special_formatting",
     75    'desc' => "{DateList.no_special_formatting}",
     76    'type' => "flag",
    7377    'reqd' => "no" }
     78     
    7479      ];
    7580
     
    108113    $self->{'buttonname'} = $self->generate_title_from_metadata($self->{'metadata'}) unless ($self->{'buttonname'});
    109114
     115    $self->{'childtype'} = "DateList";
     116    if ($self->{'no_special_formatting'}) {
     117    $self->{'childtype'} = "VList";
     118    }
     119   
    110120    return bless $self, $class;
    111121}
     
    194204
    195205    if (scalar (@$classlistref) <= 39 &&
    196     !$self->{'nogroup'}) {$childtype = "DateList";}
     206    !$self->{'nogroup'}) {$childtype = $self->{'childtype'};}
    197207
    198208    my $classifyinfo = $self->get_entry ($self->{'buttonname'}, $childtype, "Invisible");
     
    253263              $monthname="_textmonth" . $monthname . "_";
    254264              }
    255               my $monthclassify=$self->get_entry($monthname, "DateList");
     265              my $monthclassify=$self->get_entry($monthname, $self->{'childtype'});
    256266              push (@{$yearclassify->{'contains'}}, $monthclassify);
    257267             
     
    275285              $monthname="_textmonth" . $monthname . "_";
    276286              }
    277               my $monthclassify=$self->get_entry($monthname, "DateList");
     287              my $monthclassify=$self->get_entry($monthname, $self->{'childtype'});
    278288              push (@{$yearclassify->{'contains'}}, $monthclassify);
    279289             
     
    311321    if ($self->{'reverse_sort'} && $self->{'nogroup'} ) {
    312322    foreach my $subclass (reverse sort keys %$classhash) {
    313         my $tempclassify = $self->get_entry($subclass, "DateList");
     323        my $tempclassify = $self->get_entry($subclass, $self->{'childtype'});
    314324        foreach my $subsubOID (@{$classhash->{$subclass}}) {
    315325        push (@{$tempclassify->{'contains'}}, {'OID'=>$subsubOID});
     
    320330    else{
    321331    foreach my $subclass (sort keys %$classhash) {
    322         my $tempclassify = $self->get_entry($subclass, "DateList");
     332        my $tempclassify = $self->get_entry($subclass, $self->{'childtype'});
    323333        foreach my $subsubOID (@{$classhash->{$subclass}}) {
    324334        push (@{$tempclassify->{'contains'}}, {'OID'=>$subsubOID});
  • trunk/gsdl/perllib/strings.properties

    r11633 r11653  
    438438DateList.nogroup:Make each year an individual entry in the horizontal list, instead of spanning years with few entries. (This can also be used with the -bymonth option to make each month a separate entry instead of merging).
    439439
     440DateList.no_special_formatting:Don't display Year and Month information in the document list.
     441
    440442DateList.sort:An extra metadata field to sort by in the case where two documents have the same date.
    441443
Note: See TracChangeset for help on using the changeset viewer.