smaller gap between image controls
This commit is contained in:
parent
dbb8bb8280
commit
46d11a0be5
6 changed files with 22 additions and 14 deletions
|
@ -4,7 +4,7 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shimmie2;
|
namespace Shimmie2;
|
||||||
|
|
||||||
use function MicroHTML\{INPUT, SPAN};
|
use function MicroHTML\{INPUT, emptyHTML};
|
||||||
|
|
||||||
class ImageIOTheme extends Themelet
|
class ImageIOTheme extends Themelet
|
||||||
{
|
{
|
||||||
|
@ -14,13 +14,11 @@ class ImageIOTheme extends Themelet
|
||||||
*/
|
*/
|
||||||
public function get_deleter_html(int $image_id): \MicroHTML\HTMLElement
|
public function get_deleter_html(int $image_id): \MicroHTML\HTMLElement
|
||||||
{
|
{
|
||||||
return SPAN(
|
$form = SHM_FORM("image/delete", form_id: "image_delete_form");
|
||||||
["id"=>"image_delete_form"],
|
$form->appendChild(emptyHTML(
|
||||||
SHM_SIMPLE_FORM(
|
INPUT(["type" => 'hidden', "name" => 'image_id', "value" => $image_id]),
|
||||||
"image/delete",
|
INPUT(["type" => 'submit', "value" => 'Delete', "onclick" => 'return confirm("Delete the image?");', "id" => "image_delete_button"]),
|
||||||
INPUT(["type" => 'hidden', "name" => 'image_id', "value" => $image_id]),
|
));
|
||||||
INPUT(["type" => 'submit', "value" => 'Delete', "onclick" => 'return confirm("Delete the image?");', "id" => "image_delete_button"]),
|
return $form;
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,3 +3,6 @@
|
||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
|
#reportedimage .formstretch INPUT {
|
||||||
|
width: 100%;
|
||||||
|
}
|
|
@ -23,19 +23,19 @@ class ReportImageTheme extends Themelet
|
||||||
|
|
||||||
$iabbe = send_event(new ImageAdminBlockBuildingEvent($image, $user, "report"));
|
$iabbe = send_event(new ImageAdminBlockBuildingEvent($image, $user, "report"));
|
||||||
ksort($iabbe->parts);
|
ksort($iabbe->parts);
|
||||||
$actions = join("<br>", $iabbe->parts);
|
$actions = join("", $iabbe->parts);
|
||||||
|
|
||||||
$h_reportedimages .= "
|
$h_reportedimages .= "
|
||||||
<tr>
|
<tr>
|
||||||
<td>{$image_link}</td>
|
<td>{$image_link}</td>
|
||||||
<td class='reason'>Report by $userlink: $h_reason</td>
|
<td class='reason'>Report by $userlink: $h_reason</td>
|
||||||
<td class='formstretch'>
|
<td class='formstretch post_controls'>
|
||||||
".make_form(make_link("image_report/remove"))."
|
".make_form(make_link("image_report/remove"))."
|
||||||
<input type='hidden' name='id' value='{$report['id']}'>
|
<input type='hidden' name='id' value='{$report['id']}'>
|
||||||
<input type='submit' value='Remove Report'>
|
<input type='submit' value='Remove Report'>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<br>$actions
|
$actions
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
";
|
";
|
||||||
|
|
|
@ -55,6 +55,6 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||||
updateAttr("LINK#nextlink", "href", query);
|
updateAttr("LINK#nextlink", "href", query);
|
||||||
updateAttr("A#prevlink", "href", query);
|
updateAttr("A#prevlink", "href", query);
|
||||||
updateAttr("A#nextlink", "href", query);
|
updateAttr("A#nextlink", "href", query);
|
||||||
updateAttr("span#image_delete_form form", "action", query);
|
updateAttr("form#image_delete_form", "action", query);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -21,3 +21,10 @@ TABLE.form.image_info {
|
||||||
min-width: 100%;
|
min-width: 100%;
|
||||||
min-height: 3rem;
|
min-height: 3rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.post_controls FORM {
|
||||||
|
margin-bottom: 0.75em;
|
||||||
|
}
|
||||||
|
.post_controls FORM:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
|
@ -47,7 +47,7 @@ class ViewPostTheme extends Themelet
|
||||||
public function display_admin_block(Page $page, array $parts): void
|
public function display_admin_block(Page $page, array $parts): void
|
||||||
{
|
{
|
||||||
if (count($parts) > 0) {
|
if (count($parts) > 0) {
|
||||||
$page->add_block(new Block("Post Controls", DIV(["class"=>"post_controls"], joinHTML(BR(), $parts)), "left", 50));
|
$page->add_block(new Block("Post Controls", DIV(["class"=>"post_controls"], joinHTML("", $parts)), "left", 50));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue