- print '<span>';
- print $title;
- if ($versions and $User->admin("edit $Page$Args")) {
- printf(' (%s)', implode(', ', array_map(
- function ($format, $url) {
- return sprintf('<a href="/%s">%s</a>', $url, $format);
- },
- array_keys($versions), $versions)
- ));
+ $time = 0;
+ }
+
+ foreach ($rows as $title => $versions) {
+ $subtime = ($mindate - strtotime($title)) / $year * $scale - $time;
+ printf('<li style="left:%.1fem">', $subtime);
+ if ($url = @$versions['']) {
+ printf('<a href="/%s">%s</a>', $url, $title);
+ }
+ else {
+ print '<span>';
+ print $title;
+ if ($versions and $User->admin("edit {$Page->link}")) {
+ printf(' (%s)', implode(', ', array_map(
+ function ($format, $url) {
+ return sprintf('<a href="/%s">%s</a>', $url, $format);
+ },
+ array_keys($versions), $versions
+ )));
+ }
+ print '</span>';