fix tag editing with danbooru theme, hopefully in a more permanant way
git-svn-id: file:///home/shish/svn/shimmie2/trunk@721 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
parent
04fe9ad03a
commit
c7c33a1a8d
@ -77,12 +77,17 @@ class ViewTheme extends Themelet {
|
|||||||
$html .= " (<a href='http://$h_source'>source</a>)";
|
$html .= " (<a href='http://$h_source'>source</a>)";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$html .= " (<a href=\"javascript: toggle('imgdata')\">edit info</a>)";
|
|
||||||
|
|
||||||
|
$html .= $this->build_image_editor($image, $editor_parts);
|
||||||
|
|
||||||
|
return $html;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function build_image_editor($image, $editor_parts) {
|
||||||
if(isset($_GET['search'])) {$h_query = "search=".url_escape($_GET['search']);}
|
if(isset($_GET['search'])) {$h_query = "search=".url_escape($_GET['search']);}
|
||||||
else {$h_query = "";}
|
else {$h_query = "";}
|
||||||
|
|
||||||
|
$html = " (<a href=\"javascript: toggle('imgdata')\">edit info</a>)";
|
||||||
$html .= "
|
$html .= "
|
||||||
<div id='imgdata'>
|
<div id='imgdata'>
|
||||||
<form action='".make_link("post/set")."' method='POST'>
|
<form action='".make_link("post/set")."' method='POST'>
|
||||||
|
@ -14,7 +14,7 @@ class CustomViewTheme extends ViewTheme {
|
|||||||
|
|
||||||
var $pin = null;
|
var $pin = null;
|
||||||
|
|
||||||
protected function build_info($image) {
|
protected function build_info($image, $editor_parts) {
|
||||||
global $user;
|
global $user;
|
||||||
$owner = $image->get_owner();
|
$owner = $image->get_owner();
|
||||||
$h_owner = html_escape($owner->name);
|
$h_owner = html_escape($owner->name);
|
||||||
@ -36,30 +36,7 @@ class CustomViewTheme extends ViewTheme {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
global $config;
|
$html .= $this->build_image_editor($image, $editor_parts);
|
||||||
global $user;
|
|
||||||
if($config->get_bool("tag_edit_anon") || ($user->id != $config->get_int("anon_id"))) {
|
|
||||||
$html .= " (<a href=\"javascript: toggle('imgdata')\">edit</a>)";
|
|
||||||
|
|
||||||
if(isset($_GET['search'])) {$h_query = "search=".url_escape($_GET['search']);}
|
|
||||||
else {$h_query = "";}
|
|
||||||
|
|
||||||
$h_tags = html_escape($image->get_tag_list());
|
|
||||||
$i_image_id = int_escape($image->id);
|
|
||||||
|
|
||||||
$html .= "
|
|
||||||
<div id='imgdata'><form action='".make_link("tag_edit/set")."' method='POST'>
|
|
||||||
<input type='hidden' name='image_id' value='$i_image_id'>
|
|
||||||
<input type='hidden' name='query' value='$h_query'>
|
|
||||||
<table style='width: 500px;'>
|
|
||||||
<tr><td width='50px'>Tags</td><td width='300px'><input type='text' name='tags' value='$h_tags'></td></tr>
|
|
||||||
<tr><td>Source</td><td><input type='text' name='source' value='$h_source'></td></tr>
|
|
||||||
<tr><td> </td><td><input type='submit' value='Set'></td></tr>
|
|
||||||
</table>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
";
|
|
||||||
}
|
|
||||||
|
|
||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user