Use the same 'create new image' block for post/list and oekaki pages
This commit is contained in:
parent
7391dcf0b6
commit
951da261e8
@ -13,6 +13,7 @@ class Oekaki extends Extension {
|
|||||||
if($user->can("create_image")) {
|
if($user->can("create_image")) {
|
||||||
if($event->get_arg(0) == "create") {
|
if($event->get_arg(0) == "create") {
|
||||||
$this->theme->display_page();
|
$this->theme->display_page();
|
||||||
|
$this->theme->display_block();
|
||||||
}
|
}
|
||||||
if($event->get_arg(0) == "claim") {
|
if($event->get_arg(0) == "claim") {
|
||||||
// FIXME: move .chi to data/oekaki/$ha/$hash mirroring images and thumbs
|
// FIXME: move .chi to data/oekaki/$ha/$hash mirroring images and thumbs
|
||||||
@ -79,9 +80,9 @@ class Oekaki extends Extension {
|
|||||||
|
|
||||||
// FIXME: "edit this image" button on existing images?
|
// FIXME: "edit this image" button on existing images?
|
||||||
function onPostListBuilding(PostListBuildingEvent $event) {
|
function onPostListBuilding(PostListBuildingEvent $event) {
|
||||||
global $user, $page;
|
global $user;
|
||||||
if($user->can("create_image")) {
|
if($user->can("create_image")) {
|
||||||
$this->theme->display_block($page);
|
$this->theme->display_block();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,22 +36,6 @@ class OekakiTheme extends Themelet {
|
|||||||
$page->set_heading("Oekaki");
|
$page->set_heading("Oekaki");
|
||||||
$page->add_block(new NavBlock());
|
$page->add_block(new NavBlock());
|
||||||
$page->add_block(new Block("Oekaki", $html, "main", 20));
|
$page->add_block(new Block("Oekaki", $html, "main", 20));
|
||||||
$page->add_block(new Block(null,
|
|
||||||
"
|
|
||||||
Change canvas size.
|
|
||||||
<br>
|
|
||||||
<form form enctype='multipart/form-data' action='".make_link("oekaki/create")."' method='POST'>
|
|
||||||
<div style='display: inline; margin: 0; width: auto;'>
|
|
||||||
<input autocomplete='off' style='display: inline; margin: 0; width: auto;font-size: 90%' name='oekW' type='text' size='3' value='".$oekW."'/>
|
|
||||||
x
|
|
||||||
<input autocomplete='off' style='display: inline; margin: 0; width: auto;font-size: 90%' name='oekH' type='text' size='3' value='".$oekH."'/>
|
|
||||||
<input autocomplete='off' style='display: inline; margin: 0; width: auto;font-size: 90%' type='submit' value='Go!' />
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
<br>
|
|
||||||
<b>WARNING: Resets canvas!</b>
|
|
||||||
"
|
|
||||||
, "left", 21)); // upload is 20
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_block() {
|
public function display_block() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user