make_link for numeric score votes, and put in theme.php, fixes issue #50

This commit is contained in:
Shish 2011-11-08 11:23:38 +00:00
parent a89c5943d8
commit c6682b9069
2 changed files with 2 additions and 3 deletions

View File

@ -35,9 +35,6 @@ class NumericScore implements Extension {
if($event instanceof DisplayingImageEvent) { if($event instanceof DisplayingImageEvent) {
if(!$user->is_anonymous()) { if(!$user->is_anonymous()) {
$html = $this->theme->get_voter_html($event->image); $html = $this->theme->get_voter_html($event->image);
if($user->is_admin()) {
$html .= "<p><a href='/numeric_score_votes/{$event->image->id}'>See All Votes</a>";
}
$page->add_block(new Block("Image Score", $html, "left", 20)); $page->add_block(new Block("Image Score", $html, "left", 20));
} }
} }

View File

@ -37,6 +37,8 @@ class NumericScoreTheme extends Themelet {
<input type='hidden' name='image_id' value='$i_image_id'> <input type='hidden' name='image_id' value='$i_image_id'>
<input type='submit' value='Remove All Votes'> <input type='submit' value='Remove All Votes'>
</form> </form>
<p><a href='".make_link("numeric_score_votes/$i_image_id")."'>See All Votes</a>
"; ";
} }
return $html; return $html;