functions

This commit is contained in:
Shish
2023-12-14 22:31:53 +00:00
parent 98a199645a
commit c5e96a7202

View File

@@ -21,26 +21,26 @@ class CustomTagEditTheme extends TagEditTheme
$page->add_block(new Block("Mass Tag Edit", $html)); $page->add_block(new Block("Mass Tag Edit", $html));
} }
public function get_tag_editor_html(Image $image): string public function get_tag_editor_html(Image $image): \MicroHTML\HTMLElement
{ {
$h_tags = html_escape($image->get_tag_list()); $h_tags = html_escape($image->get_tag_list());
return " return \MicroHTML\rawHTML("
<tr> <tr>
<th width='50px'><a href='".make_link("tag_history/{$image->id}")."'>Tags</a></th> <th width='50px'><a href='".make_link("tag_history/{$image->id}")."'>Tags</a></th>
<td> <td>
<input type='text' name='tag_edit__tags' value='$h_tags'> <input type='text' name='tag_edit__tags' value='$h_tags'>
</td> </td>
</tr> </tr>
"; ");
} }
public function get_source_editor_html(Image $image): string public function get_source_editor_html(Image $image): \MicroHTML\HTMLElement
{ {
global $user; global $user;
$h_source = html_escape($image->get_source()); $h_source = html_escape($image->get_source());
$f_source = $this->format_source($image->get_source()); $f_source = $this->format_source($image->get_source());
$style = "overflow: hidden; white-space: nowrap; max-width: 350px; text-overflow: ellipsis;"; $style = "overflow: hidden; white-space: nowrap; max-width: 350px; text-overflow: ellipsis;";
return " return \MicroHTML\rawHTML("
<tr> <tr>
<th><a href='".make_link("source_history/{$image->id}")."'>Source&nbsp;Link</a></th> <th><a href='".make_link("source_history/{$image->id}")."'>Source&nbsp;Link</a></th>
<td> <td>
@@ -52,6 +52,6 @@ class CustomTagEditTheme extends TagEditTheme
")." ")."
</td> </td>
</tr> </tr>
"; ");
} }
} }