diff --git a/contrib/tag_history/main.php b/contrib/tag_history/main.php index db0b1b34..81e92493 100644 --- a/contrib/tag_history/main.php +++ b/contrib/tag_history/main.php @@ -77,10 +77,12 @@ class Tag_History extends Extension { } } - public function onDisplayingImage(DisplayingImageEvent $event) { - global $page; - // handle displaying a link on the view page - $this->theme->display_history_link($page, $event->image->id); + public function onImageAdminBlockBuilding(ImageAdminBlockBuildingEvent $event) { + $event->add_part(" +
+ +
+ ", 20); } public function onSetupBuilding(SetupBuildingEvent $event) { diff --git a/contrib/tag_history/test.php b/contrib/tag_history/test.php index 17a599e1..5ca06e44 100644 --- a/contrib/tag_history/test.php +++ b/contrib/tag_history/test.php @@ -8,7 +8,7 @@ class TagHistoryTest extends ShimmieWebTestCase { $this->set_field("tag_edit__tags", "new"); $this->click("Set"); $this->assert_title("Image $image_id: new"); - $this->click("Tag History"); + $this->click("View Tag History"); $this->assert_text("new (Set by demo"); $this->click("Revert To"); $this->assert_title("Image $image_id: pbx"); diff --git a/contrib/tag_history/theme.php b/contrib/tag_history/theme.php index 126ca2a1..5e3b050a 100644 --- a/contrib/tag_history/theme.php +++ b/contrib/tag_history/theme.php @@ -97,11 +97,6 @@ class Tag_HistoryTheme extends Themelet { $page->add_block(new Block("Navigation", $nav, "left")); } - public function display_history_link(Page $page, /*int*/ $image_id) { - $link = 'Tag History'; - $page->add_block(new Block(null, $link, "main", 5)); - } - /* * Add a section to the admin page. */