This repository has been archived on 2024-09-05. You can view files and clone it, but cannot push or open issues or pull requests.
shimmie2/ext/rotate/theme.php

32 lines
835 B
PHP
Raw Normal View History

2012-08-18 20:10:35 +00:00
<?php
class RotateImageTheme extends Themelet
{
/**
* Display a link to rotate an image.
*/
public function get_rotate_html(int $image_id): string
{
$html = "
2012-08-18 20:12:44 +00:00
".make_form(make_link('rotate/'.$image_id), 'POST')."
<input type='hidden' name='image_id' value='$image_id'>
<input id='rotate_deg' name='rotate_deg' type='number' placeholder='Rotation degrees'>
2012-08-18 20:12:44 +00:00
<input id='rotatebutton' type='submit' value='Rotate'>
2012-08-18 20:10:35 +00:00
</form>
";
return $html;
}
2014-04-28 06:56:58 +00:00
/**
* Display the error.
*/
public function display_rotate_error(Page $page, string $title, string $message)
{
$page->set_title("Rotate Image");
$page->set_heading("Rotate Image");
$page->add_block(new NavBlock());
$page->add_block(new Block($title, $message));
}
2012-08-18 20:10:35 +00:00
}