diff --git a/themes/rule34v2/tag_edit.theme.php b/themes/rule34v2/tag_edit.theme.php
index 8994ceb4..5c9b1a38 100644
--- a/themes/rule34v2/tag_edit.theme.php
+++ b/themes/rule34v2/tag_edit.theme.php
@@ -4,6 +4,10 @@ declare(strict_types=1);
namespace Shimmie2;
+use MicroHTML\HTMLElement;
+
+use function MicroHTML\{TR, TH, TD, emptyHTML, rawHTML, joinHTML, DIV, INPUT, A};
+
class CustomTagEditTheme extends TagEditTheme
{
public function display_mass_editor()
@@ -54,4 +58,45 @@ class CustomTagEditTheme extends TagEditTheme
");
}
+
+ public function get_user_editor_html(Image $image): HTMLElement
+ {
+ global $user;
+ $owner = $image->get_owner()->name;
+ $date = rawHTML(autodate($image->posted));
+ $ip = $user->can(Permissions::VIEW_IP) ? rawHTML(" (" . show_ip($image->owner_ip, "Post posted {$image->posted}") . ")") : "";
+ $info = SHM_POST_INFO(
+ "Uploader",
+ $user->can(Permissions::EDIT_IMAGE_OWNER),
+ emptyHTML(
+ A(["class" => "username", "href" => make_link("user/$owner")], $owner),
+ $ip,
+ ", ",
+ $date,
+ INPUT(["type" => "text", "name" => "tag_edit__owner", "value" => $owner])
+ ),
+ );
+ // SHM_POST_INFO returns a TR, let's sneakily append
+ // a TD with the avatar in it
+ $info->appendChild(
+ TD(
+ ["width" => "80px", "rowspan" => "4"],
+ rawHTML($image->get_owner()->get_avatar_html())
+ )
+ );
+ return $info;
+ }
+
+ public function get_lock_editor_html(Image $image): HTMLElement
+ {
+ global $user;
+ return SHM_POST_INFO(
+ "Locked",
+ $user->can(Permissions::EDIT_IMAGE_LOCK),
+ emptyHTML(
+ INPUT(["type" => "checkbox", "name" => "tag_edit__locked", "checked" => $image->is_locked()]),
+ $image->is_locked() ? "Yes (Only admins may edit these details)" : "No",
+ ),
+ );
+ }
}
diff --git a/themes/rule34v2/view.theme.php b/themes/rule34v2/view.theme.php
new file mode 100644
index 00000000..cf848c2d
--- /dev/null
+++ b/themes/rule34v2/view.theme.php
@@ -0,0 +1,44 @@
+is_locked() ? "
[Post Locked]" : "");
+ }
+
+ $html = make_form(make_link("post/set"))."
+
+
+ + |