Changeset 64 in bookmarks for trunk/BookmarkController.pm


Ignore:
Timestamp:
09/10/13 16:54:01 (11 years ago)
Author:
peter
Message:
  • provide wayback machine links to the bookmarked URI at the ctime and mtime
  • assemble the created/updated line in the template instead of the controller
  • made the bookmark title into an h1 heading on the view/edit page
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BookmarkController.pm

    r63 r64  
    337337        } else { 
    338338            # display the bookmark form for this bookmark 
     339            # TODO: these should probably be methods on the Bookmark class 
    339340            $bookmark->{exists} = 1; 
    340             $bookmark->{created} = "Created " . localtime($bookmark->ctime); 
    341             $bookmark->{created} .= '; Updated ' . localtime($bookmark->mtime) unless $bookmark->ctime == $bookmark->mtime; 
     341            $bookmark->{created} = localtime($bookmark->ctime); 
     342            $bookmark->{updated} = localtime($bookmark->mtime); 
     343            ($bookmark->{created_iso} = time2isoz($bookmark->ctime)) =~ s/\D//g; 
     344            ($bookmark->{updated_iso} = time2isoz($bookmark->mtime)) =~ s/\D//g; 
    342345            my $template = Template->new; 
    343346            $template->process( 
Note: See TracChangeset for help on using the changeset viewer.